diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java index 8cf4a77b21759..b5fa577041d4e 100644 --- a/core/java/android/provider/ContactsContract.java +++ b/core/java/android/provider/ContactsContract.java @@ -180,14 +180,32 @@ public final class ContactsContract { * Reference to the row in the data table holding the primary phone number. *

Type: INTEGER REFERENCES data(_id)

*/ + @Deprecated public static final String PRIMARY_PHONE_ID = "primary_phone_id"; + /** + * Reference to the row in the data table holding the default phone number. + * If the contact has only one phone number, that number is the default one. + * Otherwise it is the one explicitly selected by the user as primary. + *

Type: INTEGER REFERENCES data(_id)

+ */ + public static final String DEFAULT_PHONE_ID = "default_phone_id"; + /** * Reference to the row in the data table holding the primary email address. *

Type: INTEGER REFERENCES data(_id)

*/ + @Deprecated public static final String PRIMARY_EMAIL_ID = "primary_email_id"; + /** + * Reference to the row in the data table holding the default email address. + * If the contact has only one email address, that address is the default one. + * Otherwise it is the one explicitly selected by the user as primary. + *

Type: INTEGER REFERENCES data(_id)

+ */ + public static final String DEFAULT_EMAIL_ID = "default_email_id"; + /** * Reference to the row in the data table holding the photo. *

Type: INTEGER REFERENCES data(_id)

@@ -210,19 +228,40 @@ public final class ContactsContract { * The type of data, for example Home or Work. *

Type: INTEGER

*/ + @Deprecated public static final String PRIMARY_PHONE_TYPE = CommonDataKinds.Phone.TYPE; + /** + * The type of data, for example Home or Work. + *

Type: INTEGER

+ */ + public static final String DEFAULT_PHONE_TYPE = "default_phone_type"; + /** * The user defined label for the primary phone. *

Type: TEXT

*/ + @Deprecated public static final String PRIMARY_PHONE_LABEL = CommonDataKinds.Phone.LABEL; + /** + * The user defined label for the default phone. + *

Type: TEXT

+ */ + public static final String DEFAULT_PHONE_LABEL = "default_phone_label"; + /** * The primary phone number. *

Type: TEXT

*/ + @Deprecated public static final String PRIMARY_PHONE_NUMBER = CommonDataKinds.Phone.NUMBER; + + /** + * The default phone number. + *

Type: TEXT

+ */ + public static final String DEFAULT_PHONE_NUMBER = "default_phone_number"; } /**