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

Commit 92a551e0 authored by Lucas Lin's avatar Lucas Lin Committed by Automerger Merge Worker
Browse files

Merge changes from topics "CATEGORY_EVENT_ALWAYS_ON_STATE_CHANGED",...

Merge changes from topics "CATEGORY_EVENT_ALWAYS_ON_STATE_CHANGED", "CATEGORY_EVENT_DEACTIVATED_BY_USER" into tm-dev am: 0b2c39c7 am: ef0cdab0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18114464



Change-Id: Ia225cbb5b52970c257d5efd15ae18dba8d35a5f0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 788b7049 ef0cdab0
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1116,6 +1116,17 @@ public class Vpn {
                if (!VpnConfig.LEGACY_VPN.equals(mPackage)) {
                    mAppOpsManager.finishOp(
                            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()
                mVpnRunner.exit();