From a8d677fce88d2add418cdcc868f2a00b2e2d702e Mon Sep 17 00:00:00 2001 From: linyuh Date: Wed, 7 Mar 2018 17:16:08 -0800 Subject: Support local emergency phone number check when there are multiple SIMs. Bug: 73994020 Test: PhoneNumberHelperTest PiperOrigin-RevId: 188260007 Change-Id: I23025e9b9454f487117c35e7a3b09307371ae825 --- java/com/android/incallui/CallerInfoAsyncQuery.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'java/com/android/incallui/CallerInfoAsyncQuery.java') diff --git a/java/com/android/incallui/CallerInfoAsyncQuery.java b/java/com/android/incallui/CallerInfoAsyncQuery.java index 335895220..87dcc4f40 100644 --- a/java/com/android/incallui/CallerInfoAsyncQuery.java +++ b/java/com/android/incallui/CallerInfoAsyncQuery.java @@ -35,13 +35,13 @@ import android.provider.ContactsContract.Directory; import android.support.annotation.MainThread; import android.support.annotation.RequiresPermission; import android.support.annotation.WorkerThread; -import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import com.android.dialer.common.cp2.DirectoryCompat; import com.android.dialer.phonenumbercache.CachedNumberLookupService; import com.android.dialer.phonenumbercache.CachedNumberLookupService.CachedContactInfo; import com.android.dialer.phonenumbercache.ContactInfoHelper; import com.android.dialer.phonenumbercache.PhoneNumberCache; +import com.android.dialer.phonenumberutil.PhoneNumberHelper; import com.android.dialer.strictmode.StrictModeUtils; import java.io.IOException; import java.io.InputStream; @@ -166,7 +166,7 @@ public class CallerInfoAsyncQuery { cw.countryIso = info.countryIso; // check to see if these are recognized numbers, and use shortcuts if we can. - if (PhoneNumberUtils.isLocalEmergencyNumber(context, info.phoneNumber)) { + if (PhoneNumberHelper.isLocalEmergencyNumber(context, info.phoneNumber)) { cw.event = EVENT_EMERGENCY_NUMBER; } else if (info.isVoiceMailNumber()) { cw.event = EVENT_VOICEMAIL_NUMBER; -- cgit v1.2.3