alexandroid/decompiled/jadx/sources/androidx/credentials/CreateCredentialRequest.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

359 lines
21 KiB
Java

package androidx.credentials;
import android.graphics.drawable.Icon;
import android.os.Bundle;
import android.text.TextUtils;
import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;
import androidx.credentials.internal.FrameworkClassParsingException;
import com.amazon.alexa.assistant.transport.MissingTokenPull;
import kotlin.Metadata;
import kotlin.jvm.JvmName;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import okio.Buffer$$ExternalSyntheticBUOutline0;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import rx.Single$$ExternalSyntheticBUOutline0;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u000f\b&\u0018\u0000 \u00182\u00020\u0001:\u0002\u0018\u0019BI\b\u0000\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0005\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\u0006\u0010\t\u001a\u00020\b\u0012\u0006\u0010\n\u001a\u00020\u000b\u0012\b\u0010\f\u001a\u0004\u0018\u00010\u0003\u0012\u0006\u0010\r\u001a\u00020\b¢\u0006\u0002\u0010\u000eR\u0011\u0010\u0006\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u0010R\u0011\u0010\n\u001a\u00020\u000b¢\u0006\b\n\u0000\u001a\u0004\b\u0012\u0010\u0013R\u0011\u0010\t\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\u0014R\u0011\u0010\u0007\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\u0014R\u0013\u0010\f\u001a\u0004\u0018\u00010\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0015\u0010\u0016R\u0013\u0010\r\u001a\u00020\b8\u0007¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u0014R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0017\u0010\u0016¨\u0006\u001a"}, d2 = {"Landroidx/credentials/CreateCredentialRequest;", "", "type", "", "credentialData", "Landroid/os/Bundle;", "candidateQueryData", "isSystemProviderRequired", "", "isAutoSelectAllowed", "displayInfo", "Landroidx/credentials/CreateCredentialRequest$DisplayInfo;", "origin", "preferImmediatelyAvailableCredentials", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/os/Bundle;ZZLandroidx/credentials/CreateCredentialRequest$DisplayInfo;Ljava/lang/String;Z)V", "getCandidateQueryData", "()Landroid/os/Bundle;", "getCredentialData", "getDisplayInfo", "()Landroidx/credentials/CreateCredentialRequest$DisplayInfo;", "()Z", "getOrigin", "()Ljava/lang/String;", "getType", "Companion", "DisplayInfo", "credentials_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes13.dex */
public abstract class CreateCredentialRequest {
@RestrictTo({RestrictTo.Scope.LIBRARY})
@NotNull
public static final String BUNDLE_KEY_IS_AUTO_SELECT_ALLOWED = "androidx.credentials.BUNDLE_KEY_IS_AUTO_SELECT_ALLOWED";
@RestrictTo({RestrictTo.Scope.LIBRARY})
@NotNull
public static final String BUNDLE_KEY_PREFER_IMMEDIATELY_AVAILABLE_CREDENTIALS = "androidx.credentials.BUNDLE_KEY_PREFER_IMMEDIATELY_AVAILABLE_CREDENTIALS";
/* renamed from: Companion, reason: from kotlin metadata */
@NotNull
public static final Companion INSTANCE = new Companion(null);
@NotNull
private final Bundle candidateQueryData;
@NotNull
private final Bundle credentialData;
@NotNull
private final DisplayInfo displayInfo;
private final boolean isAutoSelectAllowed;
private final boolean isSystemProviderRequired;
@Nullable
private final String origin;
private final boolean preferImmediatelyAvailableCredentials;
@NotNull
private final String type;
public CreateCredentialRequest(@NotNull String str, @NotNull Bundle bundle, @NotNull Bundle bundle2, boolean z, boolean z2, @NotNull DisplayInfo displayInfo, @Nullable String str2, boolean z3) {
str.getClass();
bundle.getClass();
bundle2.getClass();
displayInfo.getClass();
this.type = str;
this.credentialData = bundle;
this.candidateQueryData = bundle2;
this.isSystemProviderRequired = z;
this.isAutoSelectAllowed = z2;
this.displayInfo = displayInfo;
this.origin = str2;
this.preferImmediatelyAvailableCredentials = z3;
bundle.putBoolean("androidx.credentials.BUNDLE_KEY_IS_AUTO_SELECT_ALLOWED", z2);
bundle.putBoolean("androidx.credentials.BUNDLE_KEY_PREFER_IMMEDIATELY_AVAILABLE_CREDENTIALS", z3);
bundle2.putBoolean("androidx.credentials.BUNDLE_KEY_IS_AUTO_SELECT_ALLOWED", z2);
}
@JvmStatic
@NotNull
@JvmOverloads
@RequiresApi(23)
public static final CreateCredentialRequest createFrom(@NotNull String str, @NotNull Bundle bundle, @NotNull Bundle bundle2, boolean z, @Nullable String str2) {
return INSTANCE.createFrom(str, bundle, bundle2, z, str2);
}
@NotNull
public final Bundle getCandidateQueryData() {
return this.candidateQueryData;
}
@NotNull
public final Bundle getCredentialData() {
return this.credentialData;
}
@NotNull
public final DisplayInfo getDisplayInfo() {
return this.displayInfo;
}
@Nullable
public final String getOrigin() {
return this.origin;
}
@NotNull
public final String getType() {
return this.type;
}
/* renamed from: isAutoSelectAllowed, reason: from getter */
public final boolean getIsAutoSelectAllowed() {
return this.isAutoSelectAllowed;
}
/* renamed from: isSystemProviderRequired, reason: from getter */
public final boolean getIsSystemProviderRequired() {
return this.isSystemProviderRequired;
}
@JvmName(name = "preferImmediatelyAvailableCredentials")
/* renamed from: preferImmediatelyAvailableCredentials, reason: from getter */
public final boolean getPreferImmediatelyAvailableCredentials() {
return this.preferImmediatelyAvailableCredentials;
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\r\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\u0002\u0018\u0000 \u00152\u00020\u0001:\u0001\u0015B\u001b\b\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u0003¢\u0006\u0002\u0010\u0005B#\b\u0016\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\u0006\u001a\u0004\u0018\u00010\u0007¢\u0006\u0002\u0010\bB-\b\u0000\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\t\u001a\u0004\u0018\u00010\n\u0012\b\u0010\u0006\u001a\u0004\u0018\u00010\u0007¢\u0006\u0002\u0010\u000bJ\b\u0010\u0013\u001a\u00020\u0014H\u0007R\u0015\u0010\t\u001a\u0004\u0018\u00010\n8\u0007¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\rR\u0015\u0010\u0006\u001a\u0004\u0018\u00010\u00078\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000fR\u0013\u0010\u0004\u001a\u0004\u0018\u00010\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0012\u0010\u0011¨\u0006\u0016"}, d2 = {"Landroidx/credentials/CreateCredentialRequest$DisplayInfo;", "", "userId", "", "userDisplayName", "(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)V", "preferDefaultProvider", "", "(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/String;)V", "credentialTypeIcon", "Landroid/graphics/drawable/Icon;", "(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/graphics/drawable/Icon;Ljava/lang/String;)V", "getCredentialTypeIcon", "()Landroid/graphics/drawable/Icon;", "getPreferDefaultProvider", "()Ljava/lang/String;", "getUserDisplayName", "()Ljava/lang/CharSequence;", "getUserId", "toBundle", "Landroid/os/Bundle;", "Companion", "credentials_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
@SourceDebugExtension({"SMAP\nCreateCredentialRequest.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CreateCredentialRequest.kt\nandroidx/credentials/CreateCredentialRequest$DisplayInfo\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,308:1\n1#2:309\n*E\n"})
public static final class DisplayInfo {
@RestrictTo({RestrictTo.Scope.LIBRARY})
@NotNull
public static final String BUNDLE_KEY_CREDENTIAL_TYPE_ICON = "androidx.credentials.BUNDLE_KEY_CREDENTIAL_TYPE_ICON";
@NotNull
public static final String BUNDLE_KEY_DEFAULT_PROVIDER = "androidx.credentials.BUNDLE_KEY_DEFAULT_PROVIDER";
@RestrictTo({RestrictTo.Scope.LIBRARY})
@NotNull
public static final String BUNDLE_KEY_REQUEST_DISPLAY_INFO = "androidx.credentials.BUNDLE_KEY_REQUEST_DISPLAY_INFO";
@NotNull
public static final String BUNDLE_KEY_USER_DISPLAY_NAME = "androidx.credentials.BUNDLE_KEY_USER_DISPLAY_NAME";
@RestrictTo({RestrictTo.Scope.LIBRARY})
@NotNull
public static final String BUNDLE_KEY_USER_ID = "androidx.credentials.BUNDLE_KEY_USER_ID";
/* renamed from: Companion, reason: from kotlin metadata */
@NotNull
public static final Companion INSTANCE = new Companion(null);
@Nullable
private final Icon credentialTypeIcon;
@Nullable
private final String preferDefaultProvider;
@Nullable
private final CharSequence userDisplayName;
@NotNull
private final CharSequence userId;
public DisplayInfo(@NotNull CharSequence charSequence, @Nullable CharSequence charSequence2, @Nullable Icon icon, @Nullable String str) {
charSequence.getClass();
this.userId = charSequence;
this.userDisplayName = charSequence2;
this.credentialTypeIcon = icon;
this.preferDefaultProvider = str;
if (charSequence.length() > 0) {
return;
}
Single$$ExternalSyntheticBUOutline0.m$3("userId should not be empty");
throw null;
}
@JvmStatic
@RequiresApi(23)
@NotNull
public static final DisplayInfo createFrom(@NotNull Bundle bundle) {
return INSTANCE.createFrom(bundle);
}
@RestrictTo({RestrictTo.Scope.LIBRARY})
@Nullable
public final Icon getCredentialTypeIcon() {
return this.credentialTypeIcon;
}
@RestrictTo({RestrictTo.Scope.LIBRARY})
@Nullable
public final String getPreferDefaultProvider() {
return this.preferDefaultProvider;
}
@Nullable
public final CharSequence getUserDisplayName() {
return this.userDisplayName;
}
@NotNull
public final CharSequence getUserId() {
return this.userId;
}
@RequiresApi(23)
@RestrictTo({RestrictTo.Scope.LIBRARY})
@NotNull
public final Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putCharSequence(BUNDLE_KEY_USER_ID, this.userId);
if (!TextUtils.isEmpty(this.userDisplayName)) {
bundle.putCharSequence(BUNDLE_KEY_USER_DISPLAY_NAME, this.userDisplayName);
}
if (!TextUtils.isEmpty(this.preferDefaultProvider)) {
bundle.putString(BUNDLE_KEY_DEFAULT_PROVIDER, this.preferDefaultProvider);
}
return bundle;
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\fH\u0007R\u0010\u0010\u0003\u001a\u00020\u00048\u0006X\u0087T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0080T¢\u0006\u0002\n\u0000R\u0010\u0010\u0006\u001a\u00020\u00048\u0006X\u0087T¢\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0004X\u0080T¢\u0006\u0002\n\u0000R\u0010\u0010\b\u001a\u00020\u00048\u0006X\u0087T¢\u0006\u0002\n\u0000¨\u0006\r"}, d2 = {"Landroidx/credentials/CreateCredentialRequest$DisplayInfo$Companion;", "", "()V", "BUNDLE_KEY_CREDENTIAL_TYPE_ICON", "", "BUNDLE_KEY_DEFAULT_PROVIDER", "BUNDLE_KEY_REQUEST_DISPLAY_INFO", "BUNDLE_KEY_USER_DISPLAY_NAME", "BUNDLE_KEY_USER_ID", "createFrom", "Landroidx/credentials/CreateCredentialRequest$DisplayInfo;", "from", "Landroid/os/Bundle;", "credentials_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@JvmStatic
@RequiresApi(23)
@NotNull
public final DisplayInfo createFrom(@NotNull Bundle from) {
from.getClass();
try {
Bundle bundle = from.getBundle(DisplayInfo.BUNDLE_KEY_REQUEST_DISPLAY_INFO);
bundle.getClass();
CharSequence charSequence = bundle.getCharSequence(DisplayInfo.BUNDLE_KEY_USER_ID);
CharSequence charSequence2 = bundle.getCharSequence(DisplayInfo.BUNDLE_KEY_USER_DISPLAY_NAME);
Icon icon = (Icon) bundle.getParcelable(DisplayInfo.BUNDLE_KEY_CREDENTIAL_TYPE_ICON);
String string = bundle.getString(DisplayInfo.BUNDLE_KEY_DEFAULT_PROVIDER);
charSequence.getClass();
return new DisplayInfo(charSequence, charSequence2, icon, string);
} catch (Exception e) {
Buffer$$ExternalSyntheticBUOutline0.m$1(e);
return null;
}
}
private Companion() {
}
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
/* JADX WARN: Multi-variable type inference failed */
@JvmOverloads
public DisplayInfo(@NotNull CharSequence charSequence) {
this(charSequence, (CharSequence) null, 2, (DefaultConstructorMarker) (0 == true ? 1 : 0));
charSequence.getClass();
}
public /* synthetic */ DisplayInfo(CharSequence charSequence, CharSequence charSequence2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(charSequence, (i & 2) != 0 ? null : charSequence2);
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
@JvmOverloads
public DisplayInfo(@NotNull CharSequence charSequence, @Nullable CharSequence charSequence2) {
this(charSequence, charSequence2, (Icon) null, (String) null);
charSequence.getClass();
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public DisplayInfo(@NotNull CharSequence charSequence, @Nullable CharSequence charSequence2, @Nullable String str) {
this(charSequence, charSequence2, (Icon) null, str);
charSequence.getClass();
}
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Metadata(d1 = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0010\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\tH\u0007J4\u0010\u0006\u001a\u00020\u00072\u0006\u0010\n\u001a\u00020\u00042\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\r\u001a\u00020\f2\u0006\u0010\u000e\u001a\u00020\u000f2\n\b\u0002\u0010\u0010\u001a\u0004\u0018\u00010\u0004H\u0007R\u0010\u0010\u0003\u001a\u00020\u00048\u0006X\u0087T¢\u0006\u0002\n\u0000R\u0010\u0010\u0005\u001a\u00020\u00048\u0006X\u0087T¢\u0006\u0002\n\u0000¨\u0006\u0011"}, d2 = {"Landroidx/credentials/CreateCredentialRequest$Companion;", "", "()V", "BUNDLE_KEY_IS_AUTO_SELECT_ALLOWED", "", "BUNDLE_KEY_PREFER_IMMEDIATELY_AVAILABLE_CREDENTIALS", "createFrom", "Landroidx/credentials/CreateCredentialRequest;", MissingTokenPull.TRIGGER_REQUEST, "Landroid/credentials/CreateCredentialRequest;", "type", "credentialData", "Landroid/os/Bundle;", "candidateQueryData", "requireSystemProvider", "", "origin", "credentials_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static /* synthetic */ CreateCredentialRequest createFrom$default(Companion companion, String str, Bundle bundle, Bundle bundle2, boolean z, String str2, int i, Object obj) {
if ((i & 16) != 0) {
str2 = null;
}
return companion.createFrom(str, bundle, bundle2, z, str2);
}
@JvmStatic
@NotNull
@JvmOverloads
@RequiresApi(23)
public final CreateCredentialRequest createFrom(@NotNull String type, @NotNull Bundle credentialData, @NotNull Bundle candidateQueryData, boolean requireSystemProvider, @Nullable String origin) {
type.getClass();
credentialData.getClass();
candidateQueryData.getClass();
try {
if (Intrinsics.areEqual(type, PasswordCredential.TYPE_PASSWORD_CREDENTIAL)) {
return CreatePasswordRequest.INSTANCE.createFrom$credentials_release(credentialData, origin, candidateQueryData);
}
if (!Intrinsics.areEqual(type, PublicKeyCredential.TYPE_PUBLIC_KEY_CREDENTIAL)) {
throw new FrameworkClassParsingException();
}
String string = credentialData.getString(PublicKeyCredential.BUNDLE_KEY_SUBTYPE);
if (string != null && string.hashCode() == 589054771 && string.equals(CreatePublicKeyCredentialRequest.BUNDLE_VALUE_SUBTYPE_CREATE_PUBLIC_KEY_CREDENTIAL_REQUEST)) {
return CreatePublicKeyCredentialRequest.INSTANCE.createFrom$credentials_release(credentialData, origin, candidateQueryData);
}
throw new FrameworkClassParsingException();
} catch (FrameworkClassParsingException unused) {
return new CreateCustomCredentialRequest(type, credentialData, candidateQueryData, requireSystemProvider, DisplayInfo.INSTANCE.createFrom(credentialData), credentialData.getBoolean("androidx.credentials.BUNDLE_KEY_IS_AUTO_SELECT_ALLOWED", false), origin, credentialData.getBoolean("androidx.credentials.BUNDLE_KEY_PREFER_IMMEDIATELY_AVAILABLE_CREDENTIALS", false));
}
}
private Companion() {
}
@JvmStatic
@RequiresApi(34)
@NotNull
public final CreateCredentialRequest createFrom(@NotNull android.credentials.CreateCredentialRequest request) {
request.getClass();
String type = request.getType();
type.getClass();
Bundle credentialData = request.getCredentialData();
credentialData.getClass();
Bundle candidateQueryData = request.getCandidateQueryData();
candidateQueryData.getClass();
return createFrom(type, credentialData, candidateQueryData, request.isSystemProviderRequired(), request.getOrigin());
}
@JvmStatic
@NotNull
@JvmOverloads
@RequiresApi(23)
public final CreateCredentialRequest createFrom(@NotNull String str, @NotNull Bundle bundle, @NotNull Bundle bundle2, boolean z) {
str.getClass();
bundle.getClass();
bundle2.getClass();
return createFrom$default(this, str, bundle, bundle2, z, null, 16, null);
}
}
@JvmStatic
@NotNull
@JvmOverloads
@RequiresApi(23)
public static final CreateCredentialRequest createFrom(@NotNull String str, @NotNull Bundle bundle, @NotNull Bundle bundle2, boolean z) {
return INSTANCE.createFrom(str, bundle, bundle2, z);
}
@JvmStatic
@RequiresApi(34)
@NotNull
public static final CreateCredentialRequest createFrom(@NotNull android.credentials.CreateCredentialRequest createCredentialRequest) {
return INSTANCE.createFrom(createCredentialRequest);
}
}