summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2013-01-29 23:55:33 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-01-29 23:56:20 +0000
commite8ae8b8982da37ca77bbaed8e98349d51dec824a (patch)
tree11bf6ced39e4ed70de530b9c48e7deea8d4560a4
parent7f54ffd0296ce6008b5ea949796e60248a85e2d8 (diff)
parentfdb3f094ca967f8267f5bd30635063dc294d176f (diff)
downloadframeworks_base-e8ae8b8982da37ca77bbaed8e98349d51dec824a.zip
frameworks_base-e8ae8b8982da37ca77bbaed8e98349d51dec824a.tar.gz
frameworks_base-e8ae8b8982da37ca77bbaed8e98349d51dec824a.tar.bz2
Merge "Add GET_CONTENT protocol for allowing multiple selection."
-rw-r--r--api/current.txt1
-rw-r--r--core/java/android/content/Intent.java20
2 files changed, 19 insertions, 2 deletions
diff --git a/api/current.txt b/api/current.txt
index fab07f6..473769f 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -5931,6 +5931,7 @@ package android.content {
field public static final java.lang.String CATEGORY_UNIT_TEST = "android.intent.category.UNIT_TEST";
field public static final android.os.Parcelable.Creator CREATOR;
field public static final java.lang.String EXTRA_ALARM_COUNT = "android.intent.extra.ALARM_COUNT";
+ field public static final java.lang.String EXTRA_ALLOW_MULTIPLE = "android.intent.extra.ALLOW_MULTIPLE";
field public static final deprecated java.lang.String EXTRA_ALLOW_REPLACE = "android.intent.extra.ALLOW_REPLACE";
field public static final java.lang.String EXTRA_ASSIST_CONTEXT = "android.intent.extra.ASSIST_CONTEXT";
field public static final java.lang.String EXTRA_ASSIST_PACKAGE = "android.intent.extra.ASSIST_PACKAGE";
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index dc367dd..434946c 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -883,7 +883,7 @@ public class Intent implements Parcelable, Cloneable {
* Activity Action: Allow the user to select a particular kind of data and
* return it. This is different than {@link #ACTION_PICK} in that here we
* just say what kind of data is desired, not a URI of existing data from
- * which the user can pick. A ACTION_GET_CONTENT could allow the user to
+ * which the user can pick. An ACTION_GET_CONTENT could allow the user to
* create the data as it runs (for example taking a picture or recording a
* sound), let them browse over the web and download the desired data,
* etc.
@@ -917,12 +917,17 @@ public class Intent implements Parcelable, Cloneable {
* from a remote server but not already on the local device (thus requiring
* they be downloaded when opened).
* <p>
+ * If the caller can handle multiple returned items (the user performing
+ * multiple selection), then it can specify {@link #EXTRA_ALLOW_MULTIPLE}
+ * to indicate this.
+ * <p>
* Input: {@link #getType} is the desired MIME type to retrieve. Note
* that no URI is supplied in the intent, as there are no constraints on
* where the returned data originally comes from. You may also include the
* {@link #CATEGORY_OPENABLE} if you can only accept data that can be
* opened as a stream. You may use {@link #EXTRA_LOCAL_ONLY} to limit content
- * selection to local data.
+ * selection to local data. You may use {@link #EXTRA_ALLOW_MULTIPLE} to
+ * allow the user to select multiple items.
* <p>
* Output: The URI of the item that was picked. This must be a content:
* URI so that any receiver can access it.
@@ -3045,6 +3050,17 @@ public class Intent implements Parcelable, Cloneable {
"android.intent.extra.LOCAL_ONLY";
/**
+ * Used to indicate that a {@link #ACTION_GET_CONTENT} intent can allow the
+ * user to select and return multiple items. This is a boolean extra; the default
+ * is false. If true, an implementation of ACTION_GET_CONTENT is allowed to
+ * present the user with a UI where they can pick multiple items that are all
+ * returned to the caller. When this happens, they should be returned as
+ * the {@link #getClipData()} part of the result Intent.
+ */
+ public static final String EXTRA_ALLOW_MULTIPLE =
+ "android.intent.extra.ALLOW_MULTIPLE";
+
+ /**
* The userHandle carried with broadcast intents related to addition, removal and switching of users
* - {@link #ACTION_USER_ADDED}, {@link #ACTION_USER_REMOVED} and {@link #ACTION_USER_SWITCHED}.
* @hide