[Android] Increase limit when 'previous' restarts song to 5s
Geoffrey Métais
git at videolan.org
Mon Jan 15 10:18:16 CET 2018
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 15 10:16:27 2018 +0100| [b4bb05a58279c5f03c025081db515bf1f628c1a5] | committer: Geoffrey Métais
Increase limit when 'previous' restarts song to 5s
> https://code.videolan.org/videolan/vlc-android/commit/b4bb05a58279c5f03c025081db515bf1f628c1a5
---
vlc-android/src/org/videolan/vlc/PlaybackService.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index e84d2f010..6a1905781 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -128,7 +128,8 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
private static final int DELAY_DOUBLE_CLICK = 800;
private static final int DELAY_LONG_CLICK = 1000;
- public static final String AUDIO_REPEAT_MODE_KEY = "audio_repeat_mode";
+ private static final long PREVIOUS_LIMIT_DELAY = 5000L;
+ private static final String AUDIO_REPEAT_MODE_KEY = "audio_repeat_mode";
public interface Callback {
void update();
@@ -1516,7 +1517,7 @@ public class PlaybackService extends MediaBrowserServiceCompat implements IVLCVo
@MainThread
public void previous(boolean force) {
if (hasPrevious() && mCurrentIndex > 0 &&
- (force || !mMediaPlayer.isSeekable() || mMediaPlayer.getTime() < 2000l)) {
+ (force || !mMediaPlayer.isSeekable() || mMediaPlayer.getTime() < PREVIOUS_LIMIT_DELAY)) {
final int size = mMediaList.size();
mCurrentIndex = mPrevIndex;
if (mPrevious.size() > 0)
More information about the Android
mailing list