From 732bda08a9219789f7aa079fb2ef8ab65af2d34a Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Tue, 24 Nov 2015 12:50:36 +0100 Subject: [PATCH] Rewind when skip to previous is pressed --- .../playback/PlaybackServiceMediaPlayer.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java index 4376d14d4..b04784ab3 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java @@ -1210,8 +1210,15 @@ public class PlaybackServiceMediaPlayer implements SharedPreferences.OnSharedPre } @Override - public void onSkipToNext() { - Log.d(TAG, "onSkipToNext()"); + public void onSkipToPrevious() { + Log.d(TAG, "onSkipToPrevious()"); + seekDelta(-UserPreferences.getRewindSecs() * 1000); + } + + @Override + public void onRewind() { + Log.d(TAG, "onRewind()"); + seekDelta(-UserPreferences.getRewindSecs() * 1000); } @Override @@ -1221,11 +1228,12 @@ public class PlaybackServiceMediaPlayer implements SharedPreferences.OnSharedPre } @Override - public void onRewind() { - Log.d(TAG, "onRewind()"); - seekDelta(-UserPreferences.getRewindSecs() * 1000); + public void onSkipToNext() { + Log.d(TAG, "onSkipToNext()"); + // will be handled by onMediaButtonEvent(KeyEvent.KEYCODE_MEDIA_NEXT) } + @Override public void onSeekTo(long pos) { Log.d(TAG, "onSeekTo()");