[Android] Playbackservice: Remove notification when needed
Geoffrey Métais
git at videolan.org
Tue Jan 15 11:04:15 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jan 15 11:02:01 2019 +0100| [98954e555febb28789898269539ad7b429cc9e83] | committer: Geoffrey Métais
Playbackservice: Remove notification when needed
Setting foreground on launch is mandatory on Android 8+.
But it's not relevant on TV or while playing a video to show
PlaybackService notification.
> https://code.videolan.org/videolan/vlc-android/commit/98954e555febb28789898269539ad7b429cc9e83
---
vlc-android/src/org/videolan/vlc/PlaybackService.kt | 1 +
1 file changed, 1 insertion(+)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.kt b/vlc-android/src/org/videolan/vlc/PlaybackService.kt
index 65f89dfa8..b8cbcec3a 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.kt
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.kt
@@ -569,6 +569,7 @@ class PlaybackService : MediaBrowserServiceCompat(), CoroutineScope, LifecycleOw
false, mediaSession.sessionToken, sessionPendingIntent)
startForeground(3, notification)
isForeground = true
+ if (isVideoPlaying || AndroidDevices.showTvUi(this)) hideNotification(true)
}
private fun sendStartSessionIdIntent() {
More information about the Android
mailing list