[Android] BaseBrowserAdapter: Prevent NPE
Geoffrey Métais
git at videolan.org
Wed Mar 13 11:12:13 CET 2019
vlc-android | branch: 3.1.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Mar 13 10:13:23 2019 +0100| [62e14fb5d9e328498b879ba87a7462c5a8f79f64] | committer: Geoffrey Métais
BaseBrowserAdapter: Prevent NPE
> https://code.videolan.org/videolan/vlc-android/commit/62e14fb5d9e328498b879ba87a7462c5a8f79f64
---
vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java | 2 +-
1 file changed, 1 insertion(+), 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 e78c7a13d..41fb19e33 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserAdapter.java
@@ -135,7 +135,7 @@ public class BaseBrowserAdapter extends DiffUtilAdapter<MediaLibraryItem, BaseBr
vh.binding.setHasContextMenu((!mNetworkRoot || isFavorite)
&& !"content".equals(scheme)
&& !"otg".equals(scheme));
- vh.binding.setFilename(media.getType() != MediaWrapper.TYPE_DIR && scheme.equals("file") ? media.getFileName() : null);
+ vh.binding.setFilename(media.getType() != MediaWrapper.TYPE_DIR && "file".equals(scheme) ? 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