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
This commit is contained in:
Dmitri Plotnikov
2009-09-18 15:28:22 -07:00
parent 90d8a6a449
commit de71cb3b6f

View File

@@ -682,7 +682,8 @@ public final class ContactsContract {
* definition and some generic columns. Each data type can define the meaning for each of * definition and some generic columns. Each data type can define the meaning for each of
* the generic columns. * 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 * This utility class cannot be instantiated
*/ */