[Android] BaseBrowserAdapter: Prevent NPE
Geoffrey Métais
git at videolan.org
Wed Mar 13 10:14:14 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Mar 13 10:13:23 2019 +0100| [f48bc2c0d111859690f7b542fcb1d8c9095553af] | committer: Geoffrey Métais
BaseBrowserAdapter: Prevent NPE
> https://code.videolan.org/videolan/vlc-android/commit/f48bc2c0d111859690f7b542fcb1d8c9095553af
---
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