diff options
author | ByteHamster <info@bytehamster.com> | 2018-09-26 17:32:39 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2018-09-26 17:32:39 +0200 |
commit | 7dc5d9cfb1d6d7920902a10f4671177c5ffa5cbf (patch) | |
tree | e3fe84cbc58cb553c26fd9cf19bd8c53414c24d2 /core | |
parent | 819d2df8ed42dd67c544def71462000935438323 (diff) | |
download | AntennaPod-7dc5d9cfb1d6d7920902a10f4671177c5ffa5cbf.zip |
Allow mediaPlayer to be null
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java index a7c01e43a..fc36ad004 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java @@ -660,7 +660,12 @@ public class PlaybackService extends MediaBrowserServiceCompat { private final PlaybackServiceMediaPlayer.PSMPCallback mediaPlayerCallback = new PlaybackServiceMediaPlayer.PSMPCallback() { @Override public void statusChanged(PlaybackServiceMediaPlayer.PSMPInfo newInfo) { - currentMediaType = mediaPlayer.getCurrentMediaType(); + if (mediaPlayer != null) { + currentMediaType = mediaPlayer.getCurrentMediaType(); + } else { + currentMediaType = MediaType.UNKNOWN; + } + updateMediaSession(newInfo.playerStatus); switch (newInfo.playerStatus) { case INITIALIZED: |