diff options
author | Nancy Chen <nancychen@google.com> | 2015-08-26 23:31:05 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-08-26 23:31:05 +0000 |
commit | 2b456d24c07cd902a6386ef8dbf84645430e59dd (patch) | |
tree | 2f7bd7390e875502999e7a8f6d6ff1f715a5ff5a /src/com/android | |
parent | 20db3b0d2d027d328681675c64cd1cfcf1f7132d (diff) | |
parent | 17db928b33a41874456b50f37c715f4114aaab42 (diff) |
Merge "Do not call "onPrepared" unless the media player is prepared."
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java index dabefc563..aea1dac6a 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java @@ -39,7 +39,6 @@ import android.widget.SeekBar; import com.android.dialer.R; import com.android.dialer.util.AsyncTaskExecutor; import com.android.dialer.util.AsyncTaskExecutors; - import com.android.common.io.MoreCloseables; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; @@ -48,7 +47,6 @@ import java.io.IOException; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.RejectedExecutionException; -import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; @@ -242,7 +240,7 @@ public class VoicemailPlaybackPresenter mView = view; mView.setPresenter(this, voicemailUri); - if (mMediaPlayer != null && voicemailUri.equals(mVoicemailUri)) { + if (mMediaPlayer != null && mIsPrepared && voicemailUri.equals(mVoicemailUri)) { // Handles case where MediaPlayer was retained after an orientation change. onPrepared(mMediaPlayer); mView.onSpeakerphoneOn(isSpeakerphoneOn()); |