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

Commit de71cb3b authored by Dmitri Plotnikov's avatar Dmitri Plotnikov
Browse files

ContactsContract: Adding joined columns to the Data class definition.

The rationale is this. Since all these joined columns are currently on
different classes, we routinely see code like this:

private static final String[] PROJECTION_PHONE = {
   Data._ID, // 0
   RawContacts.CONTACT_ID, // 1
   Phone.TYPE, // 2
   Phone.NUMBER, // 3
   Phone.LABEL, // 4
   Contacts.DISPLAY_NAME, // 5
};

The most noxious line is RawContacts.CONTACT_ID

After this change, the above declaration changes to:

private static final String[] PROJECTION_PHONE = {
   Data._ID, // 0
   Data.CONTACT_ID, // 1
   Phone.TYPE, // 2
   Phone.NUMBER, // 3
   Phone.LABEL, // 4
   Data.DISPLAY_NAME, // 5
};

Change-Id: I03bfc700e4c8c58a175bc885bf7b807d7fed0744
parent 90d8a6a4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -682,7 +682,8 @@ public final class ContactsContract {
     * definition and some generic columns. Each data type can define the meaning for each of
     * the generic columns.
     */
    public static final class Data implements BaseColumns, DataColumns {
    public static final class Data implements BaseColumns, DataColumns, RawContactsColumns,
            ContactsColumns {
        /**
         * This utility class cannot be instantiated
         */