Browse Source

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

housekeeping/remove-warnings
Antoine POPINEAU 4 years ago
parent
commit
dd86988518
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
  1. 4
      app/src/main/java/com/github/apognu/otter/playback/PlayerService.kt

4
app/src/main/java/com/github/apognu/otter/playback/PlayerService.kt

@ -12,6 +12,7 @@ import android.media.MediaMetadata @@ -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() { @@ -221,8 +222,7 @@ class PlayerService : Service() {
super.onTaskRemoved(rootIntent)
if (!player.playWhenReady) {
mediaControlsManager.updateNotification(queue.current(), false)
NotificationManagerCompat.from(this).cancelAll()
stopSelf()
}
}

Loading…
Cancel
Save