summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor Halvorson <thalvorson@cyngn.com>2016-07-05 12:17:56 -0700
committerdoc HD <doc.divxm@gmail.com>2016-07-12 20:50:54 +0300
commit5099c4a430b725b64018dd1161774321f14a82e7 (patch)
tree320b36be9cb4fa5cb0a335a1dd47433ca3d5212f
parent7e0ac9de9bfaf4116a4140c9da108c5851dbd567 (diff)
Don't search LookupProvider for emergency calls
Ticket: CYNGNOS-3096 Change-Id: I67648c1651f59b0a9774c77ce6d6d25bc76da5f0
-rw-r--r--src/com/android/incallui/ContactInfoCache.java10
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(