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

Commit a507f281 authored by Michal Karpinski's avatar Michal Karpinski Committed by android-build-merger
Browse files

DO NOT MERGE Fix disabling DO single user features when clearDeviceOwner() is called

am: 5c64223d

Change-Id: I37fabc41064e7fd0a1c42dab61697f74721e0beb
parents eaaf9a12 5c64223d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6049,6 +6049,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
    }

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