QuickContacts can prioritize phone mimetype. Part4
Whenever using QuickContacts in Dialer, make sure to
prioritize the phone mimetype.
Bug: 18391003
Change-Id: Ie5a93ad9e1919f470a638d4235d91fe337cb5ca3
diff --git a/src/com/android/contacts/common/list/ContactEntryListAdapter.java b/src/com/android/contacts/common/list/ContactEntryListAdapter.java
index 4d7eb19..4c5231b 100644
--- a/src/com/android/contacts/common/list/ContactEntryListAdapter.java
+++ b/src/com/android/contacts/common/list/ContactEntryListAdapter.java
@@ -22,6 +22,7 @@
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.Directory;
@@ -722,6 +723,10 @@
QuickContactBadge quickContact = view.getQuickContact();
quickContact.assignContactUri(
getContactUri(partitionIndex, cursor, contactIdColumn, lookUpKeyColumn));
+ // The Contacts app never uses the QuickContactBadge. Therefore, it is safe to assume
+ // that only Dialer will use this QuickContact badge. This means prioritizing the phone
+ // mimetype here is reasonable.
+ quickContact.setPrioritizedMimeType(Phone.CONTENT_ITEM_TYPE);
if (photoId != 0 || photoUriColumn == -1) {
getPhotoLoader().loadThumbnail(quickContact, photoId, mDarkTheme, mCircularPhotos,