alexandroid/decompiled/jadx/sources/com/google/android/gms/common/AccountPicker.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

207 lines
7.5 KiB
Java

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 java.util.ArrayList;
import java.util.List;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes7.dex */
public final class AccountPicker {
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class AccountChooserOptions {
@Nullable
private Account zza;
@Nullable
private ArrayList zzb;
@Nullable
private ArrayList zzc;
private boolean zzd;
@Nullable
private String zze;
@Nullable
private Bundle zzf;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
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.zzf(this.zzc);
accountChooserOptions.zzd(this.zzb);
accountChooserOptions.zzh(this.zzd);
accountChooserOptions.zzl(this.zzf);
accountChooserOptions.zzb(this.zza);
accountChooserOptions.zzj(this.zze);
return accountChooserOptions;
}
@NonNull
public Builder setAllowableAccounts(@Nullable List<Account> list) {
this.zzb = list == null ? null : new ArrayList(list);
return this;
}
@NonNull
public Builder setAllowableAccountsTypes(@Nullable List<String> 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 final /* synthetic */ Account zza() {
return this.zza;
}
public final /* synthetic */ void zzb(Account account) {
this.zza = account;
}
public final /* synthetic */ ArrayList zzc() {
return this.zzb;
}
public final /* synthetic */ void zzd(ArrayList arrayList) {
this.zzb = arrayList;
}
public final /* synthetic */ ArrayList zze() {
return this.zzc;
}
public final /* synthetic */ void zzf(ArrayList arrayList) {
this.zzc = arrayList;
}
public final /* synthetic */ boolean zzg() {
return this.zzd;
}
public final /* synthetic */ void zzh(boolean z) {
this.zzd = z;
}
public final /* synthetic */ String zzi() {
return this.zze;
}
public final /* synthetic */ void zzj(String str) {
this.zze = str;
}
public final /* synthetic */ Bundle zzk() {
return this.zzf;
}
public final /* synthetic */ void zzl(Bundle bundle) {
this.zzf = bundle;
}
}
private AccountPicker() {
}
@NonNull
public static Intent newChooseAccountIntent(@NonNull AccountChooserOptions accountChooserOptions) {
Intent intent = new Intent();
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");
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");
intent.setAction("com.google.android.gms.common.account.CHOOSE_ACCOUNT");
intent.setPackage("com.google.android.gms");
intent.putExtra("allowableAccounts", accountChooserOptions.zzc());
if (accountChooserOptions.zze() != null) {
intent.putExtra("allowableAccountTypes", (String[]) accountChooserOptions.zze().toArray(new String[0]));
}
intent.putExtra("addAccountOptions", accountChooserOptions.zzk());
intent.putExtra("selectedAccount", accountChooserOptions.zza());
intent.putExtra("selectedAccountIsNotClickable", false);
intent.putExtra("alwaysPromptForAccount", accountChooserOptions.zzg());
intent.putExtra("descriptionTextOverride", accountChooserOptions.zzi());
intent.putExtra("setGmsCoreAccount", false);
intent.putExtra("realClientPackage", (String) null);
intent.putExtra("overrideTheme", 0);
intent.putExtra("overrideCustomTheme", 0);
intent.putExtra("hostedDomainFilter", (String) null);
Bundle bundle = new Bundle();
if (!bundle.isEmpty()) {
intent.putExtra("first_party_options_bundle", bundle);
}
return intent;
}
@NonNull
@Deprecated
public static Intent newChooseAccountIntent(@Nullable Account account, @Nullable ArrayList<Account> 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;
}
}