mirror of
https://github.com/androidx/media.git
synced 2025-05-05 14:40:50 +08:00
Fix lint warnings for 2.10
PiperOrigin-RevId: 244268855
This commit is contained in:
parent
b30efe968b
commit
b8cdd7e40b
@ -1089,17 +1089,26 @@ public final class MediaSessionConnector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSetShuffleMode(int shuffleMode) {
|
public void onSetShuffleMode(@PlaybackStateCompat.ShuffleMode int shuffleMode) {
|
||||||
if (canDispatchPlaybackAction(PlaybackStateCompat.ACTION_SET_SHUFFLE_MODE)) {
|
if (canDispatchPlaybackAction(PlaybackStateCompat.ACTION_SET_SHUFFLE_MODE)) {
|
||||||
boolean shuffleModeEnabled =
|
boolean shuffleModeEnabled;
|
||||||
shuffleMode == PlaybackStateCompat.SHUFFLE_MODE_ALL
|
switch (shuffleMode) {
|
||||||
|| shuffleMode == PlaybackStateCompat.SHUFFLE_MODE_GROUP;
|
case PlaybackStateCompat.SHUFFLE_MODE_ALL:
|
||||||
|
case PlaybackStateCompat.SHUFFLE_MODE_GROUP:
|
||||||
|
shuffleModeEnabled = true;
|
||||||
|
break;
|
||||||
|
case PlaybackStateCompat.SHUFFLE_MODE_NONE:
|
||||||
|
case PlaybackStateCompat.SHUFFLE_MODE_INVALID:
|
||||||
|
default:
|
||||||
|
shuffleModeEnabled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
controlDispatcher.dispatchSetShuffleModeEnabled(player, shuffleModeEnabled);
|
controlDispatcher.dispatchSetShuffleModeEnabled(player, shuffleModeEnabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSetRepeatMode(int mediaSessionRepeatMode) {
|
public void onSetRepeatMode(@PlaybackStateCompat.RepeatMode int mediaSessionRepeatMode) {
|
||||||
if (canDispatchPlaybackAction(PlaybackStateCompat.ACTION_SET_REPEAT_MODE)) {
|
if (canDispatchPlaybackAction(PlaybackStateCompat.ACTION_SET_REPEAT_MODE)) {
|
||||||
@RepeatModeUtil.RepeatToggleModes int repeatMode;
|
@RepeatModeUtil.RepeatToggleModes int repeatMode;
|
||||||
switch (mediaSessionRepeatMode) {
|
switch (mediaSessionRepeatMode) {
|
||||||
@ -1110,6 +1119,8 @@ public final class MediaSessionConnector {
|
|||||||
case PlaybackStateCompat.REPEAT_MODE_ONE:
|
case PlaybackStateCompat.REPEAT_MODE_ONE:
|
||||||
repeatMode = Player.REPEAT_MODE_ONE;
|
repeatMode = Player.REPEAT_MODE_ONE;
|
||||||
break;
|
break;
|
||||||
|
case PlaybackStateCompat.REPEAT_MODE_NONE:
|
||||||
|
case PlaybackStateCompat.REPEAT_MODE_INVALID:
|
||||||
default:
|
default:
|
||||||
repeatMode = Player.REPEAT_MODE_OFF;
|
repeatMode = Player.REPEAT_MODE_OFF;
|
||||||
break;
|
break;
|
||||||
|
@ -17,7 +17,6 @@ package com.google.android.exoplayer2;
|
|||||||
|
|
||||||
import androidx.annotation.IntDef;
|
import androidx.annotation.IntDef;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.VisibleForTesting;
|
|
||||||
import com.google.android.exoplayer2.source.MediaSource;
|
import com.google.android.exoplayer2.source.MediaSource;
|
||||||
import com.google.android.exoplayer2.util.Assertions;
|
import com.google.android.exoplayer2.util.Assertions;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -103,7 +102,6 @@ public final class ExoPlaybackException extends Exception {
|
|||||||
* @param cause The cause of the failure.
|
* @param cause The cause of the failure.
|
||||||
* @return The created instance.
|
* @return The created instance.
|
||||||
*/
|
*/
|
||||||
@VisibleForTesting
|
|
||||||
public static ExoPlaybackException createForUnexpected(RuntimeException cause) {
|
public static ExoPlaybackException createForUnexpected(RuntimeException cause) {
|
||||||
return new ExoPlaybackException(TYPE_UNEXPECTED, cause, /* rendererIndex= */ C.INDEX_UNSET);
|
return new ExoPlaybackException(TYPE_UNEXPECTED, cause, /* rendererIndex= */ C.INDEX_UNSET);
|
||||||
}
|
}
|
||||||
@ -124,7 +122,6 @@ public final class ExoPlaybackException extends Exception {
|
|||||||
* @param cause The cause of the failure.
|
* @param cause The cause of the failure.
|
||||||
* @return The created instance.
|
* @return The created instance.
|
||||||
*/
|
*/
|
||||||
@VisibleForTesting
|
|
||||||
public static ExoPlaybackException createForOutOfMemoryError(OutOfMemoryError cause) {
|
public static ExoPlaybackException createForOutOfMemoryError(OutOfMemoryError cause) {
|
||||||
return new ExoPlaybackException(TYPE_OUT_OF_MEMORY, cause, /* rendererIndex= */ C.INDEX_UNSET);
|
return new ExoPlaybackException(TYPE_OUT_OF_MEMORY, cause, /* rendererIndex= */ C.INDEX_UNSET);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user