summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerfanian <erfanian@google.com>2018-06-27 11:05:03 -0700
committerCopybara-Service <copybara-piper@google.com>2018-06-27 11:08:58 -0700
commit1197fa7205cf3c709fb2718e12b563a720af85ea (patch)
treec63b2ea96ddaa3d29fb2a6db04461ae178fd488a
parent11272af4b61b1474217ca5c1a1b432f6a441f2d3 (diff)
Add voip call checks.
Bug: 110177989 Test: manual PiperOrigin-RevId: 202337281 Change-Id: I277fcbc77ad50c4ed04f92d0541b67043bc8bef8
-rw-r--r--java/com/android/incallui/call/DialerCall.java22
1 files changed, 21 insertions, 1 deletions
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 */