Predictable sort order for contact lookup by email address

This commit is contained in:
M66B
2024-09-26 07:30:17 +02:00
parent 17de79d52e
commit e538e0f036
3 changed files with 6 additions and 6 deletions

View File

@@ -312,7 +312,7 @@ public class ContactInfo {
ContactsContract.Contacts.LOOKUP_KEY,
ContactsContract.Contacts.DISPLAY_NAME
},
null, null, null)) {
null, null, ContactsContract.Contacts.DISPLAY_NAME)) {
if (cursor != null && cursor.moveToNext()) {
int colContactId = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Photo.CONTACT_ID);
@@ -1155,7 +1155,7 @@ public class ContactInfo {
ContactsContract.Contacts.DISPLAY_NAME
},
ContactsContract.CommonDataKinds.Email.ADDRESS + " <> ''",
null, null)) {
null, ContactsContract.Contacts.DISPLAY_NAME)) {
while (cursor != null && cursor.moveToNext()) {
long contactId = cursor.getLong(0);
String lookupKey = cursor.getString(1);