Loading core/java/android/os/UserManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -4033,7 +4033,8 @@ public class UserManager { * @return the {@link RemoveResult} code * @hide */ @RequiresPermission(android.Manifest.permission.MANAGE_USERS) @RequiresPermission(anyOf = {Manifest.permission.MANAGE_USERS, Manifest.permission.CREATE_USERS}) public @RemoveResult int removeUserOrSetEphemeral(@UserIdInt int userId) { try { return mService.removeUserOrSetEphemeral(userId); Loading services/core/java/com/android/server/pm/UserManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3993,7 +3993,7 @@ public class UserManagerService extends IUserManager.Stub { @Override public @UserManager.RemoveResult int removeUserOrSetEphemeral(@UserIdInt int userId) { Slog.i(LOG_TAG, "removeUserOrSetEphemeral u" + userId); checkManageUsersPermission("Only the system can remove users"); checkManageOrCreateUsersPermission("Only the system can remove users"); final String restriction = getUserRemovalRestriction(userId); if (getUserRestrictions(UserHandle.getCallingUserId()).getBoolean(restriction, false)) { Slog.w(LOG_TAG, "Cannot remove user. " + restriction + " is enabled."); Loading Loading
core/java/android/os/UserManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -4033,7 +4033,8 @@ public class UserManager { * @return the {@link RemoveResult} code * @hide */ @RequiresPermission(android.Manifest.permission.MANAGE_USERS) @RequiresPermission(anyOf = {Manifest.permission.MANAGE_USERS, Manifest.permission.CREATE_USERS}) public @RemoveResult int removeUserOrSetEphemeral(@UserIdInt int userId) { try { return mService.removeUserOrSetEphemeral(userId); Loading
services/core/java/com/android/server/pm/UserManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3993,7 +3993,7 @@ public class UserManagerService extends IUserManager.Stub { @Override public @UserManager.RemoveResult int removeUserOrSetEphemeral(@UserIdInt int userId) { Slog.i(LOG_TAG, "removeUserOrSetEphemeral u" + userId); checkManageUsersPermission("Only the system can remove users"); checkManageOrCreateUsersPermission("Only the system can remove users"); final String restriction = getUserRemovalRestriction(userId); if (getUserRestrictions(UserHandle.getCallingUserId()).getBoolean(restriction, false)) { Slog.w(LOG_TAG, "Cannot remove user. " + restriction + " is enabled."); Loading