Merge changes from topics "CATEGORY_EVENT_ALWAYS_ON_STATE_CHANGED", "CATEGORY_EVENT_DEACTIVATED_BY_USER" into tm-dev am: 0b2c39c7b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18114464 Change-Id: I23eff6c22c463f782094f06ebeac60aa61608edf Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1116,6 +1116,17 @@ public class Vpn {
|
|||||||
if (!VpnConfig.LEGACY_VPN.equals(mPackage)) {
|
if (!VpnConfig.LEGACY_VPN.equals(mPackage)) {
|
||||||
mAppOpsManager.finishOp(
|
mAppOpsManager.finishOp(
|
||||||
AppOpsManager.OPSTR_ESTABLISH_VPN_MANAGER, mOwnerUID, mPackage, null);
|
AppOpsManager.OPSTR_ESTABLISH_VPN_MANAGER, mOwnerUID, mPackage, null);
|
||||||
|
// The underlying network, NetworkCapabilities and LinkProperties are not
|
||||||
|
// necessary to send to VPN app since the purpose of this event is to notify
|
||||||
|
// VPN app that VPN is deactivated by the user.
|
||||||
|
// TODO(b/230548427): Remove SDK check once VPN related stuff are decoupled from
|
||||||
|
// ConnectivityServiceTest.
|
||||||
|
if (SdkLevel.isAtLeastT()) {
|
||||||
|
sendEventToVpnManagerApp(VpnManager.CATEGORY_EVENT_DEACTIVATED_BY_USER,
|
||||||
|
-1 /* errorClass */, -1 /* errorCode*/, mPackage,
|
||||||
|
getSessionKeyLocked(), makeVpnProfileStateLocked(),
|
||||||
|
null /* underlyingNetwork */, null /* nc */, null /* lp */);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// cleanupVpnStateLocked() is called from mVpnRunner.exit()
|
// cleanupVpnStateLocked() is called from mVpnRunner.exit()
|
||||||
mVpnRunner.exit();
|
mVpnRunner.exit();
|
||||||
|
|||||||
Reference in New Issue
Block a user