Merge "Add ParseException constructors to API" am: ef7b38b334 am: 2299e83d12 am: 40078d1567
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1635044
Change-Id: I4e4b1f4a70fcfaa43fa9b612e7fbd151093fd8fe
diff --git a/framework/api/module-lib-current.txt b/framework/api/module-lib-current.txt
index b9bcddb..cc95a7c 100644
--- a/framework/api/module-lib-current.txt
+++ b/framework/api/module-lib-current.txt
@@ -29,6 +29,11 @@
field public static final int TRANSPORT_TEST = 7; // 0x7
}
+ public class ParseException extends java.lang.RuntimeException {
+ ctor public ParseException(@NonNull String);
+ ctor public ParseException(@NonNull String, @NonNull Throwable);
+ }
+
public final class TcpRepairWindow {
ctor public TcpRepairWindow(int, int, int, int, int, int);
field public final int maxWindow;
diff --git a/framework/src/android/net/ParseException.java b/framework/src/android/net/ParseException.java
index bcfdd7e..ca6d012 100644
--- a/framework/src/android/net/ParseException.java
+++ b/framework/src/android/net/ParseException.java
@@ -17,6 +17,7 @@
package android.net;
import android.annotation.NonNull;
+import android.annotation.SystemApi;
/**
* Thrown when parsing failed.
@@ -25,12 +26,16 @@
public class ParseException extends RuntimeException {
public String response;
- ParseException(@NonNull String response) {
+ /** @hide */
+ @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
+ public ParseException(@NonNull String response) {
super(response);
this.response = response;
}
- ParseException(@NonNull String response, @NonNull Throwable cause) {
+ /** @hide */
+ @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
+ public ParseException(@NonNull String response, @NonNull Throwable cause) {
super(response, cause);
this.response = response;
}