From 053b9c7a4b2662588706211fd8aa1f8a03ec2901 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 18 Jun 2015 18:19:20 -0700 Subject: Rewrite of MediaPlayer logic. + Control MediaPlayer instance more tightly. Wait until prepareContent to initialize instance. Release MediaPlayer when it is no longer needed. + Instead of using isFinishing, check explicitly for orientation change to know whether to release MediaPlayer. + Change Presenter to singleton, to address audio change wonkiness. + Only create a Presenter if the call log fragment shows voicemail. + ... fixing a variety of cases. - Temporarily disable proximity sensor until blocking issue is fixed. Bug: 21856243 Change-Id: Ic06e98bb5278467c3cce726a06b6cf3d855861a2 --- src/com/android/dialer/calllog/CallLogAdapter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/com/android/dialer/calllog/CallLogAdapter.java') diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 4304002da..bd478bd38 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -116,8 +116,10 @@ public class CallLogAdapter extends GroupingListAdapter return; } - // Always reset the voicemail playback state on expand or collapse. - mVoicemailPlaybackPresenter.reset(); + if (mVoicemailPlaybackPresenter != null) { + // Always reset the voicemail playback state on expand or collapse. + mVoicemailPlaybackPresenter.reset(); + } if (viewHolder.getAdapterPosition() == mCurrentlyExpandedPosition) { // Hide actions, if the clicked item is the expanded item. -- cgit v1.2.3