summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/service
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/danoeh/antennapod/service')
-rw-r--r--src/de/danoeh/antennapod/service/PlaybackService.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/de/danoeh/antennapod/service/PlaybackService.java b/src/de/danoeh/antennapod/service/PlaybackService.java
index 409ac6b48..ad2b2e090 100644
--- a/src/de/danoeh/antennapod/service/PlaybackService.java
+++ b/src/de/danoeh/antennapod/service/PlaybackService.java
@@ -432,7 +432,29 @@ public class PlaybackService extends Service {
pause(true, true);
}
break;
+ case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: {
+ int currentPos = getCurrentPositionSafe();
+ int duration = getDurationSafe();
+
+ if (currentPos != INVALID_TIME && duration != INVALID_TIME) {
+ if (currentPos < duration) {
+ seek(currentPos + 10000);
+ }
+ }
+ break;
}
+ case KeyEvent.KEYCODE_MEDIA_REWIND: {
+ int currentPos = getCurrentPositionSafe();
+ int duration = getDurationSafe();
+
+ if (currentPos != INVALID_TIME && duration != INVALID_TIME) {
+ if (currentPos > 10000) {
+ seek(currentPos - 10000);
+ }
+ }
+ break;
+ }
+ }
}
/**