Merge "Use new VpnTransportInfo constructor" am: 0adb9137a2 am: b6b6f6b1b2 am: 2f58b09fac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2345342 Change-Id: I4730476317a534ccc85621e44c5f8693146513d0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -646,7 +646,10 @@ public class Vpn {
|
||||
.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)
|
||||
.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VCN_MANAGED)
|
||||
.setTransportInfo(new VpnTransportInfo(
|
||||
VpnManager.TYPE_VPN_NONE, null /* sessionId */, false /* bypassable */))
|
||||
VpnManager.TYPE_VPN_NONE,
|
||||
null /* sessionId */,
|
||||
false /* bypassable */,
|
||||
false /* longLivedTcpConnectionsExpensive */))
|
||||
.build();
|
||||
|
||||
loadAlwaysOnPackage();
|
||||
@@ -711,7 +714,10 @@ public class Vpn {
|
||||
mNetworkCapabilities = new NetworkCapabilities.Builder(mNetworkCapabilities)
|
||||
.setUids(null)
|
||||
.setTransportInfo(new VpnTransportInfo(
|
||||
VpnManager.TYPE_VPN_NONE, null /* sessionId */, false /* bypassable */))
|
||||
VpnManager.TYPE_VPN_NONE,
|
||||
null /* sessionId */,
|
||||
false /* bypassable */,
|
||||
false /* longLivedTcpConnectionsExpensive */))
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -1570,7 +1576,8 @@ public class Vpn {
|
||||
mConfig.allowedApplications, mConfig.disallowedApplications));
|
||||
|
||||
capsBuilder.setTransportInfo(
|
||||
new VpnTransportInfo(getActiveVpnType(), mConfig.session, mConfig.allowBypass));
|
||||
new VpnTransportInfo(getActiveVpnType(), mConfig.session, mConfig.allowBypass,
|
||||
false /* longLivedTcpConnectionsExpensive */));
|
||||
|
||||
// Only apps targeting Q and above can explicitly declare themselves as metered.
|
||||
// These VPNs are assumed metered unless they state otherwise.
|
||||
|
||||
Reference in New Issue
Block a user