summaryrefslogtreecommitdiff
path: root/java/com/android/incallui
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-06-18 20:59:55 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-06-18 20:59:55 +0000
commit8916483918c20cfe800501c953680e2bce736ab3 (patch)
tree9317ec96657b4e9fbe416bf4bc782dba28033d27 /java/com/android/incallui
parenta25e320431d172139b0baf0e3162b8a47e0744fa (diff)
parenteb3e5b92e6f74d7c773193f11566ccc023298ad6 (diff)
Merge changes I572ef7cd,I4bb036ab,Icb2b9bc1,I6c9d9b6e,I7e3d9c3b, ...
* changes: Updated licenses for v22 release. Show "Calling accounts" for all users in DialerSettingsActivity Fix an AOSP build error caused by bottom sheet states. Check phone capabilities. Improve Coalescer performance Fix drag and drop crash. Fix bug that RTT call is conferenceable with voice call. Fully expand the bottom sheet when touch exploration is enabled.
Diffstat (limited to 'java/com/android/incallui')
-rw-r--r--java/com/android/incallui/call/DialerCall.java23
1 files changed, 22 insertions, 1 deletions
diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java
index 904a5a833..dd6c25b5b 100644
--- a/java/com/android/incallui/call/DialerCall.java
+++ b/java/com/android/incallui/call/DialerCall.java
@@ -977,13 +977,23 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa
}
/** Checks if the call supports the given set of capabilities supplied as a bit mask. */
+ @TargetApi(28)
public boolean can(int capabilities) {
int supportedCapabilities = telecomCall.getDetails().getCallCapabilities();
if ((capabilities & Call.Details.CAPABILITY_MERGE_CONFERENCE) != 0) {
+ boolean hasConferenceableCall = false;
+ // RTT call is not conferenceable, it's a bug (a bug) in Telecom and we work around it
+ // here before it's fixed in Telecom.
+ for (Call call : telecomCall.getConferenceableCalls()) {
+ if (!(BuildCompat.isAtLeastP() && call.isRttActive())) {
+ hasConferenceableCall = true;
+ break;
+ }
+ }
// We allow you to merge if the capabilities allow it or if it is a call with
// conferenceable calls.
- if (telecomCall.getConferenceableCalls().isEmpty()
+ if (!hasConferenceableCall
&& ((Call.Details.CAPABILITY_MERGE_CONFERENCE & supportedCapabilities) == 0)) {
// Cannot merge calls if there are no calls to merge with.
return false;
@@ -1704,6 +1714,17 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa
/** Indicates the call is eligible for SpeakEasy */
public boolean isSpeakEasyEligible() {
+
+ PhoneAccount phoneAccount = getPhoneAccount();
+
+ if (phoneAccount == null) {
+ return false;
+ }
+
+ if (!phoneAccount.hasCapabilities(PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION)) {
+ return false;
+ }
+
return !isPotentialEmergencyCallback()
&& !isEmergencyCall()
&& !isActiveRttCall()