121 lines
3.2 KiB
Java
121 lines
3.2 KiB
Java
package com.google.android.gms.common.internal;
|
|
|
|
import android.accounts.Account;
|
|
import android.view.View;
|
|
import androidx.collection.ArraySet;
|
|
import com.google.android.gms.common.api.Api;
|
|
import com.google.android.gms.common.api.Scope;
|
|
import com.google.android.gms.signin.SignInOptions;
|
|
import java.util.Collection;
|
|
import java.util.Collections;
|
|
import java.util.HashSet;
|
|
import java.util.Iterator;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class ClientSettings {
|
|
private final Account a;
|
|
private final Set<Scope> b;
|
|
private final Set<Scope> c;
|
|
private final Map<Api<?>, OptionalApiSettings> d;
|
|
private final String e;
|
|
private final String f;
|
|
private final SignInOptions g;
|
|
private Integer h;
|
|
|
|
public static final class Builder {
|
|
private Account a;
|
|
private ArraySet<Scope> b;
|
|
private Map<Api<?>, OptionalApiSettings> c;
|
|
private View e;
|
|
private String f;
|
|
private String g;
|
|
private int d = 0;
|
|
private SignInOptions h = SignInOptions.i;
|
|
|
|
public final Builder a(Account account) {
|
|
this.a = account;
|
|
return this;
|
|
}
|
|
|
|
public final Builder b(String str) {
|
|
this.f = str;
|
|
return this;
|
|
}
|
|
|
|
public final Builder a(Collection<Scope> collection) {
|
|
if (this.b == null) {
|
|
this.b = new ArraySet<>();
|
|
}
|
|
this.b.addAll(collection);
|
|
return this;
|
|
}
|
|
|
|
public final Builder a(String str) {
|
|
this.g = str;
|
|
return this;
|
|
}
|
|
|
|
public final ClientSettings a() {
|
|
return new ClientSettings(this.a, this.b, this.c, this.d, this.e, this.f, this.g, this.h);
|
|
}
|
|
}
|
|
|
|
public static final class OptionalApiSettings {
|
|
public final Set<Scope> a;
|
|
}
|
|
|
|
public ClientSettings(Account account, Set<Scope> set, Map<Api<?>, OptionalApiSettings> map, int i, View view, String str, String str2, SignInOptions signInOptions) {
|
|
this.a = account;
|
|
this.b = set == null ? Collections.EMPTY_SET : Collections.unmodifiableSet(set);
|
|
this.d = map == null ? Collections.EMPTY_MAP : map;
|
|
this.e = str;
|
|
this.f = str2;
|
|
this.g = signInOptions;
|
|
HashSet hashSet = new HashSet(this.b);
|
|
Iterator<OptionalApiSettings> it = this.d.values().iterator();
|
|
while (it.hasNext()) {
|
|
hashSet.addAll(it.next().a);
|
|
}
|
|
this.c = Collections.unmodifiableSet(hashSet);
|
|
}
|
|
|
|
public final Account a() {
|
|
return this.a;
|
|
}
|
|
|
|
public final Account b() {
|
|
Account account = this.a;
|
|
return account != null ? account : new Account("<<default account>>", "com.google");
|
|
}
|
|
|
|
public final Set<Scope> c() {
|
|
return this.c;
|
|
}
|
|
|
|
public final Integer d() {
|
|
return this.h;
|
|
}
|
|
|
|
public final String e() {
|
|
return this.f;
|
|
}
|
|
|
|
public final String f() {
|
|
return this.e;
|
|
}
|
|
|
|
public final Set<Scope> g() {
|
|
return this.b;
|
|
}
|
|
|
|
public final SignInOptions h() {
|
|
return this.g;
|
|
}
|
|
|
|
public final void a(Integer num) {
|
|
this.h = num;
|
|
}
|
|
}
|