summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Shrauner <shrauner@google.com>2015-10-20 17:32:20 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-10-20 17:32:20 +0000
commit22b81946ee6e8e9ad34e7c0fd210ba45450e3281 (patch)
treeea8a420ac526fd9883e462411abbdf75fc6eecae
parent47d933cb02f794b7bb3991d7d772e2314074c4a2 (diff)
parente57c45eabf14ec199c2f18e9bc4ae47083c6e694 (diff)
Fix NPE in requestContent am: f4b1101e58
am: e57c45eabf * commit 'e57c45eabf14ec199c2f18e9bc4ae47083c6e694': Fix NPE in requestContent
-rw-r--r--src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java6
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);