[Android] Set folders blacklist on first ML init only
Geoffrey Métais
git at videolan.org
Fri Dec 23 17:33:37 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Dec 23 17:33:01 2016 +0100| [97d3efd67768b0eb30827bb9ee0f26557aba0204] | committer: Geoffrey Métais
Set folders blacklist on first ML init only
> https://code.videolan.org/videolan/vlc-android/commit/97d3efd67768b0eb30827bb9ee0f26557aba0204
---
vlc-android/src/org/videolan/vlc/VLCApplication.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/VLCApplication.java b/vlc-android/src/org/videolan/vlc/VLCApplication.java
index cb11111..d6c4c73 100644
--- a/vlc-android/src/org/videolan/vlc/VLCApplication.java
+++ b/vlc-android/src/org/videolan/vlc/VLCApplication.java
@@ -252,11 +252,10 @@ public class VLCApplication extends Application {
medialibrary.addDevice(storage, storage, TextUtils.equals(storage, AndroidDevices.EXTERNAL_PUBLIC_DIRECTORY));
if (medialibrary.init(getAppContext())) {
LocalBroadcastManager.getInstance(instance).sendBroadcast(new Intent(ACTION_MEDIALIBRARY_READY));
- //FIXME ban causes crash after app force stop
-// for (String storage : storages)
-// for (String folder : Medialibrary.banList)
-// medialibrary.banFolder(storage+folder);
if (medialibrary.getFoldersList().length == 0) {
+ for (String storage : storages)
+ for (String folder : Medialibrary.banList)
+ medialibrary.banFolder(storage+folder);
medialibrary.discover(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath());
medialibrary.discover(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES).getPath());
medialibrary.discover(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC).getPath());
More information about the Android
mailing list