diff options
Diffstat (limited to 'java/com/android/dialer/precall/impl')
-rw-r--r-- | java/com/android/dialer/precall/impl/CallingAccountSelector.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/com/android/dialer/precall/impl/CallingAccountSelector.java b/java/com/android/dialer/precall/impl/CallingAccountSelector.java index 56b392b19..16e7641ba 100644 --- a/java/com/android/dialer/precall/impl/CallingAccountSelector.java +++ b/java/com/android/dialer/precall/impl/CallingAccountSelector.java @@ -25,6 +25,7 @@ import android.support.annotation.VisibleForTesting; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; +import android.telephony.PhoneNumberUtils; import com.android.contacts.common.widget.SelectPhoneAccountDialogFragment; import com.android.contacts.common.widget.SelectPhoneAccountDialogFragment.SelectPhoneAccountListener; import com.android.dialer.callintent.CallIntentBuilder; @@ -65,6 +66,10 @@ public class CallingAccountSelector implements PreCallAction { if (builder.getPhoneAccountHandle() != null) { return false; } + if (PhoneNumberUtils.isEmergencyNumber(builder.getUri().getSchemeSpecificPart())) { + return false; + } + TelecomManager telecomManager = context.getSystemService(TelecomManager.class); List<PhoneAccountHandle> accounts = telecomManager.getCallCapablePhoneAccounts(); if (accounts.size() <= 1) { |