From 1197fa7205cf3c709fb2718e12b563a720af85ea Mon Sep 17 00:00:00 2001 From: erfanian Date: Wed, 27 Jun 2018 11:05:03 -0700 Subject: Add voip call checks. Bug: 110177989 Test: manual PiperOrigin-RevId: 202337281 Change-Id: I277fcbc77ad50c4ed04f92d0541b67043bc8bef8 --- java/com/android/incallui/call/DialerCall.java | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'java/com') diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java index fc2276232..94724e6b2 100644 --- a/java/com/android/incallui/call/DialerCall.java +++ b/java/com/android/incallui/call/DialerCall.java @@ -1731,7 +1731,27 @@ public class DialerCall implements VideoTechListener, StateChangedListener, Capa && !isConferenceCall() && !isVideoCall() && !isVoiceMailNumber() - && !hasReceivedVideoUpgradeRequest(); + && !hasReceivedVideoUpgradeRequest() + && !isVoipCallNotSupportedBySpeakeasy(); + } + + private boolean isVoipCallNotSupportedBySpeakeasy() { + Bundle extras = getIntentExtras(); + + if (extras == null) { + return false; + } + + // Indicates an VOIP call. + String callid = extras.getString("callid"); + + if (TextUtils.isEmpty(callid)) { + LogUtil.i("DialerCall.isVoipCallNotSupportedBySpeakeasy", "callid was empty"); + return false; + } + + LogUtil.i("DialerCall.isVoipCallNotSupportedBySpeakeasy", "call is not eligible"); + return true; } /** Indicates the user has selected SpeakEasy */ -- cgit v1.2.3