[Android] Trigger medialibrary setup only when needed

Geoffrey Métais git at videolan.org
Tue May 30 15:00:23 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue May 30 14:59:31 2017 +0200| [61930541b35a23f7b73b45050dacf786aa3d5bce] | committer: Geoffrey Métais

Trigger medialibrary setup only when needed

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

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

diff --git a/vlc-android/src/org/videolan/vlc/StartActivity.java b/vlc-android/src/org/videolan/vlc/StartActivity.java
index 4e7a2b3e7..4b82bca39 100644
--- a/vlc-android/src/org/videolan/vlc/StartActivity.java
+++ b/vlc-android/src/org/videolan/vlc/StartActivity.java
@@ -97,7 +97,7 @@ public class StartActivity extends Activity {
     }
 
     private void startMedialibrary(boolean firstRun, boolean upgrade) {
-        if (Permissions.canReadStorage())
+        if (!VLCApplication.getMLInstance().isInitiated() && Permissions.canReadStorage())
             startService(new Intent(MediaParsingService.ACTION_INIT, null, this, MediaParsingService.class)
                     .putExtra(EXTRA_FIRST_RUN, firstRun)
                     .putExtra(EXTRA_UPGRADE, upgrade));



More information about the Android mailing list