Fixed another NPE.
This commit is contained in:
parent
6e5408848f
commit
6b89fded4f
1 changed files with 10 additions and 4 deletions
|
|
@ -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() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue