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

Commit 4b083362 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Put getActiveAdminForCallerLocked call into synchronized block."

parents f85aaad6 c7704871
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -7983,12 +7983,12 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
        if (!mHasFeature) {
            return false;
        }
        synchronized (getLockObject()) {
            if (parent) {
            ActiveAdmin ap = getActiveAdminForCallerLocked(who,
                final ActiveAdmin ap = getActiveAdminForCallerLocked(who,
                        DeviceAdminInfo.USES_POLICY_DISABLE_CAMERA, parent);
                enforceProfileOwnerOfOrganizationOwnedDevice(ap);
            }
        synchronized (getLockObject()) {
            if (who != null) {
                ActiveAdmin admin = getActiveAdminUncheckedLocked(who, userHandle, parent);
                return (admin != null) ? admin.disableCamera : false;