[Android] Improve context menu display filtering

Geoffrey Métais git at videolan.org
Thu Aug 2 18:38:59 CEST 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Aug  2 18:05:16 2018 +0200| [e3a882c7c2c6fb8b61869d9fb034a21d30855191] | committer: Geoffrey Métais

Improve context menu display filtering

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

 vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 918ef8614..2ab011170 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
@@ -116,7 +116,9 @@ public class BaseBrowserAdapter extends DiffUtilAdapter<MediaLibraryItem, BaseBr
         final MediaWrapper media = (MediaWrapper) getItem(position);
         final boolean isFavorite = media.hasStateFlags(MediaLibraryItem.FLAG_FAVORITE);
         vh.binding.setItem(media);
-        vh.binding.setHasContextMenu((!mNetworkRoot || isFavorite) && !"content".equals(media.getUri().getScheme()));
+        vh.binding.setHasContextMenu((!mNetworkRoot || isFavorite)
+                && !"content".equals(media.getUri().getScheme())
+                && !"otg".equals(media.getUri().getScheme()));
         if (mNetworkRoot) vh.binding.setProtocol(getProtocol(media));
         vh.binding.setCover(getIcon(media, mSpecialIcons));
         vh.selectView(media.hasStateFlags(FLAG_SELECTED));



More information about the Android mailing list