[Android] Audio adapter: fix logic fail

Geoffrey Métais git at videolan.org
Fri Mar 30 16:51:31 CEST 2018


vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar 27 13:06:20 2018 +0200| [3716dc558ceac554ff3734a991f2cab1542ed5fb] | committer: Geoffrey Métais

Audio adapter: fix logic fail

(cherry picked from commit b1b1ae7c142bf1b328e44f52cb781ec35123142b)

> https://code.videolan.org/videolan/vlc-android/commit/3716dc558ceac554ff3734a991f2cab1542ed5fb
---

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
index d5b8af10c..511feea91 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserAdapter.java
@@ -150,7 +150,7 @@ public class AudioBrowserAdapter extends SortableAdapter<MediaLibraryItem, Audio
     }
 
     private boolean isPositionValid(int position) {
-        return position >= 0 || position < getDataset().size();
+        return position >= 0 && position < getDataset().size();
     }
 
     public List<MediaLibraryItem> getAll() {



More information about the Android mailing list