From c2ace741563f33d507ae7fd425ad659298cbd655 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Wed, 6 Jun 2018 18:37:33 +0200 Subject: [PATCH] Stop service on status change --- .../antennapod/core/service/playback/PlaybackService.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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 90df9871b..68583c840 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 @@ -677,11 +677,6 @@ public class PlaybackService extends MediaBrowserServiceCompat { writePlayerStatusPlaybackPreferences(); break; - case STOPPED: - //setCurrentlyPlayingMedia(PlaybackPreferences.NO_MEDIA_PLAYING); - //stopSelf(); - break; - case PLAYING: writePlayerStatusPlaybackPreferences(); setupNotification(newInfo); @@ -694,8 +689,9 @@ public class PlaybackService extends MediaBrowserServiceCompat { } break; - case ERROR: + case ERROR: case STOPPED: writePlaybackPreferencesNoMediaPlaying(); + stopSelf(); break; }