From a47eb8a08a0ba4a75afe901be05bb8792e5279ea Mon Sep 17 00:00:00 2001 From: ibaker Date: Mon, 12 Jul 2021 17:39:47 +0100 Subject: [PATCH] Explicitly override all non-deprecated methods in `Player.Listener` Most of the super-interfaces are deprecated, but the intention is that only the types are deprecated and the methods themselves shouldn't be. In order to reflect this in javadoc we override all the methods in `Player.Listener` in order to 'cancel' the deprecation. This change deliberately doesn't override methods that are explicitly deprecated with documented replacements (like `Player.EventListener#onPlayerStateChanged`) - these should contine to be marked as deprecated in javadoc. PiperOrigin-RevId: 384253725 --- .../com/google/android/exoplayer2/Player.java | 87 ++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/library/common/src/main/java/com/google/android/exoplayer2/Player.java b/library/common/src/main/java/com/google/android/exoplayer2/Player.java index 558c930773..0bb973d4ef 100644 --- a/library/common/src/main/java/com/google/android/exoplayer2/Player.java +++ b/library/common/src/main/java/com/google/android/exoplayer2/Player.java @@ -325,6 +325,9 @@ public interface Player { *

State changes and events that happen within one {@link Looper} message queue iteration are * reported together and only after all individual callbacks were triggered. * + *

Only state changes represented by {@link EventFlags events} are reported through this + * method. + * *

Listeners should prefer this method over individual callbacks in the following cases: * *