mirror of
https://github.com/androidx/media.git
synced 2025-05-15 19:49:50 +08:00
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:
parent
65d923c08e
commit
ba0466b198
@ -66,6 +66,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.
|
||||||
*
|
*
|
||||||
@ -77,7 +89,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,
|
||||||
@ -101,7 +113,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,
|
||||||
@ -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)}. */
|
/** 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 {
|
||||||
|
|
||||||
@ -697,7 +697,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,
|
||||||
@ -739,12 +745,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)}. */
|
||||||
@ -785,7 +785,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,
|
||||||
@ -813,12 +819,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.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -835,7 +835,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,
|
||||||
@ -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
|
@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,
|
||||||
@ -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
|
@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,
|
||||||
@ -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
|
@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,
|
||||||
@ -997,12 +1003,6 @@ public abstract class Action {
|
|||||||
|
|
||||||
playerTarget.setCallback(callback);
|
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
|
@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,
|
||||||
@ -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. */
|
/** Waits until the player acknowledged all pending player commands. */
|
||||||
@ -1066,7 +1066,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,
|
||||||
@ -1084,12 +1090,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()}. */
|
||||||
|
@ -829,7 +829,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,
|
||||||
@ -841,11 +847,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.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -286,7 +286,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