This commit is contained in:
vfsfitvnm
2022-07-25 12:32:19 +02:00
parent 9ed2c84822
commit 457e6712d4
4 changed files with 58 additions and 20 deletions

View File

@@ -213,7 +213,7 @@ class PlayerService : InvincibleService(), Player.Listener, PlaybackStatsListene
}
override fun onTaskRemoved(rootIntent: Intent?) {
if (!player.playWhenReady) {
if (!player.shouldBePlaying) {
if (isPersistentQueueEnabled) {
broadCastPendingIntent<NotificationDismissReceiver>().send()
} else {
@@ -398,7 +398,9 @@ class PlayerService : InvincibleService(), Player.Listener, PlaybackStatsListene
val notification = notification()
if (notification == null) {
stopSelf()
isNotificationStarted = false
makeInvincible(false)
stopForeground(true)
return
}