[Android] Prevent IndexOutOfBoundsException

Geoffrey Métais git at videolan.org
Thu Jan 7 16:56:14 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jan  7 16:54:01 2016 +0100| [b94af282cc1aff94e3ff2bb06b9e9ade7045ef3f] | committer: Geoffrey Métais

Prevent IndexOutOfBoundsException

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/PlaylistAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/PlaylistAdapter.java
index a0fd1ad..3f01297 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/PlaylistAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/PlaylistAdapter.java
@@ -129,9 +129,9 @@ public class PlaylistAdapter extends RecyclerView.Adapter<PlaylistAdapter.ViewHo
     public void remove(int position) {
         if (mService == null)
             return;
-        mService.remove(position);
         mDataSet.remove(position);
         mOriginalDataSet.remove(position);
+        mService.remove(position);
         notifyItemRemoved(position);
     }
 



More information about the Android mailing list