Explicitely remove notification when paused and the app is swiped up.

This commit is contained in:
Antoine POPINEAU 2020-07-11 14:16:22 +02:00
parent b6b9e4c053
commit dd86988518
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
1 changed files with 2 additions and 2 deletions

View File

@ -12,6 +12,7 @@ import android.media.MediaMetadata
import android.os.Build
import android.os.IBinder
import android.support.v4.media.MediaMetadataCompat
import androidx.core.app.NotificationManagerCompat
import com.github.apognu.otter.Otter
import com.github.apognu.otter.R
import com.github.apognu.otter.utils.*
@ -221,8 +222,7 @@ class PlayerService : Service() {
super.onTaskRemoved(rootIntent)
if (!player.playWhenReady) {
mediaControlsManager.updateNotification(queue.current(), false)
NotificationManagerCompat.from(this).cancelAll()
stopSelf()
}
}