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

Commit f7b3e192 authored by Daniel Lehmann's avatar Daniel Lehmann
Browse files

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

Bug:5134056
Change-Id: I7b9f419ee552a7d0c592f836355234ad6e34e221
parent 1cb12707
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: {