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