summaryrefslogtreecommitdiff
path: root/java/com
diff options
context:
space:
mode:
authorwangqi <wangqi@google.com>2018-06-13 15:05:29 -0700
committerCopybara-Service <copybara-piper@google.com>2018-06-18 13:19:20 -0700
commit1b96ca56fda7caf341fe8a7a228151c68587b4de (patch)
tree338a0d83bce97d1c5056dca6bcb9d2df569a615f /java/com
parentd7c769160453149a7207839526c901395e725b27 (diff)
Fix bug that RTT call is conferenceable with voice call.
Bug: 109763648 Test: manual PiperOrigin-RevId: 200460856 Change-Id: I1ce385490e6ce6167f56dc32c35a931292e0d03f
Diffstat (limited to 'java/com')
-rw-r--r--java/com/android/incallui/call/DialerCall.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java
index 904a5a833..585421eab 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;