Fixed NPE on updatePlaystate()

This commit is contained in:
Karim Abou Zeid 2015-06-26 15:49:32 +02:00
commit 957e223e40
2 changed files with 2 additions and 2 deletions

View file

@ -263,7 +263,7 @@ public class PlayingNotificationHelper {
this.isPlaying = isPlaying; this.isPlaying = isPlaying;
if (notification == null) { if (notification == null) {
updateNotification(); return;
} }
if (notificationLayout != null) { if (notificationLayout != null) {
notificationLayout.setImageViewResource(R.id.action_play_pause, notificationLayout.setImageViewResource(R.id.action_play_pause,

View file

@ -663,11 +663,11 @@ public class MusicService extends Service {
} else { } else {
registerReceiversAndRemoteControlClient(); registerReceiversAndRemoteControlClient();
player.start(); player.start();
notifyChange(PLAY_STATE_CHANGED);
if (notNotifiedMetaChangedForCurrentTrack) { if (notNotifiedMetaChangedForCurrentTrack) {
notifyChange(META_CHANGED); notifyChange(META_CHANGED);
notNotifiedMetaChangedForCurrentTrack = false; notNotifiedMetaChangedForCurrentTrack = false;
} }
notifyChange(PLAY_STATE_CHANGED);
} }
} }
} else { } else {