summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah Chin <sarahchin@google.com>2023-10-19 14:36:12 -0700
committerSarah Chin <sarahchin@google.com>2023-10-19 14:36:14 -0700
commit527c4ef5bbd0e848f5089d7354a43a5c21d7982a (patch)
treeec144dd074a55697c8a8b8e8009a3151ec900144
parent514adc8dc045205d1e2ddd4b9d3219fdccb5a33b (diff)
downloadgsma_services-527c4ef5bbd0e848f5089d7354a43a5c21d7982a.tar.gz
Make AuthenticationException constructor public
Test: build and manual Bug: 282974919 Change-Id: Ia86637365fa7d179ec3f41ef9b86ea79d8152444
-rw-r--r--ts43authentication/src/com/android/libraries/ts43authentication/AuthenticationException.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/ts43authentication/src/com/android/libraries/ts43authentication/AuthenticationException.java b/ts43authentication/src/com/android/libraries/ts43authentication/AuthenticationException.java
index 707a7bf..24dd7db 100644
--- a/ts43authentication/src/com/android/libraries/ts43authentication/AuthenticationException.java
+++ b/ts43authentication/src/com/android/libraries/ts43authentication/AuthenticationException.java
@@ -122,7 +122,15 @@ public class AuthenticationException extends Exception {
private final int mHttpStatusCode;
private final String mRetryAfter;
- private AuthenticationException(@AuthenticationError int error, int httpStatusCode,
+ /**
+ * Create an AuthenticationException by setting all fields manually.
+ *
+ * @param error The authentication error.
+ * @param httpStatusCode The HTTP status code.
+ * @param retryAfter The {@code Retry-After} header from the HTTP response.
+ * @param message The detailed message with more information about the exception.
+ */
+ public AuthenticationException(@AuthenticationError int error, int httpStatusCode,
String retryAfter, String message) {
super(message);
mError = error;
@@ -134,7 +142,7 @@ public class AuthenticationException extends Exception {
* Create an AuthenticationException for the given {@link AuthenticationError}.
*
* @param error The authentication error.
- * @param message The detail message with more information about the exception.
+ * @param message The detailed message with more information about the exception.
*/
public AuthenticationException(int error, String message) {
this(error, HTTP_STATUS_CODE_UNSPECIFIED, RETRY_AFTER_UNSPECIFIED, message);