- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
50 lines
2.0 KiB
Java
50 lines
2.0 KiB
Java
package androidx.credentials;
|
|
|
|
import android.os.Bundle;
|
|
import androidx.credentials.exceptions.NoCredentialException;
|
|
import androidx.credentials.internal.RequestValidationHelper;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class RestoreCredential extends Credential {
|
|
private static final String BUNDLE_KEY_GET_RESTORE_CREDENTIAL_RESPONSE = "androidx.credentials.BUNDLE_KEY_GET_RESTORE_CREDENTIAL_RESPONSE";
|
|
public static final Companion Companion = new Companion(null);
|
|
public static final String TYPE_RESTORE_CREDENTIAL = "androidx.credentials.TYPE_RESTORE_CREDENTIAL";
|
|
private final String authenticationResponseJson;
|
|
|
|
public /* synthetic */ RestoreCredential(String str, Bundle bundle, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(str, bundle);
|
|
}
|
|
|
|
public final String getAuthenticationResponseJson() {
|
|
return this.authenticationResponseJson;
|
|
}
|
|
|
|
private RestoreCredential(String str, Bundle bundle) {
|
|
super(TYPE_RESTORE_CREDENTIAL, bundle);
|
|
this.authenticationResponseJson = str;
|
|
if (!RequestValidationHelper.Companion.isValidJSON(str)) {
|
|
throw new IllegalArgumentException("authenticationResponseJson must not be empty, and must be a valid JSON".toString());
|
|
}
|
|
}
|
|
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
|
|
public final RestoreCredential createFrom$credentials_release(Bundle data) {
|
|
Intrinsics.checkNotNullParameter(data, "data");
|
|
String string = data.getString(RestoreCredential.BUNDLE_KEY_GET_RESTORE_CREDENTIAL_RESPONSE);
|
|
if (string == null) {
|
|
throw new NoCredentialException("The device does not contain a restore credential.");
|
|
}
|
|
return new RestoreCredential(string, data, null);
|
|
}
|
|
}
|
|
}
|