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

Commit 833a9e58 authored by Yorke Lee's avatar Yorke Lee Committed by Android (Google) Code Review
Browse files

Merge "ContactsContract api changes"

parents 6b86518c 217d8a79
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -20414,6 +20414,8 @@ package android.provider {
    field public static final java.lang.String LIMIT_PARAM_KEY = "limit";
    field public static final java.lang.String PRIMARY_ACCOUNT_NAME = "name_for_primary_account";
    field public static final java.lang.String PRIMARY_ACCOUNT_TYPE = "type_for_primary_account";
    field public static final java.lang.String REMOVE_DUPLICATE_ENTRIES = "remove_duplicate_entries";
    field public static final java.lang.String STREQUENT_PHONE_ONLY = "strequent_phone_only";
  }
  public static final class ContactsContract.AggregationExceptions implements android.provider.BaseColumns {
@@ -20442,6 +20444,12 @@ package android.provider {
    field public static final int TYPE_CUSTOM = 0; // 0x0
  }
  public static final class ContactsContract.CommonDataKinds.Callable implements android.provider.ContactsContract.CommonDataKinds.CommonColumns android.provider.ContactsContract.DataColumnsWithJoins {
    ctor public ContactsContract.CommonDataKinds.Callable();
    field public static final android.net.Uri CONTENT_FILTER_URI;
    field public static final android.net.Uri CONTENT_URI;
  }
  protected static abstract interface ContactsContract.CommonDataKinds.CommonColumns implements android.provider.ContactsContract.CommonDataKinds.BaseTypes {
    field public static final java.lang.String DATA = "data1";
    field public static final java.lang.String LABEL = "data3";
@@ -20620,6 +20628,7 @@ package android.provider {
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/name";
    field public static final java.lang.String DISPLAY_NAME = "data1";
    field public static final java.lang.String FAMILY_NAME = "data3";
    field public static final java.lang.String FULL_NAME_STYLE = "data10";
    field public static final java.lang.String GIVEN_NAME = "data2";
    field public static final java.lang.String MIDDLE_NAME = "data5";
    field public static final java.lang.String PHONETIC_FAMILY_NAME = "data9";
@@ -20673,6 +20682,7 @@ package android.provider {
  protected static abstract interface ContactsContract.ContactOptionsColumns {
    field public static final java.lang.String CUSTOM_RINGTONE = "custom_ringtone";
    field public static final java.lang.String LAST_TIME_CONTACTED = "last_time_contacted";
    field public static final java.lang.String PINNED = "pinned";
    field public static final java.lang.String SEND_TO_VOICEMAIL = "send_to_voicemail";
    field public static final java.lang.String STARRED = "starred";
    field public static final java.lang.String TIMES_CONTACTED = "times_contacted";
@@ -20699,6 +20709,7 @@ package android.provider {
    field public static final android.net.Uri CONTENT_GROUP_URI;
    field public static final java.lang.String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact";
    field public static final android.net.Uri CONTENT_LOOKUP_URI;
    field public static final android.net.Uri CONTENT_MULTI_VCARD_URI;
    field public static final android.net.Uri CONTENT_STREQUENT_FILTER_URI;
    field public static final android.net.Uri CONTENT_STREQUENT_URI;
    field public static final java.lang.String CONTENT_TYPE = "vnd.android.cursor.dir/contact";
@@ -20931,6 +20942,7 @@ package android.provider {
  public static final class ContactsContract.PhoneLookup implements android.provider.BaseColumns android.provider.ContactsContract.ContactOptionsColumns android.provider.ContactsContract.ContactsColumns android.provider.ContactsContract.PhoneLookupColumns {
    field public static final android.net.Uri CONTENT_FILTER_URI;
    field public static final java.lang.String QUERY_PARAMETER_SIP_ADDRESS = "sip";
  }
  protected static abstract interface ContactsContract.PhoneLookupColumns {
@@ -20947,6 +20959,25 @@ package android.provider {
    field public static final int UNDEFINED = 0; // 0x0
  }
  public static final class ContactsContract.PinnedPositions {
    ctor public ContactsContract.PinnedPositions();
    field public static final int DEMOTED = -1; // 0xffffffff
    field public static final java.lang.String STAR_WHEN_PINNING = "star_when_pinning";
    field public static final java.lang.String UNDEMOTE = "undemote";
    field public static final int UNPINNED = 2147483647; // 0x7fffffff
    field public static final android.net.Uri UPDATE_URI;
  }
  public static final class ContactsContract.Preferences {
    ctor public ContactsContract.Preferences();
    field public static final java.lang.String DISPLAY_ORDER = "android.contacts.DISPLAY_ORDER";
    field public static final int DISPLAY_ORDER_ALTERNATIVE = 2; // 0x2
    field public static final int DISPLAY_ORDER_PRIMARY = 1; // 0x1
    field public static final java.lang.String SORT_ORDER = "android.contacts.SORT_ORDER";
    field public static final int SORT_ORDER_ALTERNATIVE = 2; // 0x2
    field public static final int SORT_ORDER_PRIMARY = 1; // 0x1
  }
  public static final deprecated class ContactsContract.Presence extends android.provider.ContactsContract.StatusUpdates {
    ctor public ContactsContract.Presence();
  }
+39 −38
Original line number Diff line number Diff line
@@ -164,8 +164,6 @@ public final class ContactsContract {
     * {@link Contacts#CONTENT_STREQUENT_FILTER_URI}, which requires the ContactsProvider to
     * return only phone-related results. For example, frequently contacted person list should
     * include persons contacted via phone (not email, sms, etc.)
     *
     * @hide
     */
    public static final String STREQUENT_PHONE_ONLY = "strequent_phone_only";

@@ -190,8 +188,6 @@ public final class ContactsContract {
     * {@link CommonDataKinds.Email#CONTENT_URI}, and
     * {@link CommonDataKinds.StructuredPostal#CONTENT_URI}.
     * This enables a content provider to remove duplicate entries in results.
     *
     * @hide
     */
    public static final String REMOVE_DUPLICATE_ENTRIES = "remove_duplicate_entries";

@@ -248,30 +244,21 @@ public final class ContactsContract {
        public static final String KEY_AUTHORIZED_URI = "authorized_uri";
    }

    /**
     * @hide
     */
    public static final class Preferences {

        /**
         * A key in the {@link android.provider.Settings android.provider.Settings} provider
         * that stores the preferred sorting order for contacts (by given name vs. by family name).
         *
         * @hide
         */
        public static final String SORT_ORDER = "android.contacts.SORT_ORDER";

        /**
         * The value for the SORT_ORDER key corresponding to sorting by given name first.
         *
         * @hide
         */
        public static final int SORT_ORDER_PRIMARY = 1;

        /**
         * The value for the SORT_ORDER key corresponding to sorting by family name first.
         *
         * @hide
         */
        public static final int SORT_ORDER_ALTERNATIVE = 2;

@@ -279,22 +266,16 @@ public final class ContactsContract {
         * A key in the {@link android.provider.Settings android.provider.Settings} provider
         * that stores the preferred display order for contacts (given name first vs. family
         * name first).
         *
         * @hide
         */
        public static final String DISPLAY_ORDER = "android.contacts.DISPLAY_ORDER";

        /**
         * The value for the DISPLAY_ORDER key corresponding to showing the given name first.
         *
         * @hide
         */
        public static final int DISPLAY_ORDER_PRIMARY = 1;

        /**
         * The value for the DISPLAY_ORDER key corresponding to showing the family name first.
         *
         * @hide
         */
        public static final int DISPLAY_ORDER_ALTERNATIVE = 2;
    }
@@ -824,10 +805,9 @@ public final class ContactsContract {
        public static final String STARRED = "starred";

        /**
         * The position at which the contact is pinned. If {@link PinnedPositions.UNPINNED},
         * The position at which the contact is pinned. If {@link PinnedPositions#UNPINNED},
         * the contact is not pinned. Also see {@link PinnedPositions}.
         * <P>Type: INTEGER </P>
         * @hide
         */
        public static final String PINNED = "pinned";

@@ -1467,17 +1447,43 @@ public final class ContactsContract {
         * Base {@link Uri} for referencing multiple {@link Contacts} entry,
         * created by appending {@link #LOOKUP_KEY} using
         * {@link Uri#withAppendedPath(Uri, String)}. The lookup keys have to be
         * encoded and joined with the colon (":") separator. The resulting string
         * has to be encoded again. Provides
         * {@link OpenableColumns} columns when queried, or returns the
         * joined with the colon (":") separator, and the resulting string encoded.
         *
         * Provides {@link OpenableColumns} columns when queried, or returns the
         * referenced contact formatted as a vCard when opened through
         * {@link ContentResolver#openAssetFileDescriptor(Uri, String)}.
         *
         * This is private API because we do not have a well-defined way to
         * specify several entities yet. The format of this Uri might change in the future
         * or the Uri might be completely removed.
         * <p>
         * Usage example:
         * <dl>
         * <dt>The following code snippet creates a multi-vcard URI that references all the
         * contacts in a user's database.</dt>
         * <dd>
         *
         * <pre>
         * public Uri getAllContactsVcardUri() {
         *     Cursor cursor = getActivity().getContentResolver().query(Contacts.CONTENT_URI,
         *         new String[] {Contacts.LOOKUP_KEY}, null, null, null);
         *     if (cursor == null) {
         *         return null;
         *     }
         *     try {
         *         StringBuilder uriListBuilder = new StringBuilder();
         *         int index = 0;
         *         while (cursor.moveToNext()) {
         *             if (index != 0) uriListBuilder.append(':');
         *             uriListBuilder.append(cursor.getString(0));
         *             index++;
         *         }
         *         return Uri.withAppendedPath(Contacts.CONTENT_MULTI_VCARD_URI,
         *                 Uri.encode(uriListBuilder.toString()));
         *     } finally {
         *         cursor.close();
         *     }
         * }
         * </pre>
         *
         * @hide
         * </p>
         */
        public static final Uri CONTENT_MULTI_VCARD_URI = Uri.withAppendedPath(CONTENT_URI,
                "as_multi_vcard");
@@ -4792,9 +4798,9 @@ public final class ContactsContract {
        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/phone_lookup";

        /**
        * Boolean parameter that is used to look up a SIP address.
        *
        * @hide
         * If this boolean parameter is set to true, then the appended query is treated as a
         * SIP address and the lookup will be performed against SIP addresses in the user's
         * contacts.
         */
        public static final String QUERY_PARAMETER_SIP_ADDRESS = "sip";
    }
@@ -5304,8 +5310,6 @@ public final class ContactsContract {
            /**
             * The style used for combining given/middle/family name into a full name.
             * See {@link ContactsContract.FullNameStyle}.
             *
             * @hide
             */
            public static final String FULL_NAME_STYLE = DATA10;

@@ -6897,8 +6901,6 @@ public final class ContactsContract {
         * each column. For example the meaning for {@link Phone}'s type is different than
         * {@link SipAddress}'s.
         * </p>
         *
         * @hide
         */
        public static final class Callable implements DataColumnsWithJoins, CommonColumns {
            /**
@@ -7756,7 +7758,6 @@ public final class ContactsContract {
     * {@link PinnedPositions#STAR_WHEN_PINNING} to true to force all pinned and unpinned
     * contacts to be automatically starred and unstarred.
     * </p>
     * @hide
     */
    public static final class PinnedPositions {