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

Skip to content
Commit dd768a6a 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: I820e68efd6c1364241596f826c4da1b9c2defe11
parent e5a6d16f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment