summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2015-10-28 00:12:12 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-10-28 00:12:12 +0000
commit1749a7ebc825a6068c8bab7e466eb63181b040d2 (patch)
treea0ad594e2222e48c48d3b085670b484ab390f0da
parent9ce5286ab3644733339ff739bf15f8ce36e41524 (diff)
parent128fe6987ec832e63a21ab7d551c0b55494d8964 (diff)
Merge "Retain progress for voicemail playback when rebinding voicemail card." into ub-contactsdialer-a-dev
-rw-r--r--src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java
index c0884ad1b..658aaec2d 100644
--- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java
+++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java
@@ -246,6 +246,10 @@ public class VoicemailPlaybackPresenter implements MediaPlayer.OnPreparedListene
// Handles cases where the same entry is binded again when scrolling in list, or where
// the MediaPlayer was retained after an orientation change.
if (mMediaPlayer != null && mIsPrepared && voicemailUri.equals(mVoicemailUri)) {
+ // If the voicemail card was rebinded, we need to set the position to the appropriate
+ // point. Since we retain the media player, we can just set it to the position of the
+ // media player.
+ mPosition = mMediaPlayer.getCurrentPosition();
onPrepared(mMediaPlayer);
} else {
if (!voicemailUri.equals(mVoicemailUri)) {