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

Commit dfd93c69 authored by Zheng Fu's avatar Zheng Fu Committed by Android (Google) Code Review
Browse files

Merge "Revert contact metadata_sync constants." into mnc-dev

parents df85c12b 1ed73199
Loading
Loading
Loading
Loading
+0 −153
Original line number Diff line number Diff line
@@ -8931,157 +8931,4 @@ public final class ContactsContract {
            public static final String EXTRA_DATA_SET = "android.provider.extra.DATA_SET";
        }
    }

    /**
     * @hide
     */
    protected interface MetadataSyncColumns {

        /**
         * The raw contact backup id.
         * A reference to the {@link ContactsContract.RawContacts#BACKUP_ID} that save the
         * persistent unique id for each raw contact within its source system.
         *
         * @hide
         */
        public static final String RAW_CONTACT_BACKUP_ID = "raw_contact_backup_id";

        /**
         * The account type to which the raw_contact of this item is associated. See
         * {@link RawContacts#ACCOUNT_TYPE}
         *
         * @hide
         */
        public static final String ACCOUNT_TYPE = "account_type";

        /**
         * The account name to which the raw_contact of this item is associated. See
         * {@link RawContacts#ACCOUNT_NAME}
         *
         * @hide
         */
        public static final String ACCOUNT_NAME = "account_name";

        /**
         * The data set within the account that the raw_contact of this row belongs to. This allows
         * multiple sync adapters for the same account type to distinguish between
         * each others' data.
         * {@link RawContacts#DATA_SET}
         *
         * @hide
         */
        public static final String DATA_SET = "data_set";

        /**
         * A text column contains the Json string got from People API. The Json string contains
         * all the metadata related to the raw contact, i.e., all the data fields and
         * aggregation exceptions.
         *
         * Here is an example of the Json string got from the actual schema.
         * <pre>
         *     {
         *       "unique_contact_id": {
         *         "account_type": "CUSTOM_ACCOUNT",
         *         "custom_account_type": "facebook",
         *         "account_name": "android-test",
         *         "contact_id": "1111111",
         *         "data_set": "FOCUS"
         *       },
         *       "contact_prefs": {
         *         "send_to_voicemail": true,
         *         "starred": false,
         *         "pinned": 2
         *       },
         *       "aggregation_data": [
         *         {
         *           "type": "TOGETHER",
         *           "contact_ids": [
         *             {
         *               "account_type": "GOOGLE_ACCOUNT",
         *               "account_name": "android-test2",
         *               "contact_id": "2222222",
         *               "data_set": "GOOGLE_PLUS"
         *             },
         *             {
         *               "account_type": "GOOGLE_ACCOUNT",
         *               "account_name": "android-test3",
         *               "contact_id": "3333333",
         *               "data_set": "CUSTOM",
         *               "custom_data_set": "custom type"
         *             }
         *           ]
         *         }
         *       ],
         *       "field_data": [
         *         {
         *           "field_data_id": "1001",
         *           "field_data_prefs": {
         *             "is_primary": true,
         *             "is_super_primary": true
         *           },
         *           "usage_stats": [
         *             {
         *               "usage_type": "CALL",
         *               "last_time_used": 10000001,
         *               "usage_count": 10
         *             }
         *           ]
         *         }
         *       ]
         *     }
         * </pre>
         *
         * @hide
         */
        public static final String DATA = "data";

        /**
         * The "deleted" flag: "0" by default, "1" if the row has been marked
         * for deletion. When {@link android.content.ContentResolver#delete} is
         * called on a raw contact, updating MetadataSync table to set the flag of the raw contact
         * as "1", then metadata sync adapter deletes the raw contact metadata on the server.
         * <P>Type: INTEGER</P>
         *
         * @hide
         */
        public static final String DELETED = "deleted";
    }

    /**
     * Constants for the metadata sync table. This table is used to cache the metadata_sync data
     * from server before it is merged into other CP2 tables.
     *
     * @hide
     */
    public static final class MetadataSync implements BaseColumns, MetadataSyncColumns {

        /** The authority for the contacts metadata */
        public static final String METADATA_AUTHORITY = "com.android.contacts.metadata";

        /** A content:// style uri to the authority for the contacts metadata */
        public static final Uri METADATA_AUTHORITY_URI = Uri.parse(
                "content://" + METADATA_AUTHORITY);

        /**
         * This utility class cannot be instantiated
         */
        private MetadataSync() {
        }

        /**
         * The content:// style URI for this table.
         */
        public static final Uri CONTENT_URI = Uri.withAppendedPath(METADATA_AUTHORITY_URI,
                "metadata_sync");

        /**
         * The MIME type of {@link #CONTENT_URI} providing a directory of contact metadata
         */
        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact_metadata";

        /**
         * The MIME type of a {@link #CONTENT_URI} subdirectory of a single contact metadata.
         */
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_metadata";
    }
}