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

Commit 538c814a authored by Sean Midford's avatar Sean Midford
Browse files

Fixed quick contact button in send to labels

Removed the quick contact photo badge on left side
of items in send to group picker fragment. Now entire
row triggers the checkbox.

Test: Verified that change is working as intended in both
send email and send phone number to groups

Bug: 32945249, 32950580
Change-Id: I13ba2837481dd4630a5ef5ff77ff143c10a8994e
parent 12b8e80c
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();
    }