[Android] PlaybackService: Do not hide notif too soon
Geoffrey Métais
git at videolan.org
Thu Mar 12 07:57:12 CET 2020
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Mar 11 13:09:00 2020 +0100| [959d834619adebbf8449a3b3d65026e5529ced65] | committer: Nicolas Pomepuy
PlaybackService: Do not hide notif too soon
> https://code.videolan.org/videolan/vlc-android/commit/959d834619adebbf8449a3b3d65026e5529ced65
---
.../vlc-android/src/org/videolan/vlc/PlaybackService.kt | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
index fcb81db83..c0777d04f 100644
--- a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
+++ b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
@@ -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() {
More information about the Android
mailing list