Fix Javadoc references to deprecated EventListener

#minor-release

PiperOrigin-RevId: 372919342
This commit is contained in:
olly 2021-05-10 15:02:14 +01:00 committed by Oliver Woodman
parent 01f85394d2
commit 3c64bc1b49
3 changed files with 40 additions and 40 deletions

View File

@ -159,8 +159,8 @@ public interface Player {
* Called when the combined {@link MediaMetadata} changes. * Called when the combined {@link MediaMetadata} changes.
* *
* <p>The provided {@link MediaMetadata} is a combination of the {@link MediaItem#mediaMetadata} * <p>The provided {@link MediaMetadata} is a combination of the {@link MediaItem#mediaMetadata}
* and the static and dynamic metadata sourced from {@link * and the static and dynamic metadata sourced from {@link #onStaticMetadataChanged(List)} and
* EventListener#onStaticMetadataChanged(List)} and {@link MetadataOutput#onMetadata(Metadata)}. * {@link MetadataOutput#onMetadata(Metadata)}.
* *
* <p>{@link #onEvents(Player, Events)} will also be called to report this event along with * <p>{@link #onEvents(Player, Events)} will also be called to report this event along with
* other events that happen in the same {@link Looper} message queue iteration. * other events that happen in the same {@link Looper} message queue iteration.
@ -926,7 +926,7 @@ public interface Player {
int MEDIA_ITEM_TRANSITION_REASON_PLAYLIST_CHANGED = 3; int MEDIA_ITEM_TRANSITION_REASON_PLAYLIST_CHANGED = 3;
/** /**
* Events that can be reported via {@link EventListener#onEvents(Player, Events)}. * Events that can be reported via {@link Listener#onEvents(Player, Events)}.
* *
* <p>One of the {@link Player}{@code .EVENT_*} flags. * <p>One of the {@link Player}{@code .EVENT_*} flags.
*/ */
@ -976,8 +976,8 @@ public interface Player {
/** {@link #getPlayerError()} changed. */ /** {@link #getPlayerError()} changed. */
int EVENT_PLAYER_ERROR = 11; int EVENT_PLAYER_ERROR = 11;
/** /**
* A position discontinuity occurred. See {@link * A position discontinuity occurred. See {@link Listener#onPositionDiscontinuity(PositionInfo,
* EventListener#onPositionDiscontinuity(PositionInfo, PositionInfo, int)}. * PositionInfo, int)}.
*/ */
int EVENT_POSITION_DISCONTINUITY = 12; int EVENT_POSITION_DISCONTINUITY = 12;
/** {@link #getPlaybackParameters()} changed. */ /** {@link #getPlaybackParameters()} changed. */
@ -1088,7 +1088,7 @@ public interface Player {
* the player does not have a {@link Looper}, then the listener will be called on the main thread. * the player does not have a {@link Looper}, then the listener will be called on the main thread.
* *
* @param listener The listener to register. * @param listener The listener to register.
* @deprecated Use {@link #addListener(Listener)} instead. * @deprecated Use {@link #addListener(Listener)} and {@link #removeListener(Listener)} instead.
*/ */
@Deprecated @Deprecated
void addListener(EventListener listener); void addListener(EventListener listener);
@ -1105,7 +1105,7 @@ public interface Player {
* no longer receive events from the player. * no longer receive events from the player.
* *
* @param listener The listener to unregister. * @param listener The listener to unregister.
* @deprecated Use {@link #addListener(Listener)} instead. * @deprecated Use {@link #addListener(Listener)} and {@link #removeListener(Listener)} instead.
*/ */
@Deprecated @Deprecated
void removeListener(EventListener listener); void removeListener(EventListener listener);
@ -1262,7 +1262,7 @@ public interface Player {
* *
* @param command A {@link Command}. * @param command A {@link Command}.
* @return Whether the {@link Command} is available. * @return Whether the {@link Command} is available.
* @see EventListener#onAvailableCommandsChanged(Commands) * @see Listener#onAvailableCommandsChanged(Commands)
*/ */
boolean isCommandAvailable(@Command int command); boolean isCommandAvailable(@Command int command);
@ -1270,8 +1270,8 @@ public interface Player {
* Returns the player's currently available {@link Commands}. * Returns the player's currently available {@link Commands}.
* *
* <p>The returned {@link Commands} are not updated when available commands change. Use {@link * <p>The returned {@link Commands} are not updated when available commands change. Use {@link
* EventListener#onAvailableCommandsChanged(Commands)} to get an update when the available * Listener#onAvailableCommandsChanged(Commands)} to get an update when the available commands
* commands change. * change.
* *
* <p>Executing a command that is not available (for example, calling {@link #next()} if {@link * <p>Executing a command that is not available (for example, calling {@link #next()} if {@link
* #COMMAND_SEEK_TO_NEXT_MEDIA_ITEM} is unavailable) will neither throw an exception nor generate * #COMMAND_SEEK_TO_NEXT_MEDIA_ITEM} is unavailable) will neither throw an exception nor generate
@ -1281,7 +1281,7 @@ public interface Player {
* are unavailable if there is no such {@link MediaItem}. * are unavailable if there is no such {@link MediaItem}.
* *
* @return The currently available {@link Commands}. * @return The currently available {@link Commands}.
* @see EventListener#onAvailableCommandsChanged * @see Listener#onAvailableCommandsChanged
*/ */
Commands getAvailableCommands(); Commands getAvailableCommands();
@ -1292,7 +1292,7 @@ public interface Player {
* Returns the current {@link State playback state} of the player. * Returns the current {@link State playback state} of the player.
* *
* @return The current {@link State playback state}. * @return The current {@link State playback state}.
* @see EventListener#onPlaybackStateChanged(int) * @see Listener#onPlaybackStateChanged(int)
*/ */
@State @State
int getPlaybackState(); int getPlaybackState();
@ -1302,7 +1302,7 @@ public interface Player {
* true}, or {@link #PLAYBACK_SUPPRESSION_REASON_NONE} if playback is not suppressed. * true}, or {@link #PLAYBACK_SUPPRESSION_REASON_NONE} if playback is not suppressed.
* *
* @return The current {@link PlaybackSuppressionReason playback suppression reason}. * @return The current {@link PlaybackSuppressionReason playback suppression reason}.
* @see EventListener#onPlaybackSuppressionReasonChanged(int) * @see Listener#onPlaybackSuppressionReasonChanged(int)
*/ */
@PlaybackSuppressionReason @PlaybackSuppressionReason
int getPlaybackSuppressionReason(); int getPlaybackSuppressionReason();
@ -1319,20 +1319,20 @@ public interface Player {
* </ul> * </ul>
* *
* @return Whether the player is playing. * @return Whether the player is playing.
* @see EventListener#onIsPlayingChanged(boolean) * @see Listener#onIsPlayingChanged(boolean)
*/ */
boolean isPlaying(); boolean isPlaying();
/** /**
* Returns the error that caused playback to fail. This is the same error that will have been * Returns the error that caused playback to fail. This is the same error that will have been
* reported via {@link Player.EventListener#onPlayerError(ExoPlaybackException)} at the time of * reported via {@link Listener#onPlayerError(ExoPlaybackException)} at the time of failure. It
* failure. It can be queried using this method until the player is re-prepared. * can be queried using this method until the player is re-prepared.
* *
* <p>Note that this method will always return {@code null} if {@link #getPlaybackState()} is not * <p>Note that this method will always return {@code null} if {@link #getPlaybackState()} is not
* {@link #STATE_IDLE}. * {@link #STATE_IDLE}.
* *
* @return The error, or {@code null}. * @return The error, or {@code null}.
* @see EventListener#onPlayerError(ExoPlaybackException) * @see Listener#onPlayerError(ExoPlaybackException)
*/ */
@Nullable @Nullable
ExoPlaybackException getPlayerError(); ExoPlaybackException getPlayerError();
@ -1364,7 +1364,7 @@ public interface Player {
* Whether playback will proceed when {@link #getPlaybackState()} == {@link #STATE_READY}. * Whether playback will proceed when {@link #getPlaybackState()} == {@link #STATE_READY}.
* *
* @return Whether playback will proceed when ready. * @return Whether playback will proceed when ready.
* @see EventListener#onPlayWhenReadyChanged(boolean, int) * @see Listener#onPlayWhenReadyChanged(boolean, int)
*/ */
boolean getPlayWhenReady(); boolean getPlayWhenReady();
@ -1379,7 +1379,7 @@ public interface Player {
* Returns the current {@link RepeatMode} used for playback. * Returns the current {@link RepeatMode} used for playback.
* *
* @return The current repeat mode. * @return The current repeat mode.
* @see EventListener#onRepeatModeChanged(int) * @see Listener#onRepeatModeChanged(int)
*/ */
@RepeatMode @RepeatMode
int getRepeatMode(); int getRepeatMode();
@ -1394,7 +1394,7 @@ public interface Player {
/** /**
* Returns whether shuffling of windows is enabled. * Returns whether shuffling of windows is enabled.
* *
* @see EventListener#onShuffleModeEnabledChanged(boolean) * @see Listener#onShuffleModeEnabledChanged(boolean)
*/ */
boolean getShuffleModeEnabled(); boolean getShuffleModeEnabled();
@ -1402,7 +1402,7 @@ public interface Player {
* Whether the player is currently loading the source. * Whether the player is currently loading the source.
* *
* @return Whether the player is currently loading the source. * @return Whether the player is currently loading the source.
* @see EventListener#onIsLoadingChanged(boolean) * @see Listener#onIsLoadingChanged(boolean)
*/ */
boolean isLoading(); boolean isLoading();
@ -1490,8 +1490,8 @@ public interface Player {
* player to the default, which means there is no speed or pitch adjustment. * player to the default, which means there is no speed or pitch adjustment.
* *
* <p>Playback parameters changes may cause the player to buffer. {@link * <p>Playback parameters changes may cause the player to buffer. {@link
* EventListener#onPlaybackParametersChanged(PlaybackParameters)} will be called whenever the * Listener#onPlaybackParametersChanged(PlaybackParameters)} will be called whenever the currently
* currently active playback parameters change. * active playback parameters change.
* *
* @param playbackParameters The playback parameters. * @param playbackParameters The playback parameters.
*/ */
@ -1511,7 +1511,7 @@ public interface Player {
/** /**
* Returns the currently active playback parameters. * Returns the currently active playback parameters.
* *
* @see EventListener#onPlaybackParametersChanged(PlaybackParameters) * @see Listener#onPlaybackParametersChanged(PlaybackParameters)
*/ */
PlaybackParameters getPlaybackParameters(); PlaybackParameters getPlaybackParameters();
@ -1545,7 +1545,7 @@ public interface Player {
/** /**
* Returns the available track groups. * Returns the available track groups.
* *
* @see EventListener#onTracksChanged(TrackGroupArray, TrackSelectionArray) * @see Listener#onTracksChanged(TrackGroupArray, TrackSelectionArray)
*/ */
TrackGroupArray getCurrentTrackGroups(); TrackGroupArray getCurrentTrackGroups();
@ -1556,7 +1556,7 @@ public interface Player {
* components, wishes to report a TrackSelection for each of them, and has one or more renderer * components, wishes to report a TrackSelection for each of them, and has one or more renderer
* components that is not assigned any selected tracks. * components that is not assigned any selected tracks.
* *
* @see EventListener#onTracksChanged(TrackGroupArray, TrackSelectionArray) * @see Listener#onTracksChanged(TrackGroupArray, TrackSelectionArray)
*/ */
TrackSelectionArray getCurrentTrackSelections(); TrackSelectionArray getCurrentTrackSelections();
@ -1571,7 +1571,7 @@ public interface Player {
* <p>This metadata is considered static in that it comes from the tracks' declared Formats, * <p>This metadata is considered static in that it comes from the tracks' declared Formats,
* rather than being timed (or dynamic) metadata, which is represented within a metadata track. * rather than being timed (or dynamic) metadata, which is represented within a metadata track.
* *
* @see EventListener#onStaticMetadataChanged(List) * @see Listener#onStaticMetadataChanged(List)
*/ */
List<Metadata> getCurrentStaticMetadata(); List<Metadata> getCurrentStaticMetadata();
@ -1580,8 +1580,8 @@ public interface Player {
* supported. * supported.
* *
* <p>This {@link MediaMetadata} is a combination of the {@link MediaItem#mediaMetadata} and the * <p>This {@link MediaMetadata} is a combination of the {@link MediaItem#mediaMetadata} and the
* static and dynamic metadata sourced from {@link EventListener#onStaticMetadataChanged(List)} * static and dynamic metadata sourced from {@link Listener#onStaticMetadataChanged(List)} and
* and {@link MetadataOutput#onMetadata(Metadata)}. * {@link MetadataOutput#onMetadata(Metadata)}.
*/ */
MediaMetadata getMediaMetadata(); MediaMetadata getMediaMetadata();
@ -1594,7 +1594,7 @@ public interface Player {
/** /**
* Returns the current {@link Timeline}. Never null, but may be empty. * Returns the current {@link Timeline}. Never null, but may be empty.
* *
* @see EventListener#onTimelineChanged(Timeline, int) * @see Listener#onTimelineChanged(Timeline, int)
*/ */
Timeline getCurrentTimeline(); Timeline getCurrentTimeline();
@ -1642,7 +1642,7 @@ public interface Player {
* Returns the media item of the current window in the timeline. May be null if the timeline is * Returns the media item of the current window in the timeline. May be null if the timeline is
* empty. * empty.
* *
* @see EventListener#onMediaItemTransition(MediaItem, int) * @see Listener#onMediaItemTransition(MediaItem, int)
*/ */
@Nullable @Nullable
MediaItem getCurrentMediaItem(); MediaItem getCurrentMediaItem();
@ -1856,7 +1856,7 @@ public interface Player {
* <p>The video's width and height are {@code 0} if there is no video or its size has not been * <p>The video's width and height are {@code 0} if there is no video or its size has not been
* determined yet. * determined yet.
* *
* @see Listener#onVideoSizeChanged(int, int, int, float) * @see Listener#onVideoSizeChanged(VideoSize)
*/ */
VideoSize getVideoSize(); VideoSize getVideoSize();

View File

@ -616,7 +616,7 @@ public interface ExoPlayer extends Player {
/** /**
* Set a limit on the time a call to {@link ExoPlayer#setForegroundMode} can spend. If a call to * Set a limit on the time a call to {@link ExoPlayer#setForegroundMode} can spend. If a call to
* {@link ExoPlayer#setForegroundMode} takes more than {@code timeoutMs} milliseconds to * {@link ExoPlayer#setForegroundMode} takes more than {@code timeoutMs} milliseconds to
* complete, the player will raise an error via {@link Player.EventListener#onPlayerError}. * complete, the player will raise an error via {@link Player.Listener#onPlayerError}.
* *
* <p>This method is experimental, and will be renamed or removed in a future release. * <p>This method is experimental, and will be renamed or removed in a future release.
* *
@ -742,7 +742,7 @@ public interface ExoPlayer extends Player {
* *
* <p>If a call to {@link #release} or {@link #setForegroundMode} takes more than {@code * <p>If a call to {@link #release} or {@link #setForegroundMode} takes more than {@code
* timeoutMs} to complete, the player will report an error via {@link * timeoutMs} to complete, the player will report an error via {@link
* Player.EventListener#onPlayerError}. * Player.Listener#onPlayerError}.
* *
* @param releaseTimeoutMs The release timeout, in milliseconds. * @param releaseTimeoutMs The release timeout, in milliseconds.
* @return This builder. * @return This builder.
@ -759,7 +759,7 @@ public interface ExoPlayer extends Player {
* *
* <p>This means the player will pause at the end of each window in the current {@link * <p>This means the player will pause at the end of each window in the current {@link
* #getCurrentTimeline() timeline}. Listeners will be informed by a call to {@link * #getCurrentTimeline() timeline}. Listeners will be informed by a call to {@link
* Player.EventListener#onPlayWhenReadyChanged(boolean, int)} with the reason {@link * Player.Listener#onPlayWhenReadyChanged(boolean, int)} with the reason {@link
* Player#PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM} when this happens. * Player#PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM} when this happens.
* *
* @param pauseAtEndOfMediaItems Whether to pause playback at the end of each media item. * @param pauseAtEndOfMediaItems Whether to pause playback at the end of each media item.
@ -1060,7 +1060,7 @@ public interface ExoPlayer extends Player {
* *
* <p>This means the player will pause at the end of each window in the current {@link * <p>This means the player will pause at the end of each window in the current {@link
* #getCurrentTimeline() timeline}. Listeners will be informed by a call to {@link * #getCurrentTimeline() timeline}. Listeners will be informed by a call to {@link
* Player.EventListener#onPlayWhenReadyChanged(boolean, int)} with the reason {@link * Player.Listener#onPlayWhenReadyChanged(boolean, int)} with the reason {@link
* Player#PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM} when this happens. * Player#PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM} when this happens.
* *
* @param pauseAtEndOfMediaItems Whether to pause playback at the end of each media item. * @param pauseAtEndOfMediaItems Whether to pause playback at the end of each media item.

View File

@ -269,7 +269,7 @@ public class SimpleExoPlayer extends BasePlayer
/** /**
* Set a limit on the time a call to {@link #setForegroundMode} can spend. If a call to {@link * Set a limit on the time a call to {@link #setForegroundMode} can spend. If a call to {@link
* #setForegroundMode} takes more than {@code timeoutMs} milliseconds to complete, the player * #setForegroundMode} takes more than {@code timeoutMs} milliseconds to complete, the player
* will raise an error via {@link Player.EventListener#onPlayerError}. * will raise an error via {@link Player.Listener#onPlayerError}.
* *
* <p>This method is experimental, and will be renamed or removed in a future release. * <p>This method is experimental, and will be renamed or removed in a future release.
* *
@ -500,7 +500,7 @@ public class SimpleExoPlayer extends BasePlayer
* *
* <p>If a call to {@link #release} or {@link #setForegroundMode} takes more than {@code * <p>If a call to {@link #release} or {@link #setForegroundMode} takes more than {@code
* timeoutMs} to complete, the player will report an error via {@link * timeoutMs} to complete, the player will report an error via {@link
* Player.EventListener#onPlayerError}. * Player.Listener#onPlayerError}.
* *
* @param releaseTimeoutMs The release timeout, in milliseconds. * @param releaseTimeoutMs The release timeout, in milliseconds.
* @return This builder. * @return This builder.
@ -517,7 +517,7 @@ public class SimpleExoPlayer extends BasePlayer
* *
* <p>If detaching a surface or replacing a surface takes more than {@code * <p>If detaching a surface or replacing a surface takes more than {@code
* detachSurfaceTimeoutMs} to complete, the player will report an error via {@link * detachSurfaceTimeoutMs} to complete, the player will report an error via {@link
* Player.EventListener#onPlayerError}. * Player.Listener#onPlayerError}.
* *
* @param detachSurfaceTimeoutMs The timeout for detaching a surface, in milliseconds. * @param detachSurfaceTimeoutMs The timeout for detaching a surface, in milliseconds.
* @return This builder. * @return This builder.
@ -534,7 +534,7 @@ public class SimpleExoPlayer extends BasePlayer
* *
* <p>This means the player will pause at the end of each window in the current {@link * <p>This means the player will pause at the end of each window in the current {@link
* #getCurrentTimeline() timeline}. Listeners will be informed by a call to {@link * #getCurrentTimeline() timeline}. Listeners will be informed by a call to {@link
* Player.EventListener#onPlayWhenReadyChanged(boolean, int)} with the reason {@link * Player.Listener#onPlayWhenReadyChanged(boolean, int)} with the reason {@link
* Player#PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM} when this happens. * Player#PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM} when this happens.
* *
* @param pauseAtEndOfMediaItems Whether to pause playback at the end of each media item. * @param pauseAtEndOfMediaItems Whether to pause playback at the end of each media item.