summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-10-19 23:22:36 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-10-19 23:22:36 +0000
commit4b2d5d5c91b1188c011a81be73ff48582d660c5b (patch)
tree4db0d0509cc611f60519f1d5b5c1e3e6fe350399
parent3800dc7ef55309217d4b135be05110a02bd2a339 (diff)
parent902be353b5e7a5f9b26d1fabfe4e21df5e82b1c2 (diff)
downloadgsma_services-4b2d5d5c91b1188c011a81be73ff48582d660c5b.tar.gz
Merge "Make AuthenticationException constructor public" into main am: 902be353b5
Original change: https://android-review.googlesource.com/c/platform/frameworks/libs/gsma_services/+/2797167 Change-Id: Id4fe66978c1dc0600321dd917cc63b515e592d33 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-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);