[Android] Fix inverted logic and set uuid for internal

Geoffrey Métais git at videolan.org
Fri Jan 6 17:56:19 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Jan  6 11:55:44 2017 +0100| [4196caae0ffbf899ba91b737afc7ed96fc762fb5] | committer: Geoffrey Métais

Fix inverted logic and set uuid for internal

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

 vlc-android/src/org/videolan/vlc/VLCApplication.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/VLCApplication.java b/vlc-android/src/org/videolan/vlc/VLCApplication.java
index c871f55..a67aeac 100644
--- a/vlc-android/src/org/videolan/vlc/VLCApplication.java
+++ b/vlc-android/src/org/videolan/vlc/VLCApplication.java
@@ -248,8 +248,10 @@ public class VLCApplication extends Application {
                     return;
                 medialibrary.setup();
                 String[] storages = AndroidDevices.getMediaDirectories();
-                for (String storage : storages)
-                    medialibrary.addDevice(storage, storage, TextUtils.equals(storage, AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY));
+                for (String storage : storages) {
+                    boolean isMainStorage = TextUtils.equals(storage, AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY);
+                    medialibrary.addDevice(isMainStorage ? "main-storage" : storage, storage, !isMainStorage);
+                }
                 if (medialibrary.init(getAppContext())) {
                     LocalBroadcastManager.getInstance(instance).sendBroadcast(new Intent(ACTION_MEDIALIBRARY_READY));
                     if (medialibrary.getFoldersList().length == 0) {



More information about the Android mailing list