package androidx.credentials.exceptions; import android.os.Bundle; import androidx.annotation.RestrictTo; import androidx.credentials.internal.ConversionUtilsKt; import kotlin.jvm.internal.DefaultConstructorMarker; import kotlin.jvm.internal.Intrinsics; /* loaded from: classes.dex */ public abstract class GetCredentialException extends Exception { public static final Companion Companion = new Companion(null); private static final String EXTRA_GET_CREDENTIAL_EXCEPTION_MESSAGE = "androidx.credentials.provider.extra.CREATE_CREDENTIAL_EXCEPTION_MESSAGE"; private static final String EXTRA_GET_CREDENTIAL_EXCEPTION_TYPE = "androidx.credentials.provider.extra.CREATE_CREDENTIAL_EXCEPTION_TYPE"; private final CharSequence errorMessage; private final String type; /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */ /* JADX WARN: Multi-variable type inference failed */ public GetCredentialException(String type) { this(type, null, 2, 0 == true ? 1 : 0); Intrinsics.checkNotNullParameter(type, "type"); } public static final Bundle asBundle(GetCredentialException getCredentialException) { return Companion.asBundle(getCredentialException); } public static final GetCredentialException fromBundle(Bundle bundle) { return Companion.fromBundle(bundle); } @RestrictTo({RestrictTo.Scope.LIBRARY_GROUP}) public CharSequence getErrorMessage() { return this.errorMessage; } @RestrictTo({RestrictTo.Scope.LIBRARY_GROUP}) public String getType() { return this.type; } public /* synthetic */ GetCredentialException(String str, CharSequence charSequence, int i, DefaultConstructorMarker defaultConstructorMarker) { this(str, (i & 2) != 0 ? null : charSequence); } public static final class Companion { public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) { this(); } private Companion() { } public final Bundle asBundle(GetCredentialException ex) { Intrinsics.checkNotNullParameter(ex, "ex"); Bundle bundle = new Bundle(); bundle.putString(GetCredentialException.EXTRA_GET_CREDENTIAL_EXCEPTION_TYPE, ex.getType()); CharSequence errorMessage = ex.getErrorMessage(); if (errorMessage != null) { bundle.putCharSequence(GetCredentialException.EXTRA_GET_CREDENTIAL_EXCEPTION_MESSAGE, errorMessage); } return bundle; } public final GetCredentialException fromBundle(Bundle bundle) { Intrinsics.checkNotNullParameter(bundle, "bundle"); String string = bundle.getString(GetCredentialException.EXTRA_GET_CREDENTIAL_EXCEPTION_TYPE); if (string == null) { throw new IllegalArgumentException("Bundle was missing exception type."); } return ConversionUtilsKt.toJetpackGetException(string, bundle.getCharSequence(GetCredentialException.EXTRA_GET_CREDENTIAL_EXCEPTION_MESSAGE)); } } /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public GetCredentialException(String type, CharSequence charSequence) { super(charSequence != null ? charSequence.toString() : null); Intrinsics.checkNotNullParameter(type, "type"); this.type = type; this.errorMessage = charSequence; } }