[Android] MediaParsingService: Use a normal dispatcher

Geoffrey Métais git at videolan.org
Thu Feb 13 11:59:20 CET 2020


vlc-android | branch: 3.2.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Feb 12 15:57:22 2020 +0100| [1dac4737ea50f755c3b0b56e8a0890aef9cc46f8] | committer: Geoffrey Métais

MediaParsingService: Use a normal dispatcher

.immediate extension can lead to close service too quickly
May help with #1197

> https://code.videolan.org/videolan/vlc-android/commit/1dac4737ea50f755c3b0b56e8a0890aef9cc46f8
---

 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 53a021c8b..e43b46c83 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
@@ -58,7 +58,7 @@ private const val NOTIFICATION_DELAY = 1000L
 @ExperimentalCoroutinesApi
 class MediaParsingService : Service(), DevicesDiscoveryCb, CoroutineScope, LifecycleOwner {
 
-    override val coroutineContext = Dispatchers.Main.immediate
+    override val coroutineContext = Dispatchers.Main
     private val dispatcher = ServiceLifecycleDispatcher(this)
     private lateinit var wakeLock: PowerManager.WakeLock
     private lateinit var localBroadcastManager: LocalBroadcastManager



More information about the Android mailing list