Explicitely remove notification when paused and the app is swiped up.
This commit is contained in:
parent
b6b9e4c053
commit
dd86988518
|
@ -12,6 +12,7 @@ import android.media.MediaMetadata
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.IBinder
|
import android.os.IBinder
|
||||||
import android.support.v4.media.MediaMetadataCompat
|
import android.support.v4.media.MediaMetadataCompat
|
||||||
|
import androidx.core.app.NotificationManagerCompat
|
||||||
import com.github.apognu.otter.Otter
|
import com.github.apognu.otter.Otter
|
||||||
import com.github.apognu.otter.R
|
import com.github.apognu.otter.R
|
||||||
import com.github.apognu.otter.utils.*
|
import com.github.apognu.otter.utils.*
|
||||||
|
@ -221,8 +222,7 @@ class PlayerService : Service() {
|
||||||
super.onTaskRemoved(rootIntent)
|
super.onTaskRemoved(rootIntent)
|
||||||
|
|
||||||
if (!player.playWhenReady) {
|
if (!player.playWhenReady) {
|
||||||
mediaControlsManager.updateNotification(queue.current(), false)
|
NotificationManagerCompat.from(this).cancelAll()
|
||||||
|
|
||||||
stopSelf()
|
stopSelf()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue