Merge "Address API review feedback" am: 4123af09c9

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

Change-Id: I50c59c529bc3e8f5a817f64f3fb0f093228b027f
This commit is contained in:
Chiachang Wang
2022-02-10 01:04:41 +00:00
committed by Automerger Merge Worker
3 changed files with 6 additions and 5 deletions

View File

@@ -25224,7 +25224,7 @@ package android.net {
method @NonNull public android.net.Ikev2VpnProfile.Builder setAuthPsk(@NonNull byte[]); 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 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 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 setMaxMtu(int);
method @NonNull public android.net.Ikev2VpnProfile.Builder setMetered(boolean); method @NonNull public android.net.Ikev2VpnProfile.Builder setMetered(boolean);
method @NonNull public android.net.Ikev2VpnProfile.Builder setProxy(@Nullable android.net.ProxyInfo); method @NonNull public android.net.Ikev2VpnProfile.Builder setProxy(@Nullable android.net.ProxyInfo);
@@ -25371,7 +25371,7 @@ package android.net {
} }
public abstract class PlatformVpnProfile { public abstract class PlatformVpnProfile {
method public final boolean getExcludeLocalRoutes(); method public final boolean areLocalRoutesExcluded();
method public final boolean getRequiresInternetValidation(); method public final boolean getRequiresInternetValidation();
method public final int getType(); method public final int getType();
method @NonNull public final String getTypeString(); method @NonNull public final String getTypeString();

View File

@@ -547,7 +547,8 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile {
if (profile.excludeLocalRoutes && !profile.isBypassable) { if (profile.excludeLocalRoutes && !profile.isBypassable) {
Log.w(TAG, "ExcludeLocalRoutes should only be set in the bypassable VPN"); 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); builder.setRequiresInternetValidation(profile.requiresInternetValidation);
return builder.build(); return builder.build();
@@ -1104,7 +1105,7 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile {
*/ */
@NonNull @NonNull
@RequiresFeature(PackageManager.FEATURE_IPSEC_TUNNELS) @RequiresFeature(PackageManager.FEATURE_IPSEC_TUNNELS)
public Builder setExcludeLocalRoutes(boolean excludeLocalRoutes) { public Builder setLocalRoutesExcluded(boolean excludeLocalRoutes) {
mExcludeLocalRoutes = excludeLocalRoutes; mExcludeLocalRoutes = excludeLocalRoutes;
return this; return this;
} }

View File

@@ -83,7 +83,7 @@ public abstract class PlatformVpnProfile {
/** /**
* Returns whether the local traffic is exempted from the VPN. * Returns whether the local traffic is exempted from the VPN.
*/ */
public final boolean getExcludeLocalRoutes() { public final boolean areLocalRoutesExcluded() {
return mExcludeLocalRoutes; return mExcludeLocalRoutes;
} }