summaryrefslogtreecommitdiff
path: root/framework/src/android/net/ParseException.java
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2021-03-15 10:20:40 +0900
committerRemi NGUYEN VAN <reminv@google.com>2021-03-15 10:26:02 +0900
commit25dcabf72d3c67be515bafcc7f94bc5e7911bcc7 (patch)
tree3c42a662d860ac653dec23597f4da376f1805069 /framework/src/android/net/ParseException.java
parent7e9e7dce89705ad13ff050c31d3ea095a2c78e46 (diff)
Add ParseException constructors to API
ParseException constructors are used by both platform and mainline module code, so they can't be package-private. Removing dependencies on either side is not possible as the class itself is part of the public API, and supports APIs on both sides. Having the constructors part of the API makes the class usable by both sides. Fixes: 182705505 Test: CtsNetTestCases for APIs using the exception Change-Id: Ia396ab2fa3afaed3cf474c8e60f72fc7f3f4fded
Diffstat (limited to 'framework/src/android/net/ParseException.java')
-rw-r--r--framework/src/android/net/ParseException.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/framework/src/android/net/ParseException.java b/framework/src/android/net/ParseException.java
index bcfdd7ef09..ca6d012dfe 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 @@ import android.annotation.NonNull;
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;
}