[Android] Prevent PlaybackService to be get stuck foreground
Geoffrey Métais
git at videolan.org
Tue Jan 15 18:21:04 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jan 15 18:18:47 2019 +0100| [889355224951f144204420e6446d9d76bd48d8d3] | committer: Geoffrey Métais
Prevent PlaybackService to be get stuck foreground
> https://code.videolan.org/videolan/vlc-android/commit/889355224951f144204420e6446d9d76bd48d8d3
---
vlc-android/src/org/videolan/vlc/PlaybackService.kt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.kt b/vlc-android/src/org/videolan/vlc/PlaybackService.kt
index d9b71004e..5bc041817 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.kt
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.kt
@@ -570,7 +570,8 @@ class PlaybackService : MediaBrowserServiceCompat(), CoroutineScope, LifecycleOw
false, mediaSession.sessionToken, sessionPendingIntent)
startForeground(3, notification)
isForeground = true
- if (isVideoPlaying || AndroidDevices.showTvUi(this)) hideNotification(true)
+ if (isVideoPlaying || AndroidDevices.showTvUi(this)
+ || playlistManager.player.playbackState == PlaybackStateCompat.STATE_STOPPED) hideNotification(true)
}
private fun sendStartSessionIdIntent() {
More information about the Android
mailing list