Commit 52cec56d authored by Geoffrey Métais's avatar Geoffrey Métais

Medialibrary: Always set service foreground

parent 49e0b737
Pipeline #4433 passed with stage
in 3 minutes and 49 seconds
...@@ -117,7 +117,7 @@ class MediaParsingService : Service(), DevicesDiscoveryCb, CoroutineScope { ...@@ -117,7 +117,7 @@ class MediaParsingService : Service(), DevicesDiscoveryCb, CoroutineScope {
// Set 1s delay before displaying scan icon // Set 1s delay before displaying scan icon
// Except for Android 8+ which expects startForeground immediately // 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() else if (lastNotificationTime <= 0L) lastNotificationTime = System.currentTimeMillis()
when (intent.action) { when (intent.action) {
ACTION_INIT -> { ACTION_INIT -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment