Send NotificationDismissReceiver intent in onTaskRemoved

This commit is contained in:
vfsfitvnm
2022-09-01 15:25:03 +02:00
parent 6b26ad1fd9
commit 1f88238e78

View File

@@ -220,11 +220,7 @@ class PlayerService : InvincibleService(), Player.Listener, PlaybackStatsListene
override fun onTaskRemoved(rootIntent: Intent?) { override fun onTaskRemoved(rootIntent: Intent?) {
if (!player.shouldBePlaying) { if (!player.shouldBePlaying) {
if (isPersistentQueueEnabled) { broadCastPendingIntent<NotificationDismissReceiver>().send()
broadCastPendingIntent<NotificationDismissReceiver>().send()
} else {
stopSelf()
}
} }
super.onTaskRemoved(rootIntent) super.onTaskRemoved(rootIntent)
} }