From c1d81408c1073cfb1657b265f7b0229dbf45c380 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Wed, 9 Oct 2019 12:26:11 +0200 Subject: [PATCH] Fixed notification reappearing if continuous playback is disabled --- .../antennapod/core/service/playback/PlaybackService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java index f155e578e..a9967ae07 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java @@ -838,6 +838,7 @@ public class PlaybackService extends MediaBrowserServiceCompat { @Override public void onPlaybackPause(Playable playable, int position) { taskManager.cancelPositionSaver(); + cancelPositionObserver(); saveCurrentPosition(position == PlaybackServiceMediaPlayer.INVALID_TIME || playable == null, playable, position); taskManager.cancelWidgetUpdater(); @@ -914,6 +915,7 @@ public class PlaybackService extends MediaBrowserServiceCompat { Log.d(TAG, "Playback ended"); if (stopPlaying) { taskManager.cancelPositionSaver(); + cancelPositionObserver(); PlaybackPreferences.writeNoMediaPlaying(); if (!isCasting) { stateManager.stopForeground(true);