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

Commit 08a7b187 authored by Sean Midford's avatar Sean Midford Committed by android-build-merger
Browse files

Fixed quick contact button in send to labels am: 538c814a

am: 28107c76

Change-Id: I557fca7c293b01f016aeb25444fe20d70fe2e825
parents 3ec95845 28107c76
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.view.ViewGroup;

import android.provider.ContactsContract.CommonDataKinds.Email;

import com.android.contacts.common.ContactPhotoManager;
import com.android.contacts.common.list.ContactListItemView;
import com.android.contacts.common.list.MultiSelectEntryContactListAdapter;
import com.android.contacts.common.preference.ContactsPreferences;
@@ -162,9 +163,7 @@ public class MultiSelectEmailAddressesListAdapter extends MultiSelectEntryContac
        bindViewId(view, cursor, EmailQuery.EMAIL_ID);
        if (isFirstEntry) {
            bindName(view, cursor);
            bindQuickContact(view, partition, cursor, EmailQuery.PHOTO_ID,
                    EmailQuery.PHOTO_URI, EmailQuery.CONTACT_ID,
                    EmailQuery.LOOKUP_KEY, EmailQuery.DISPLAY_NAME);
            bindPhoto(view, cursor);
        } else {
            unbindName(view);
            view.removePhotoView(true, false);
@@ -172,6 +171,17 @@ public class MultiSelectEmailAddressesListAdapter extends MultiSelectEntryContac
        bindEmailAddress(view, cursor);
    }

    protected void bindPhoto(final ContactListItemView view, Cursor cursor) {
        final long photoId = cursor.isNull(EmailQuery.PHOTO_ID)
                ? 0 : cursor.getLong(EmailQuery.PHOTO_ID);
        final ContactPhotoManager.DefaultImageRequest imageRequest = photoId == 0
                ? getDefaultImageRequestFromCursor(cursor, EmailQuery.DISPLAY_NAME,
                EmailQuery.LOOKUP_KEY)
                : null;
        getPhotoLoader().loadThumbnail(view.getPhotoView(), photoId, false, getCircularPhotos(),
                imageRequest);
    }

    protected void unbindName(final ContactListItemView view) {
        view.hideDisplayName();
    }
+13 −3
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.view.ViewGroup;

import android.provider.ContactsContract.CommonDataKinds.Phone;

import com.android.contacts.common.ContactPhotoManager;
import com.android.contacts.common.list.ContactListItemView;
import com.android.contacts.common.list.MultiSelectEntryContactListAdapter;
import com.android.contacts.common.preference.ContactsPreferences;
@@ -162,9 +163,7 @@ public class MultiSelectPhoneNumbersListAdapter extends MultiSelectEntryContactL
        bindViewId(view, cursor, PhoneQuery.PHONE_ID);
        if (isFirstEntry) {
            bindName(view, cursor);
            bindQuickContact(view, partition, cursor, PhoneQuery.PHOTO_ID,
                        PhoneQuery.PHOTO_URI, PhoneQuery.CONTACT_ID,
                        PhoneQuery.LOOKUP_KEY, PhoneQuery.DISPLAY_NAME);
            bindPhoto(view, cursor);
        } else {
            unbindName(view);
            view.removePhotoView(true, false);
@@ -172,6 +171,17 @@ public class MultiSelectPhoneNumbersListAdapter extends MultiSelectEntryContactL
        bindPhoneNumber(view, cursor);
    }

    protected void bindPhoto(final ContactListItemView view, Cursor cursor) {
        final long photoId = cursor.isNull(PhoneQuery.PHOTO_ID)
                ? 0 : cursor.getLong(PhoneQuery.PHOTO_ID);
        final ContactPhotoManager.DefaultImageRequest imageRequest = photoId == 0
                ? getDefaultImageRequestFromCursor(cursor, PhoneQuery.DISPLAY_NAME,
                PhoneQuery.LOOKUP_KEY)
                : null;
        getPhotoLoader().loadThumbnail(view.getPhotoView(), photoId, false, getCircularPhotos(),
                imageRequest);
    }

    protected void unbindName(final ContactListItemView view) {
        view.hideDisplayName();
    }