Remove reference to deprecated Player.EventListener.

#minor-release

PiperOrigin-RevId: 372925409
This commit is contained in:
tonihei 2021-05-10 15:42:33 +01:00 committed by Oliver Woodman
parent 3c64bc1b49
commit 8a5d21adef
9 changed files with 39 additions and 41 deletions

View File

@ -366,7 +366,7 @@ public final class CastPlayer extends BasePlayer {
return playWhenReady.value; return playWhenReady.value;
} }
// We still call EventListener#onSeekProcessed() for backwards compatibility with listeners that // We still call Listener#onSeekProcessed() for backwards compatibility with listeners that
// don't implement onPositionDiscontinuity(). // don't implement onPositionDiscontinuity().
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@Override @Override
@ -788,7 +788,7 @@ public final class CastPlayer extends BasePlayer {
} }
/** /**
* Updates the timeline and notifies {@link Player.EventListener event listeners} if required. * Updates the timeline and notifies {@link Player.Listener event listeners} if required.
* *
* @return Whether the timeline change has caused a change of the period currently being played. * @return Whether the timeline change has caused a change of the period currently being played.
*/ */
@ -1291,7 +1291,7 @@ public final class CastPlayer extends BasePlayer {
private final class SeekResultCallback implements ResultCallback<MediaChannelResult> { private final class SeekResultCallback implements ResultCallback<MediaChannelResult> {
// We still call EventListener#onSeekProcessed() for backwards compatibility with listeners that // We still call Listener#onSeekProcessed() for backwards compatibility with listeners that
// don't implement onPositionDiscontinuity(). // don't implement onPositionDiscontinuity().
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@Override @Override

View File

@ -426,9 +426,8 @@ public class ForwardingPlayer extends BasePlayer {
} }
/** /**
* Wraps a {@link Listener} and intercepts {@link EventListener#onAvailableCommandsChanged} in * Wraps a {@link Listener} and intercepts {@link Listener#onAvailableCommandsChanged} in order to
* order to filter disabled commands. All other operations are forwarded to the wrapped {@link * filter disabled commands. All other operations are forwarded to the wrapped {@link Listener}.
* Listener}.
*/ */
private static class ForwardingListener implements Listener { private static class ForwardingListener implements Listener {
private final ForwardingPlayer player; private final ForwardingPlayer player;

View File

@ -243,7 +243,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
/** /**
* 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 will * #setForegroundMode} takes more than {@code timeoutMs} milliseconds to complete, the player will
* raise an error via {@link Player.EventListener#onPlayerError}. * raise an error via {@link Player.Listener#onPlayerError}.
* *
* <p>This method is experimental, and will be renamed or removed in a future release. It should * <p>This method is experimental, and will be renamed or removed in a future release. It should
* only be called before the player is used. * only be called before the player is used.

View File

@ -246,7 +246,7 @@ public final class PlayerMessage {
/** /**
* Sends the message. If the target throws an {@link ExoPlaybackException} then it is propagated * Sends the message. If the target throws an {@link ExoPlaybackException} then it is propagated
* out of the player as an error using {@link * out of the player as an error using {@link
* Player.EventListener#onPlayerError(ExoPlaybackException)}. * Player.Listener#onPlayerError(ExoPlaybackException)}.
* *
* @return This message. * @return This message.
* @throws IllegalStateException If this message has already been sent. * @throws IllegalStateException If this message has already been sent.

View File

@ -241,7 +241,7 @@ public interface AnalyticsListener {
int EVENT_PLAYER_ERROR = Player.EVENT_PLAYER_ERROR; int EVENT_PLAYER_ERROR = Player.EVENT_PLAYER_ERROR;
/** /**
* A position discontinuity occurred. See {@link * A position discontinuity occurred. See {@link
* Player.EventListener#onPositionDiscontinuity(Player.PositionInfo, Player.PositionInfo, int)}. * Player.Listener#onPositionDiscontinuity(Player.PositionInfo, Player.PositionInfo, int)}.
*/ */
int EVENT_POSITION_DISCONTINUITY = Player.EVENT_POSITION_DISCONTINUITY; int EVENT_POSITION_DISCONTINUITY = Player.EVENT_POSITION_DISCONTINUITY;
/** {@link Player#getPlaybackParameters()} changed. */ /** {@link Player#getPlaybackParameters()} changed. */
@ -651,8 +651,7 @@ public interface AnalyticsListener {
* *
* <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
* Player.EventListener#onStaticMetadataChanged(List)} and {@link * Player.Listener#onStaticMetadataChanged(List)} and {@link MetadataOutput#onMetadata(Metadata)}.
* MetadataOutput#onMetadata(Metadata)}.
* *
* @param eventTime The event time. * @param eventTime The event time.
* @param mediaMetadata The combined {@link MediaMetadata}. * @param mediaMetadata The combined {@link MediaMetadata}.
@ -695,9 +694,9 @@ public interface AnalyticsListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail. * <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em> * The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry. * implement this method to display a user visible error or initiate an application level retry.
* {@link Player.EventListener#onPlayerError} is the appropriate place to implement such behavior. * {@link Player.Listener#onPlayerError} is the appropriate place to implement such behavior. This
* This method is called to provide the application with an opportunity to log the error if it * method is called to provide the application with an opportunity to log the error if it wishes
* wishes to do so. * to do so.
* *
* @param eventTime The event time. * @param eventTime The event time.
* @param loadEventInfo The {@link LoadEventInfo} defining the load event. * @param loadEventInfo The {@link LoadEventInfo} defining the load event.
@ -890,9 +889,9 @@ public interface AnalyticsListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail. * <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em> * The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry. * implement this method to display a user visible error or initiate an application level retry.
* {@link Player.EventListener#onPlayerError} is the appropriate place to implement such behavior. * {@link Player.Listener#onPlayerError} is the appropriate place to implement such behavior. This
* This method is called to provide the application with an opportunity to log the error if it * method is called to provide the application with an opportunity to log the error if it wishes
* wishes to do so. * to do so.
* *
* @param eventTime The event time. * @param eventTime The event time.
* @param audioSinkError The error that occurred. Typically an {@link * @param audioSinkError The error that occurred. Typically an {@link
@ -907,9 +906,9 @@ public interface AnalyticsListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail. * <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em> * The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry. * implement this method to display a user visible error or initiate an application level retry.
* {@link Player.EventListener#onPlayerError} is the appropriate place to implement such behavior. * {@link Player.Listener#onPlayerError} is the appropriate place to implement such behavior. This
* This method is called to provide the application with an opportunity to log the error if it * method is called to provide the application with an opportunity to log the error if it wishes
* wishes to do so. * to do so.
* *
* @param eventTime The event time. * @param eventTime The event time.
* @param audioCodecError The error. Typically a {@link CodecException} if the renderer uses * @param audioCodecError The error. Typically a {@link CodecException} if the renderer uses
@ -1025,9 +1024,9 @@ public interface AnalyticsListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail. * <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em> * The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry. * implement this method to display a user visible error or initiate an application level retry.
* {@link Player.EventListener#onPlayerError} is the appropriate place to implement such behavior. * {@link Player.Listener#onPlayerError} is the appropriate place to implement such behavior. This
* This method is called to provide the application with an opportunity to log the error if it * method is called to provide the application with an opportunity to log the error if it wishes
* wishes to do so. * to do so.
* *
* @param eventTime The event time. * @param eventTime The event time.
* @param videoCodecError The error. Typically a {@link CodecException} if the renderer uses * @param videoCodecError The error. Typically a {@link CodecException} if the renderer uses
@ -1100,9 +1099,9 @@ public interface AnalyticsListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail. * <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em> * The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry. * implement this method to display a user visible error or initiate an application level retry.
* {@link Player.EventListener#onPlayerError} is the appropriate place to implement such behavior. * {@link Player.Listener#onPlayerError} is the appropriate place to implement such behavior. This
* This method is called to provide the application with an opportunity to log the error if it * method is called to provide the application with an opportunity to log the error if it wishes
* wishes to do so. * to do so.
* *
* @param eventTime The event time. * @param eventTime The event time.
* @param error The error. * @param error The error.

View File

@ -118,9 +118,9 @@ public interface AudioRendererEventListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail. * <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em> * The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry. * implement this method to display a user visible error or initiate an application level retry.
* {@link Player.EventListener#onPlayerError} is the appropriate place to implement such behavior. * {@link Player.Listener#onPlayerError} is the appropriate place to implement such behavior. This
* This method is called to provide the application with an opportunity to log the error if it * method is called to provide the application with an opportunity to log the error if it wishes
* wishes to do so. * to do so.
* *
* @param audioCodecError The error. Typically a {@link CodecException} if the renderer uses * @param audioCodecError The error. Typically a {@link CodecException} if the renderer uses
* {@link MediaCodec}, or a {@link DecoderException} if the renderer uses a software decoder. * {@link MediaCodec}, or a {@link DecoderException} if the renderer uses a software decoder.
@ -136,9 +136,9 @@ public interface AudioRendererEventListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail. * <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em> * The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry. * implement this method to display a user visible error or initiate an application level retry.
* {@link Player.EventListener#onPlayerError} is the appropriate place to implement such behavior. * {@link Player.Listener#onPlayerError} is the appropriate place to implement such behavior. This
* This method is called to provide the application with an opportunity to log the error if it * method is called to provide the application with an opportunity to log the error if it wishes
* wishes to do so. * to do so.
* *
* @param audioSinkError The error that occurred. Typically an {@link * @param audioSinkError The error that occurred. Typically an {@link
* AudioSink.InitializationException}, a {@link AudioSink.WriteException}, or an {@link * AudioSink.InitializationException}, a {@link AudioSink.WriteException}, or an {@link

View File

@ -117,12 +117,12 @@ public interface AudioSink {
* The player may be able to recover from the error (for example by recreating the AudioTrack, * The player may be able to recover from the error (for example by recreating the AudioTrack,
* possibly with different settings) and continue. Hence applications should <em>not</em> * possibly with different settings) and continue. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry * implement this method to display a user visible error or initiate an application level retry
* ({@link Player.EventListener#onPlayerError} is the appropriate place to implement such * ({@link Player.Listener#onPlayerError} is the appropriate place to implement such behavior).
* behavior). This method is called to provide the application with an opportunity to log the * This method is called to provide the application with an opportunity to log the error if it
* error if it wishes to do so. * wishes to do so.
* *
* <p>Fatal errors that cannot be recovered will be reported wrapped in a {@link * <p>Fatal errors that cannot be recovered will be reported wrapped in a {@link
* ExoPlaybackException} by {@link Player.EventListener#onPlayerError(ExoPlaybackException)}. * ExoPlaybackException} by {@link Player.Listener#onPlayerError(ExoPlaybackException)}.
* *
* @param audioSinkError The error that occurred. Typically an {@link InitializationException}, * @param audioSinkError The error that occurred. Typically an {@link InitializationException},
* a {@link WriteException}, or an {@link UnexpectedDiscontinuityException}. * a {@link WriteException}, or an {@link UnexpectedDiscontinuityException}.

View File

@ -56,8 +56,8 @@ public interface DrmSessionEventListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail. * <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error and continue. Hence applications should * The player may be able to recover from the error and continue. Hence applications should
* <em>not</em> implement this method to display a user visible error or initiate an application * <em>not</em> implement this method to display a user visible error or initiate an application
* level retry ({@link Player.EventListener#onPlayerError} is the appropriate place to implement * level retry ({@link Player.Listener#onPlayerError} is the appropriate place to implement such
* such behavior). This method is called to provide the application with an opportunity to log the * behavior). This method is called to provide the application with an opportunity to log the
* error if it wishes to do so. * error if it wishes to do so.
* *
* @param windowIndex The window index in the timeline this media period belongs to. * @param windowIndex The window index in the timeline this media period belongs to.

View File

@ -141,9 +141,9 @@ public interface VideoRendererEventListener {
* <p>This method being called does not indicate that playback has failed, or that it will fail. * <p>This method being called does not indicate that playback has failed, or that it will fail.
* The player may be able to recover from the error. Hence applications should <em>not</em> * The player may be able to recover from the error. Hence applications should <em>not</em>
* implement this method to display a user visible error or initiate an application level retry. * implement this method to display a user visible error or initiate an application level retry.
* {@link Player.EventListener#onPlayerError} is the appropriate place to implement such behavior. * {@link Player.Listener#onPlayerError} is the appropriate place to implement such behavior. This
* This method is called to provide the application with an opportunity to log the error if it * method is called to provide the application with an opportunity to log the error if it wishes
* wishes to do so. * to do so.
* *
* @param videoCodecError The error. Typically a {@link CodecException} if the renderer uses * @param videoCodecError The error. Typically a {@link CodecException} if the renderer uses
* {@link MediaCodec}, or a {@link DecoderException} if the renderer uses a software decoder. * {@link MediaCodec}, or a {@link DecoderException} if the renderer uses a software decoder.