summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorJorge Ruesga <jorge@ruesga.com>2013-05-22 03:46:54 +0200
committerDanny Baumann <dannybaumann@web.de>2013-06-25 08:32:01 +0200
commit60f0747301c7dad9a3ac88e2016b93a3194033bc (patch)
tree0c5e0ff2304d42e2a41d51e18ccdffec05dccff4 /core/java
parentee0783a5c1f97ac763a74d0cc7a28cd9f9e4eac3 (diff)
downloadframeworks_base-60f0747301c7dad9a3ac88e2016b93a3194033bc.zip
frameworks_base-60f0747301c7dad9a3ac88e2016b93a3194033bc.tar.gz
frameworks_base-60f0747301c7dad9a3ac88e2016b93a3194033bc.tar.bz2
Profiles: Add a profile picker activity
Patchset 2: Add CM Copyright Patchset 3+4: Rebase Patchset 5: Some optimizations Change-Id: Ic8281e4c6fef6d2f4c56fc01acfe6e54b4c8f51c Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/ProfileManager.java66
1 files changed, 66 insertions, 0 deletions
diff --git a/core/java/android/app/ProfileManager.java b/core/java/android/app/ProfileManager.java
index 7bb80714..62bd0aa 100644
--- a/core/java/android/app/ProfileManager.java
+++ b/core/java/android/app/ProfileManager.java
@@ -46,6 +46,72 @@ public class ProfileManager {
private static final String SYSTEM_PROFILES_ENABLED = "system_profiles_enabled";
/**
+ * Activity Action: Shows a profile picker.
+ * <p>
+ * Input: {@link #EXTRA_PROFILE_EXISTING_UUID}, {@link #EXTRA_PROFILE_SHOW_NONE},
+ * {@link #EXTRA_PROFILE_TITLE}.
+ * <p>
+ * Output: {@link #EXTRA_PROFILE_PICKED_UUID}.
+ * @hide
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_PROFILE_PICKER = "android.intent.action.PROFILE_PICKER";
+
+ /**
+ * @hide
+ */
+ public static final UUID NO_PROFILE =
+ UUID.fromString("00000000-0000-0000-0000-000000000000");
+
+ /**
+ * Given to the profile picker as a boolean. Whether to show an item for
+ * deselect the profile. If the "None" item is picked,
+ * {@link #EXTRA_PROFILE_PICKED_UUID} will be {@link #NO_PROFILE}.
+ *
+ * @see #ACTION_PROFILE_PICKER
+ * @hide
+ */
+ public static final String EXTRA_PROFILE_SHOW_NONE =
+ "android.intent.extra.profile.SHOW_NONE";
+
+ /**
+ * Given to the profile picker as a {@link UUID} string representation. The {@link UUID}
+ * representation of the current profile, which will be used to show a checkmark next to
+ * the item for this {@link UUID}. If the item is {@link #NO_PROFILE} then "None" item
+ * is selected if {@link EXTRA_PROFILE_SHOW_NONE} is enabled. Otherwise, the current
+ * profile is selected.
+ *
+ * @see #ACTION_PROFILE_PICKER
+ * @hide
+ */
+ public static final String EXTRA_PROFILE_EXISTING_UUID =
+ "android.intent.extra.profile.EXISTING_UUID";
+
+ /**
+ * Given to the profile picker as a {@link CharSequence}. The title to
+ * show for the profile picker. This has a default value that is suitable
+ * in most cases.
+ *
+ * @see #ACTION_PROFILE_PICKER
+ * @hide
+ */
+ public static final String EXTRA_PROFILE_TITLE = "android.intent.extra.profile.TITLE";
+
+ /**
+ * Returned from the profile picker as a {@link UUID} string representation.
+ * <p>
+ * It will be one of:
+ * <li> the picked profile,
+ * <li> null if the "None" item was picked.
+ *
+ * @see #ACTION_PROFILE_PICKER
+ * @hide
+ */
+ public static final String EXTRA_PROFILE_PICKED_UUID =
+ "android.intent.extra.profile.PICKED_UUID";
+
+
+ /**
* Broadcast intent action indicating that Profiles has been enabled or disabled.
* One extra provides this state as an int.
*