package androidx.credentials.provider;

import android.content.Intent;
import android.credentials.CreateCredentialException;
import android.credentials.CreateCredentialResponse;
import android.credentials.GetCredentialException;
import android.credentials.GetCredentialResponse;
import androidx.credentials.provider.utils.BeginGetCredentialUtil;
import androidx.media3.container.NalUnitUtil;
import defpackage.an1;
import defpackage.cr4;
import defpackage.gc4;
import defpackage.kp6;
import defpackage.l18;
import defpackage.pq6;
import defpackage.r15;
import kotlin.Metadata;

/* JADX INFO: loaded from: classes.dex */
@Metadata(d1 = {"\u0000$\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u001a\u000e\u0010\u0000\u001a\u0004\u0018\u00010\u0001*\u00020\u0002H\u0007\u001a\u000e\u0010\u0003\u001a\u0004\u0018\u00010\u0004*\u00020\u0002H\u0007\u001a\u000e\u0010\u0005\u001a\u0004\u0018\u00010\u0006*\u00020\u0002H\u0007\u001a\u000e\u0010\u0007\u001a\u0004\u0018\u00010\b*\u00020\u0002H\u0007\u001a\u000e\u0010\t\u001a\u0004\u0018\u00010\n*\u00020\u0002H\u0007¨\u0006\u000b"}, d2 = {"getBeginGetResponse", "Landroidx/credentials/provider/BeginGetCredentialResponse;", "Landroid/content/Intent;", "getCreateCredentialCredentialResponse", "Landroid/credentials/CreateCredentialResponse;", "getCreateCredentialException", "Landroid/credentials/CreateCredentialException;", "getGetCredentialException", "Landroid/credentials/GetCredentialException;", "getGetCredentialResponse", "Landroid/credentials/GetCredentialResponse;", "credentials_release"}, k = 2, mv = {1, 8, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
@r15
public final class IntentHandlerConverters {
    @l18
    @pq6
    public static final BeginGetCredentialResponse getBeginGetResponse(@kp6 Intent intent) {
        android.service.credentials.BeginGetCredentialResponse beginGetCredentialResponseJ;
        cr4.g(intent, "<this>");
        if (intent.hasExtra("android.service.credentials.extra.BEGIN_GET_CREDENTIAL_RESPONSE") && (beginGetCredentialResponseJ = gc4.j(intent.getParcelableExtra("android.service.credentials.extra.BEGIN_GET_CREDENTIAL_RESPONSE", gc4.z()))) != null) {
            return BeginGetCredentialUtil.INSTANCE.convertToJetpackResponse(beginGetCredentialResponseJ);
        }
        return null;
    }

    @l18
    @pq6
    public static final CreateCredentialResponse getCreateCredentialCredentialResponse(@kp6 Intent intent) {
        cr4.g(intent, "<this>");
        if (intent.hasExtra("android.service.credentials.extra.CREATE_CREDENTIAL_RESPONSE")) {
            return an1.h(intent.getParcelableExtra("android.service.credentials.extra.CREATE_CREDENTIAL_RESPONSE", gc4.v()));
        }
        return null;
    }

    @l18
    @pq6
    public static final CreateCredentialException getCreateCredentialException(@kp6 Intent intent) {
        cr4.g(intent, "<this>");
        if (intent.hasExtra("android.service.credentials.extra.CREATE_CREDENTIAL_EXCEPTION")) {
            return gc4.e(intent.getParcelableExtra("android.service.credentials.extra.CREATE_CREDENTIAL_EXCEPTION", gc4.ab()));
        }
        return null;
    }

    @l18
    @pq6
    public static final GetCredentialException getGetCredentialException(@kp6 Intent intent) {
        cr4.g(intent, "<this>");
        if (intent.hasExtra("android.service.credentials.extra.GET_CREDENTIAL_EXCEPTION")) {
            return gc4.f(intent.getParcelableExtra("android.service.credentials.extra.GET_CREDENTIAL_EXCEPTION", gc4.ac()));
        }
        return null;
    }

    @l18
    @pq6
    public static final GetCredentialResponse getGetCredentialResponse(@kp6 Intent intent) {
        cr4.g(intent, "<this>");
        if (intent.hasExtra("android.service.credentials.extra.GET_CREDENTIAL_RESPONSE")) {
            return an1.n(intent.getParcelableExtra("android.service.credentials.extra.GET_CREDENTIAL_RESPONSE", gc4.k()));
        }
        return null;
    }
}
