Rename getVpnRequiresValidation to isVpnValidationRequired
Update API name from getVpnRequiresValidation to
isVpnValidationRequired according to API review feedback.
Test: atest FrameworksNetTests
Bug: 220129160
Change-Id: I1025f4c35b320c14e872eaffd7ed82658a5f3d0c
diff --git a/framework/api/module-lib-current.txt b/framework/api/module-lib-current.txt
index 5579db6..886efc6 100644
--- a/framework/api/module-lib-current.txt
+++ b/framework/api/module-lib-current.txt
@@ -128,8 +128,8 @@
public final class NetworkAgentConfig implements android.os.Parcelable {
method @Nullable public String getSubscriberId();
- method public boolean getVpnRequiresValidation();
method public boolean isBypassableVpn();
+ method public boolean isVpnValidationRequired();
}
public static final class NetworkAgentConfig.Builder {
diff --git a/framework/src/android/net/NetworkAgentConfig.java b/framework/src/android/net/NetworkAgentConfig.java
index 1991a58..b28c006 100644
--- a/framework/src/android/net/NetworkAgentConfig.java
+++ b/framework/src/android/net/NetworkAgentConfig.java
@@ -250,7 +250,7 @@
/**
* Whether network validation should be performed for this VPN network.
- * {@see #getVpnRequiresValidation}
+ * {@see #isVpnValidationRequired}
* @hide
*/
private boolean mVpnRequiresValidation = false;
@@ -265,7 +265,7 @@
* @hide
*/
@SystemApi(client = MODULE_LIBRARIES)
- public boolean getVpnRequiresValidation() {
+ public boolean isVpnValidationRequired() {
return mVpnRequiresValidation;
}
diff --git a/tests/common/java/android/net/NetworkAgentConfigTest.kt b/tests/common/java/android/net/NetworkAgentConfigTest.kt
index e5db09f..c05cdbd 100644
--- a/tests/common/java/android/net/NetworkAgentConfigTest.kt
+++ b/tests/common/java/android/net/NetworkAgentConfigTest.kt
@@ -88,7 +88,7 @@
assertEquals("TEST_NETWORK", config.getLegacyTypeName())
if (isAtLeastT()) {
assertTrue(config.areLocalRoutesExcludedForVpn())
- assertTrue(config.getVpnRequiresValidation())
+ assertTrue(config.isVpnValidationRequired())
}
if (isAtLeastS()) {
assertEquals(testExtraInfo, config.getLegacyExtraInfo())