[Android] Show display name on networks
Geoffrey Métais
git at videolan.org
Thu Jan 24 10:26:51 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jan 24 09:55:38 2019 +0100| [605fa783f4f9aff5870e304e0227d1593e4fcf8d] | committer: Geoffrey Métais
Show display name on networks
> https://code.videolan.org/videolan/vlc-android/commit/605fa783f4f9aff5870e304e0227d1593e4fcf8d
---
.../src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java | 7 ++++---
1 file changed, 4 insertions(+), 3 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 1802fe431..d3aa87200 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
@@ -123,10 +123,11 @@ 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);
+ final String scheme = media.getUri().getScheme();
vh.binding.setHasContextMenu((!mNetworkRoot || isFavorite)
- && !"content".equals(media.getUri().getScheme())
- && !"otg".equals(media.getUri().getScheme()));
- vh.binding.setFilename(media.getType() != MediaWrapper.TYPE_DIR ? media.getFileName() : null);
+ && !"content".equals(scheme)
+ && !"otg".equals(scheme));
+ vh.binding.setFilename(media.getType() != MediaWrapper.TYPE_DIR && scheme.equals("file") ? media.getFileName() : null);
if (mNetworkRoot) vh.binding.setProtocol(getProtocol(media));
vh.binding.setCover(getIcon(media, mSpecialIcons));
vh.selectView(multiSelectHelper.isSelected(position));
More information about the Android
mailing list