summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/CallerInfo.java4
-rw-r--r--InCallUI/src/com/android/incallui/ContactInfoCache.java11
2 files changed, 10 insertions, 5 deletions
diff --git a/InCallUI/src/com/android/incallui/CallerInfo.java b/InCallUI/src/com/android/incallui/CallerInfo.java
index 609696130..670c3fd66 100644
--- a/InCallUI/src/com/android/incallui/CallerInfo.java
+++ b/InCallUI/src/com/android/incallui/CallerInfo.java
@@ -241,7 +241,9 @@ public class CallerInfo {
columnIndex = getColumnIndexForPersonId(contactRef, cursor);
if (columnIndex != -1) {
contactId = cursor.getLong(columnIndex);
- if (contactId != 0 && !Contacts.isEnterpriseContactId(contactId)) {
+ // QuickContacts in M doesn't support enterprise contact id
+ if (contactId != 0 && (ContactsUtils.FLAG_N_FEATURE
+ || !Contacts.isEnterpriseContactId(contactId))) {
info.contactIdOrZero = contactId;
Log.v(TAG, "==> got info.contactIdOrZero: " + info.contactIdOrZero);
diff --git a/InCallUI/src/com/android/incallui/ContactInfoCache.java b/InCallUI/src/com/android/incallui/ContactInfoCache.java
index bba973b1c..f50cc7e46 100644
--- a/InCallUI/src/com/android/incallui/ContactInfoCache.java
+++ b/InCallUI/src/com/android/incallui/ContactInfoCache.java
@@ -426,11 +426,14 @@ public class ContactInfoCache implements ContactsAsyncHelper.OnImageLoadComplete
cce.displayPhotoUri = info.contactDisplayPhotoUri;
}
- if (info.lookupKeyOrNull == null || info.contactIdOrZero == 0) {
- Log.v(TAG, "lookup key is null or contact ID is 0. Don't create a lookup uri.");
- cce.lookupUri = null;
- } else {
+ // Support any contact id in N because QuickContacts in N starts supporting enterprise
+ // contact id
+ if (info.lookupKeyOrNull != null
+ && (ContactsUtils.FLAG_N_FEATURE || info.contactIdOrZero != 0)) {
cce.lookupUri = Contacts.getLookupUri(info.contactIdOrZero, info.lookupKeyOrNull);
+ } else {
+ Log.v(TAG, "lookup key is null or contact ID is 0 on M. Don't create a lookup uri.");
+ cce.lookupUri = null;
}
cce.photo = photo;