Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -34433,6 +34433,7 @@ package android.os { method public deprecated void setUserRestrictions(android.os.Bundle); method public deprecated void setUserRestrictions(android.os.Bundle, android.os.UserHandle); method public static boolean supportsMultipleUsers(); field public static final java.lang.String ACTION_USER_RESTRICTIONS_CHANGED = "android.os.action.USER_RESTRICTIONS_CHANGED"; field public static final java.lang.String ALLOW_PARENT_PROFILE_APP_LINKING = "allow_parent_profile_app_linking"; field public static final java.lang.String DISALLOW_ADD_MANAGED_PROFILE = "no_add_managed_profile"; field public static final java.lang.String DISALLOW_ADD_USER = "no_add_user"; api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -31735,6 +31735,7 @@ package android.os { method public deprecated void setUserRestrictions(android.os.Bundle); method public deprecated void setUserRestrictions(android.os.Bundle, android.os.UserHandle); method public static boolean supportsMultipleUsers(); field public static final java.lang.String ACTION_USER_RESTRICTIONS_CHANGED = "android.os.action.USER_RESTRICTIONS_CHANGED"; field public static final java.lang.String ALLOW_PARENT_PROFILE_APP_LINKING = "allow_parent_profile_app_linking"; field public static final java.lang.String DISALLOW_ADD_MANAGED_PROFILE = "no_add_managed_profile"; field public static final java.lang.String DISALLOW_ADD_USER = "no_add_user"; core/java/android/os/UserManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.annotation.IntDef; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.SystemApi; import android.annotation.TestApi; import android.annotation.UserIdInt; import android.annotation.WorkerThread; import android.app.Activity; Loading Loading @@ -762,6 +763,16 @@ public class UserManager { /** @hide */ public static final int PIN_VERIFICATION_SUCCESS = -1; /** * Sent when user restrictions have changed. * * @hide */ @SystemApi @TestApi // To allow seeing it from CTS. public static final String ACTION_USER_RESTRICTIONS_CHANGED = "android.os.action.USER_RESTRICTIONS_CHANGED"; /** * Error result indicating that this user is not allowed to add other users on this device. * This is a result code returned from the activity created by the intent Loading services/core/java/com/android/server/pm/UserManagerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -1493,6 +1493,10 @@ public class UserManagerService extends IUserManager.Stub { listeners[i].onUserRestrictionsChanged(userId, newRestrictionsFinal, prevRestrictionsFinal); } final Intent broadcast = new Intent(UserManager.ACTION_USER_RESTRICTIONS_CHANGED) .setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); mContext.sendBroadcastAsUser(broadcast, UserHandle.of(userId)); } }); } Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -34433,6 +34433,7 @@ package android.os { method public deprecated void setUserRestrictions(android.os.Bundle); method public deprecated void setUserRestrictions(android.os.Bundle, android.os.UserHandle); method public static boolean supportsMultipleUsers(); field public static final java.lang.String ACTION_USER_RESTRICTIONS_CHANGED = "android.os.action.USER_RESTRICTIONS_CHANGED"; field public static final java.lang.String ALLOW_PARENT_PROFILE_APP_LINKING = "allow_parent_profile_app_linking"; field public static final java.lang.String DISALLOW_ADD_MANAGED_PROFILE = "no_add_managed_profile"; field public static final java.lang.String DISALLOW_ADD_USER = "no_add_user";
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -31735,6 +31735,7 @@ package android.os { method public deprecated void setUserRestrictions(android.os.Bundle); method public deprecated void setUserRestrictions(android.os.Bundle, android.os.UserHandle); method public static boolean supportsMultipleUsers(); field public static final java.lang.String ACTION_USER_RESTRICTIONS_CHANGED = "android.os.action.USER_RESTRICTIONS_CHANGED"; field public static final java.lang.String ALLOW_PARENT_PROFILE_APP_LINKING = "allow_parent_profile_app_linking"; field public static final java.lang.String DISALLOW_ADD_MANAGED_PROFILE = "no_add_managed_profile"; field public static final java.lang.String DISALLOW_ADD_USER = "no_add_user";
core/java/android/os/UserManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.annotation.IntDef; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.SystemApi; import android.annotation.TestApi; import android.annotation.UserIdInt; import android.annotation.WorkerThread; import android.app.Activity; Loading Loading @@ -762,6 +763,16 @@ public class UserManager { /** @hide */ public static final int PIN_VERIFICATION_SUCCESS = -1; /** * Sent when user restrictions have changed. * * @hide */ @SystemApi @TestApi // To allow seeing it from CTS. public static final String ACTION_USER_RESTRICTIONS_CHANGED = "android.os.action.USER_RESTRICTIONS_CHANGED"; /** * Error result indicating that this user is not allowed to add other users on this device. * This is a result code returned from the activity created by the intent Loading
services/core/java/com/android/server/pm/UserManagerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -1493,6 +1493,10 @@ public class UserManagerService extends IUserManager.Stub { listeners[i].onUserRestrictionsChanged(userId, newRestrictionsFinal, prevRestrictionsFinal); } final Intent broadcast = new Intent(UserManager.ACTION_USER_RESTRICTIONS_CHANGED) .setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); mContext.sendBroadcastAsUser(broadcast, UserHandle.of(userId)); } }); } Loading