summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-10-16 16:26:48 -0700
committerAndrew Lee <anwlee@google.com>2014-10-16 16:33:52 -0700
commite0ec202ff354be3cd3bded7af8fca678dea7fb61 (patch)
tree6b085f9e6dc413191c79196696eb2d1261d3be05 /InCallUI
parentaec501c9c29db2ef2f2ac885da1462a5916e32b7 (diff)
Update UI based on MANAGE_CONFERENCE capability.
- Remove the manage conference button if capability disabled. - Close the conference call manager if the capability is removed while the conference manager is visible. Bug: 17429707 Change-Id: Id242d776aa7b677edd4604b7c23caee315154b1b
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/CallCardPresenter.java5
-rw-r--r--InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java20
2 files changed, 17 insertions, 8 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java
index f4568ef6d..ac85019bc 100644
--- a/InCallUI/src/com/android/incallui/CallCardPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java
@@ -264,6 +264,11 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
@Override
public void onDetailsChanged(Call call, android.telecom.Call.Details details) {
updatePrimaryCallState();
+
+ if (call.can(PhoneCapabilities.MANAGE_CONFERENCE) != PhoneCapabilities.can(
+ details.getCallCapabilities(), PhoneCapabilities.MANAGE_CONFERENCE)) {
+ maybeShowManageConferenceCallButton();
+ }
}
private String getSubscriptionNumber() {
diff --git a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
index 555048da1..f754fdec8 100644
--- a/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
+++ b/InCallUI/src/com/android/incallui/ConferenceManagerPresenter.java
@@ -81,16 +81,20 @@ public class ConferenceManagerPresenter
boolean canSeparate = PhoneCapabilities.can(
details.getCallCapabilities(), PhoneCapabilities.SEPARATE_FROM_CONFERENCE);
- if (call.can(PhoneCapabilities.DISCONNECT_FROM_CONFERENCE) == canDisconnect
- && call.can(PhoneCapabilities.SEPARATE_FROM_CONFERENCE) == canSeparate) {
- return;
+ if (call.can(PhoneCapabilities.DISCONNECT_FROM_CONFERENCE) != canDisconnect
+ || call.can(PhoneCapabilities.SEPARATE_FROM_CONFERENCE) != canSeparate) {
+ for (int i = 0; i < mCallerIds.length; i++) {
+ if (mCallerIds[i] == call.getId()) {
+ getUi().updateSeparateButtonForRow(i, canSeparate);
+ getUi().updateEndButtonForRow(i, canDisconnect);
+ break;
+ }
+ }
}
- for (int i = 0; i < mCallerIds.length; i++) {
- if (mCallerIds[i] == call.getId()) {
- getUi().updateSeparateButtonForRow(i, canSeparate);
- getUi().updateEndButtonForRow(i, canDisconnect);
- }
+ if (!PhoneCapabilities.can(
+ details.getCallCapabilities(), PhoneCapabilities.MANAGE_CONFERENCE)) {
+ getUi().setVisible(false);
}
}