Merged #226 into develop
This commit is contained in:
commit
4e6276c9c4
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue