Merge "Add test for [set|is]BypassableVpn" am: 3fbec7cf77 am: 7f7769b82e

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

Change-Id: I03024cb93ea05cccb7ec43a19c3430ef20637eeb
This commit is contained in:
Treehugger Robot
2021-04-15 10:54:23 +00:00
committed by Automerger Merge Worker

View File

@@ -44,6 +44,9 @@ class NetworkAgentConfigTest {
setSubscriberId("MySubId")
setPartialConnectivityAcceptable(false)
setUnvalidatedConnectivityAcceptable(true)
if (isAtLeastS()) {
setBypassableVpn(true)
}
}.build()
if (isAtLeastS()) {
// From S, the config will have 12 items
@@ -66,6 +69,7 @@ class NetworkAgentConfigTest {
if (isAtLeastS()) {
setNat64DetectionEnabled(false)
setProvisioningNotificationEnabled(false)
setBypassableVpn(true)
}
}.build()
@@ -78,6 +82,7 @@ class NetworkAgentConfigTest {
if (isAtLeastS()) {
assertFalse(config.isNat64DetectionEnabled())
assertFalse(config.isProvisioningNotificationEnabled())
assertTrue(config.isBypassableVpn())
} else {
assertTrue(config.isNat64DetectionEnabled())
assertTrue(config.isProvisioningNotificationEnabled())