[Android] audio: fix play/pause

Sébastien Toque git at videolan.org
Sun Sep 1 20:42:25 CEST 2013


vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Sun Sep  1 20:42:03 2013 +0200| [a6685741e2f6097c20317167c4408576630e8dc1] | committer: Sébastien Toque

audio: fix play/pause
play() is meant to resume after pause, not restart the current media

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

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

diff --git a/vlc-android/src/org/videolan/vlc/AudioService.java b/vlc-android/src/org/videolan/vlc/AudioService.java
index 1ccfdce..21fa230 100644
--- a/vlc-android/src/org/videolan/vlc/AudioService.java
+++ b/vlc-android/src/org/videolan/vlc/AudioService.java
@@ -674,9 +674,9 @@ public class AudioService extends Service {
     }
 
     private void play() {
-        if(mCurrentIndex >= 0 && mCurrentIndex < mLibVLC.getMediaList().size()) {
+        if(hasCurrentMedia()) {
             setUpRemoteControlClient();
-            mLibVLC.playIndex(mCurrentIndex);
+            mLibVLC.play();
             mHandler.sendEmptyMessage(SHOW_PROGRESS);
             showNotification();
             updateWidget(this);



More information about the Android mailing list