- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
63 lines
2.4 KiB
Java
63 lines
2.4 KiB
Java
package androidx.credentials;
|
|
|
|
import android.os.Bundle;
|
|
import androidx.annotation.RestrictTo;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class GetCredentialResponse {
|
|
public static final Companion Companion = new Companion(null);
|
|
private static final String EXTRA_CREDENTIAL_DATA = "androidx.credentials.provider.extra.EXTRA_CREDENTIAL_DATA";
|
|
private static final String EXTRA_CREDENTIAL_TYPE = "androidx.credentials.provider.extra.EXTRA_CREDENTIAL_TYPE";
|
|
private final Credential credential;
|
|
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
|
public static final Bundle asBundle(GetCredentialResponse getCredentialResponse) {
|
|
return Companion.asBundle(getCredentialResponse);
|
|
}
|
|
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
|
public static final GetCredentialResponse fromBundle(Bundle bundle) {
|
|
return Companion.fromBundle(bundle);
|
|
}
|
|
|
|
public final Credential getCredential() {
|
|
return this.credential;
|
|
}
|
|
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
|
public final Bundle asBundle(GetCredentialResponse response) {
|
|
Intrinsics.checkNotNullParameter(response, "response");
|
|
Bundle bundle = new Bundle();
|
|
bundle.putString(GetCredentialResponse.EXTRA_CREDENTIAL_TYPE, response.getCredential().getType());
|
|
bundle.putBundle(GetCredentialResponse.EXTRA_CREDENTIAL_DATA, response.getCredential().getData());
|
|
return bundle;
|
|
}
|
|
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY})
|
|
public final GetCredentialResponse fromBundle(Bundle bundle) {
|
|
Bundle bundle2;
|
|
Intrinsics.checkNotNullParameter(bundle, "bundle");
|
|
String string = bundle.getString(GetCredentialResponse.EXTRA_CREDENTIAL_TYPE);
|
|
if (string == null || (bundle2 = bundle.getBundle(GetCredentialResponse.EXTRA_CREDENTIAL_DATA)) == null) {
|
|
return null;
|
|
}
|
|
return new GetCredentialResponse(Credential.Companion.createFrom(string, bundle2));
|
|
}
|
|
}
|
|
|
|
public GetCredentialResponse(Credential credential) {
|
|
Intrinsics.checkNotNullParameter(credential, "credential");
|
|
this.credential = credential;
|
|
}
|
|
}
|