[Android] Add 'Downloads' to browser quick access

Geoffrey Métais git at videolan.org
Thu Nov 2 18:02:47 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov  2 18:02:27 2017 +0100| [bdf4994024a03663cce0c5425cbdb178c219ed17] | committer: Geoffrey Métais

Add 'Downloads' to browser quick access

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

 vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java | 3 +++
 vlc-android/src/org/videolan/vlc/util/AndroidDevices.java             | 1 +
 2 files changed, 4 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java
index b225b5d1c..5fac90758 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/FileBrowserFragment.java
@@ -112,6 +112,9 @@ public class FileBrowserFragment extends BaseBrowserFragment {
                     final MediaWrapper podcasts = new MediaWrapper(AndroidDevices.MediaFolders.EXTERNAL_PUBLIC_PODCAST_DIRECTORY_URI);
                     podcasts.setType(MediaWrapper.TYPE_DIR);
                     devices.add(podcasts);
+                    final MediaWrapper downloads = new MediaWrapper(AndroidDevices.MediaFolders.EXTERNAL_PUBLIC_DOWNLOAD_DIRECTORY_URI);
+                    downloads.setType(MediaWrapper.TYPE_DIR);
+                    devices.add(downloads);
                 }
                 VLCApplication.runOnMainThread(new Runnable() {
                     @Override
diff --git a/vlc-android/src/org/videolan/vlc/util/AndroidDevices.java b/vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
index bd4a08fbc..e6350c542 100644
--- a/vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
+++ b/vlc-android/src/org/videolan/vlc/util/AndroidDevices.java
@@ -224,6 +224,7 @@ public class AndroidDevices {
         public final static Uri EXTERNAL_PUBLIC_MOVIES_DIRECTORY_URI = getFolderUri(Environment.DIRECTORY_MOVIES);
         public final static Uri EXTERNAL_PUBLIC_MUSIC_DIRECTORY_URI = getFolderUri(Environment.DIRECTORY_MUSIC);
         public final static Uri EXTERNAL_PUBLIC_PODCAST_DIRECTORY_URI = getFolderUri(Environment.DIRECTORY_PODCASTS);
+        public final static Uri EXTERNAL_PUBLIC_DOWNLOAD_DIRECTORY_URI = getFolderUri(Environment.DIRECTORY_DOWNLOADS);
 
         @NonNull
         private static Uri getFolderUri(String type) {



More information about the Android mailing list