[Android] Browser: show every protocol except 'file'

Geoffrey Métais git at videolan.org
Mon Jan 11 17:47:43 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 11 17:42:13 2016 +0100| [e0731dd666514496e25055133bdd515736d84e12] | committer: Geoffrey Métais

Browser: show every protocol except 'file'

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

 .../src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java   | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
index 6fb9187..1c3b3bc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
@@ -25,7 +25,6 @@ package org.videolan.vlc.gui.browser;
 import android.databinding.DataBindingUtil;
 import android.net.Uri;
 import android.support.v7.widget.RecyclerView;
-import android.text.TextUtils;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -104,7 +103,8 @@ public class BaseBrowserAdapter extends  RecyclerView.Adapter<RecyclerView.ViewH
         vh.binding.setMedia(media);
         vh.binding.setType(TYPE_MEDIA);
         vh.binding.setHasContextMenu(true);
-        vh.binding.setProtocole(getProtocol(media));
+        if (fragment instanceof NetworkBrowserFragment)
+            vh.binding.setProtocole(getProtocol(media));
         vh.binding.executePendingBindings();
 
         vh.icon.setBackgroundResource(getIconResId(media));
@@ -347,11 +347,7 @@ public class BaseBrowserAdapter extends  RecyclerView.Adapter<RecyclerView.ViewH
             return null;
         if (media.getType() != MediaWrapper.TYPE_DIR)
             return null;
-        String scheme = media.getUri().getScheme();
-        if (TextUtils.equals(scheme, "smb") || TextUtils.equals(scheme, "upnp"))
-            return scheme;
-        else
-            return null;
+        return media.getUri().getScheme();
     }
 
     protected void checkBoxAction(View v, String path){}



More information about the Android mailing list