From 1da81ce59cfbebd4e53fdfd2011e859069120de7 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 22 Aug 2014 18:11:31 -0700 Subject: Move "manage conference calls" button above photo. - Remove it from the CallButtonFragment. This meant that related logic was removed from CallButtonFragment/Presenter, and similar logic was added to the CallCardFragment/Presenter. - Delete old groups icons. (new ones added in ContactsCommon) - Delete the extra_button_row logic. + Replace extra_button_row with a dedicated "manage conference calls" button, and added to call card content layouts. + Style the new button to be similar to the secondary call info. Bug: 15862303 Change-Id: I2b4e1a3a30422c7d5e9c01479f13291a785d85f3 --- .../com/android/incallui/CallButtonFragment.java | 28 ------------------ .../com/android/incallui/CallButtonPresenter.java | 27 ------------------ .../src/com/android/incallui/CallCardFragment.java | 33 ++++++++++++++++++---- .../com/android/incallui/CallCardPresenter.java | 13 +++++++++ .../src/com/android/incallui/InCallActivity.java | 6 ++-- 5 files changed, 42 insertions(+), 65 deletions(-) (limited to 'InCallUI/src/com/android/incallui') diff --git a/InCallUI/src/com/android/incallui/CallButtonFragment.java b/InCallUI/src/com/android/incallui/CallButtonFragment.java index 5744cc5a1..14d1363ab 100644 --- a/InCallUI/src/com/android/incallui/CallButtonFragment.java +++ b/InCallUI/src/com/android/incallui/CallButtonFragment.java @@ -58,8 +58,6 @@ public class CallButtonFragment private PopupMenu mAudioModePopup; private boolean mAudioModePopupVisible; private PopupMenu mOverflowPopup; - private View mExtraRowButton; - private View mManageConferenceButton; private int mPrevAudioMode = 0; @@ -90,11 +88,6 @@ public class CallButtonFragment Bundle savedInstanceState) { final View parent = inflater.inflate(R.layout.call_button_fragment, container, false); - mExtraRowButton = parent.findViewById(R.id.extraButtonRow); - - mManageConferenceButton = parent.findViewById(R.id.manageConferenceButton); - mManageConferenceButton.setOnClickListener(this); - mAudioButton = (ImageButton) parent.findViewById(R.id.audioButton); mAudioButton.setOnClickListener(this); mChangeToVoiceButton = (ImageButton) parent.findViewById(R.id.changeToVoiceButton); @@ -191,9 +184,6 @@ public class CallButtonFragment case R.id.overflowButton: mOverflowPopup.show(); break; - case R.id.manageConferenceButton: - getPresenter().manageConferenceButtonClicked(); - break; default: Log.wtf(this, "onClick: unexpected"); break; @@ -659,29 +649,11 @@ public class CallButtonFragment return false; } - @Override - public void displayManageConferencePanel(boolean value) { - if (getActivity() != null && getActivity() instanceof InCallActivity) { - ((InCallActivity) getActivity()).displayManageConferencePanel(value); - } - } - @Override public Context getContext() { return getActivity(); } - @Override - public void showManageConferenceCallButton() { - mExtraRowButton.setVisibility(View.VISIBLE); - mManageConferenceButton.setVisibility(View.VISIBLE); - } - - @Override - public void hideExtraRow() { - mExtraRowButton.setVisibility(View.GONE); - } - private void maybeSendAccessibilityEvent(View view, int stringId) { final Context context = getActivity(); AccessibilityManager manager = diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java index 393c0f6ac..8a5170c88 100644 --- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java +++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java @@ -165,10 +165,6 @@ public class CallButtonPresenter extends Presenter eventText = event.getText(); diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java index 5f98aa9df..b746267e8 100644 --- a/InCallUI/src/com/android/incallui/CallCardPresenter.java +++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java @@ -249,6 +249,8 @@ public class CallCardPresenter extends Presenter callState != Call.State.ONHOLD)); } + maybeShowManageConferenceCallButton(); + final boolean enableEndCallButton = Call.State.isConnectingOrConnected(callState) && callState != Call.State.INCOMING && mPrimary != null; // Hide the end call button instantly if we're receiving an incoming call. @@ -291,6 +293,16 @@ public class CallCardPresenter extends Presenter } } + /** + * Only show the conference call button if we are not in a generic conference. + * On CDMA devices, instead of a manage conference call button, we show "add" and "merge" + * buttons in the {@link CallButtonFragment}. + */ + private void maybeShowManageConferenceCallButton() { + final boolean isGenericConference = mPrimary.can(PhoneCapabilities.GENERIC_CONFERENCE); + getUi().showManageConferenceCallButton(mPrimary.isConferenceCall() && !isGenericConference); + } + private void setCallbackNumber() { String callbackNumber = null; @@ -658,6 +670,7 @@ public class CallCardPresenter extends Presenter void setCallbackNumber(String number, boolean isEmergencyCalls); void setPhotoVisible(boolean isVisible); void setProgressSpinnerVisible(boolean visible); + void showManageConferenceCallButton(boolean visible); } private TelecommManager getTelecommManager() { diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index 02635dccc..f09203369 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -586,10 +586,8 @@ public class InCallActivity extends Activity { return mDialpadFragment != null && mDialpadFragment.isVisible(); } - public void displayManageConferencePanel(boolean showPanel) { - if (showPanel) { - mConferenceManagerFragment.setVisible(true); - } + public void showConferenceCallManager() { + mConferenceManagerFragment.setVisible(true); } public void showPostCharWaitDialog(String callId, String chars) { -- cgit v1.2.3