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