Commit a26caae4 by samrobinson Committed by bachinger

Remove BasePlayer stop as a final method.

It calls through to a deprecated method, which is unusual for a
convenience method, and the deprecated method has various
implementations. This allows for a smoother removal of stop(boolean)
and removes an obstacle for the ExoPlayer-SimpleExoPlayer merge.

Adds missing @Deprecated tags to some Players.

PiperOrigin-RevId: 400213422
parent c8103097
......@@ -494,6 +494,12 @@ public final class CastPlayer extends BasePlayer {
}
@Override
public void stop() {
stop(/* reset= */ false);
}
@Deprecated
@Override
public void stop(boolean reset) {
playbackState = STATE_IDLE;
if (remoteMediaClient != null) {
......
......@@ -228,11 +228,6 @@ public abstract class BasePlayer implements Player {
}
@Override
public final void stop() {
stop(/* reset= */ false);
}
@Override
public final int getNextWindowIndex() {
Timeline timeline = getCurrentTimeline();
return timeline.isEmpty()
......
......@@ -739,6 +739,12 @@ import java.util.concurrent.CopyOnWriteArraySet;
}
@Override
public void stop() {
stop(/* reset= */ false);
}
@Deprecated
@Override
public void stop(boolean reset) {
stop(reset, /* error= */ null);
}
......
......@@ -1378,6 +1378,11 @@ public class SimpleExoPlayer extends BasePlayer
player.setForegroundMode(foregroundMode);
}
@Override
public void stop() {
stop(/* reset= */ false);
}
@Deprecated
@Override
public void stop(boolean reset) {
......
......@@ -417,6 +417,12 @@ public class StubExoPlayer extends BasePlayer implements ExoPlayer {
}
@Override
public void stop() {
throw new UnsupportedOperationException();
}
@Deprecated
@Override
public void stop(boolean reset) {
throw new UnsupportedOperationException();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment