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

Commit 367e0608 authored by Adam Bookatz's avatar Adam Bookatz Committed by Android (Google) Code Review
Browse files

Merge "Only one managed profile allowed per device" into main

parents ca80906a 2715cbba
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)