- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
159 lines
7.9 KiB
Java
159 lines
7.9 KiB
Java
package androidx.credentials.provider;
|
|
|
|
import android.os.Build;
|
|
import android.os.Bundle;
|
|
import androidx.annotation.RequiresApi;
|
|
import androidx.credentials.provider.utils.BeginGetCredentialUtil;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class BeginGetCredentialRequest {
|
|
public static final Companion Companion = new Companion(null);
|
|
private final List<BeginGetCredentialOption> beginGetCredentialOptions;
|
|
private final CallingAppInfo callingAppInfo;
|
|
|
|
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public BeginGetCredentialRequest(List<? extends BeginGetCredentialOption> beginGetCredentialOptions) {
|
|
this(beginGetCredentialOptions, null, 2, 0 == true ? 1 : 0);
|
|
Intrinsics.checkNotNullParameter(beginGetCredentialOptions, "beginGetCredentialOptions");
|
|
}
|
|
|
|
public static final Bundle asBundle(BeginGetCredentialRequest beginGetCredentialRequest) {
|
|
return Companion.asBundle(beginGetCredentialRequest);
|
|
}
|
|
|
|
public static final BeginGetCredentialRequest fromBundle(Bundle bundle) {
|
|
return Companion.fromBundle(bundle);
|
|
}
|
|
|
|
public final List<BeginGetCredentialOption> getBeginGetCredentialOptions() {
|
|
return this.beginGetCredentialOptions;
|
|
}
|
|
|
|
public final CallingAppInfo getCallingAppInfo() {
|
|
return this.callingAppInfo;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public BeginGetCredentialRequest(List<? extends BeginGetCredentialOption> beginGetCredentialOptions, CallingAppInfo callingAppInfo) {
|
|
Intrinsics.checkNotNullParameter(beginGetCredentialOptions, "beginGetCredentialOptions");
|
|
this.beginGetCredentialOptions = beginGetCredentialOptions;
|
|
this.callingAppInfo = callingAppInfo;
|
|
}
|
|
|
|
public /* synthetic */ BeginGetCredentialRequest(List list, CallingAppInfo callingAppInfo, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(list, (i & 2) != 0 ? null : callingAppInfo);
|
|
}
|
|
|
|
@RequiresApi(34)
|
|
public static final class Api34Impl {
|
|
public static final Api34Impl INSTANCE = new Api34Impl();
|
|
private static final String REQUEST_KEY = "androidx.credentials.provider.BeginGetCredentialRequest";
|
|
|
|
private Api34Impl() {
|
|
}
|
|
|
|
public static final void asBundle(Bundle bundle, BeginGetCredentialRequest request) {
|
|
Intrinsics.checkNotNullParameter(bundle, "bundle");
|
|
Intrinsics.checkNotNullParameter(request, "request");
|
|
bundle.putParcelable(REQUEST_KEY, BeginGetCredentialUtil.Companion.convertToFrameworkRequest(request));
|
|
}
|
|
|
|
public static final BeginGetCredentialRequest fromBundle(Bundle bundle) {
|
|
Intrinsics.checkNotNullParameter(bundle, "bundle");
|
|
android.service.credentials.BeginGetCredentialRequest beginGetCredentialRequest = (android.service.credentials.BeginGetCredentialRequest) bundle.getParcelable(REQUEST_KEY, android.service.credentials.BeginGetCredentialRequest.class);
|
|
if (beginGetCredentialRequest != null) {
|
|
return BeginGetCredentialUtil.Companion.convertToJetpackRequest$credentials_release(beginGetCredentialRequest);
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
|
|
@SourceDebugExtension({"SMAP\nBeginGetCredentialRequest.kt\nKotlin\n*S Kotlin\n*F\n+ 1 BeginGetCredentialRequest.kt\nandroidx/credentials/provider/BeginGetCredentialRequest$Api21Impl\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,163:1\n1#2:164\n*E\n"})
|
|
public static final class Api21Impl {
|
|
private static final String EXTRA_BEGIN_GET_CREDENTIAL_OPTION_CANDIDATE_QUERY_DATA_PREFIX = "androidx.credentials.provider.extra.EXTRA_BEGIN_GET_CREDENTIAL_OPTION_CANDIDATE_QUERY_DATA_";
|
|
private static final String EXTRA_BEGIN_GET_CREDENTIAL_OPTION_ID_PREFIX = "androidx.credentials.provider.extra.EXTRA_BEGIN_GET_CREDENTIAL_OPTION_ID_";
|
|
private static final String EXTRA_BEGIN_GET_CREDENTIAL_OPTION_SIZE = "androidx.credentials.provider.extra.EXTRA_BEGIN_GET_CREDENTIAL_OPTION_SIZE";
|
|
private static final String EXTRA_BEGIN_GET_CREDENTIAL_OPTION_TYPE_PREFIX = "androidx.credentials.provider.extra.EXTRA_BEGIN_GET_CREDENTIAL_OPTION_TYPE_";
|
|
public static final Api21Impl INSTANCE = new Api21Impl();
|
|
|
|
private Api21Impl() {
|
|
}
|
|
|
|
public static final void asBundle(Bundle bundle, BeginGetCredentialRequest request) {
|
|
Intrinsics.checkNotNullParameter(bundle, "bundle");
|
|
Intrinsics.checkNotNullParameter(request, "request");
|
|
int size = request.getBeginGetCredentialOptions().size();
|
|
bundle.putInt(EXTRA_BEGIN_GET_CREDENTIAL_OPTION_SIZE, size);
|
|
for (int i = 0; i < size; i++) {
|
|
bundle.putString(EXTRA_BEGIN_GET_CREDENTIAL_OPTION_ID_PREFIX + i, request.getBeginGetCredentialOptions().get(i).getId());
|
|
bundle.putString(EXTRA_BEGIN_GET_CREDENTIAL_OPTION_TYPE_PREFIX + i, request.getBeginGetCredentialOptions().get(i).getType());
|
|
bundle.putBundle(EXTRA_BEGIN_GET_CREDENTIAL_OPTION_CANDIDATE_QUERY_DATA_PREFIX + i, request.getBeginGetCredentialOptions().get(i).getCandidateQueryData());
|
|
CallingAppInfo callingAppInfo = request.getCallingAppInfo();
|
|
if (callingAppInfo != null) {
|
|
CallingAppInfo.Companion.setCallingAppInfo$credentials_release(bundle, callingAppInfo);
|
|
}
|
|
}
|
|
}
|
|
|
|
public static final BeginGetCredentialRequest fromBundle(Bundle bundle) {
|
|
Intrinsics.checkNotNullParameter(bundle, "bundle");
|
|
CallingAppInfo extractCallingAppInfo$credentials_release = CallingAppInfo.Companion.extractCallingAppInfo$credentials_release(bundle);
|
|
int i = bundle.getInt(EXTRA_BEGIN_GET_CREDENTIAL_OPTION_SIZE, -1);
|
|
if (i < 0) {
|
|
return null;
|
|
}
|
|
ArrayList arrayList = new ArrayList();
|
|
for (int i2 = 0; i2 < i; i2++) {
|
|
String string = bundle.getString(EXTRA_BEGIN_GET_CREDENTIAL_OPTION_ID_PREFIX + i2);
|
|
if (string == null) {
|
|
return null;
|
|
}
|
|
String string2 = bundle.getString(EXTRA_BEGIN_GET_CREDENTIAL_OPTION_TYPE_PREFIX + i2);
|
|
if (string2 == null) {
|
|
return null;
|
|
}
|
|
Bundle bundle2 = bundle.getBundle(EXTRA_BEGIN_GET_CREDENTIAL_OPTION_CANDIDATE_QUERY_DATA_PREFIX + i2);
|
|
if (bundle2 == null) {
|
|
bundle2 = new Bundle();
|
|
}
|
|
arrayList.add(BeginGetCredentialOption.Companion.createFrom$credentials_release(string, string2, bundle2));
|
|
}
|
|
return new BeginGetCredentialRequest(arrayList, extractCallingAppInfo$credentials_release);
|
|
}
|
|
}
|
|
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
|
|
public final Bundle asBundle(BeginGetCredentialRequest request) {
|
|
Intrinsics.checkNotNullParameter(request, "request");
|
|
Bundle bundle = new Bundle();
|
|
if (Build.VERSION.SDK_INT >= 34) {
|
|
Api34Impl.asBundle(bundle, request);
|
|
} else {
|
|
Api21Impl.asBundle(bundle, request);
|
|
}
|
|
return bundle;
|
|
}
|
|
|
|
public final BeginGetCredentialRequest fromBundle(Bundle bundle) {
|
|
Intrinsics.checkNotNullParameter(bundle, "bundle");
|
|
if (Build.VERSION.SDK_INT >= 34) {
|
|
return Api34Impl.fromBundle(bundle);
|
|
}
|
|
return Api21Impl.fromBundle(bundle);
|
|
}
|
|
}
|
|
}
|