Skip to content
Snippets Groups Projects
Commit 959d8346 authored by Geoffrey Métais's avatar Geoffrey Métais Committed by Nicolas Pomepuy
Browse files

PlaybackService: Do not hide notif too soon

parent e4ec9282
No related branches found
No related tags found
1 merge request!488Service exception
Pipeline #14790 passed with stage
in 4 minutes and 38 seconds
......@@ -168,14 +168,7 @@ class PlaybackService : MediaBrowserServiceCompat(), LifecycleOwner {
publishState()
audioFocusHelper.changeAudioFocus(true)
if (!wakeLock.isHeld) wakeLock.acquire()
if (!keyguardManager.isKeyguardLocked
&& !playlistManager.videoBackground
&& !hasRenderer()
&& playlistManager.switchToVideo()) {
hideNotification(true)
} else {
showNotification()
}
showNotification()
handler.nbErrors = 0
}
MediaPlayer.Event.Paused -> {
......@@ -598,7 +591,7 @@ class PlaybackService : MediaBrowserServiceCompat(), LifecycleOwner {
false, true, mediaSession.sessionToken, sessionPendingIntent)
startForeground(3, notification)
isForeground = true
if (isVideoPlaying || Settings.showTvUi || stopped) hideNotification(true)
if (stopped) lifecycleScope.launch { hideNotification(true) }
}
private fun sendStartSessionIdIntent() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment