[Android] Medialibrary: Always set service foreground

Geoffrey Métais git at videolan.org
Fri Feb 8 12:05:24 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb  8 12:04:50 2019 +0100| [52cec56d0b515b8ab9ccb0bf37bb1e6b3eff5aa2] | committer: Geoffrey Métais

Medialibrary: Always set service foreground

> https://code.videolan.org/videolan/vlc-android/commit/52cec56d0b515b8ab9ccb0bf37bb1e6b3eff5aa2
---

 vlc-android/src/org/videolan/vlc/MediaParsingService.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaParsingService.kt b/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
index 168259e2c..a8e4e751a 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
@@ -117,7 +117,7 @@ class MediaParsingService : Service(), DevicesDiscoveryCb, CoroutineScope {
         // Set 1s delay before displaying scan icon
         // Except for Android 8+ which expects startForeground immediately
 
-        if (AndroidUtil.isOOrLater && lastNotificationTime == 0L) forceForeground()
+        if (AndroidUtil.isOOrLater) forceForeground()
         else if (lastNotificationTime <= 0L) lastNotificationTime = System.currentTimeMillis()
         when (intent.action) {
             ACTION_INIT -> {



More information about the Android mailing list