Commit de871ea2 by bachinger Committed by Ian Baker

Some fixes/cleanup in MediaControllerImplLegacy

PiperOrigin-RevId: 444542725
parent 6708b43b
......@@ -846,7 +846,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
calculateCurrentItemIndexAfterRemoveItems(currentMediaItemIndex, fromIndex, toIndex);
if (currentMediaItemIndexAfterRemove == C.INDEX_UNSET) {
currentMediaItemIndexAfterRemove =
Util.constrainValue(fromIndex, /* min= */ 0, /* toIndex= */ lastItemIndexAfterRemove);
Util.constrainValue(fromIndex, /* min= */ 0, /* max= */ lastItemIndexAfterRemove);
Log.w(
TAG,
"Currently playing item will be removed and added back to mimic move."
......@@ -1550,8 +1550,8 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
pendingLegacyPlayerInfo =
pendingLegacyPlayerInfo.copyWithExtraBinderGetters(
convertToSafePlaybackStateCompat(controllerCompat.getPlaybackState()),
controllerCompat.getShuffleMode(),
controllerCompat.getRepeatMode());
controllerCompat.getRepeatMode(),
controllerCompat.getShuffleMode());
boolean isCaptioningEnabled = controllerCompat.isCaptioningEnabled();
onCaptioningEnabledChanged(isCaptioningEnabled);
......
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