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:
parent
562391c7d9
commit
24a7c11788
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue