Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77481b8d authored by Sarup Dalwani's avatar Sarup Dalwani Committed by Android (Google) Code Review
Browse files

Merge "Bypassing available user check for profiles."

parents 0c5b1d4b 98df36d3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4209,9 +4209,9 @@ public class UserManagerService extends IUserManager.Stub {
                            UserManager.USER_OPERATION_ERROR_MAX_USERS);
                }
                // Keep logic in sync with getRemainingCreatableUserCount()
                if (!isGuest && !isManagedProfile && !isDemo && isUserLimitReached()) {
                if (!isGuest && !isProfile && !isDemo && isUserLimitReached()) {
                    // If the user limit has been reached, we cannot add a user (except guest/demo).
                    // Note that managed profiles can bypass it in certain circumstances (taken
                    // Note that profiles can bypass it in certain circumstances (taken
                    // into account in the profile check below).
                    throwCheckedUserOperationException(
                            "Cannot add user. Maximum user limit is reached.",