mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-27 13:54:01 +02:00
Update:Android remove stop action when notification cancelled
This commit is contained in:
+1
-5
@@ -44,11 +44,7 @@ class PlayerNotificationListener(var playerNotificationService:PlayerNotificatio
|
|||||||
} else {
|
} else {
|
||||||
Log.d(tag, "onNotificationCancelled not dismissed by user")
|
Log.d(tag, "onNotificationCancelled not dismissed by user")
|
||||||
|
|
||||||
// When stop button is pressed on the notification I guess it isn't considered "dismissedByUser" so we need to close playback ourselves
|
if (PlayerNotificationService.isSwitchingPlayer) {
|
||||||
if (!PlayerNotificationService.isClosed && !PlayerNotificationService.isSwitchingPlayer) {
|
|
||||||
Log.d(tag, "PNS is not closed - closing it now")
|
|
||||||
playerNotificationService.closePlayback()
|
|
||||||
} else if (PlayerNotificationService.isSwitchingPlayer) {
|
|
||||||
// When switching from cast player to exo player and vice versa the notification is cancelled and posted again
|
// When switching from cast player to exo player and vice versa the notification is cancelled and posted again
|
||||||
// so we don't want to cancel the playback during this switch
|
// so we don't want to cancel the playback during this switch
|
||||||
Log.d(tag, "PNS is switching player")
|
Log.d(tag, "PNS is switching player")
|
||||||
|
|||||||
Reference in New Issue
Block a user