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

Commit 75ec5465 authored by Michal Karpinski's avatar Michal Karpinski Committed by Android (Google) Code Review
Browse files

Merge "Fix disabling DO single user features when clearDeviceOwner() is called"

parents 7b4d8501 c44e6796
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6041,6 +6041,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
    }

    private void clearDeviceOwnerLocked(ActiveAdmin admin, int userId) {
        disableDeviceOwnerManagedSingleUserFeaturesIfNeeded();
        if (admin != null) {
            admin.disableCamera = false;
            admin.userRestrictions = null;
@@ -6052,7 +6053,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
        mOwners.clearDeviceOwner();
        mOwners.writeDeviceOwner();
        updateDeviceOwnerLocked();
        disableDeviceOwnerManagedSingleUserFeaturesIfNeeded();
        try {
            if (mInjector.getIBackupManager() != null) {
                // Reactivate backup service.