Merge "Address API review feedback"

This commit is contained in:
Chiachang Wang
2022-02-10 00:50:30 +00:00
committed by Gerrit Code Review
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 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);
@@ -25371,7 +25371,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();

View File

@@ -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;
}

View File

@@ -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;
}