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

Commit ce0ca12b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fixed mark-profile-owner-on-organization-owned-device for non-profile...

Merge "Fixed mark-profile-owner-on-organization-owned-device for non-profile users" into sc-dev am: 9857a76c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13808985

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If5e1494c1c0e990fe6fe68917f4ab933a955622f
parents 36474d90 9857a76c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -13729,6 +13729,9 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
        mInjector.binderWithCleanCallingIdentity(() -> {
            // Clear restriction as user.
            final UserHandle parentUser = mUserManager.getProfileParent(UserHandle.of(userId));
            if (parentUser == null) {
                throw new IllegalStateException(String.format("User %d is not a profile", userId));
            }
            if (!parentUser.isSystem()) {
                throw new IllegalStateException(
                        String.format("Only the profile owner of a managed profile on the"