Update network preference priority value for VPN

Currently netd supports only the default value for VPN but CS
send priorty value 1 to netd. It will break the default routing
for VPN. Thus, update network preference priority value to 0 for
VPN.

Bug: 193245476
Test: atest CtsHostsideNetworkTests:HostsideVpnTests
Change-Id: I197cb358e8e30355fbf675e4c623abebe7abdb7f
This commit is contained in:
paulhu
2021-07-12 18:07:27 +08:00
parent 5b37955322
commit da7129d862

View File

@@ -428,7 +428,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
// PREFERENCE_PRIORITY_NONE when sending to netd.
static final int PREFERENCE_PRIORITY_DEFAULT = 1000;
// As a security feature, VPNs have the top priority.
static final int PREFERENCE_PRIORITY_VPN = 1;
static final int PREFERENCE_PRIORITY_VPN = 0; // Netd supports only 0 for VPN.
// Priority of per-app OEM preference. See {@link #setOemNetworkPreference}.
@VisibleForTesting
static final int PREFERENCE_PRIORITY_OEM = 10;