[Android] Exit delete process for non media items

Geoffrey Métais git at videolan.org
Fri Apr 27 12:13:11 CEST 2018


vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Apr 27 11:23:54 2018 +0200| [412253ae1be2faa12a72fd433f9d09cfb5681999] | committer: Geoffrey Métais

Exit delete process for non media items

> https://code.videolan.org/videolan/vlc-android/commit/412253ae1be2faa12a72fd433f9d09cfb5681999
---

 vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java | 1 +
 1 file changed, 1 insertion(+)

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 f485eb327..898b815bb 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserFragment.java
@@ -248,6 +248,7 @@ public class AudioBrowserFragment extends BaseAudioBrowser implements SwipeRefre
         final MediaLibraryItem mediaItem = adapter.getItem(position);
 
         if (id == R.id.audio_list_browser_delete) {
+            if (mediaItem.getItemType() != MediaLibraryItem.TYPE_MEDIA) return false;
             final MediaLibraryItem previous = position > 0 ? adapter.getItem(position-1) : null;
             final MediaLibraryItem next = position < adapter.getItemCount()-1 ? adapter.getItem(position+1) : null;
             final String message;



More information about the Android mailing list