Add sorting by default phone number

Currently the order of numbers is times contacted -> displayName ->
phone type (mobile vs. home, etc.). This adds whether the number has
been saved as the default number for a contact to sort numbers belonging
to the same contact.

Fixes #580
This commit is contained in:
Michael Bennett 2014-02-09 14:28:10 -08:00 committed by Moxie Marlinspike
parent 12d217991c
commit 468eb3382c

View File

@ -412,7 +412,9 @@ public class ContactAccessor {
ContentResolver mContentResolver) ContentResolver mContentResolver)
{ {
final String SORT_ORDER = Contacts.TIMES_CONTACTED + " DESC," + final String SORT_ORDER = Contacts.TIMES_CONTACTED + " DESC," +
Contacts.DISPLAY_NAME + "," + Phone.TYPE; Contacts.DISPLAY_NAME + "," +
Contacts.Data.IS_SUPER_PRIMARY + " DESC," +
Phone.TYPE;
final String[] PROJECTION_PHONE = { final String[] PROJECTION_PHONE = {
Phone._ID, // 0 Phone._ID, // 0