Skip to content
Snippets Groups Projects
Commit 828ffce2 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

MediaParsingService: Always set foreground Oreo+

parent bd91edb9
No related branches found
No related tags found
No related merge requests found
Pipeline #8870 passed with stage
in 28 minutes and 17 seconds
......@@ -128,15 +128,14 @@ class MediaParsingService : Service(), DevicesDiscoveryCb, CoroutineScope, Lifec
}
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
if (intent == null) {
exitCommand()
return Service.START_NOT_STICKY
}
// Set 1s delay before displaying scan icon
// Except for Android 8+ which expects startForeground immediately
if (AndroidUtil.isOOrLater) forceForeground()
else if (lastNotificationTime <= 0L) lastNotificationTime = System.currentTimeMillis()
if (intent == null) {
exitCommand()
return Service.START_NOT_STICKY
}
dispatcher.onServicePreSuperOnStart()
when (intent.action) {
ACTION_INIT -> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment