diff options
author | Eric Erfanian <erfanian@google.com> | 2017-05-03 23:10:39 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-03 23:10:39 +0000 |
commit | d67f1627521b174f12e0c247f154c7c93c5e408e (patch) | |
tree | 1a45d60921e293c6088efeaf4d9c408456f3e0e2 /java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java | |
parent | 010981b798fbc6b8e6a00c3ea507f00c3e77c371 (diff) | |
parent | 8369df095a73a77b3715f8ae7ba06089cebca4ce (diff) |
This change reflects the Dialer V10 RC00 branch.
am: 8369df095a
Change-Id: I6820870feb74cba010ac3039e4da41325b3005f9
Diffstat (limited to 'java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java')
-rw-r--r-- | java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java b/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java index 5e820a750..7c25e7d39 100644 --- a/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java +++ b/java/com/android/dialer/app/calllog/VisualVoicemailCallLogFragment.java @@ -31,15 +31,15 @@ import com.android.dialer.app.voicemail.VoicemailAudioManager; import com.android.dialer.app.voicemail.VoicemailErrorManager; import com.android.dialer.app.voicemail.VoicemailPlaybackPresenter; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; public class VisualVoicemailCallLogFragment extends CallLogFragment { private final ContentObserver mVoicemailStatusObserver = new CustomContentObserver(); private VoicemailPlaybackPresenter mVoicemailPlaybackPresenter; - private VoicemailErrorManager mVoicemailAlertManager; + private VoicemailErrorManager mVoicemailErrorManager; public VisualVoicemailCallLogFragment() { super(CallLog.Calls.VOICEMAIL_TYPE); @@ -63,14 +63,14 @@ public class VisualVoicemailCallLogFragment extends CallLogFragment { @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); - mVoicemailAlertManager = + mVoicemailErrorManager = new VoicemailErrorManager(getContext(), getAdapter().getAlertManager(), mModalAlertManager); getActivity() .getContentResolver() .registerContentObserver( VoicemailContract.Status.CONTENT_URI, true, - mVoicemailAlertManager.getContentObserver()); + mVoicemailErrorManager.getContentObserver()); } @Override @@ -84,13 +84,13 @@ public class VisualVoicemailCallLogFragment extends CallLogFragment { public void onResume() { super.onResume(); mVoicemailPlaybackPresenter.onResume(); - mVoicemailAlertManager.onResume(); + mVoicemailErrorManager.onResume(); } @Override public void onPause() { mVoicemailPlaybackPresenter.onPause(); - mVoicemailAlertManager.onPause(); + mVoicemailErrorManager.onPause(); super.onPause(); } @@ -98,8 +98,9 @@ public class VisualVoicemailCallLogFragment extends CallLogFragment { public void onDestroy() { getActivity() .getContentResolver() - .unregisterContentObserver(mVoicemailAlertManager.getContentObserver()); + .unregisterContentObserver(mVoicemailErrorManager.getContentObserver()); mVoicemailPlaybackPresenter.onDestroy(); + mVoicemailErrorManager.onDestroy(); getActivity().getContentResolver().unregisterContentObserver(mVoicemailStatusObserver); super.onDestroy(); } @@ -131,6 +132,9 @@ public class VisualVoicemailCallLogFragment extends CallLogFragment { public void onNotVisible() { LogUtil.enterBlock("VisualVoicemailCallLogFragment.onPageUnselected"); super.onNotVisible(); + if (getAdapter() != null && getAdapter().mActionMode != null) { + getAdapter().mActionMode.finish(); + } if (getActivity() != null) { getActivity().setVolumeControlStream(AudioManager.USE_DEFAULT_STREAM_TYPE); } |