[Android] Add NoSlavesAutodetect browser flag to subs picker

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


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

Add NoSlavesAutodetect browser flag to subs picker

(cherry picked from commit 1c893b9455a3188df69372a7740cd4992e440410)

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

 .../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 163382a..e7bc2d7 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -353,7 +353,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) {
@@ -374,6 +374,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