[Android] Fix crash on group context menu

Geoffrey Métais git at videolan.org
Tue Apr 5 16:18:29 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Apr  5 16:13:04 2016 +0200| [9bf18919bac075b0f02f1bbae105a1370d4fc630] | committer: Geoffrey Métais

Fix crash on group context menu

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

 vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index 93375b1..23d1eca 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -342,9 +342,11 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
             return;
         MenuInflater inflater = getActivity().getMenuInflater();
         inflater.inflate(media instanceof MediaGroup ? R.menu.video_group_contextual : R.menu.video_list, menu);
-        if (media instanceof MediaGroup && !AndroidUtil.isHoneycombOrLater()) {
-            menu.findItem(R.id.video_list_append).setVisible(false);
-            menu.findItem(R.id.video_group_play).setVisible(false);
+        if (media instanceof MediaGroup) {
+            if (!AndroidUtil.isHoneycombOrLater()) {
+                menu.findItem(R.id.video_list_append).setVisible(false);
+                menu.findItem(R.id.video_group_play).setVisible(false);
+            }
         } else
             setContextMenuItems(menu, media);
     }



More information about the Android mailing list