Fixes for some minor misc issues
- Unnecessary deprecation suppressions - Dead code - Broken Javadoc PiperOrigin-RevId: 409357884
This commit is contained in:
parent
3b11822fa1
commit
c046f40fd0
@ -392,7 +392,6 @@ public class CastPlayerTest {
|
|||||||
assertThat(mediaQueueItems[1].getMedia().getContentId()).isEqualTo(uri2);
|
assertThat(mediaQueueItems[1].getMedia().getContentId()).isEqualTo(uri2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation") // Verifies deprecated callback being called correctly.
|
|
||||||
@Test
|
@Test
|
||||||
public void setMediaItems_replaceExistingPlaylist_notifiesMediaItemTransition() {
|
public void setMediaItems_replaceExistingPlaylist_notifiesMediaItemTransition() {
|
||||||
List<MediaItem> firstPlaylist = new ArrayList<>();
|
List<MediaItem> firstPlaylist = new ArrayList<>();
|
||||||
|
@ -366,7 +366,6 @@ public final class Cue implements Bundleable {
|
|||||||
* @deprecated Use {@link Builder}.
|
* @deprecated Use {@link Builder}.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
@UnstableApi
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public Cue(
|
public Cue(
|
||||||
CharSequence text,
|
CharSequence text,
|
||||||
|
@ -265,7 +265,6 @@ public class DefaultLoadControl implements LoadControl {
|
|||||||
private boolean isLoading;
|
private boolean isLoading;
|
||||||
|
|
||||||
/** Constructs a new instance, using the {@code DEFAULT_*} constants defined in this class. */
|
/** Constructs a new instance, using the {@code DEFAULT_*} constants defined in this class. */
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public DefaultLoadControl() {
|
public DefaultLoadControl() {
|
||||||
this(
|
this(
|
||||||
new DefaultAllocator(true, C.DEFAULT_BUFFER_SEGMENT_SIZE),
|
new DefaultAllocator(true, C.DEFAULT_BUFFER_SEGMENT_SIZE),
|
||||||
|
@ -407,7 +407,6 @@ public class SimpleExoPlayer extends BasePlayer
|
|||||||
|
|
||||||
/** @deprecated Use the {@link ExoPlayer.Builder}. */
|
/** @deprecated Use the {@link ExoPlayer.Builder}. */
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
protected SimpleExoPlayer(
|
protected SimpleExoPlayer(
|
||||||
Context context,
|
Context context,
|
||||||
RenderersFactory renderersFactory,
|
RenderersFactory renderersFactory,
|
||||||
@ -439,7 +438,6 @@ public class SimpleExoPlayer extends BasePlayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @param builder The {@link ExoPlayer.Builder} to obtain all construction parameters. */
|
/** @param builder The {@link ExoPlayer.Builder} to obtain all construction parameters. */
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
/* package */ SimpleExoPlayer(ExoPlayer.Builder builder) {
|
/* package */ SimpleExoPlayer(ExoPlayer.Builder builder) {
|
||||||
constructorFinished = new ConditionVariable();
|
constructorFinished = new ConditionVariable();
|
||||||
try {
|
try {
|
||||||
|
@ -52,9 +52,8 @@ import org.junit.runner.RunWith;
|
|||||||
import org.junit.runners.Parameterized;
|
import org.junit.runners.Parameterized;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class that tests whether {@link MediaController.Listener#onSurfaceSizeChanged(int, int)} is
|
* A class that tests whether {@link Player.Listener#onSurfaceSizeChanged(int, int)} is called when
|
||||||
* called when calling {@link MediaController#setVideoSurface(Surface)} and other surface related
|
* calling {@link MediaController#setVideoSurface(Surface)} and other surface related methods.
|
||||||
* methods.
|
|
||||||
*/
|
*/
|
||||||
@RunWith(Parameterized.class)
|
@RunWith(Parameterized.class)
|
||||||
@LargeTest
|
@LargeTest
|
||||||
|
@ -96,14 +96,8 @@ public class RemoteMediaBrowser extends RemoteMediaController {
|
|||||||
// Non-public methods
|
// Non-public methods
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Create a {@link MediaBrowser} in the client app. Should be used after successful connection
|
protected void create(SessionToken token, Bundle connectionHints, boolean waitForConnection)
|
||||||
* through {@link #connect()}.
|
|
||||||
*
|
|
||||||
* @param connectionHints connection hints
|
|
||||||
* @param waitForConnection true if this method needs to wait for the connection,
|
|
||||||
*/
|
|
||||||
void create(SessionToken token, Bundle connectionHints, boolean waitForConnection)
|
|
||||||
throws RemoteException {
|
throws RemoteException {
|
||||||
binder.create(
|
binder.create(
|
||||||
/* isBrowser= */ true, controllerId, token.toBundle(), connectionHints, waitForConnection);
|
/* isBrowser= */ true, controllerId, token.toBundle(), connectionHints, waitForConnection);
|
||||||
|
@ -340,7 +340,7 @@ public class RemoteMediaController {
|
|||||||
* @param connectionHints connection hints
|
* @param connectionHints connection hints
|
||||||
* @param waitForConnection true if this method needs to wait for the connection,
|
* @param waitForConnection true if this method needs to wait for the connection,
|
||||||
*/
|
*/
|
||||||
void create(SessionToken token, Bundle connectionHints, boolean waitForConnection)
|
protected void create(SessionToken token, Bundle connectionHints, boolean waitForConnection)
|
||||||
throws RemoteException {
|
throws RemoteException {
|
||||||
binder.create(
|
binder.create(
|
||||||
/* isBrowser= */ false, controllerId, token.toBundle(), connectionHints, waitForConnection);
|
/* isBrowser= */ false, controllerId, token.toBundle(), connectionHints, waitForConnection);
|
||||||
|
@ -1224,7 +1224,6 @@ public class PlayerControlView extends FrameLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
private void dispatchPlay(Player player) {
|
private void dispatchPlay(Player player) {
|
||||||
@State int state = player.getPlaybackState();
|
@State int state = player.getPlaybackState();
|
||||||
if (state == Player.STATE_IDLE) {
|
if (state == Player.STATE_IDLE) {
|
||||||
|
@ -136,8 +136,6 @@ public final class LeanbackPlayerAdapter extends PlayerAdapter implements Runnab
|
|||||||
return player.getPlaybackState() == Player.STATE_IDLE ? -1 : player.getCurrentPosition();
|
return player.getPlaybackState() == Player.STATE_IDLE ? -1 : player.getCurrentPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calls deprecated method to provide backwards compatibility.
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Override
|
@Override
|
||||||
public void play() {
|
public void play() {
|
||||||
if (player.getPlaybackState() == Player.STATE_IDLE) {
|
if (player.getPlaybackState() == Player.STATE_IDLE) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user