summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2014-12-10 10:10:30 -0800
committerTyler Gunn <tgunn@google.com>2014-12-10 10:10:30 -0800
commit73c4fdaf1794054fa7d8a5151f274a200b6bdd76 (patch)
tree6b51ffb8e87674dac08d4c6d1617f32dc0d89bde
parentc14bf4ad56d336b792b637a9cfb5b27064eaa2ca (diff)
No InCall UI visible after hiding conference manager.
- The hide of the conference manager fragment and subsequent show of the call card was being done inconsistently in a few places. - Added a new method to hide/show the conference manager fragment and the call card at the same time and replaced all references with this new unified method. Bug: 18699503 Change-Id: Ia6b80bdc29198627b1c46de72da432dc9523dc5e
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java2
-rw-r--r--InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java6
-rw-r--r--InCallUI/src/com/android/incallui/InCallActivity.java15
-rw-r--r--InCallUI/src/com/android/incallui/InCallPresenter.java14
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 a12e5ea6f..ed781b137 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -1238,6 +1238,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() {