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) {
int newPosition = playback.seek(millis);
savePositionInTrack();
throttledPublicPlayStateChangedNotifier.scheduleIntent();
return newPosition;
synchronized (this) {
try {
int newPosition = playback.seek(millis);
savePositionInTrack();
throttledPublicPlayStateChangedNotifier.scheduleIntent();
return newPosition;
} catch (Exception e) {
return -1;
}
}
}
public void cycleRepeatMode() {