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

Commit afc09c76 authored by Isaac Katzenelson's avatar Isaac Katzenelson Committed by Android (Google) Code Review
Browse files

Merge "Sort people in group view according to sort settings"

parents c8513baa 4b9b26ec
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
package com.android.contacts;

import com.android.contacts.list.ContactListAdapter;
import com.android.contacts.preference.ContactsPreferences;

import android.content.Context;
import android.content.CursorLoader;
@@ -81,8 +82,14 @@ public final class GroupMemberLoader extends CursorLoader {
        setProjection(PROJECTION_DATA);
        setSelection(createSelection());
        setSelectionArgs(createSelectionArgs());

        ContactsPreferences prefs = new ContactsPreferences(context);
        if (prefs.getSortOrder() == ContactsContract.Preferences.SORT_ORDER_PRIMARY) {
            setSortOrder(Contacts.SORT_KEY_PRIMARY);
        } else {
            setSortOrder(Contacts.SORT_KEY_ALTERNATIVE);
        }
    }

    private Uri createUri() {
        Uri uri = Data.CONTENT_URI;