Merge "Revert "Invert the order of event sending and VpnRunner.exit()""

This commit is contained in:
Chiachang Wang
2022-08-11 11:44:07 +00:00
committed by Gerrit Code Review

View File

@@ -4042,11 +4042,9 @@ public class Vpn {
// To stop the VPN profile, the caller must be the current prepared package and must be
// running an Ikev2VpnProfile.
if (isCurrentIkev2VpnLocked(packageName)) {
// Cache ownerUid to prevent the value being changed after performing VpnRunner.exit().
final int ownerUid = mOwnerUID;
notifyVpnManagerVpnStopped(packageName, mOwnerUID);
mVpnRunner.exit();
notifyVpnManagerVpnStopped(packageName, ownerUid);
}
}