summaryrefslogtreecommitdiffstats
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
commit467cf770237c13d291a8fea59817d469909d5e60 (patch)
tree9e0416a7ddbe214e3fe7f0dbb1c190c63eb34ea8
parent9cb3912d5153097073234cd2345ac8063c80584d (diff)
downloadpackages_apps_InCallUI-467cf770237c13d291a8fea59817d469909d5e60.tar.gz
packages_apps_InCallUI-467cf770237c13d291a8fea59817d469909d5e60.tar.bz2
packages_apps_InCallUI-467cf770237c13d291a8fea59817d469909d5e60.zip
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--src/com/android/incallui/CallCardFragment.java2
-rw-r--r--src/com/android/incallui/ConferenceManagerPresenter.java6
-rw-r--r--src/com/android/incallui/InCallActivity.java15
-rw-r--r--src/com/android/incallui/InCallPresenter.java14
4 files changed, 28 insertions, 9 deletions
diff --git a/src/com/android/incallui/CallCardFragment.java b/src/com/android/incallui/CallCardFragment.java
index 8648eee3..6ecf62e9 100644
--- a/src/com/android/incallui/CallCardFragment.java
+++ b/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/src/com/android/incallui/ConferenceManagerPresenter.java b/src/com/android/incallui/ConferenceManagerPresenter.java
index 5640ad7b..bef4ef30 100644
--- a/src/com/android/incallui/ConferenceManagerPresenter.java
+++ b/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/src/com/android/incallui/InCallActivity.java b/src/com/android/incallui/InCallActivity.java
index 3de04ad9..00693641 100644
--- a/src/com/android/incallui/InCallActivity.java
+++ b/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/src/com/android/incallui/InCallPresenter.java b/src/com/android/incallui/InCallPresenter.java
index a12e5ea6..ed781b13 100644
--- a/src/com/android/incallui/InCallPresenter.java
+++ b/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() {