From 527c4ef5bbd0e848f5089d7354a43a5c21d7982a Mon Sep 17 00:00:00 2001 From: Sarah Chin Date: Thu, 19 Oct 2023 14:36:12 -0700 Subject: Make AuthenticationException constructor public Test: build and manual Bug: 282974919 Change-Id: Ia86637365fa7d179ec3f41ef9b86ea79d8152444 --- .../ts43authentication/AuthenticationException.java | 12 ++++++++++-- 1 file 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); -- cgit v1.2.3