[Android] Allow subs picking on network

Geoffrey Métais git at videolan.org
Tue Mar 7 11:38:10 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar  7 11:37:38 2017 +0100| [116ca0e6a9564e76eea60ff10087cbb3d9bd36c8] | committer: Geoffrey Métais

Allow  subs picking on network

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

 .../src/org/videolan/vlc/gui/browser/FilePickerFragment.java      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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 7ffdeb5..588e4c4 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/FilePickerFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/FilePickerFragment.java
@@ -57,7 +57,7 @@ public class FilePickerFragment extends FileBrowserFragment {
     public void onCreate(Bundle bundle) {
         if (getActivity().getIntent() != null) {
             Uri uri = getActivity().getIntent().getData();
-            if (uri == null || !TextUtils.equals(uri.getScheme(), "file")) {
+            if (uri == null || TextUtils.equals(uri.getScheme(), "http")) {
                 getActivity().setIntent(null);
             }
         }
@@ -114,13 +114,13 @@ public class FilePickerFragment extends FileBrowserFragment {
             return true;
         if (mMrl.startsWith("file")) {
             String path = Strings.removeFileProtocole(mMrl);
-            for (int i = 0; i < rootDirectories.length; ++i) {
-                if (path.startsWith(rootDirectories[i]))
+            for (String directory : rootDirectories) {
+                if (path.startsWith(directory))
                     return false;
             }
             return true;
         } else
-            return true;
+            return mMrl.startsWith("http");
     }
 
     @Override



More information about the Android mailing list