From 279e55e5005b5bd3d5653f0787a1fdb6416edfc9 Mon Sep 17 00:00:00 2001 From: mhelder Date: Thu, 8 Apr 2021 09:01:53 +0200 Subject: [PATCH] Also toggle local `isForegroundService` flag when service is removed from the foreground because of playback state change --- .../src/main/java/com/example/android/uamp/media/MusicService.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/common/src/main/java/com/example/android/uamp/media/MusicService.kt b/common/src/main/java/com/example/android/uamp/media/MusicService.kt index 112b56ba1..a60f63d7f 100644 --- a/common/src/main/java/com/example/android/uamp/media/MusicService.kt +++ b/common/src/main/java/com/example/android/uamp/media/MusicService.kt @@ -618,6 +618,7 @@ open class MusicService : MediaBrowserServiceCompat() { // "close" button in the notification which stops playback and clears // the notification. stopForeground(false) + isForegroundService = false } } }