package com.google.android.gms.common; import android.accounts.Account; import android.content.Intent; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.google.android.gms.common.internal.Preconditions; import com.google.errorprone.annotations.ResultIgnorabilityUnspecified; import java.util.ArrayList; import java.util.List; /* loaded from: classes2.dex */ public final class AccountPicker { public static class AccountChooserOptions { @Nullable private Account zza; private boolean zzb; @Nullable private ArrayList zzc; @Nullable private ArrayList zzd; private boolean zze; @Nullable private String zzf; @Nullable private Bundle zzg; private boolean zzh; private int zzi; @Nullable private String zzj; private boolean zzk; @Nullable private zza zzl; @Nullable private String zzm; private boolean zzn; private boolean zzo; public static class Builder { @Nullable private Account zza; @Nullable private ArrayList zzb; @Nullable private ArrayList zzc; private boolean zzd = false; @Nullable private String zze; @Nullable private Bundle zzf; @NonNull public AccountChooserOptions build() { Preconditions.checkArgument(true, "We only support hostedDomain filter for account chip styled account picker"); Preconditions.checkArgument(true, "Consent is only valid for account chip styled account picker"); AccountChooserOptions accountChooserOptions = new AccountChooserOptions(); accountChooserOptions.zzd = this.zzc; accountChooserOptions.zzc = this.zzb; accountChooserOptions.zze = this.zzd; accountChooserOptions.zzl = null; accountChooserOptions.zzj = null; accountChooserOptions.zzg = this.zzf; accountChooserOptions.zza = this.zza; accountChooserOptions.zzb = false; accountChooserOptions.zzh = false; accountChooserOptions.zzm = null; accountChooserOptions.zzi = 0; accountChooserOptions.zzf = this.zze; accountChooserOptions.zzk = false; accountChooserOptions.zzn = false; accountChooserOptions.zzo = false; return accountChooserOptions; } @NonNull public Builder setAllowableAccounts(@Nullable List list) { this.zzb = list == null ? null : new ArrayList(list); return this; } @NonNull public Builder setAllowableAccountsTypes(@Nullable List list) { this.zzc = list == null ? null : new ArrayList(list); return this; } @NonNull public Builder setAlwaysShowAccountPicker(boolean z) { this.zzd = z; return this; } @NonNull public Builder setOptionsForAddingAccount(@Nullable Bundle bundle) { this.zzf = bundle; return this; } @NonNull public Builder setSelectedAccount(@Nullable Account account) { this.zza = account; return this; } @NonNull public Builder setTitleOverrideText(@Nullable String str) { this.zze = str; return this; } } public static /* bridge */ /* synthetic */ boolean zzA(AccountChooserOptions accountChooserOptions) { boolean z = accountChooserOptions.zzo; return false; } public static /* bridge */ /* synthetic */ boolean zzB(AccountChooserOptions accountChooserOptions) { boolean z = accountChooserOptions.zzb; return false; } public static /* bridge */ /* synthetic */ boolean zzC(AccountChooserOptions accountChooserOptions) { boolean z = accountChooserOptions.zzh; return false; } public static /* bridge */ /* synthetic */ boolean zzD(AccountChooserOptions accountChooserOptions) { boolean z = accountChooserOptions.zzk; return false; } public static /* bridge */ /* synthetic */ int zza(AccountChooserOptions accountChooserOptions) { int i = accountChooserOptions.zzi; return 0; } public static /* bridge */ /* synthetic */ zza zzd(AccountChooserOptions accountChooserOptions) { zza zzaVar = accountChooserOptions.zzl; return null; } public static /* bridge */ /* synthetic */ String zze(AccountChooserOptions accountChooserOptions) { String str = accountChooserOptions.zzj; return null; } public static /* bridge */ /* synthetic */ String zzf(AccountChooserOptions accountChooserOptions) { String str = accountChooserOptions.zzm; return null; } public static /* bridge */ /* synthetic */ boolean zzz(AccountChooserOptions accountChooserOptions) { boolean z = accountChooserOptions.zzn; return false; } } private AccountPicker() { } @NonNull @ResultIgnorabilityUnspecified @Deprecated public static Intent newChooseAccountIntent(@Nullable Account account, @Nullable ArrayList arrayList, @Nullable String[] strArr, boolean z, @Nullable String str, @Nullable String str2, @Nullable String[] strArr2, @Nullable Bundle bundle) { Intent intent = new Intent(); Preconditions.checkArgument(true, "We only support hostedDomain filter for account chip styled account picker"); intent.setAction("com.google.android.gms.common.account.CHOOSE_ACCOUNT"); intent.setPackage("com.google.android.gms"); intent.putExtra("allowableAccounts", arrayList); intent.putExtra("allowableAccountTypes", strArr); intent.putExtra("addAccountOptions", bundle); intent.putExtra("selectedAccount", account); intent.putExtra("alwaysPromptForAccount", z); intent.putExtra("descriptionTextOverride", str); intent.putExtra("authTokenType", str2); intent.putExtra("addAccountRequiredFeatures", strArr2); intent.putExtra("setGmsCoreAccount", false); intent.putExtra("overrideTheme", 0); intent.putExtra("overrideCustomTheme", 0); intent.putExtra("hostedDomainFilter", (String) null); return intent; } @NonNull public static Intent newChooseAccountIntent(@NonNull AccountChooserOptions accountChooserOptions) { Intent intent = new Intent(); AccountChooserOptions.zzD(accountChooserOptions); AccountChooserOptions.zze(accountChooserOptions); Preconditions.checkArgument(true, "We only support hostedDomain filter for account chip styled account picker"); AccountChooserOptions.zzd(accountChooserOptions); Preconditions.checkArgument(true, "Consent is only valid for account chip styled account picker"); AccountChooserOptions.zzB(accountChooserOptions); Preconditions.checkArgument(true, "Making the selected account non-clickable is only supported for the THEME_DAY_NIGHT_GOOGLE_MATERIAL2, THEME_LIGHT_GOOGLE_MATERIAL3, THEME_DARK_GOOGLE_MATERIAL3 or THEME_DAY_NIGHT_GOOGLE_MATERIAL3 themes"); AccountChooserOptions.zzD(accountChooserOptions); intent.setAction("com.google.android.gms.common.account.CHOOSE_ACCOUNT"); intent.setPackage("com.google.android.gms"); intent.putExtra("allowableAccounts", accountChooserOptions.zzc); if (accountChooserOptions.zzd != null) { intent.putExtra("allowableAccountTypes", (String[]) accountChooserOptions.zzd.toArray(new String[0])); } intent.putExtra("addAccountOptions", accountChooserOptions.zzg); intent.putExtra("selectedAccount", accountChooserOptions.zza); AccountChooserOptions.zzB(accountChooserOptions); intent.putExtra("selectedAccountIsNotClickable", false); intent.putExtra("alwaysPromptForAccount", accountChooserOptions.zze); intent.putExtra("descriptionTextOverride", accountChooserOptions.zzf); AccountChooserOptions.zzC(accountChooserOptions); intent.putExtra("setGmsCoreAccount", false); AccountChooserOptions.zzf(accountChooserOptions); intent.putExtra("realClientPackage", (String) null); AccountChooserOptions.zza(accountChooserOptions); intent.putExtra("overrideTheme", 0); AccountChooserOptions.zzD(accountChooserOptions); intent.putExtra("overrideCustomTheme", 0); AccountChooserOptions.zze(accountChooserOptions); intent.putExtra("hostedDomainFilter", (String) null); Bundle bundle = new Bundle(); AccountChooserOptions.zzD(accountChooserOptions); AccountChooserOptions.zzd(accountChooserOptions); AccountChooserOptions.zzz(accountChooserOptions); AccountChooserOptions.zzA(accountChooserOptions); if (!bundle.isEmpty()) { intent.putExtra("first_party_options_bundle", bundle); } return intent; } }