From fd24c08529e31c78052b5df28530760362aa669c Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sun, 4 May 2025 21:07:35 +0200 Subject: [PATCH] Player/handleIntent: de morgan samePlayQueue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Okay, so this is the … only? branch in this if-chain that will conditionally fire if `playQueue` *is* `null`, sometimes. This is why the unconditional `initPlayback` in `else` is not passed a `null` in many cases … because `RESUME_PLAYBACK` is `true` and `playQueue` is `null`. It’s gonna be hard to figure out which parts of that are intentional, I say. --- app/src/main/java/org/schabi/newpipe/player/Player.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/Player.java b/app/src/main/java/org/schabi/newpipe/player/Player.java index 945eba795..1668d4ded 100644 --- a/app/src/main/java/org/schabi/newpipe/player/Player.java +++ b/app/src/main/java/org/schabi/newpipe/player/Player.java @@ -429,7 +429,8 @@ public final class Player implements PlaybackListener, Listener { } else if (intent.getBooleanExtra(RESUME_PLAYBACK, false) && DependentPreferenceHelper.getResumePlaybackEnabled(context) - && !samePlayQueue + // !samePlayQueue + && (playQueue == null || !playQueue.equalStreamsAndIndex(newQueue)) && !newQueue.isEmpty() && newQueue.getItem() != null && newQueue.getItem().getRecoveryPosition() == PlayQueueItem.RECOVERY_UNSET) {