[Android] Audio browser: fix the popup menu action

Adrien Maglo git at videolan.org
Wed Jan 29 11:52:02 CET 2014


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Wed Jan 29 11:51:55 2014 +0100| [cae0fa0720f7846be96572f512938cad27444b84] | committer: Adrien Maglo

Audio browser: fix the popup menu action

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=cae0fa0720f7846be96572f512938cad27444b84
---

 .../src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java |    6 ++----
 .../src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java     |    6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
index 855da1c..c644b00 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioAlbumsSongsFragment.java
@@ -206,10 +206,8 @@ public class AudioAlbumsSongsFragment extends SherlockFragment {
             ExpandableListContextMenuInfo info = (ExpandableListContextMenuInfo) menuInfo;
             groupPosition = ExpandableListView.getPackedPositionGroup(info.packedPosition);
         }
-        else {
-            AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;
-            groupPosition = info.position;
-        }
+        else
+            groupPosition = position;
 
         if (id == R.id.audio_list_browser_delete) {
             AlertDialog alertDialog = CommonDialogs.deleteMedia(
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
index 3928ce8..0a3de5a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -244,10 +244,8 @@ public class AudioBrowserFragment extends SherlockFragment {
             ExpandableListContextMenuInfo info = (ExpandableListContextMenuInfo) menuInfo;
             groupPosition = ExpandableListView.getPackedPositionGroup(info.packedPosition);
         }
-        else {
-            AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;
-            groupPosition = info.position;
-        }
+        else
+            groupPosition = position;
 
         if (id == R.id.audio_list_browser_delete) {
             AlertDialog alertDialog = CommonDialogs.deleteMedia(



More information about the Android mailing list