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
diff --git a/service/src/com/android/server/ConnectivityService.java b/service/src/com/android/server/ConnectivityService.java
index 41b093e..770aa8a 100644
--- a/service/src/com/android/server/ConnectivityService.java
+++ b/service/src/com/android/server/ConnectivityService.java
@@ -428,7 +428,7 @@
// 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;