Address leftover comments of ag/18108411

Bug: 229799060
Test: atest FrameworksNetTests:VpnTest
Change-Id: Iade04ede17b9371e530556acb2bd84c4b57c1581
(cherry picked from commit a0cb82f78b)
Merged-In: Iade04ede17b9371e530556acb2bd84c4b57c1581
This commit is contained in:
lucaslin
2022-05-17 00:45:57 +08:00
committed by Lorenzo Colitti
parent 29b1b5beac
commit 63b2a309ec
2 changed files with 3 additions and 5 deletions

View File

@@ -2655,8 +2655,6 @@ public class Vpn {
super(TAG);
mProfile = profile;
mIpSecManager = (IpSecManager) mContext.getSystemService(Context.IPSEC_SERVICE);
// Pass mExecutor into Ikev2VpnNetworkCallback and make sure that IkeV2VpnRunnerCallback
// will be called by the mExecutor thread.
mNetworkCallback = new VpnIkev2Utils.Ikev2VpnNetworkCallback(TAG, this, mExecutor);
mSessionKey = UUID.randomUUID().toString();
}

View File

@@ -88,7 +88,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executor;
/**
* Utility class to build and convert IKEv2/IPsec parameters.
@@ -379,10 +379,10 @@ public class VpnIkev2Utils {
static class Ikev2VpnNetworkCallback extends NetworkCallback {
private final String mTag;
private final Vpn.IkeV2VpnRunnerCallback mCallback;
private final ExecutorService mExecutor;
private final Executor mExecutor;
Ikev2VpnNetworkCallback(String tag, Vpn.IkeV2VpnRunnerCallback callback,
ExecutorService executor) {
Executor executor) {
mTag = tag;
mCallback = callback;
mExecutor = executor;