Merge "Define and use default request in Ikev2VpnRunner" am: d4235a815c am: 1a2d80e256

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

Change-Id: I42fd8968c34fcf246db6133b2ecccfac35bc738f
This commit is contained in:
Lucas Lin
2020-11-17 11:56:51 +00:00
committed by Automerger Merge Worker

View File

@@ -2407,7 +2407,14 @@ public class Vpn {
.addTransportType(NetworkCapabilities.TRANSPORT_TEST)
.build();
} else {
req = cm.getDefaultRequest();
// Basically, the request here is referring to the default request which is defined
// in ConnectivityService. Ideally, ConnectivityManager should provide an new API
// which can provide the status of physical network even though there is a virtual
// network. b/147280869 is used for tracking the new API.
// TODO: Use the new API to register default physical network.
req = new NetworkRequest.Builder()
.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
.build();
}
cm.requestNetwork(req, mNetworkCallback);