Remove ForwardingPlayer special case from PlayerControlView.setPlayer

This was originally added in 4fd7d777b6, but it hasn't done anything
since 98ee159df1 (when the instanceof ExoPlayer check was removed).

PiperOrigin-RevId: 482161662
(cherry picked from commit a5b09b8cccca80fb7c40a9576e029ef462b64582)
This commit is contained in:
ibaker 2022-10-19 10:40:06 +00:00 committed by microkatz
parent d8b6c2971b
commit 950ea910db

View File

@ -57,7 +57,6 @@ import androidx.annotation.Nullable;
import androidx.core.content.res.ResourcesCompat;
import androidx.media3.common.C;
import androidx.media3.common.Format;
import androidx.media3.common.ForwardingPlayer;
import androidx.media3.common.MediaLibraryInfo;
import androidx.media3.common.Player;
import androidx.media3.common.Player.Events;
@ -633,9 +632,6 @@ public class PlayerControlView extends FrameLayout {
if (player != null) {
player.addListener(componentListener);
}
if (player instanceof ForwardingPlayer) {
player = ((ForwardingPlayer) player).getWrappedPlayer();
}
updateAll();
}