diff options
author | Jay Shrauner <shrauner@google.com> | 2015-10-12 16:34:56 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2015-10-12 16:34:56 -0700 |
commit | 8aa09c8771ef5d521c3f646484d9304a19cf6fd9 (patch) | |
tree | fd63920fe2b7ba915a39b4207faa2ae362b486ed /src/com/android/dialer | |
parent | b01520f92d03560d6f5423875db06a515d3455a7 (diff) |
Fix NPE in requestContent
Check for null context in resumePlayback.
Bug:24858686
Change-Id: I7c65e3ae836535f15936ecb397a68ee6590f31ed
Diffstat (limited to 'src/com/android/dialer')
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java index 8b8b7c539..9b4e20d38 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java @@ -625,7 +625,7 @@ public class VoicemailPlaybackPresenter implements MediaPlayer.OnPreparedListene * playing. */ public void resumePlayback() { - if (mView == null) { + if (mView == null || mContext == null) { return; } @@ -638,7 +638,7 @@ public class VoicemailPlaybackPresenter implements MediaPlayer.OnPreparedListene 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())); |