[Android] Prevent ClassCastException

Geoffrey Métais git at videolan.org
Fri Apr 14 17:29:07 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Apr 13 17:43:55 2017 +0200| [86ab50e3e94c87108ca3c2a2d130261ff0c354c6] | committer: Geoffrey Métais

Prevent ClassCastException

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

 vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
index 537b83a..6d2c5a1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -819,7 +819,7 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
     }
 
     public void onCtxClick(View v, int position, MediaLibraryItem item) {
-        if (mActionMode == null)
+        if (mActionMode == null && item.getItemType() == MediaLibraryItem.TYPE_MEDIA)
             mRecyclerView.openContextMenu(position);
     }
 



More information about the Android mailing list