Merge pull request #3506 from ByteHamster/fixed-notification-reappearing

Fixed notification reappearing if continuous playback is disabled
This commit is contained in:
H. Lehmann 2019-10-10 09:57:58 +02:00 committed by GitHub
commit 8d81fb8d9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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);