diff options
author | erfanian <erfanian@google.com> | 2018-06-15 14:10:34 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-18 13:20:47 -0700 |
commit | 61dc939969bce0a6246deb7109dc5dc64cd84942 (patch) | |
tree | ad8c34062ff2e3cf0d91d6f44ec0051a67aff6b5 | |
parent | 8f1fbd77f64fdf376e70dd3e7de3c8eb5d9cfbf9 (diff) |
Check phone capabilities.
Bug: 110177989
Test: none/manual
PiperOrigin-RevId: 200771224
Change-Id: I6c9d9b6eb0aa98be8e60d693549c07fbbf73c5d7
-rw-r--r-- | java/com/android/incallui/call/DialerCall.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java index 585421eab..dd6c25b5b 100644 --- a/java/com/android/incallui/call/DialerCall.java +++ b/java/com/android/incallui/call/DialerCall.java @@ -1714,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() |