diff options
author | Chiachang Wang <chiachangwang@google.com> | 2022-02-08 15:41:59 +0800 |
---|---|---|
committer | Chiachang Wang <chiachangwang@google.com> | 2022-02-09 14:28:12 +0800 |
commit | 7e34f92ab2c932fab27fe163ec93e6fe0bdb41f6 (patch) | |
tree | bec9f6fed9985663bb954309c879f63d02a81716 | |
parent | cbb2fa2f004366538d9452698db80bd1971cbf76 (diff) | |
download | base-7e34f92ab2c932fab27fe163ec93e6fe0bdb41f6.tar.gz |
Address API review feedback
Change naming of getExcludeLocalRoutes and setExcludedLocalRoutes
APIs based on API review feedback.
Bug: 217742354
Test: atest FrameworksNetTests
Change-Id: Ia330b571726f93fb38dc24341cc6b748269ccb61
-rw-r--r-- | core/api/current.txt | 4 | ||||
-rw-r--r-- | core/java/android/net/Ikev2VpnProfile.java | 5 | ||||
-rw-r--r-- | core/java/android/net/PlatformVpnProfile.java | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 235c496e999b..2baa6ae4450c 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -25223,7 +25223,7 @@ package android.net { method @NonNull public android.net.Ikev2VpnProfile.Builder setAuthPsk(@NonNull byte[]); method @NonNull public android.net.Ikev2VpnProfile.Builder setAuthUsernamePassword(@NonNull String, @NonNull String, @Nullable java.security.cert.X509Certificate); method @NonNull public android.net.Ikev2VpnProfile.Builder setBypassable(boolean); - method @NonNull public android.net.Ikev2VpnProfile.Builder setExcludeLocalRoutes(boolean); + method @NonNull public android.net.Ikev2VpnProfile.Builder setLocalRoutesExcluded(boolean); method @NonNull public android.net.Ikev2VpnProfile.Builder setMaxMtu(int); method @NonNull public android.net.Ikev2VpnProfile.Builder setMetered(boolean); method @NonNull public android.net.Ikev2VpnProfile.Builder setProxy(@Nullable android.net.ProxyInfo); @@ -25370,7 +25370,7 @@ package android.net { } public abstract class PlatformVpnProfile { - method public final boolean getExcludeLocalRoutes(); + method public final boolean areLocalRoutesExcluded(); method public final boolean getRequiresInternetValidation(); method public final int getType(); method @NonNull public final String getTypeString(); diff --git a/core/java/android/net/Ikev2VpnProfile.java b/core/java/android/net/Ikev2VpnProfile.java index ec752fdbf45f..0fd3e034291b 100644 --- a/core/java/android/net/Ikev2VpnProfile.java +++ b/core/java/android/net/Ikev2VpnProfile.java @@ -547,7 +547,8 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile { if (profile.excludeLocalRoutes && !profile.isBypassable) { Log.w(TAG, "ExcludeLocalRoutes should only be set in the bypassable VPN"); } - builder.setExcludeLocalRoutes(profile.excludeLocalRoutes && profile.isBypassable); + + builder.setLocalRoutesExcluded(profile.excludeLocalRoutes && profile.isBypassable); builder.setRequiresInternetValidation(profile.requiresInternetValidation); return builder.build(); @@ -1104,7 +1105,7 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile { */ @NonNull @RequiresFeature(PackageManager.FEATURE_IPSEC_TUNNELS) - public Builder setExcludeLocalRoutes(boolean excludeLocalRoutes) { + public Builder setLocalRoutesExcluded(boolean excludeLocalRoutes) { mExcludeLocalRoutes = excludeLocalRoutes; return this; } diff --git a/core/java/android/net/PlatformVpnProfile.java b/core/java/android/net/PlatformVpnProfile.java index 8bd1c8d07017..c0fb4cf4f3dd 100644 --- a/core/java/android/net/PlatformVpnProfile.java +++ b/core/java/android/net/PlatformVpnProfile.java @@ -83,7 +83,7 @@ public abstract class PlatformVpnProfile { /** * Returns whether the local traffic is exempted from the VPN. */ - public final boolean getExcludeLocalRoutes() { + public final boolean areLocalRoutesExcluded() { return mExcludeLocalRoutes; } |