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
(cherry picked from commit 3ab881351e04bcf921f946c8e74e4a0cf5989768)
This commit is contained in:
ibaker 2022-11-10 10:00:48 +00:00 committed by microkatz
parent 65d923c08e
commit ba0466b198
3 changed files with 78 additions and 78 deletions

View File

@ -66,6 +66,18 @@ public abstract class Action {
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.
*
@ -77,7 +89,7 @@ public abstract class Action {
* @param nextAction The next action to schedule immediately after this action finished, or {@code
* null} if there's no next action.
*/
public final void doActionAndScheduleNext(
/* package */ final void doActionAndScheduleNext(
ExoPlayer player,
DefaultTrackSelector trackSelector,
@Nullable Surface surface,
@ -101,7 +113,7 @@ public abstract class Action {
* @param nextAction The next action to schedule immediately after this action finished, or {@code
* null} if there's no next action.
*/
protected void doActionAndScheduleNextImpl(
/* package */ void doActionAndScheduleNextImpl(
ExoPlayer player,
DefaultTrackSelector trackSelector,
@Nullable Surface surface,
@ -113,18 +125,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)}. */
public static final class Seek extends Action {
@ -697,7 +697,13 @@ public abstract class Action {
}
@Override
protected void doActionAndScheduleNextImpl(
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
@Override
/* package */ void doActionAndScheduleNextImpl(
ExoPlayer player,
DefaultTrackSelector trackSelector,
@Nullable Surface surface,
@ -739,12 +745,6 @@ public abstract class Action {
}
player.play();
}
@Override
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
}
/** Waits for {@link Player.Listener#onTimelineChanged(Timeline, int)}. */
@ -785,7 +785,13 @@ public abstract class Action {
}
@Override
protected void doActionAndScheduleNextImpl(
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
@Override
/* package */ void doActionAndScheduleNextImpl(
ExoPlayer player,
DefaultTrackSelector trackSelector,
@Nullable Surface surface,
@ -813,12 +819,6 @@ public abstract class Action {
nextAction.schedule(player, trackSelector, surface, handler);
}
}
@Override
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
}
/**
@ -835,7 +835,13 @@ public abstract class Action {
}
@Override
protected void doActionAndScheduleNextImpl(
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
@Override
/* package */ void doActionAndScheduleNextImpl(
ExoPlayer player,
DefaultTrackSelector trackSelector,
@Nullable Surface surface,
@ -856,12 +862,6 @@ public abstract class Action {
}
});
}
@Override
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
}
/**
@ -882,7 +882,13 @@ public abstract class Action {
}
@Override
protected void doActionAndScheduleNextImpl(
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
@Override
/* package */ void doActionAndScheduleNextImpl(
ExoPlayer player,
DefaultTrackSelector trackSelector,
@Nullable Surface surface,
@ -907,12 +913,6 @@ public abstract class Action {
});
}
}
@Override
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
}
/**
@ -933,7 +933,13 @@ public abstract class Action {
}
@Override
protected void doActionAndScheduleNextImpl(
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
@Override
/* package */ void doActionAndScheduleNextImpl(
ExoPlayer player,
DefaultTrackSelector trackSelector,
@Nullable Surface surface,
@ -957,12 +963,6 @@ public abstract class Action {
});
}
}
@Override
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
}
/**
@ -983,7 +983,13 @@ public abstract class Action {
}
@Override
protected void doActionAndScheduleNextImpl(
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
@Override
/* package */ void doActionAndScheduleNextImpl(
ExoPlayer player,
DefaultTrackSelector trackSelector,
@Nullable Surface surface,
@ -997,12 +1003,6 @@ public abstract class Action {
playerTarget.setCallback(callback);
}
@Override
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
}
/**
@ -1023,7 +1023,13 @@ public abstract class Action {
}
@Override
protected void doActionAndScheduleNextImpl(
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
@Override
/* package */ void doActionAndScheduleNextImpl(
ExoPlayer player,
DefaultTrackSelector trackSelector,
@Nullable Surface surface,
@ -1047,12 +1053,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. */
@ -1066,7 +1066,13 @@ public abstract class Action {
}
@Override
protected void doActionAndScheduleNextImpl(
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
@Override
/* package */ void doActionAndScheduleNextImpl(
ExoPlayer player,
DefaultTrackSelector trackSelector,
@Nullable Surface surface,
@ -1084,12 +1090,6 @@ public abstract class Action {
.setLooper(Util.getCurrentOrMainLooper())
.send();
}
@Override
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
}
/** Calls {@code Runnable.run()}. */

View File

@ -829,7 +829,13 @@ public final class ActionSchedule {
}
@Override
protected void doActionAndScheduleNextImpl(
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
@Override
/* package */ void doActionAndScheduleNextImpl(
ExoPlayer player,
DefaultTrackSelector trackSelector,
@Nullable Surface surface,
@ -841,11 +847,5 @@ public final class ActionSchedule {
handler.post(callback::onActionScheduleFinished);
}
}
@Override
protected void doActionImpl(
ExoPlayer player, DefaultTrackSelector trackSelector, @Nullable Surface surface) {
// Not triggered.
}
}
}

View File

@ -286,7 +286,7 @@ public class FakeClock implements Clock {
private final int arg2;
@Nullable private final Object obj;
public HandlerMessage(
private HandlerMessage(
long timeMs,
ClockHandler handler,
int what,