Merge "Allow any caller with CONTROL_VPN to disconnect existing VPN"

This commit is contained in:
Cassie Wang
2023-06-19 11:38:23 +00:00
committed by Gerrit Code Review

View File

@@ -1389,7 +1389,7 @@ public class Vpn {
} }
// Check that the caller is authorized. // Check that the caller is authorized.
enforceControlPermission(); enforceControlPermissionOrInternalCaller();
// Stop an existing always-on VPN from being dethroned by other apps. // Stop an existing always-on VPN from being dethroned by other apps.
if (mAlwaysOn && !isCurrentPreparedPackage(newPackage)) { if (mAlwaysOn && !isCurrentPreparedPackage(newPackage)) {