From c0204bfdc49d4cd57a5bef54d15c04d82d49f819 Mon Sep 17 00:00:00 2001 From: bachinger Date: Thu, 16 Jul 2020 14:30:00 +0100 Subject: [PATCH] Throw when window uid changes for unexpected reasons PiperOrigin-RevId: 321553397 --- .../main/java/com/google/android/exoplayer2/ExoPlayerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java b/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java index 4520054b90..215e6a3528 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java @@ -1055,7 +1055,8 @@ import java.util.concurrent.TimeoutException; } else if (timelineChanged) { transitionReason = MEDIA_ITEM_TRANSITION_REASON_PLAYLIST_CHANGED; } else { - transitionReason = MEDIA_ITEM_TRANSITION_REASON_SKIP; + // A change in window uid must be justified by one of the reasons above. + throw new IllegalStateException(); } return new Pair<>(/* isTransitioning */ true, transitionReason); } else if (positionDiscontinuity