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

Commit 2715cbba authored by Adam Bookatz's avatar Adam Bookatz
Browse files

Only one managed profile allowed per device

Flag: EXEMPT trivial no-op bugfix
Test: Create a managed profile. Nothing should have changed.
Bug: 374832167
Change-Id: Ib51ce2b9ed82fbe792e38aa959f209333b74b9b3
parent 9d8c6297
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -179,6 +179,8 @@ public final class UserTypeFactory {
                .setName(USER_TYPE_PROFILE_MANAGED)
                .setBaseType(FLAG_PROFILE)
                .setDefaultUserInfoPropertyFlags(FLAG_MANAGED_PROFILE)
                // Only allow one per device; we cannot currently handle conflicting policies.
                .setMaxAllowed(1)
                .setMaxAllowedPerParent(1)
                .setProfileParentRequired(true)
                .setLabels(
@@ -302,6 +304,7 @@ public final class UserTypeFactory {
                .setName(USER_TYPE_PROFILE_PRIVATE)
                .setBaseType(FLAG_PROFILE)
                .setProfileParentRequired(true)
                .setMaxAllowed(1)
                .setMaxAllowedPerParent(1)
                .setEnabled(UserManager.isPrivateProfileEnabled() ? 1 : 0)
                .setLabels(R.string.profile_label_private)