diff --git a/api/current.txt b/api/current.txt index 46cf2afc1f992..f3dda785fa675 100644 --- a/api/current.txt +++ b/api/current.txt @@ -16007,6 +16007,7 @@ package android.provider { protected static abstract interface ContactsContract.GroupsColumns { field public static final java.lang.String AUTO_ADD = "auto_add"; + field public static final java.lang.String DATA_SET = "data_set"; field public static final java.lang.String DELETED = "deleted"; field public static final java.lang.String FAVORITES = "favorites"; field public static final java.lang.String GROUP_IS_READ_ONLY = "group_is_read_only"; @@ -16134,6 +16135,7 @@ package android.provider { protected static abstract interface ContactsContract.RawContactsColumns { field public static final java.lang.String AGGREGATION_MODE = "aggregation_mode"; field public static final java.lang.String CONTACT_ID = "contact_id"; + field public static final java.lang.String DATA_SET = "data_set"; field public static final java.lang.String DELETED = "deleted"; field public static final java.lang.String RAW_CONTACT_IS_READ_ONLY = "raw_contact_is_read_only"; field public static final java.lang.String RAW_CONTACT_IS_USER_PROFILE = "raw_contact_is_user_profile"; diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java index 9c12a44c81f35..ec67683cde8d0 100644 --- a/core/java/android/provider/ContactsContract.java +++ b/core/java/android/provider/ContactsContract.java @@ -1870,6 +1870,18 @@ public final class ContactsContract { */ public static final String CONTACT_ID = "contact_id"; + /** + * The data set within the account that this row belongs to. This allows + * multiple sync adapters for the same account type to distinguish between + * each others' data. + * + * This is empty by default, and is completely optional. It only needs to + * be populated if multiple sync adapters are entering distinct data for + * the same account type and account name. + *
Type: TEXT
+ */ + public static final String DATA_SET = "data_set"; + /** * The aggregation mode for this contact. *Type: INTEGER
@@ -2192,8 +2204,8 @@ public final class ContactsContract { ** The type of account to which this row belongs, which when paired with * {@link #ACCOUNT_NAME} identifies a specific account. - * It should be set at the time - * the raw contact is inserted and never changed afterwards. + * It should be set at the time the raw contact is inserted and never + * changed afterwards. *
** To ensure uniqueness, new account types should be chosen according to the @@ -2214,15 +2226,38 @@ public final class ContactsContract { *
+ * The data set within the account that this row belongs to. This allows + * multiple sync adapters for the same account type to distinguish between + * each others' data. The combination of {@link #ACCOUNT_TYPE}, + * {@link #ACCOUNT_NAME}, and {@link #DATA_SET} identifies a set of data + * that is associated with a single sync adapter. + *
+ *+ * This is empty by default, and is completely optional. It only needs to + * be populated if multiple sync adapters are entering distinct data for + * the same account type and account name. + *
+ *+ * It should be set at the time the raw contact is inserted and never + * changed afterwards. + *
+ *Type: TEXT
+ */ + public static final String DATA_SET = "data_set"; + /** * The display title of this group. *@@ -6297,6 +6344,29 @@ public final class ContactsContract { * In other words, it would be a really bad idea to delete and reinsert a * group. A sync adapter should always do an update instead. *
+ * The data set within the account that this group belongs to. This allows + * multiple sync adapters for the same account type to distinguish between + * each others' group data. The combination of {@link #ACCOUNT_TYPE}, + * {@link #ACCOUNT_NAME}, and {@link #DATA_SET} identifies a set of data + * that is associated with a single sync adapter. + *
+ *+ * This is empty by default, and is completely optional. It only needs to + * be populated if multiple sync adapters are entering distinct data for + * the same account type and account name. + *
+ *+ * It should be set at the time the group is inserted and never changed + * afterwards. + *
+ *