Use collate localized to sort contacts

Fixes #5144
// FREEBIE
This commit is contained in:
Moxie Marlinspike 2016-01-30 14:36:06 -08:00
parent 7fcd9c36bf
commit 1b97756b05

View File

@ -147,7 +147,7 @@ public class ContactsDatabase {
ContactsContract.CommonDataKinds.Phone.TYPE, ContactsContract.CommonDataKinds.Phone.TYPE,
ContactsContract.CommonDataKinds.Phone.LABEL}; ContactsContract.CommonDataKinds.Phone.LABEL};
String sort = ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME + " COLLATE NOCASE ASC"; String sort = ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME + " COLLATE LOCALIZED NOCASE ASC";
Map<String, String> projectionMap = new HashMap<String, String>() {{ Map<String, String> projectionMap = new HashMap<String, String>() {{
put(ID_COLUMN, ContactsContract.CommonDataKinds.Phone._ID); put(ID_COLUMN, ContactsContract.CommonDataKinds.Phone._ID);
@ -181,7 +181,7 @@ public class ContactsDatabase {
ContactsContract.Contacts.DISPLAY_NAME, ContactsContract.Contacts.DISPLAY_NAME,
ContactsContract.Data.DATA1}; ContactsContract.Data.DATA1};
String sort = ContactsContract.Contacts.DISPLAY_NAME + " COLLATE NOCASE ASC"; String sort = ContactsContract.Contacts.DISPLAY_NAME + " COLLATE LOCALIZED NOCASE ASC";
Map<String, String> projectionMap = new HashMap<String, String>(){{ Map<String, String> projectionMap = new HashMap<String, String>(){{
put(ID_COLUMN, ContactsContract.Data._ID); put(ID_COLUMN, ContactsContract.Data._ID);