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

Commit d2fcd9f9 authored by Alex Johnston's avatar Alex Johnston Committed by Android (Google) Code Review
Browse files

Merge "Fix access control isAlwaysOnVpnLockdownEnabled"

parents e23d2466 26af4ae6
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -5791,8 +5791,9 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
    public boolean isAlwaysOnVpnLockdownEnabled(ComponentName admin) throws SecurityException {
    public boolean isAlwaysOnVpnLockdownEnabled(ComponentName admin) throws SecurityException {
        Objects.requireNonNull(admin, "ComponentName is null");
        Objects.requireNonNull(admin, "ComponentName is null");
        final CallerIdentity caller = getCallerIdentity(admin);
        final CallerIdentity caller = getNonPrivilegedOrAdminCallerIdentity(admin);
        Preconditions.checkCallAuthorization(isDeviceOwner(caller) || isProfileOwner(caller)
        Preconditions.checkCallAuthorization((caller.hasAdminComponent()
                && (isDeviceOwner(caller) || isProfileOwner(caller)))
                || hasCallingPermission(PERMISSION_MAINLINE_NETWORK_STACK));
                || hasCallingPermission(PERMISSION_MAINLINE_NETWORK_STACK));
        return mInjector.binderWithCleanCallingIdentity(
        return mInjector.binderWithCleanCallingIdentity(