From 7ec6ae74c8989de0eb4c459dd06d6c936ef4ba0b Mon Sep 17 00:00:00 2001 From: Chiachang Wang Date: Fri, 18 Feb 2022 13:15:13 +0800 Subject: [PATCH] Rename getVpnRequiresValidation to isVpnValidationRequired Update API name from getVpnRequiresValidation to isVpnValidationRequired according to API review feedback. Test: atest FrameworksNetTests Bug: 220129160 Change-Id: I1025f4c35b320c14e872eaffd7ed82658a5f3d0c --- framework/api/module-lib-current.txt | 2 +- framework/src/android/net/NetworkAgentConfig.java | 4 ++-- tests/common/java/android/net/NetworkAgentConfigTest.kt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/api/module-lib-current.txt b/framework/api/module-lib-current.txt index 5579db6f2d..886efc6734 100644 --- a/framework/api/module-lib-current.txt +++ b/framework/api/module-lib-current.txt @@ -128,8 +128,8 @@ package android.net { 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 1991a58c57..b28c00635f 100644 --- a/framework/src/android/net/NetworkAgentConfig.java +++ b/framework/src/android/net/NetworkAgentConfig.java @@ -250,7 +250,7 @@ public final class NetworkAgentConfig implements Parcelable { /** * Whether network validation should be performed for this VPN network. - * {@see #getVpnRequiresValidation} + * {@see #isVpnValidationRequired} * @hide */ private boolean mVpnRequiresValidation = false; @@ -265,7 +265,7 @@ public final class NetworkAgentConfig implements Parcelable { * @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 e5db09fc4b..c05cdbdc6f 100644 --- a/tests/common/java/android/net/NetworkAgentConfigTest.kt +++ b/tests/common/java/android/net/NetworkAgentConfigTest.kt @@ -88,7 +88,7 @@ class NetworkAgentConfigTest { assertEquals("TEST_NETWORK", config.getLegacyTypeName()) if (isAtLeastT()) { assertTrue(config.areLocalRoutesExcludedForVpn()) - assertTrue(config.getVpnRequiresValidation()) + assertTrue(config.isVpnValidationRequired()) } if (isAtLeastS()) { assertEquals(testExtraInfo, config.getLegacyExtraInfo())