Fixed pressing play from headset button

When pausing, we stop the foreground service. This prevented re-entering
foreground state later, which lead to Android killing the service after a
few seconds.
This commit is contained in:
ByteHamster 2019-11-05 23:44:56 +01:00
parent 562391c7d9
commit 24a7c11788
1 changed files with 1 additions and 1 deletions

View File

@ -22,6 +22,7 @@ class PlaybackServiceStateManager {
void stopService() {
stopForeground(true);
playbackService.stopSelf();
hasReceivedValidStartCommand = false;
}
void stopForeground(boolean removeNotification) {
@ -35,7 +36,6 @@ class PlaybackServiceStateManager {
}
}
isInForeground = false;
hasReceivedValidStartCommand = false;
}
boolean isInForeground() {