Fix ForwardingPlayer @Override and @Deprecated annotations
These were messed up in 74c6ef9ba0
Also suppress deprecation warnings when we're just forwarding a
deprecated method to the delegate.
#minor-release
PiperOrigin-RevId: 426351791
This commit is contained in:
parent
37d47e1d13
commit
7b9eaaed14
@ -39,12 +39,12 @@ public class ForwardingPlayer implements Player {
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public Looper getApplicationLooper() {
|
||||
return player.getApplicationLooper();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void addListener(Listener listener) {
|
||||
player.addListener(new ForwardingListener(this, listener));
|
||||
}
|
||||
@ -255,12 +255,14 @@ public class ForwardingPlayer implements Player {
|
||||
player.seekForward();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public boolean hasPrevious() {
|
||||
return player.hasPrevious();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public boolean hasPreviousWindow() {
|
||||
@ -272,12 +274,14 @@ public class ForwardingPlayer implements Player {
|
||||
return player.hasPreviousMediaItem();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public void previous() {
|
||||
player.previous();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public void seekToPreviousWindow() {
|
||||
@ -299,12 +303,14 @@ public class ForwardingPlayer implements Player {
|
||||
return player.getMaxSeekToPreviousPosition();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return player.hasNext();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public boolean hasNextWindow() {
|
||||
@ -316,12 +322,14 @@ public class ForwardingPlayer implements Player {
|
||||
return player.hasNextMediaItem();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public void next() {
|
||||
player.next();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public void seekToNextWindow() {
|
||||
@ -358,6 +366,7 @@ public class ForwardingPlayer implements Player {
|
||||
player.stop();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public void stop(boolean reset) {
|
||||
@ -369,11 +378,15 @@ public class ForwardingPlayer implements Player {
|
||||
player.release();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public TrackGroupArray getCurrentTrackGroups() {
|
||||
return player.getCurrentTrackGroups();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public TrackSelectionArray getCurrentTrackSelections() {
|
||||
return player.getCurrentTrackSelections();
|
||||
@ -425,6 +438,7 @@ public class ForwardingPlayer implements Player {
|
||||
return player.getCurrentPeriodIndex();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public int getCurrentWindowIndex() {
|
||||
@ -436,6 +450,7 @@ public class ForwardingPlayer implements Player {
|
||||
return player.getCurrentMediaItemIndex();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public int getNextWindowIndex() {
|
||||
@ -447,6 +462,7 @@ public class ForwardingPlayer implements Player {
|
||||
return player.getNextMediaItemIndex();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public int getPreviousWindowIndex() {
|
||||
@ -499,6 +515,7 @@ public class ForwardingPlayer implements Player {
|
||||
return player.getTotalBufferedDuration();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public boolean isCurrentWindowDynamic() {
|
||||
@ -510,6 +527,7 @@ public class ForwardingPlayer implements Player {
|
||||
return player.isCurrentMediaItemDynamic();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public boolean isCurrentWindowLive() {
|
||||
@ -526,6 +544,7 @@ public class ForwardingPlayer implements Player {
|
||||
return player.getCurrentLiveOffset();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") // Forwarding to deprecated method
|
||||
@Deprecated
|
||||
@Override
|
||||
public boolean isCurrentWindowSeekable() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user