Loading core/java/android/content/Intent.java +11 −0 Original line number Diff line number Diff line Loading @@ -4215,6 +4215,17 @@ public class Intent implements Parcelable, Cloneable { public static final String ACTION_USER_INFO_CHANGED = "android.intent.action.USER_INFO_CHANGED"; /** * Broadcast sent to the system when a user's information changes. Carries an extra * {@link #EXTRA_USER_HANDLE} to indicate which user's information changed. * This is only sent to permission protected manifest receivers. It is sent to all users. * @hide */ @BroadcastBehavior(includeBackground = true) public static final String ACTION_USER_INFO_CHANGED_BACKGROUND = "android.intent.action.USER_INFO_CHANGED_BACKGROUND"; /** * Broadcast sent to the primary user when an associated managed profile is added (the profile * was created and is ready to be used). Carries an extra {@link #EXTRA_USER} that specifies Loading data/etc/preinstalled-packages-platform.xml +5 −0 Original line number Diff line number Diff line Loading @@ -134,4 +134,9 @@ to pre-existing users, but cannot uninstall pre-existing system packages from pr <install-in-user-type package="com.android.avatarpicker"> <install-in user-type="FULL" /> </install-in-user-type> <!-- Users Widget (Users widget)--> <install-in-user-type package="com.android.multiuser"> <install-in user-type="FULL" /> </install-in-user-type> </config> services/core/java/com/android/server/pm/UserManagerService.java +7 −2 Original line number Diff line number Diff line Loading @@ -3312,13 +3312,18 @@ public class UserManagerService extends IUserManager.Stub { } } private void sendUserInfoChangedBroadcast(@UserIdInt int userId) { Intent changedIntent = new Intent(Intent.ACTION_USER_INFO_CHANGED); changedIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId); changedIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); mContext.sendBroadcastAsUser(changedIntent, UserHandle.ALL); // This intent allow system UI apps to refresh the content even if process was freezed. Intent bgIntent = new Intent(Intent.ACTION_USER_INFO_CHANGED_BACKGROUND); bgIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId); bgIntent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); mContext.sendBroadcastAsUser(bgIntent, UserHandle.ALL, Manifest.permission.MANAGE_USERS); } @Override Loading Loading
core/java/android/content/Intent.java +11 −0 Original line number Diff line number Diff line Loading @@ -4215,6 +4215,17 @@ public class Intent implements Parcelable, Cloneable { public static final String ACTION_USER_INFO_CHANGED = "android.intent.action.USER_INFO_CHANGED"; /** * Broadcast sent to the system when a user's information changes. Carries an extra * {@link #EXTRA_USER_HANDLE} to indicate which user's information changed. * This is only sent to permission protected manifest receivers. It is sent to all users. * @hide */ @BroadcastBehavior(includeBackground = true) public static final String ACTION_USER_INFO_CHANGED_BACKGROUND = "android.intent.action.USER_INFO_CHANGED_BACKGROUND"; /** * Broadcast sent to the primary user when an associated managed profile is added (the profile * was created and is ready to be used). Carries an extra {@link #EXTRA_USER} that specifies Loading
data/etc/preinstalled-packages-platform.xml +5 −0 Original line number Diff line number Diff line Loading @@ -134,4 +134,9 @@ to pre-existing users, but cannot uninstall pre-existing system packages from pr <install-in-user-type package="com.android.avatarpicker"> <install-in user-type="FULL" /> </install-in-user-type> <!-- Users Widget (Users widget)--> <install-in-user-type package="com.android.multiuser"> <install-in user-type="FULL" /> </install-in-user-type> </config>
services/core/java/com/android/server/pm/UserManagerService.java +7 −2 Original line number Diff line number Diff line Loading @@ -3312,13 +3312,18 @@ public class UserManagerService extends IUserManager.Stub { } } private void sendUserInfoChangedBroadcast(@UserIdInt int userId) { Intent changedIntent = new Intent(Intent.ACTION_USER_INFO_CHANGED); changedIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId); changedIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); mContext.sendBroadcastAsUser(changedIntent, UserHandle.ALL); // This intent allow system UI apps to refresh the content even if process was freezed. Intent bgIntent = new Intent(Intent.ACTION_USER_INFO_CHANGED_BACKGROUND); bgIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId); bgIntent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); mContext.sendBroadcastAsUser(bgIntent, UserHandle.ALL, Manifest.permission.MANAGE_USERS); } @Override Loading