Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4b26262 authored by Victor Chang's avatar Victor Chang Committed by Android (Google) Code Review
Browse files

Merge "Open work profile QuickContacts for work contacts in personal dialer"...

Merge "Open work profile QuickContacts for work contacts in personal dialer" into ub-contactsdialer-b-dev
parents e8b7032e fced4676
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);

+7 −4
Original line number Diff line number Diff line
@@ -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;