diff options
author | Victor Chang <vichang@google.com> | 2016-01-25 21:46:43 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-01-25 21:46:43 +0000 |
commit | 4e52aee89f13376684cc1f925c4df66246a4bacd (patch) | |
tree | 0fcb5e598712c0f0f33971559b73e7c51aabb0e7 | |
parent | 29ce4938c83eddf75470ea393ecb9609a8a3254b (diff) | |
parent | c4b26262269f0db8cfd14d68a0596801642219ff (diff) |
Merge "Open work profile QuickContacts for work contacts in personal dialer" into ub-contactsdialer-b-dev
am: ccfb9e42ea
* commit 'ccfb9e42ea60ba7a8f024d93da2b8c19657f8bf6':
Open work profile QuickContacts for work contacts in personal dialer
-rw-r--r-- | InCallUI/src/com/android/incallui/CallerInfo.java | 4 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/ContactInfoCache.java | 11 |
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; |