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

Commit 24c58b1e authored by Adam Bookatz's avatar Adam Bookatz
Browse files

Create Supervising Profile if multiuser disabled

We wish to allow the creation of supervising profiles, even if multiuser
is disabled overall.

This is hopefully a temporary measure. Long-term plans involved
overhauling config_multiuserMaximumUsers. But in the meantime, this is
required.

Test: Compiles. CTS tests forthcoming.
Bug: 428754296
Flag: EXEMPT bugfix
Change-Id: I15219eabf0e3cf0ffc0db28d555af52428526c9d
parent 63a6e7e7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4067,6 +4067,11 @@ public class UserManagerService extends IUserManager.Stub {
            // TODO(b/394178333): This is here for ease-of-rollout. Delete the Guest exception.
            return UserManager.getMaxSupportedUsers() >  1;
        }
        if (UserManager.isUserTypeSupervisingProfile(userType)) {
            // Return true in the scenario that the device doesn't support multi-user, since we'd
            // still want to support Supervising Profiles.
            return UserManager.getMaxSupportedUsers() == 1;
        }
        return false;
    }