|
|
|
@ -217,6 +217,16 @@ class PlayerService : Service() {
@@ -217,6 +217,16 @@ class PlayerService : Service() {
|
|
|
|
|
|
|
|
|
|
override fun onBind(intent: Intent?): IBinder? = null |
|
|
|
|
|
|
|
|
|
override fun onTaskRemoved(rootIntent: Intent?) { |
|
|
|
|
super.onTaskRemoved(rootIntent) |
|
|
|
|
|
|
|
|
|
if (!player.playWhenReady) { |
|
|
|
|
mediaControlsManager.updateNotification(queue.current(), false) |
|
|
|
|
|
|
|
|
|
stopSelf() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@SuppressLint("NewApi") |
|
|
|
|
override fun onDestroy() { |
|
|
|
|
scope.cancel() |
|
|
|
@ -243,9 +253,6 @@ class PlayerService : Service() {
@@ -243,9 +253,6 @@ class PlayerService : Service() {
|
|
|
|
|
setPlaybackState(false) |
|
|
|
|
player.release() |
|
|
|
|
|
|
|
|
|
stopForeground(true) |
|
|
|
|
stopSelf() |
|
|
|
|
|
|
|
|
|
super.onDestroy() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|