Commit b4bb05a5 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Increase limit when 'previous' restarts song to 5s

parent 652eeac3
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment