[Android] Fix medialibrary not started app upgrade

Geoffrey Métais git at videolan.org
Mon Aug 6 10:56:00 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Aug  6 10:54:37 2018 +0200| [e3e38e98d1486dc332dfec965f94f2cc3e685a15] | committer: Geoffrey Métais

Fix medialibrary not started app upgrade

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

 vlc-android/src/org/videolan/vlc/MediaParsingService.kt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaParsingService.kt b/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
index 5c818b55f..d38645ece 100644
--- a/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
+++ b/vlc-android/src/org/videolan/vlc/MediaParsingService.kt
@@ -423,14 +423,14 @@ fun Context.startMedialibrary(firstRun: Boolean = false, upgrade: Boolean = fals
             if (MediaParsingService.wizardShowing) return at uiJob
             MediaParsingService.wizardShowing = true
             startMLWizard()
+            return at uiJob
         }
-    } else {
-        val intent = Intent(Constants.ACTION_INIT, null, this at startMedialibrary, MediaParsingService::class.java)
-        ContextCompat.startForegroundService(this at startMedialibrary, intent
-                .putExtra(Constants.EXTRA_FIRST_RUN, firstRun)
-                .putExtra(Constants.EXTRA_UPGRADE, upgrade)
-                .putExtra(Constants.EXTRA_PARSE, parse && scanOpt == Constants.ML_SCAN_ON))
     }
+    val intent = Intent(Constants.ACTION_INIT, null, this at startMedialibrary, MediaParsingService::class.java)
+    ContextCompat.startForegroundService(this at startMedialibrary, intent
+            .putExtra(Constants.EXTRA_FIRST_RUN, firstRun)
+            .putExtra(Constants.EXTRA_UPGRADE, upgrade)
+            .putExtra(Constants.EXTRA_PARSE, parse && scanOpt == Constants.ML_SCAN_ON))
 }
 
 private suspend fun dbExists(context: Context) = withContext(VLCIO) {



More information about the Android mailing list