summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2013-08-03 21:33:10 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2013-08-03 21:33:10 +0200
commit4e6276c9c4c3cf3fa344abc181688ce6dd17ec51 (patch)
tree2b6b89e48c29ae3aaf58e03420b64ad5b79d567f
parent45dc22a0442f26eb478b20cc9b00d32a1c5bcb72 (diff)
parent743587ee0c75c658158357d860906e67bb7d9438 (diff)
downloadAntennaPod-4e6276c9c4c3cf3fa344abc181688ce6dd17ec51.zip
Merged #226 into develop
-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;
+ }
+ }
}
/**