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

Commit 4464784b authored by Dmitri Plotnikov's avatar Dmitri Plotnikov Committed by Android (Google) Code Review
Browse files

Merge "Add the hidden ACTION_GET_MULTIPLE_PHONES and EXTRA_PHONE_URIS: a. Add...

Merge "Add the hidden ACTION_GET_MULTIPLE_PHONES and EXTRA_PHONE_URIS: a. Add the ACTION_GET_MULTIPLE_PHONES which will launch the contacts with multiple picker mode, and user can selected the multiple phones in the list of phone numbers. b. Add the EXTRA_PHONE_URIS which works with ACTION_PICK_MULTIPLE to specify the phone numbers should be selected by default when it is used as input or store the list of selected phone numbers when returnning from the activity."
parents 55bd1f13 fc7838b4
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
@@ -5557,6 +5557,28 @@ public final class ContactsContract {
        public static final String SHOW_OR_CREATE_CONTACT =
                "com.android.contacts.action.SHOW_OR_CREATE_CONTACT";

        /**
         * Starts an Activity that lets the user select the multiple phones from a
         * list of phone numbers which come from the contacts or
         * {@link #EXTRA_PHONE_URIS}.
         * <p>
         * The phone numbers being passed in through {@link #EXTRA_PHONE_URIS}
         * could belong to the contacts or not, and will be selected by default.
         * <p>
         * The user's selection will be returned from
         * {@link android.app.Activity#onActivityResult(int, int, android.content.Intent)}
         * if the resultCode is 
         * {@link android.app.Activity#RESULT_OK}, the array of picked phone
         * numbers are in the Intent's
         * {@link #EXTRA_PHONE_URIS}; otherwise, the
         * {@link android.app.Activity#RESULT_CANCELED} is returned if the user
         * left the Activity without changing the selection.
         *
         * @hide
         */
        public static final String ACTION_GET_MULTIPLE_PHONES =
                "com.android.contacts.action.GET_MULTIPLE_PHONES";

        /**
         * Used with {@link #SHOW_OR_CREATE_CONTACT} to force creating a new
         * contact if no matching contact found. Otherwise, default behavior is
@@ -5577,6 +5599,23 @@ public final class ContactsContract {
        public static final String EXTRA_CREATE_DESCRIPTION =
            "com.android.contacts.action.CREATE_DESCRIPTION";

        /**
         * Used with {@link #ACTION_GET_MULTIPLE_PHONES} as the input or output value.
         * <p>
         * The phone numbers want to be picked by default should be passed in as
         * input value. These phone numbers could belong to the contacts or not.
         * <p>
         * The phone numbers which were picked by the user are returned as output
         * value.
         * <p>
         * Type: array of URIs, the tel URI is used for the phone numbers which don't
         * belong to any contact, the content URI is used for phone id in contacts.
         * 
         * @hide
         */
        public static final String EXTRA_PHONE_URIS =
            "com.android.contacts.extra.PHONE_URIS";

        /**
         * Optional extra used with {@link #SHOW_OR_CREATE_CONTACT} to specify a
         * dialog location using screen coordinates. When not specified, the