diff options
author | Tyler Gunn <tgunn@google.com> | 2014-12-11 01:39:57 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-11 01:39:57 +0000 |
commit | 25c3ba4c659a79e27305b2f03a054bc7459d0b3c (patch) | |
tree | 22ce3e2078a6ebd3bef1a5a6bc88e27e3325c571 | |
parent | b4cc231de0cab656df03995d27594a53d571a8c3 (diff) | |
parent | 3666716a73f5bdd97d22e7e5190d4c050cd87cbd (diff) |
am 4ea74bac: am ec54cd8c: am 6bd19a57: Merge "No InCall UI visible after hiding conference manager." into lmp-mr1-dev
* commit '4ea74bacb2ae2a05bf125f0dc02239c61606e5a6':
No InCall UI visible after hiding conference manager.
4 files changed, 28 insertions, 9 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index 8648eee3f..6ecf62e99 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -220,7 +220,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr @Override public void onClick(View v) { InCallActivity activity = (InCallActivity) getActivity(); - activity.showConferenceCallManager(); + activity.showConferenceCallManager(true); } }); diff --git a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java index 5640ad7b5..bef4ef30a 100644 --- a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java +++ b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java @@ -62,10 +62,10 @@ public class ConferenceManagerPresenter String.valueOf(call.getChildCallIds().size())); update(callList); } else { - getUi().setVisible(false); + InCallPresenter.getInstance().showConferenceCallManager(false); } } else { - getUi().setVisible(false); + InCallPresenter.getInstance().showConferenceCallManager(false); } } } @@ -86,7 +86,7 @@ public class ConferenceManagerPresenter if (!details.can( android.telecom.Call.Details.CAPABILITY_MANAGE_CONFERENCE)) { - getUi().setVisible(false); + InCallPresenter.getInstance().showConferenceCallManager(false); } } diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index 3de04ad93..006936411 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -326,8 +326,7 @@ public class InCallActivity extends Activity { mCallButtonFragment.displayDialpad(false /* show */, true /* animate */); return; } else if (mConferenceManagerFragment.isVisible()) { - mConferenceManagerFragment.setVisible(false); - mCallCardFragment.getView().setVisibility(View.VISIBLE); + showConferenceCallManager(false); return; } @@ -685,12 +684,18 @@ public class InCallActivity extends Activity { return mDialpadFragment != null && mDialpadFragment.isVisible(); } - public void showConferenceCallManager() { - mConferenceManagerFragment.setVisible(true); + /** + * Hides or shows the conference manager fragment. + * + * @param show {@code true} if the conference manager should be shown, {@code false} if it + * should be hidden. + */ + public void showConferenceCallManager(boolean show) { + mConferenceManagerFragment.setVisible(show); // Need to hide the call card fragment to ensure that accessibility service does not try to // give focus to the call card when the conference manager is visible. - mCallCardFragment.getView().setVisibility(View.GONE); + mCallCardFragment.getView().setVisibility(show ? View.GONE : View.VISIBLE); } public void showPostCharWaitDialog(String callId, String chars) { diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java index 898772e64..0004d4618 100644 --- a/InCallUI/src/com/android/incallui/InCallPresenter.java +++ b/InCallUI/src/com/android/incallui/InCallPresenter.java @@ -1258,6 +1258,20 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener { } /** + * Hides or shows the conference manager fragment. + * + * @param show {@code true} if the conference manager should be shown, {@code false} if it + * should be hidden. + */ + public void showConferenceCallManager(boolean show) { + if (mInCallActivity == null) { + return; + } + + mInCallActivity.showConferenceCallManager(show); + } + + /** * @return True if the application is currently running in a right-to-left locale. */ public static boolean isRtl() { |