diff options
author | Trevor Halvorson <thalvorson@cyngn.com> | 2016-07-05 12:17:56 -0700 |
---|---|---|
committer | Trevor Halvorson <thalvorson@cyngn.com> | 2016-07-12 10:43:24 -0700 |
commit | 8e571534d5060e970b561cca2e2a951d46027b79 (patch) | |
tree | 2476f45236c529157a803ab21387a40a85968dcd | |
parent | 7cb3472a4c7f31a3cbf70bbca8f79e2d3cabedad (diff) | |
download | android_packages_apps_InCallUI-8e571534d5060e970b561cca2e2a951d46027b79.tar.gz android_packages_apps_InCallUI-8e571534d5060e970b561cca2e2a951d46027b79.tar.bz2 android_packages_apps_InCallUI-8e571534d5060e970b561cca2e2a951d46027b79.zip |
Don't search LookupProvider for emergency calls
Ticket: CYNGNOS-3096
Change-Id: I67648c1651f59b0a9774c77ce6d6d25bc76da5f0
-rw-r--r-- | src/com/android/incallui/ContactInfoCache.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/incallui/ContactInfoCache.java b/src/com/android/incallui/ContactInfoCache.java index 58851986..5c454e68 100644 --- a/src/com/android/incallui/ContactInfoCache.java +++ b/src/com/android/incallui/ContactInfoCache.java @@ -25,9 +25,9 @@ import android.os.AsyncTask; import android.os.Handler; import android.os.Looper; import android.provider.ContactsContract; +import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.DisplayNameSources; -import android.provider.ContactsContract.CommonDataKinds.Phone; import android.telecom.TelecomManager; import android.telephony.PhoneNumberUtils; import android.telephony.TelephonyManager; @@ -264,7 +264,9 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete // Before issuing a request for more data from other services, we only check that the // contact wasn't found in the local DB. We don't check the if the cache entry already // has a name because we allow overriding cnap data with data from other services. - if (!callerInfo.contactExists && mPhoneNumberService != null) { + if (!callerInfo.contactExists && + !callerInfo.isEmergencyNumber() && + mPhoneNumberService != null) { Log.d(TAG, "Contact lookup. Local contacts miss, checking remote"); final PhoneNumberServiceListener listener = new PhoneNumberServiceListener(callId); mPhoneNumberService.getPhoneNumberInfo(cacheEntry.number, listener, listener, @@ -272,7 +274,9 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete clearCallbacks = false; } - if (!callerInfo.contactExists && mLookupProvider.isEnabled()) { + if (!callerInfo.contactExists && + !callerInfo.isEmergencyNumber() && + mLookupProvider.isEnabled()) { cacheEntry.isLookupInProgress = true; cacheEntry.lookupProviderName = mLookupProvider.getDisplayName(); String countryIso = ((TelephonyManager) mContext.getSystemService( |