Merged #226 into develop

This commit is contained in:
daniel oeh 2013-08-03 21:33:10 +02:00
commit 4e6276c9c4
1 changed files with 22 additions and 0 deletions

View File

@ -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;
}
}
}
/**