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 7d5f1a24be)
This commit is contained in:
ibaker 2022-10-19 10:40:06 +00:00 committed by microkatz
parent e54127cf52
commit f56d714dd3

View file

@ -60,7 +60,6 @@ import androidx.recyclerview.widget.RecyclerView;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.ExoPlayerLibraryInfo; import com.google.android.exoplayer2.ExoPlayerLibraryInfo;
import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.ForwardingPlayer;
import com.google.android.exoplayer2.Player; import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.Player.Events; import com.google.android.exoplayer2.Player.Events;
import com.google.android.exoplayer2.Player.State; import com.google.android.exoplayer2.Player.State;
@ -639,9 +638,6 @@ public class StyledPlayerControlView extends FrameLayout {
if (player != null) { if (player != null) {
player.addListener(componentListener); player.addListener(componentListener);
} }
if (player instanceof ForwardingPlayer) {
player = ((ForwardingPlayer) player).getWrappedPlayer();
}
updateAll(); updateAll();
} }