Fixed another NPE.

This commit is contained in:
Karim Abou Zeid 2016-03-29 18:36:46 +02:00
commit 6b89fded4f

View file

@ -832,10 +832,16 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
} }
public int seek(int millis) { public int seek(int millis) {
synchronized (this) {
try {
int newPosition = playback.seek(millis); int newPosition = playback.seek(millis);
savePositionInTrack(); savePositionInTrack();
throttledPublicPlayStateChangedNotifier.scheduleIntent(); throttledPublicPlayStateChangedNotifier.scheduleIntent();
return newPosition; return newPosition;
} catch (Exception e) {
return -1;
}
}
} }
public void cycleRepeatMode() { public void cycleRepeatMode() {