summaryrefslogtreecommitdiff
path: root/core/java/android/content/Intent.java
diff options
context:
space:
mode:
authorValentin Iftime <valiiftime@google.com>2020-10-09 10:41:27 +0200
committerValentin Iftime <valiiftime@google.com>2020-12-17 19:31:01 +0100
commitaf309450f709e62debdf7afc36710b9b1450f7aa (patch)
tree673bf215e798788fe77aa90a84a18b386a39f4e3 /core/java/android/content/Intent.java
parent281c2f5b68087a351daf7b38f998d19597b5343d (diff)
Add start/stopProfile @SystemApi
Add ActivityManager APIs to start/stop profiles. Add PROFILE_ACCESSIBLE and PROFILE_INACCESSIBLE broadcast intents. Test: atest UserControllerTest Bug: 159716781 Change-Id: I65b461f47f12a7a1bdce93bef5c2e09925c575ca
Diffstat (limited to 'core/java/android/content/Intent.java')
-rw-r--r--core/java/android/content/Intent.java24
1 files changed, 20 insertions, 4 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index a03bdf2da2be..b0dfecead2ee 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -3649,7 +3649,7 @@ public class Intent implements Parcelable, Cloneable {
/**
* Broadcast sent by the system when a user is started. Carries an extra
- * EXTRA_USER_HANDLE that has the userHandle of the user. This is only sent to
+ * {@link EXTRA_USER_HANDLE} that has the userHandle of the user. This is only sent to
* registered receivers, not manifest receivers. It is sent to the user
* that has been started. This is sent as a foreground
* broadcast, since it is part of a visible user interaction; be as quick
@@ -3661,7 +3661,7 @@ public class Intent implements Parcelable, Cloneable {
/**
* Broadcast sent when a user is in the process of starting. Carries an extra
- * EXTRA_USER_HANDLE that has the userHandle of the user. This is only
+ * {@link EXTRA_USER_HANDLE} that has the userHandle of the user. This is only
* sent to registered receivers, not manifest receivers. It is sent to all
* users (including the one that is being started). You must hold
* {@link android.Manifest.permission#INTERACT_ACROSS_USERS} to receive
@@ -3678,7 +3678,7 @@ public class Intent implements Parcelable, Cloneable {
/**
* Broadcast sent when a user is going to be stopped. Carries an extra
- * EXTRA_USER_HANDLE that has the userHandle of the user. This is only
+ * {@link EXTRA_USER_HANDLE} that has the userHandle of the user. This is only
* sent to registered receivers, not manifest receivers. It is sent to all
* users (including the one that is being stopped). You must hold
* {@link android.Manifest.permission#INTERACT_ACROSS_USERS} to receive
@@ -3696,7 +3696,7 @@ public class Intent implements Parcelable, Cloneable {
/**
* Broadcast sent to the system when a user is stopped. Carries an extra
- * EXTRA_USER_HANDLE that has the userHandle of the user. This is similar to
+ * {@link EXTRA_USER_HANDLE} that has the userHandle of the user. This is similar to
* {@link #ACTION_PACKAGE_RESTARTED}, but for an entire user instead of a
* specific package. This is only sent to registered receivers, not manifest
* receivers. It is sent to all running users <em>except</em> the one that
@@ -3800,6 +3800,22 @@ public class Intent implements Parcelable, Cloneable {
"android.intent.action.MANAGED_PROFILE_UNAVAILABLE";
/**
+ * Broadcast sent to the parent user when an associated profile has been started and unlocked.
+ * Carries an extra {@link #EXTRA_USER} that specifies the {@link UserHandle} of the profile.
+ * This is only sent to registered receivers, not manifest receivers.
+ */
+ public static final String ACTION_PROFILE_ACCESSIBLE =
+ "android.intent.action.PROFILE_ACCESSIBLE";
+
+ /**
+ * Broadcast sent to the parent user when an associated profile has stopped.
+ * Carries an extra {@link #EXTRA_USER} that specifies the {@link UserHandle} of the profile.
+ * This is only sent to registered receivers, not manifest receivers.
+ */
+ public static final String ACTION_PROFILE_INACCESSIBLE =
+ "android.intent.action.PROFILE_INACCESSIBLE";
+
+ /**
* Broadcast sent to the system user when the 'device locked' state changes for any user.
* Carries an extra {@link #EXTRA_USER_HANDLE} that specifies the ID of the user for which
* the device was locked or unlocked.