Fix Dackka/Metalava errors in test_utils module
This involves reducing the visibility of methods/constructors that are already unusable outside the `androidx.media3.test.utils` package. #minor-release PiperOrigin-RevId: 487473005
This commit is contained in:
parent
1cd488ac9a
commit
ca8de0e49b
@ -64,6 +64,18 @@ public abstract class Action {
|
|||||||
this.description = description;
|
this.description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called by {@link #doActionAndScheduleNextImpl(ExoPlayer, DefaultTrackSelector, Surface,
|
||||||
|
* HandlerWrapper, ActionNode)} to perform the action.
|
||||||
|
*
|
||||||
|
* @param player The player to which the action should be applied.
|
||||||
|
* @param trackSelector The track selector to which the action should be applied.
|
||||||
|
* @param surface The surface to use when applying actions, or {@code null} if no surface is
|
||||||
|
* needed.
|
||||||
|
*/
|
||||||
|
protected abstract void doActionImpl(
|
||||||
|
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the action and schedules the next.
|
* Executes the action and schedules the next.
|
||||||
*
|
*
|
||||||
@ -75,7 +87,7 @@ public abstract class Action {
|
|||||||
* @param nextAction The next action to schedule immediately after this action finished, or {@code
|
* @param nextAction The next action to schedule immediately after this action finished, or {@code
|
||||||
* null} if there's no next action.
|
* null} if there's no next action.
|
||||||
*/
|
*/
|
||||||
public final void doActionAndScheduleNext(
|
/* package */ final void doActionAndScheduleNext(
|
||||||
ExoPlayer player,
|
ExoPlayer player,
|
||||||
DefaultTrackSelector trackSelector,
|
DefaultTrackSelector trackSelector,
|
||||||
@Nullable Surface surface,
|
@Nullable Surface surface,
|
||||||
@ -99,7 +111,7 @@ public abstract class Action {
|
|||||||
* @param nextAction The next action to schedule immediately after this action finished, or {@code
|
* @param nextAction The next action to schedule immediately after this action finished, or {@code
|
||||||
* null} if there's no next action.
|
* null} if there's no next action.
|
||||||
*/
|
*/
|
||||||
protected void doActionAndScheduleNextImpl(
|
/* package */ void doActionAndScheduleNextImpl(
|
||||||
ExoPlayer player,
|
ExoPlayer player,
|
||||||
DefaultTrackSelector trackSelector,
|
DefaultTrackSelector trackSelector,
|
||||||
@Nullable Surface surface,
|
@Nullable Surface surface,
|
||||||
@ -111,18 +123,6 @@ public abstract class Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Called by {@link #doActionAndScheduleNextImpl(ExoPlayer, DefaultTrackSelector, Surface,
|
|
||||||
* HandlerWrapper, ActionNode)} to perform the action.
|
|
||||||
*
|
|
||||||
* @param player The player to which the action should be applied.
|
|
||||||
* @param trackSelector The track selector to which the action should be applied.
|
|
||||||
* @param surface The surface to use when applying actions, or {@code null} if no surface is
|
|
||||||
* needed.
|
|
||||||
*/
|
|
||||||
protected abstract void doActionImpl(
|
|
||||||
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface);
|
|
||||||
|
|
||||||
/** Calls {@link Player#seekTo(long)} or {@link Player#seekTo(int, long)}. */
|
/** Calls {@link Player#seekTo(long)} or {@link Player#seekTo(int, long)}. */
|
||||||
public static final class Seek extends Action {
|
public static final class Seek extends Action {
|
||||||
|
|
||||||
@ -695,7 +695,13 @@ public abstract class Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doActionAndScheduleNextImpl(
|
protected void doActionImpl(
|
||||||
|
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
||||||
|
// Not triggered.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
/* package */ void doActionAndScheduleNextImpl(
|
||||||
ExoPlayer player,
|
ExoPlayer player,
|
||||||
DefaultTrackSelector trackSelector,
|
DefaultTrackSelector trackSelector,
|
||||||
@Nullable Surface surface,
|
@Nullable Surface surface,
|
||||||
@ -737,12 +743,6 @@ public abstract class Action {
|
|||||||
}
|
}
|
||||||
player.play();
|
player.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void doActionImpl(
|
|
||||||
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
|
||||||
// Not triggered.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Waits for {@link Player.Listener#onTimelineChanged(Timeline, int)}. */
|
/** Waits for {@link Player.Listener#onTimelineChanged(Timeline, int)}. */
|
||||||
@ -783,7 +783,13 @@ public abstract class Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doActionAndScheduleNextImpl(
|
protected void doActionImpl(
|
||||||
|
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
||||||
|
// Not triggered.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
/* package */ void doActionAndScheduleNextImpl(
|
||||||
ExoPlayer player,
|
ExoPlayer player,
|
||||||
DefaultTrackSelector trackSelector,
|
DefaultTrackSelector trackSelector,
|
||||||
@Nullable Surface surface,
|
@Nullable Surface surface,
|
||||||
@ -811,12 +817,6 @@ public abstract class Action {
|
|||||||
nextAction.schedule(player, trackSelector, surface, handler);
|
nextAction.schedule(player, trackSelector, surface, handler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void doActionImpl(
|
|
||||||
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
|
||||||
// Not triggered.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -833,7 +833,13 @@ public abstract class Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doActionAndScheduleNextImpl(
|
protected void doActionImpl(
|
||||||
|
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
||||||
|
// Not triggered.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
/* package */ void doActionAndScheduleNextImpl(
|
||||||
ExoPlayer player,
|
ExoPlayer player,
|
||||||
DefaultTrackSelector trackSelector,
|
DefaultTrackSelector trackSelector,
|
||||||
@Nullable Surface surface,
|
@Nullable Surface surface,
|
||||||
@ -854,12 +860,6 @@ public abstract class Action {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void doActionImpl(
|
|
||||||
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
|
||||||
// Not triggered.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -880,7 +880,13 @@ public abstract class Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doActionAndScheduleNextImpl(
|
protected void doActionImpl(
|
||||||
|
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
||||||
|
// Not triggered.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
/* package */ void doActionAndScheduleNextImpl(
|
||||||
ExoPlayer player,
|
ExoPlayer player,
|
||||||
DefaultTrackSelector trackSelector,
|
DefaultTrackSelector trackSelector,
|
||||||
@Nullable Surface surface,
|
@Nullable Surface surface,
|
||||||
@ -905,12 +911,6 @@ public abstract class Action {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void doActionImpl(
|
|
||||||
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
|
||||||
// Not triggered.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -931,7 +931,13 @@ public abstract class Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doActionAndScheduleNextImpl(
|
protected void doActionImpl(
|
||||||
|
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
||||||
|
// Not triggered.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
/* package */ void doActionAndScheduleNextImpl(
|
||||||
ExoPlayer player,
|
ExoPlayer player,
|
||||||
DefaultTrackSelector trackSelector,
|
DefaultTrackSelector trackSelector,
|
||||||
@Nullable Surface surface,
|
@Nullable Surface surface,
|
||||||
@ -955,12 +961,6 @@ public abstract class Action {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void doActionImpl(
|
|
||||||
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
|
||||||
// Not triggered.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -981,7 +981,13 @@ public abstract class Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doActionAndScheduleNextImpl(
|
protected void doActionImpl(
|
||||||
|
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
||||||
|
// Not triggered.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
/* package */ void doActionAndScheduleNextImpl(
|
||||||
ExoPlayer player,
|
ExoPlayer player,
|
||||||
DefaultTrackSelector trackSelector,
|
DefaultTrackSelector trackSelector,
|
||||||
@Nullable Surface surface,
|
@Nullable Surface surface,
|
||||||
@ -995,12 +1001,6 @@ public abstract class Action {
|
|||||||
|
|
||||||
playerTarget.setCallback(callback);
|
playerTarget.setCallback(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void doActionImpl(
|
|
||||||
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
|
||||||
// Not triggered.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1021,7 +1021,13 @@ public abstract class Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doActionAndScheduleNextImpl(
|
protected void doActionImpl(
|
||||||
|
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
||||||
|
// Not triggered.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
/* package */ void doActionAndScheduleNextImpl(
|
||||||
ExoPlayer player,
|
ExoPlayer player,
|
||||||
DefaultTrackSelector trackSelector,
|
DefaultTrackSelector trackSelector,
|
||||||
@Nullable Surface surface,
|
@Nullable Surface surface,
|
||||||
@ -1045,12 +1051,6 @@ public abstract class Action {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void doActionImpl(
|
|
||||||
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
|
||||||
// Not triggered.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Waits until the player acknowledged all pending player commands. */
|
/** Waits until the player acknowledged all pending player commands. */
|
||||||
@ -1064,7 +1064,13 @@ public abstract class Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doActionAndScheduleNextImpl(
|
protected void doActionImpl(
|
||||||
|
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
||||||
|
// Not triggered.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
/* package */ void doActionAndScheduleNextImpl(
|
||||||
ExoPlayer player,
|
ExoPlayer player,
|
||||||
DefaultTrackSelector trackSelector,
|
DefaultTrackSelector trackSelector,
|
||||||
@Nullable Surface surface,
|
@Nullable Surface surface,
|
||||||
@ -1082,12 +1088,6 @@ public abstract class Action {
|
|||||||
.setLooper(Util.getCurrentOrMainLooper())
|
.setLooper(Util.getCurrentOrMainLooper())
|
||||||
.send();
|
.send();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void doActionImpl(
|
|
||||||
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
|
||||||
// Not triggered.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Calls {@code Runnable.run()}. */
|
/** Calls {@code Runnable.run()}. */
|
||||||
|
@ -827,7 +827,13 @@ public final class ActionSchedule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doActionAndScheduleNextImpl(
|
protected void doActionImpl(
|
||||||
|
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
||||||
|
// Not triggered.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
/* package */ void doActionAndScheduleNextImpl(
|
||||||
ExoPlayer player,
|
ExoPlayer player,
|
||||||
DefaultTrackSelector trackSelector,
|
DefaultTrackSelector trackSelector,
|
||||||
@Nullable Surface surface,
|
@Nullable Surface surface,
|
||||||
@ -839,11 +845,5 @@ public final class ActionSchedule {
|
|||||||
handler.post(callback::onActionScheduleFinished);
|
handler.post(callback::onActionScheduleFinished);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void doActionImpl(
|
|
||||||
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
|
|
||||||
// Not triggered.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -284,7 +284,7 @@ public class FakeClock implements Clock {
|
|||||||
private final int arg2;
|
private final int arg2;
|
||||||
@Nullable private final Object obj;
|
@Nullable private final Object obj;
|
||||||
|
|
||||||
public HandlerMessage(
|
private HandlerMessage(
|
||||||
long timeMs,
|
long timeMs,
|
||||||
ClockHandler handler,
|
ClockHandler handler,
|
||||||
int what,
|
int what,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user