diff options
author | Andrew Lee <anwlee@google.com> | 2015-06-02 16:43:01 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-06-03 16:53:03 -0700 |
commit | 267e9ebd056ec4973c4b37c38f949e863de4f24c (patch) | |
tree | 088d070a3f7c9a6fe55ec926933c68731d8fc25c /src/com/android/dialer/CallDetailActivity.java | |
parent | f024f336cd205f2d1501b02aef0adc0e1c9b5879 (diff) |
Move VM playback from details to call log.
- Delete voicemail playback in the CallDetailActivity.
+ Add voicemail playback to the call log list items.
+ Move the VoicemailPlaybackPresenter to the CallLogFragment.
+ Fix some retaining state for both call log (expanded items), and
preserve rotation/state functionality for voicemail playback. This
included some changes to the Presenter logic.
+ Fix some tests.
Bug: 21471763
Bug: 21170557
Change-Id: I30aae3a52c5bbf74a5075a9666343c337b1fc0df
Diffstat (limited to 'src/com/android/dialer/CallDetailActivity.java')
-rw-r--r-- | src/com/android/dialer/CallDetailActivity.java | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index ce29049d3..6da7c798c 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -61,8 +61,6 @@ import com.android.dialer.calllog.PhoneNumberUtilsWrapper; import com.android.dialer.util.IntentUtil; import com.android.dialer.util.DialerUtils; import com.android.dialer.util.TelecomUtil; -import com.android.dialer.voicemail.VoicemailPlaybackLayout; -import com.android.dialer.voicemail.VoicemailPlaybackPresenter; import java.util.List; @@ -218,8 +216,6 @@ public class CallDetailActivity extends Activity { /** Helper to load contact photos. */ private ContactPhotoManager mContactPhotoManager; - private VoicemailPlaybackPresenter mVoicemailPlaybackPresenter; - private Uri mVoicemailUri; private BidiFormatter mBidiFormatter = BidiFormatter.getInstance(); @@ -255,8 +251,6 @@ public class CallDetailActivity extends Activity { mContactInfoHelper = new ContactInfoHelper(this, GeoUtil.getCurrentCountryIso(this)); getActionBar().setDisplayHomeAsUpEnabled(true); - optionallyHandleVoicemail(); - if (getIntent().getBooleanExtra(EXTRA_FROM_NOTIFICATION, false)) { closeSystemDialogs(); } @@ -269,58 +263,6 @@ public class CallDetailActivity extends Activity { CallLogAsyncTaskUtil.getCallDetails(this, getCallLogEntryUris(), mCallLogAsyncTaskListener); } - @Override - public void onPause() { - if (mVoicemailPlaybackPresenter != null) { - mVoicemailPlaybackPresenter.onPause(isFinishing()); - } - super.onPause(); - } - - @Override - public void onDestroy() { - if (mVoicemailPlaybackPresenter != null) { - mVoicemailPlaybackPresenter.onDestroy(isFinishing()); - } - super.onDestroy(); - } - - @Override - public void onSaveInstanceState(Bundle outState) { - super.onSaveInstanceState(outState); - if (mVoicemailPlaybackPresenter != null) { - mVoicemailPlaybackPresenter.onSaveInstanceState(outState); - } - } - - @Override - public void onRestoreInstanceState(Bundle savedInstanceState) { - if (mVoicemailPlaybackPresenter != null) { - mVoicemailPlaybackPresenter.onRestoreInstanceState(savedInstanceState); - } - super.onRestoreInstanceState(savedInstanceState); - } - - /** - * Handle voicemail playback or hide voicemail ui. - * <p> - * If the Intent used to start this Activity contains the suitable extras, then start voicemail - * playback. If it doesn't, then don't inflate the voicemail ui. - */ - private void optionallyHandleVoicemail() { - if (hasVoicemail()) { - VoicemailPlaybackLayout voicemailPlaybackLayout = - (VoicemailPlaybackLayout) findViewById(R.id.voicemail_playback_layout); - - mVoicemailPlaybackPresenter = new VoicemailPlaybackPresenter(this); - mVoicemailPlaybackPresenter.setPlaybackView( - voicemailPlaybackLayout, mVoicemailUri, false /* startPlayingImmediately */); - - voicemailPlaybackLayout.setVisibility(View.VISIBLE); - CallLogAsyncTaskUtil.markVoicemailAsRead(this, mVoicemailUri); - } - } - private boolean hasVoicemail() { return mVoicemailUri != null; } |