what-the-bank/sources/com/google/android/gms/auth/api/credentials/CredentialPickerConfig.java

104 lines
3.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.auth.api.credentials;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.ReflectedParcelable;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/* loaded from: classes.dex */
public final class CredentialPickerConfig extends AbstractSafeParcelable implements ReflectedParcelable {
public static final Parcelable.Creator<CredentialPickerConfig> CREATOR = new zze();
private final boolean mShowCancelButton;
private final int zzv;
private final boolean zzw;
@Deprecated
private final boolean zzx;
private final int zzy;
@Retention(RetentionPolicy.SOURCE)
/* loaded from: classes.dex */
public @interface Prompt {
public static final int CONTINUE = 1;
public static final int SIGN_IN = 2;
public static final int SIGN_UP = 3;
}
/* JADX INFO: Access modifiers changed from: package-private */
public CredentialPickerConfig(int i, boolean z, boolean z2, boolean z3, int i2) {
this.zzv = i;
this.zzw = z;
this.mShowCancelButton = z2;
if (i < 2) {
this.zzx = z3;
this.zzy = z3 ? 3 : 1;
} else {
this.zzx = i2 == 3;
this.zzy = i2;
}
}
private CredentialPickerConfig(Builder builder) {
this(2, builder.zzw, builder.mShowCancelButton, false, builder.zzz);
}
/* loaded from: classes.dex */
public static class Builder {
private boolean zzw = false;
private boolean mShowCancelButton = true;
private int zzz = 1;
public CredentialPickerConfig build() {
return new CredentialPickerConfig(this);
}
public Builder setShowCancelButton(boolean z) {
this.mShowCancelButton = z;
return this;
}
public Builder setShowAddAccountButton(boolean z) {
this.zzw = z;
return this;
}
public Builder setPrompt(int i) {
this.zzz = i;
return this;
}
@Deprecated
public Builder setForNewAccount(boolean z) {
this.zzz = z ? 3 : 1;
return this;
}
}
@Override // android.os.Parcelable
public final void writeToParcel(Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeBoolean(parcel, 1, shouldShowAddAccountButton());
SafeParcelWriter.writeBoolean(parcel, 2, shouldShowCancelButton());
SafeParcelWriter.writeBoolean(parcel, 3, isForNewAccount());
SafeParcelWriter.writeInt(parcel, 4, this.zzy);
SafeParcelWriter.writeInt(parcel, 1000, this.zzv);
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
public final boolean shouldShowCancelButton() {
return this.mShowCancelButton;
}
public final boolean shouldShowAddAccountButton() {
return this.zzw;
}
@Deprecated
public final boolean isForNewAccount() {
return this.zzy == 3;
}
}