diff options
author | Jay Shrauner <shrauner@google.com> | 2015-10-20 17:32:20 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-10-20 17:32:20 +0000 |
commit | 22b81946ee6e8e9ad34e7c0fd210ba45450e3281 (patch) | |
tree | ea8a420ac526fd9883e462411abbdf75fc6eecae | |
parent | 47d933cb02f794b7bb3991d7d772e2314074c4a2 (diff) | |
parent | e57c45eabf14ec199c2f18e9bc4ae47083c6e694 (diff) |
Fix NPE in requestContent am: f4b1101e58
am: e57c45eabf
* commit 'e57c45eabf14ec199c2f18e9bc4ae47083c6e694':
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); |