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

Commit 9eb66a2c authored by Rubin Xu's avatar Rubin Xu Committed by Android (Google) Code Review
Browse files

Merge "Do not hold lock inside enableSystemApp"

parents 89da27ec cc3a6e04
Loading
Loading
Loading
Loading
+55 −59
Original line number Diff line number Diff line
@@ -11608,7 +11608,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
                && (isProfileOwner(caller) || isDefaultDeviceOwner(caller)))
                || (caller.hasPackage() && isCallerDelegate(caller, DELEGATION_ENABLE_SYSTEM_APP)));
        synchronized (getLockObject()) {
        final boolean isDemo = isCurrentUserDemo();
        int userId = caller.getUserId();
        long id = mInjector.binderClearCallingIdentity();
@@ -11636,7 +11635,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
        } finally {
            mInjector.binderRestoreCallingIdentity(id);
        }
        }
        DevicePolicyEventLogger
                .createEvent(DevicePolicyEnums.ENABLE_SYSTEM_APP)
                .setAdmin(caller.getPackageName())
@@ -11653,7 +11651,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
                || (caller.hasPackage() && isCallerDelegate(caller, DELEGATION_ENABLE_SYSTEM_APP)));
        int numberOfAppsInstalled = 0;
        synchronized (getLockObject()) {
        long id = mInjector.binderClearCallingIdentity();
        try {
            final int parentUserId = getProfileParentId(caller.getUserId());
@@ -11692,7 +11689,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
        } finally {
            mInjector.binderRestoreCallingIdentity(id);
        }
        }
        DevicePolicyEventLogger
                .createEvent(DevicePolicyEnums.ENABLE_SYSTEM_APP_WITH_INTENT)
                .setAdmin(caller.getPackageName())