[Android] Add NoSlavesAutodetect browser flag to subs picker

Geoffrey Métais git at videolan.org
Mon Jun 27 17:28:31 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jun 27 17:16:32 2016 +0200| [1c893b9455a3188df69372a7740cd4992e440410] | committer: Geoffrey Métais

Add NoSlavesAutodetect browser flag to subs picker

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

 .../src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java       | 6 +++++-
 .../src/org/videolan/vlc/gui/browser/FilePickerFragment.java        | 5 +++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
index 79447d4..bf7aed9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -354,7 +354,7 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
         if (mRoot)
             browseRoot();
         else
-            mMediaBrowser.browse(mCurrentMedia != null ? mCurrentMedia.getUri() : Uri.parse(mMrl), MediaBrowser.Flag.Interact);
+            mMediaBrowser.browse(mCurrentMedia != null ? mCurrentMedia.getUri() : Uri.parse(mMrl), getBrowserFlags());
     }
 
     private void deleteMedia(final MediaWrapper mw) {
@@ -375,6 +375,10 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
         }
     }
 
+    protected int getBrowserFlags() {
+        return MediaBrowser.Flag.Interact;
+    }
+
     protected static class BrowserFragmentHandler extends WeakHandler<BaseBrowserFragment> {
 
         public static final int MSG_SHOW_LOADING = 0;
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/FilePickerFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/FilePickerFragment.java
index 8f55fb5..bd468b9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/FilePickerFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/FilePickerFragment.java
@@ -109,4 +109,9 @@ public class FilePickerFragment extends FileBrowserFragment {
     protected int getLayoutId(){
         return R.layout.file_picker_fragment;
     }
+
+    @Override
+    protected int getBrowserFlags() {
+        return MediaBrowser.Flag.Interact|MediaBrowser.Flag.NoSlavesAutodetect;
+    }
 }



More information about the Android mailing list