[Android] Fix ArrayIndexOutOfBoundsException in AudioService.java

Jean-Baptiste Kempf git at videolan.org
Fri May 17 17:15:08 CEST 2013


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri May 17 17:13:23 2013 +0200| [1c1afdbeb6999bab5b0e9fd560e78aa215c54c03] | committer: Jean-Baptiste Kempf

Fix ArrayIndexOutOfBoundsException in AudioService.java

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

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

diff --git a/vlc-android/src/org/videolan/vlc/AudioService.java b/vlc-android/src/org/videolan/vlc/AudioService.java
index 0e8edf0..fb90a62 100644
--- a/vlc-android/src/org/videolan/vlc/AudioService.java
+++ b/vlc-android/src/org/videolan/vlc/AudioService.java
@@ -604,7 +604,7 @@ public class AudioService extends Service {
     private void next() {
         int index = mMediaList.indexOf(mCurrentMedia);
         mPrevious.push(mCurrentMedia);
-        if (mRepeating == RepeatType.Once)
+        if (mRepeating == RepeatType.Once && index < mMediaList.size())
             mCurrentMedia = mMediaList.get(index);
         else if (mShuffling && mPrevious.size() < mMediaList.size()) {
             while (mPrevious.contains(mCurrentMedia = mMediaList



More information about the Android mailing list