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

Commit 06dfcefa authored by Daniel Lehmann's avatar Daniel Lehmann Committed by Android (Google) Code Review
Browse files

Merge "Replace the is_profile hack by a worse hack, which is at least way faster"

parents 68ca6aa9 f7b3e192
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -186,7 +186,7 @@ public class DefaultContactListAdapter extends ContactListAdapter {
                break;
            }
            case ContactListFilter.FILTER_TYPE_ACCOUNT: {
                // TODO: avoid the use of private API
                // TODO (stopship): avoid the use of private API
                selection.append(
                        Contacts._ID + " IN ("
                                + "SELECT DISTINCT " + RawContacts.CONTACT_ID
@@ -201,7 +201,11 @@ public class DefaultContactListAdapter extends ContactListAdapter {
                } else {
                    selection.append(" AND " + RawContacts.DATA_SET + " IS NULL");
                }
                selection.append(" OR " + Contacts.IS_USER_PROFILE + "=1)");
                // TODO (stopship): And also this private API, which is even worse
                selection.append(") OR " + Contacts._ID + "=(" +
                        "SELECT contact_id " +
                        "FROM raw_contacts rc inner join accounts a" +
                        " ON a.profile_raw_contact_id = rc._id)");
                break;
            }
            case ContactListFilter.FILTER_TYPE_GROUP: {