[Android] [PATCH 1/4] VideoPlayer: refactor playIndex

Thomas Guillem thomas at gllm.fr
Tue Apr 7 11:40:33 CEST 2015


---
 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index a0ddf2c..23faf4c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -2614,7 +2614,6 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
         /* Start / resume playback */
         if (savedIndexPosition > -1) {
             AudioServiceController.getInstance().stop(); // Stop the previous playback.
-            mMediaListPlayer.playIndex(savedIndexPosition, wasPaused);
         } else if (mLocation != null && mLocation.length() > 0) {
             AudioServiceController.getInstance().stop(); // Stop the previous playback.
             mMediaListPlayer.getMediaList().clear();
@@ -2623,8 +2622,9 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
             media.release();
             mMediaListPlayer.getMediaList().add(new MediaWrapper(media));
             savedIndexPosition = mMediaListPlayer.getMediaList().size() - 1;
-            mMediaListPlayer.playIndex(savedIndexPosition, wasPaused);
         }
+        mMediaListPlayer.playIndex(savedIndexPosition, wasPaused);
+
         mCanSeek = false;
 
         if (mLocation != null && mLocation.length() > 0) {
-- 
2.1.3



More information about the Android mailing list