NP check in executor run code

This commit is contained in:
Martin Fietz 2015-09-17 23:18:08 +02:00
parent 17c87d9bfc
commit 96132d0da9
1 changed files with 4 additions and 4 deletions

View File

@ -273,11 +273,11 @@ public class PlaybackServiceMediaPlayer implements SharedPreferences.OnSharedPre
}
private void updateMediaSessionMetadata() {
if(this.media == null) {
return;
}
executor.execute(() -> {
Playable p = this.media;
final Playable p = this.media;
if(p == null) {
return;
}
MediaMetadataCompat.Builder builder = new MediaMetadataCompat.Builder();
builder.putString(MediaMetadataCompat.METADATA_KEY_ARTIST, p.getFeedTitle());
builder.putString(MediaMetadataCompat.METADATA_KEY_TITLE, p.getEpisodeTitle());