Make test networks not be VPNs
Make this change for below reasons:
- This API is intended to be used for testing.
- This change correct because almost all the tests that use this
API are not doing so to create VPNs.
- It makes it easier to write tests for IKEv2 VPNs because without
this change, a VPN that is restricted to test networks would pick
itself as the underlying network(since it does not have
NET_CAPABILITY_NOT_VPN).
Test: treehugger
Change-Id: I91582f398e426c0efb2dec28943df5f572e1c8da
diff --git a/service/src/com/android/server/TestNetworkService.java b/service/src/com/android/server/TestNetworkService.java
index a0bfb4a..ccc2776 100644
--- a/service/src/com/android/server/TestNetworkService.java
+++ b/service/src/com/android/server/TestNetworkService.java
@@ -231,6 +231,7 @@
nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_SUSPENDED);
nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED);
nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VCN_MANAGED);
+ nc.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN);
nc.setNetworkSpecifier(new TestNetworkSpecifier(iface));
nc.setAdministratorUids(administratorUids);
if (!isMetered) {