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

Commit 3168c245 authored by Sarup Dalwani's avatar Sarup Dalwani
Browse files

Revert "Bypassing available user check for profiles."

Revert Change-Id: I22b0344b376f5d729ba5b70fd9d0315ff34d19e8

Bug: 271588557
Test: atest CtsAppCloningHostTest
Test: atest CtsAppCloningDeviceTestCases
Change-Id: I6de154274bcb8567d22773259075930a08ffe1f2
parent 37ea5f68
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4645,9 +4645,9 @@ public class UserManagerService extends IUserManager.Stub {
                            UserManager.USER_OPERATION_ERROR_MAX_USERS);
                }
                // Keep logic in sync with getRemainingCreatableUserCount()
                if (!isGuest && !isProfile && !isDemo && isUserLimitReached()) {
                if (!isGuest && !isManagedProfile && !isDemo && isUserLimitReached()) {
                    // If the user limit has been reached, we cannot add a user (except guest/demo).
                    // Note that profiles can bypass it in certain circumstances (taken
                    // Note that managed profiles can bypass it in certain circumstances (taken
                    // into account in the profile check below).
                    throwCheckedUserOperationException(
                            "Cannot add user. Maximum user limit is reached.",