summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-10-18 00:29:19 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-18 00:29:19 +0000
commit78711e6951e7444afa0ae224194824c4dc087337 (patch)
treecc1433a0724a98d03f70614882ae0a7401c8ef88 /InCallUI
parentdb9fe4d15c502e24363343097c2b9ba8f326ea4d (diff)
parent82754dcd3751af40ed4c4c8f2c08f7a6a11be418 (diff)
am 8930b3af: am c3defe5b: Merge "Update UI based on MANAGE_CONFERENCE capability." into lmp-mr1-dev
* commit '8930b3af41398a898d9bcc8c0dee40c2c4db5bd6': Update UI based on MANAGE_CONFERENCE capability.
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);
}
}