diff options
Diffstat (limited to 'core/java/android/provider/ContactsContract.java')
-rw-r--r-- | core/java/android/provider/ContactsContract.java | 119 |
1 files changed, 74 insertions, 45 deletions
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java index 61deea4..ec67683 100644 --- a/core/java/android/provider/ContactsContract.java +++ b/core/java/android/provider/ContactsContract.java @@ -135,14 +135,6 @@ public final class ContactsContract { public static final String ALLOW_PROFILE = "allow_profile"; /** - * A query parameter key used to specify the package that is requesting a query. - * This is used for restricting data based on package name. - * - * @hide - */ - public static final String REQUESTING_PACKAGE_PARAM_KEY = "requesting_package"; - - /** * Query parameter that should be used by the client to access a specific * {@link Directory}. The parameter value should be the _ID of the corresponding * directory, e.g. @@ -271,8 +263,6 @@ public final class ContactsContract { * <li>The URI authority is replaced with the corresponding {@link #DIRECTORY_AUTHORITY}.</li> * <li>The {@code accountName=} and {@code accountType=} parameters are added or * replaced using the corresponding {@link #ACCOUNT_TYPE} and {@link #ACCOUNT_NAME} values.</li> - * <li>If the URI is missing a ContactsContract.REQUESTING_PACKAGE_PARAM_KEY - * parameter, this parameter is added.</li> * </ul> * </p> * <p> @@ -1881,13 +1871,16 @@ public final class ContactsContract { public static final String CONTACT_ID = "contact_id"; /** - * Flag indicating that this {@link RawContacts} entry and its children have - * been restricted to specific platform apps. - * <P>Type: INTEGER (boolean)</P> + * 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. * - * @hide until finalized in future platform release + * 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. + * <P>Type: TEXT</P> */ - public static final String IS_RESTRICTED = "is_restricted"; + public static final String DATA_SET = "data_set"; /** * The aggregation mode for this contact. @@ -2211,8 +2204,8 @@ public final class ContactsContract { * <td>The name of the account instance to which this row belongs, which when paired with * {@link #ACCOUNT_TYPE} identifies a specific account. * For example, this will be the Gmail address if it is a Google account. - * It should be set at the time - * the raw contact is inserted and never changed afterwards.</td> + * It should be set at the time the raw contact is inserted and never + * changed afterwards.</td> * </tr> * <tr> * <td>String</td> @@ -2222,8 +2215,8 @@ public final class ContactsContract { * <p> * 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. * </p> * <p> * To ensure uniqueness, new account types should be chosen according to the @@ -2233,15 +2226,38 @@ public final class ContactsContract { * </tr> * <tr> * <td>String</td> + * <td>{@link #DATA_SET}</td> + * <td>read/write-once</td> + * <td> + * <p> + * 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. + * </p> + * <p> + * 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. + * </p> + * <p> + * It should be set at the time the raw contact is inserted and never + * changed afterwards. + * </p> + * </td> + * </tr> + * <tr> + * <td>String</td> * <td>{@link #SOURCE_ID}</td> * <td>read/write</td> * <td>String that uniquely identifies this row to its source account. * Typically it is set at the time the raw contact is inserted and never * changed afterwards. The one notable exception is a new raw contact: it - * will have an account name and type, but no source id. This - * indicates to the sync adapter that a new contact needs to be created - * server-side and its ID stored in the corresponding SOURCE_ID field on - * the phone. + * will have an account name and type (and possibly a data set), but no + * source id. This indicates to the sync adapter that a new contact needs + * to be created server-side and its ID stored in the corresponding + * SOURCE_ID field on the phone. * </td> * </tr> * <tr> @@ -2537,7 +2553,6 @@ public final class ContactsContract { DatabaseUtils.cursorLongToContentValuesIfPresent(cursor, cv, DELETED); DatabaseUtils.cursorLongToContentValuesIfPresent(cursor, cv, CONTACT_ID); DatabaseUtils.cursorLongToContentValuesIfPresent(cursor, cv, STARRED); - DatabaseUtils.cursorIntToContentValuesIfPresent(cursor, cv, IS_RESTRICTED); DatabaseUtils.cursorIntToContentValuesIfPresent(cursor, cv, NAME_VERIFIED); android.content.Entity contact = new android.content.Entity(cv); @@ -3814,27 +3829,6 @@ public final class ContactsContract { /** * <p> - * If {@link #FOR_EXPORT_ONLY} is explicitly set to "1", returned Cursor toward - * Data.CONTENT_URI contains only exportable data. - * </p> - * <p> - * This flag is useful (currently) only for vCard exporter in Contacts app, which - * needs to exclude "un-exportable" data from available data to export, while - * Contacts app itself has priviledge to access all data including "un-exportable" - * ones and providers return all of them regardless of the callers' intention. - * </p> - * <p> - * Type: INTEGER - * </p> - * - * @hide Maybe available only in Eclair and not really ready for public use. - * TODO: remove, or implement this feature completely. As of now (Eclair), - * we only use this flag in queryEntities(), not query(). - */ - public static final String FOR_EXPORT_ONLY = "for_export_only"; - - /** - * <p> * Build a {@link android.provider.ContactsContract.Contacts#CONTENT_LOOKUP_URI} * style {@link Uri} for the parent {@link android.provider.ContactsContract.Contacts} * entry of the given {@link ContactsContract.Data} entry. @@ -6213,6 +6207,18 @@ public final class ContactsContract { */ protected interface GroupsColumns { /** + * 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. + * + * This is empty by default, and is completely optional. It only needs to + * be populated if multiple sync adapters are entering distinct group data + * for the same account type and account name. + * <P>Type: TEXT</P> + */ + public static final String DATA_SET = "data_set"; + + /** * The display title of this group. * <p> * Type: TEXT @@ -6338,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.</td> * </tr> + # <tr> + * <td>String</td> + * <td>{@link #DATA_SET}</td> + * <td>read/write-once</td> + * <td> + * <p> + * 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. + * </p> + * <p> + * 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. + * </p> + * <p> + * It should be set at the time the group is inserted and never changed + * afterwards. + * </p> + * </td> + * </tr> * <tr> * <td>String</td> * <td>{@link #TITLE}</td> |