[Android] Restart current song on 'previous'
Geoffrey Métais
git at videolan.org
Thu Nov 12 11:48:57 CET 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov 12 11:47:49 2015 +0100| [f4abdddf7155559c1c2945eaf0c282800115c714] | committer: Geoffrey Métais
Restart current song on 'previous'
behaviour is:
- if playback < 2 seconds or there is no previous song: skip to
previous song
- else: restart current song playback
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=f4abdddf7155559c1c2945eaf0c282800115c714
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index d3b1a67..7b094c6 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1128,7 +1128,7 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
@MainThread
public void previous() {
int size = mMediaList.size();
- if (size > 1) {
+ if (hasPrevious() && mCurrentIndex > 0 && mMediaPlayer.getTime() < 2000l) {
mCurrentIndex = mPrevIndex;
if (mPrevious.size() > 0)
mPrevious.pop();
More information about the Android
mailing list