diff options
Diffstat (limited to 'src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java')
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java index f76af59a4..90617df79 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java @@ -627,7 +627,8 @@ public class VoicemailPlaybackPresenter mMediaPlayer.pause(); } - mPosition = mMediaPlayer.getCurrentPosition(); + mPosition = mMediaPlayer == null ? 0 : mMediaPlayer.getCurrentPosition(); + Log.d(TAG, "Paused playback at " + mPosition + "."); if (mView != null) { @@ -646,7 +647,9 @@ public class VoicemailPlaybackPresenter * playing to know whether to resume playback once the user selects a new position. */ public void pausePlaybackForSeeking() { - mShouldResumePlaybackAfterSeeking = mMediaPlayer.isPlaying(); + if (mMediaPlayer != null) { + mShouldResumePlaybackAfterSeeking = mMediaPlayer.isPlaying(); + } pausePlayback(); } |