Rename getBypassable to isBypassable
Bug: 262336021
Bug: 256775913
Test: atest FrameworksNetTests
Change-Id: I5ac8f4f9a2a64189fc66d3c14af6da201a35e3e2
diff --git a/framework/api/system-current.txt b/framework/api/system-current.txt
index 0b0f2bb..dd3404c 100644
--- a/framework/api/system-current.txt
+++ b/framework/api/system-current.txt
@@ -515,8 +515,8 @@
ctor public VpnTransportInfo(int, @Nullable String, boolean, boolean);
method public boolean areLongLivedTcpConnectionsExpensive();
method public int describeContents();
- method public boolean getBypassable();
method public int getType();
+ method public boolean isBypassable();
method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.net.VpnTransportInfo> CREATOR;
}
diff --git a/framework/src/android/net/VpnTransportInfo.java b/framework/src/android/net/VpnTransportInfo.java
index e335c0f..6bb00c8 100644
--- a/framework/src/android/net/VpnTransportInfo.java
+++ b/framework/src/android/net/VpnTransportInfo.java
@@ -86,7 +86,7 @@
// When the module runs on older SDKs, |bypassable| will always be false since the old Vpn
// code will call this constructor. For Settings VPNs, this is always correct as they are
// never bypassable. For VpnManager and VpnService types, this may be wrong since both of
- // them have a choice. However, on these SDKs VpnTransportInfo#getBypassable is not
+ // them have a choice. However, on these SDKs VpnTransportInfo#isBypassable is not
// available anyway, so this should be harmless. False is a better choice than true here
// regardless because it is the default value for both VpnManager and VpnService if the app
// does not do anything about it.
@@ -111,7 +111,7 @@
* {@code UnsupportedOperationException} if called.
*/
@RequiresApi(UPSIDE_DOWN_CAKE)
- public boolean getBypassable() {
+ public boolean isBypassable() {
if (!SdkLevel.isAtLeastU()) {
throw new UnsupportedOperationException("Not supported before U");
}
@@ -134,7 +134,7 @@
* VPNs can be bypassable or not. When the VPN is not bypassable, the user has
* expressed explicit intent to have no connection outside of the VPN, so even
* privileged apps with permission to bypass non-bypassable VPNs should not do
- * so. See {@link #getBypassable()}.
+ * so. See {@link #isBypassable()}.
* For bypassable VPNs however, the user expects apps choose reasonable tradeoffs
* about whether they use the VPN.
*