diff options
author | Jay Shrauner <shrauner@google.com> | 2015-10-20 17:23:39 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-10-20 17:23:39 +0000 |
commit | e57c45eabf14ec199c2f18e9bc4ae47083c6e694 (patch) | |
tree | d30bf0ae73898317a828b0f8128bc899bc70ce37 | |
parent | 2f311c7bbedd2200d8f91035303b0a359598ff7f (diff) | |
parent | f4b1101e5831faa5407e44566185007788090dce (diff) |
Fix NPE in requestContent
am: f4b1101e58
* commit 'f4b1101e5831faa5407e44566185007788090dce':
Fix NPE in requestContent
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java index 9319b6ed9..ed6cc8b43 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java @@ -587,6 +587,10 @@ public class VoicemailPlaybackPresenter * playing. */ public void resumePlayback() { + if (mView == null || mContext == null) { + return; + } + if (!mIsPrepared) { // If we haven't downloaded the voicemail yet, attempt to download it. checkForContent(); @@ -597,7 +601,7 @@ public class VoicemailPlaybackPresenter mIsPlaying = true; - if (!mMediaPlayer.isPlaying()) { + if (mMediaPlayer != null && !mMediaPlayer.isPlaying()) { // Clamp the start position between 0 and the duration. mPosition = Math.max(0, Math.min(mPosition, mDuration.get())); mMediaPlayer.seekTo(mPosition); |