From 886a949a0021e722d4702aebfb216c57a4154a60 Mon Sep 17 00:00:00 2001 From: Avently <7953703+avently@users.noreply.github.com> Date: Thu, 17 Sep 2020 22:30:03 +0300 Subject: [PATCH] Enable/disable video after screen on/off regardless of background playback setting --- .../java/org/schabi/newpipe/player/VideoPlayerImpl.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java index 224f2d3e2..7a258a4b8 100644 --- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java +++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java @@ -1290,18 +1290,14 @@ public class VideoPlayerImpl extends VideoPlayer // Interrupt playback only when screen turns on // and user is watching video in popup player. // Same actions for video player will be handled in ACTION_VIDEO_FRAGMENT_RESUMED - if (backgroundPlaybackEnabled() - && popupPlayerSelected() - && (isPlaying() || isLoading())) { + if (popupPlayerSelected() && (isPlaying() || isLoading())) { useVideoSource(true); } break; case Intent.ACTION_SCREEN_OFF: shouldUpdateOnProgress = false; // Interrupt playback only when screen turns off with popup player working - if (backgroundPlaybackEnabled() - && popupPlayerSelected() - && (isPlaying() || isLoading())) { + if (popupPlayerSelected() && (isPlaying() || isLoading())) { useVideoSource(false); } break;