Stop service on status change

This commit is contained in:
ByteHamster 2018-06-06 18:37:33 +02:00
parent 632906df07
commit c2ace74156
1 changed files with 2 additions and 6 deletions

View File

@ -677,11 +677,6 @@ public class PlaybackService extends MediaBrowserServiceCompat {
writePlayerStatusPlaybackPreferences(); writePlayerStatusPlaybackPreferences();
break; break;
case STOPPED:
//setCurrentlyPlayingMedia(PlaybackPreferences.NO_MEDIA_PLAYING);
//stopSelf();
break;
case PLAYING: case PLAYING:
writePlayerStatusPlaybackPreferences(); writePlayerStatusPlaybackPreferences();
setupNotification(newInfo); setupNotification(newInfo);
@ -694,8 +689,9 @@ public class PlaybackService extends MediaBrowserServiceCompat {
} }
break; break;
case ERROR: case ERROR: case STOPPED:
writePlaybackPreferencesNoMediaPlaying(); writePlaybackPreferencesNoMediaPlaying();
stopSelf();
break; break;
} }