combine both preference listeners in PlaybackService

This commit is contained in:
Domingos Lopes 2016-04-12 22:48:18 -04:00
parent f71a3152d4
commit 2762af8d50
1 changed files with 2 additions and 2 deletions

View File

@ -950,7 +950,7 @@ public class PlaybackService extends Service {
}
private void updateMediaSessionMetadata(Playable p) {
if (p == null) {
if (p == null || mediaSession == null) {
return;
}
MediaMetadataCompat.Builder builder = new MediaMetadataCompat.Builder();
@ -1695,7 +1695,7 @@ public class PlaybackService extends Service {
castManager.disconnect();
}
}
} else if(key.equals(UserPreferences.PREF_LOCKSCREEN_BACKGROUND)) {
} else if (UserPreferences.PREF_LOCKSCREEN_BACKGROUND.equals(key)) {
updateMediaSessionMetadata(getPlayable());
}
};