Merge "Make AuthenticationException constructor public" into main am: 902be353b5 am: 7ea94f45ed am: e50efd4083

Original change: https://android-review.googlesource.com/c/platform/frameworks/libs/gsma_services/+/2797167

Change-Id: I166602571920b46909ddc454ca9f3348ffeeb534
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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 @@
     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 @@
      * 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);