Initial version -- added millennium read funcionality

This commit is contained in:
Pablo
2026-03-09 22:05:28 +01:00
commit 77c2ded482
2770 changed files with 141927 additions and 0 deletions
@@ -0,0 +1,259 @@
package com.google.android.gms.auth.api.signin;
import android.accounts.Account;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import androidx.collection.ArraySet;
import com.google.android.gms.common.api.Scope;
import com.google.android.gms.common.internal.AccountType;
import com.google.android.gms.common.internal.Preconditions;
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 com.google.android.gms.common.util.Clock;
import com.google.android.gms.common.util.DefaultClock;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
/* JADX INFO: loaded from: classes2.dex */
@Deprecated
public class GoogleSignInAccount extends AbstractSafeParcelable implements ReflectedParcelable {
public static final Parcelable.Creator<GoogleSignInAccount> CREATOR = new zab();
public static final Clock zaa = DefaultClock.getInstance();
final int zab;
final List zac;
private final String zad;
private final String zae;
private final String zaf;
private final String zag;
private final Uri zah;
private String zai;
private final long zaj;
private final String zak;
private final String zal;
private final String zam;
private final Set zan = new HashSet();
GoogleSignInAccount(int i, String str, String str2, String str3, String str4, Uri uri, String str5, long j, String str6, List list, String str7, String str8) {
this.zab = i;
this.zad = str;
this.zae = str2;
this.zaf = str3;
this.zag = str4;
this.zah = uri;
this.zai = str5;
this.zaj = j;
this.zak = str6;
this.zac = list;
this.zal = str7;
this.zam = str8;
}
public static GoogleSignInAccount createDefault() {
return zae(new Account("<<default account>>", AccountType.GOOGLE), new HashSet());
}
public static GoogleSignInAccount fromAccount(Account account) {
return zae(account, new ArraySet());
}
public static GoogleSignInAccount fromAccountAndScopes(Account account, Scope scope, Scope... scopeArr) {
Preconditions.checkNotNull(account);
Preconditions.checkNotNull(scope);
HashSet hashSet = new HashSet();
hashSet.add(scope);
hashSet.addAll(Arrays.asList(scopeArr));
return zae(account, hashSet);
}
public static GoogleSignInAccount zaa(String str, String str2, String str3, String str4, String str5, String str6, Uri uri, Long l, String str7, Set set) {
return new GoogleSignInAccount(3, str, str2, str3, str4, uri, null, l.longValue(), Preconditions.checkNotEmpty(str7), new ArrayList((Collection) Preconditions.checkNotNull(set)), str5, str6);
}
public static GoogleSignInAccount zab(String str) throws JSONException {
if (TextUtils.isEmpty(str)) {
return null;
}
JSONObject jSONObject = new JSONObject(str);
String strOptString = jSONObject.optString("photoUrl");
Uri uri = !TextUtils.isEmpty(strOptString) ? Uri.parse(strOptString) : null;
long j = Long.parseLong(jSONObject.getString("expirationTime"));
HashSet hashSet = new HashSet();
JSONArray jSONArray = jSONObject.getJSONArray("grantedScopes");
int length = jSONArray.length();
for (int i = 0; i < length; i++) {
hashSet.add(new Scope(jSONArray.getString(i)));
}
GoogleSignInAccount googleSignInAccountZaa = zaa(jSONObject.optString("id"), jSONObject.has("tokenId") ? jSONObject.optString("tokenId") : null, jSONObject.has("email") ? jSONObject.optString("email") : null, jSONObject.has("displayName") ? jSONObject.optString("displayName") : null, jSONObject.has("givenName") ? jSONObject.optString("givenName") : null, jSONObject.has("familyName") ? jSONObject.optString("familyName") : null, uri, Long.valueOf(j), jSONObject.getString("obfuscatedIdentifier"), hashSet);
googleSignInAccountZaa.zai = jSONObject.has("serverAuthCode") ? jSONObject.optString("serverAuthCode") : null;
return googleSignInAccountZaa;
}
private static GoogleSignInAccount zae(Account account, Set set) {
return zaa(null, null, account.name, null, null, null, null, 0L, account.name, set);
}
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (!(obj instanceof GoogleSignInAccount)) {
return false;
}
GoogleSignInAccount googleSignInAccount = (GoogleSignInAccount) obj;
return googleSignInAccount.zak.equals(this.zak) && googleSignInAccount.getRequestedScopes().equals(getRequestedScopes());
}
public Account getAccount() {
String str = this.zaf;
if (str == null) {
return null;
}
return new Account(str, AccountType.GOOGLE);
}
public String getDisplayName() {
return this.zag;
}
public String getEmail() {
return this.zaf;
}
public String getFamilyName() {
return this.zam;
}
public String getGivenName() {
return this.zal;
}
public Set<Scope> getGrantedScopes() {
return new HashSet(this.zac);
}
public String getId() {
return this.zad;
}
public String getIdToken() {
return this.zae;
}
public Uri getPhotoUrl() {
return this.zah;
}
public Set<Scope> getRequestedScopes() {
HashSet hashSet = new HashSet(this.zac);
hashSet.addAll(this.zan);
return hashSet;
}
public String getServerAuthCode() {
return this.zai;
}
public int hashCode() {
return ((this.zak.hashCode() + 527) * 31) + getRequestedScopes().hashCode();
}
public boolean isExpired() {
return zaa.currentTimeMillis() / 1000 >= this.zaj + (-300);
}
public GoogleSignInAccount requestExtraScopes(Scope... scopeArr) {
if (scopeArr != null) {
Collections.addAll(this.zan, scopeArr);
}
return this;
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
int iBeginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeInt(parcel, 1, this.zab);
SafeParcelWriter.writeString(parcel, 2, getId(), false);
SafeParcelWriter.writeString(parcel, 3, getIdToken(), false);
SafeParcelWriter.writeString(parcel, 4, getEmail(), false);
SafeParcelWriter.writeString(parcel, 5, getDisplayName(), false);
SafeParcelWriter.writeParcelable(parcel, 6, getPhotoUrl(), i, false);
SafeParcelWriter.writeString(parcel, 7, getServerAuthCode(), false);
SafeParcelWriter.writeLong(parcel, 8, this.zaj);
SafeParcelWriter.writeString(parcel, 9, this.zak, false);
SafeParcelWriter.writeTypedList(parcel, 10, this.zac, false);
SafeParcelWriter.writeString(parcel, 11, getGivenName(), false);
SafeParcelWriter.writeString(parcel, 12, getFamilyName(), false);
SafeParcelWriter.finishObjectHeader(parcel, iBeginObjectHeader);
}
public final String zac() {
return this.zak;
}
public final String zad() {
JSONObject jSONObject = new JSONObject();
try {
if (getId() != null) {
jSONObject.put("id", getId());
}
if (getIdToken() != null) {
jSONObject.put("tokenId", getIdToken());
}
if (getEmail() != null) {
jSONObject.put("email", getEmail());
}
if (getDisplayName() != null) {
jSONObject.put("displayName", getDisplayName());
}
if (getGivenName() != null) {
jSONObject.put("givenName", getGivenName());
}
if (getFamilyName() != null) {
jSONObject.put("familyName", getFamilyName());
}
Uri photoUrl = getPhotoUrl();
if (photoUrl != null) {
jSONObject.put("photoUrl", photoUrl.toString());
}
if (getServerAuthCode() != null) {
jSONObject.put("serverAuthCode", getServerAuthCode());
}
jSONObject.put("expirationTime", this.zaj);
jSONObject.put("obfuscatedIdentifier", this.zak);
JSONArray jSONArray = new JSONArray();
List list = this.zac;
Scope[] scopeArr = (Scope[]) list.toArray(new Scope[list.size()]);
Arrays.sort(scopeArr, new Comparator() { // from class: com.google.android.gms.auth.api.signin.zaa
@Override // java.util.Comparator
public final int compare(Object obj, Object obj2) {
Parcelable.Creator<GoogleSignInAccount> creator = GoogleSignInAccount.CREATOR;
return ((Scope) obj).getScopeUri().compareTo(((Scope) obj2).getScopeUri());
}
});
for (Scope scope : scopeArr) {
jSONArray.put(scope.getScopeUri());
}
jSONObject.put("grantedScopes", jSONArray);
jSONObject.remove("serverAuthCode");
return jSONObject.toString();
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
}
@@ -0,0 +1,418 @@
package com.google.android.gms.auth.api.signin;
import android.accounts.Account;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import com.google.android.gms.auth.api.signin.internal.GoogleSignInOptionsExtensionParcelable;
import com.google.android.gms.auth.api.signin.internal.HashAccumulator;
import com.google.android.gms.common.Scopes;
import com.google.android.gms.common.api.Api;
import com.google.android.gms.common.api.Scope;
import com.google.android.gms.common.internal.AccountType;
import com.google.android.gms.common.internal.Preconditions;
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.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
/* JADX INFO: loaded from: classes2.dex */
@Deprecated
public class GoogleSignInOptions extends AbstractSafeParcelable implements Api.ApiOptions.Optional, ReflectedParcelable {
public static final Parcelable.Creator<GoogleSignInOptions> CREATOR;
public static final GoogleSignInOptions DEFAULT_GAMES_SIGN_IN;
public static final GoogleSignInOptions DEFAULT_SIGN_IN;
public static final Scope zaa = new Scope(Scopes.PROFILE);
public static final Scope zab = new Scope("email");
public static final Scope zac = new Scope(Scopes.OPEN_ID);
public static final Scope zad;
public static final Scope zae;
private static final Comparator zag;
final int zaf;
private final ArrayList zah;
private Account zai;
private boolean zaj;
private final boolean zak;
private final boolean zal;
private String zam;
private String zan;
private ArrayList zao;
private String zap;
private Map zaq;
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
public static final class Builder {
private Set zaa;
private boolean zab;
private boolean zac;
private boolean zad;
private String zae;
private Account zaf;
private String zag;
private Map zah;
private String zai;
public Builder() {
this.zaa = new HashSet();
this.zah = new HashMap();
}
private final String zaa(String str) {
Preconditions.checkNotEmpty(str);
String str2 = this.zae;
boolean z = true;
if (str2 != null && !str2.equals(str)) {
z = false;
}
Preconditions.checkArgument(z, "two different server client ids provided");
return str;
}
public Builder addExtension(GoogleSignInOptionsExtension googleSignInOptionsExtension) {
if (this.zah.containsKey(Integer.valueOf(googleSignInOptionsExtension.getExtensionType()))) {
throw new IllegalStateException("Only one extension per type may be added");
}
List<Scope> impliedScopes = googleSignInOptionsExtension.getImpliedScopes();
if (impliedScopes != null) {
this.zaa.addAll(impliedScopes);
}
this.zah.put(Integer.valueOf(googleSignInOptionsExtension.getExtensionType()), new GoogleSignInOptionsExtensionParcelable(googleSignInOptionsExtension));
return this;
}
public GoogleSignInOptions build() {
if (this.zaa.contains(GoogleSignInOptions.zae) && this.zaa.contains(GoogleSignInOptions.zad)) {
this.zaa.remove(GoogleSignInOptions.zad);
}
if (this.zad && (this.zaf == null || !this.zaa.isEmpty())) {
requestId();
}
return new GoogleSignInOptions(new ArrayList(this.zaa), this.zaf, this.zad, this.zab, this.zac, this.zae, this.zag, this.zah, this.zai);
}
public Builder requestEmail() {
this.zaa.add(GoogleSignInOptions.zab);
return this;
}
public Builder requestId() {
this.zaa.add(GoogleSignInOptions.zac);
return this;
}
public Builder requestIdToken(String str) {
this.zad = true;
zaa(str);
this.zae = str;
return this;
}
public Builder requestProfile() {
this.zaa.add(GoogleSignInOptions.zaa);
return this;
}
public Builder requestScopes(Scope scope, Scope... scopeArr) {
this.zaa.add(scope);
this.zaa.addAll(Arrays.asList(scopeArr));
return this;
}
public Builder requestServerAuthCode(String str) {
requestServerAuthCode(str, false);
return this;
}
public Builder setAccountName(String str) {
this.zaf = new Account(Preconditions.checkNotEmpty(str), AccountType.GOOGLE);
return this;
}
public Builder setHostedDomain(String str) {
this.zag = Preconditions.checkNotEmpty(str);
return this;
}
public Builder setLogSessionId(String str) {
this.zai = str;
return this;
}
public Builder requestServerAuthCode(String str, boolean z) {
this.zab = true;
zaa(str);
this.zae = str;
this.zac = z;
return this;
}
public Builder(GoogleSignInOptions googleSignInOptions) {
this.zaa = new HashSet();
this.zah = new HashMap();
Preconditions.checkNotNull(googleSignInOptions);
this.zaa = new HashSet(googleSignInOptions.zah);
this.zab = googleSignInOptions.zak;
this.zac = googleSignInOptions.zal;
this.zad = googleSignInOptions.zaj;
this.zae = googleSignInOptions.zam;
this.zaf = googleSignInOptions.zai;
this.zag = googleSignInOptions.zan;
this.zah = GoogleSignInOptions.zam(googleSignInOptions.zao);
this.zai = googleSignInOptions.zap;
}
}
static {
Scope scope = new Scope(Scopes.GAMES_LITE);
zad = scope;
zae = new Scope(Scopes.GAMES);
Builder builder = new Builder();
builder.requestId();
builder.requestProfile();
DEFAULT_SIGN_IN = builder.build();
Builder builder2 = new Builder();
builder2.requestScopes(scope, new Scope[0]);
DEFAULT_GAMES_SIGN_IN = builder2.build();
CREATOR = new zae();
zag = new zac();
}
GoogleSignInOptions(int i, ArrayList arrayList, Account account, boolean z, boolean z2, boolean z3, String str, String str2, ArrayList arrayList2, String str3) {
this(i, arrayList, account, z, z2, z3, str, str2, zam(arrayList2), str3);
}
public static GoogleSignInOptions zab(String str) throws JSONException {
if (TextUtils.isEmpty(str)) {
return null;
}
JSONObject jSONObject = new JSONObject(str);
HashSet hashSet = new HashSet();
JSONArray jSONArray = jSONObject.getJSONArray("scopes");
int length = jSONArray.length();
for (int i = 0; i < length; i++) {
hashSet.add(new Scope(jSONArray.getString(i)));
}
String strOptString = jSONObject.has("accountName") ? jSONObject.optString("accountName") : null;
return new GoogleSignInOptions(3, new ArrayList(hashSet), !TextUtils.isEmpty(strOptString) ? new Account(strOptString, AccountType.GOOGLE) : null, jSONObject.getBoolean("idTokenRequested"), jSONObject.getBoolean("serverAuthRequested"), jSONObject.getBoolean("forceCodeForRefreshToken"), jSONObject.has("serverClientId") ? jSONObject.optString("serverClientId") : null, jSONObject.has("hostedDomain") ? jSONObject.optString("hostedDomain") : null, new HashMap(), (String) null);
}
/* JADX INFO: Access modifiers changed from: private */
public static Map zam(List list) {
HashMap map = new HashMap();
if (list != null) {
Iterator it = list.iterator();
while (it.hasNext()) {
GoogleSignInOptionsExtensionParcelable googleSignInOptionsExtensionParcelable = (GoogleSignInOptionsExtensionParcelable) it.next();
map.put(Integer.valueOf(googleSignInOptionsExtensionParcelable.getType()), googleSignInOptionsExtensionParcelable);
}
}
return map;
}
/* JADX WARN: Removed duplicated region for block: B:24:0x0052 A[Catch: ClassCastException -> 0x0090, TryCatch #0 {ClassCastException -> 0x0090, blocks: (B:5:0x0004, B:7:0x000e, B:10:0x0018, B:12:0x0028, B:15:0x0035, B:17:0x0039, B:22:0x004a, B:24:0x0052, B:30:0x006a, B:32:0x0072, B:34:0x007a, B:36:0x0082, B:27:0x005d, B:20:0x0040), top: B:42:0x0004 }] */
/* JADX WARN: Removed duplicated region for block: B:27:0x005d A[Catch: ClassCastException -> 0x0090, TryCatch #0 {ClassCastException -> 0x0090, blocks: (B:5:0x0004, B:7:0x000e, B:10:0x0018, B:12:0x0028, B:15:0x0035, B:17:0x0039, B:22:0x004a, B:24:0x0052, B:30:0x006a, B:32:0x0072, B:34:0x007a, B:36:0x0082, B:27:0x005d, B:20:0x0040), top: B:42:0x0004 }] */
/* JADX WARN: Removed duplicated region for block: B:38:0x008e A[RETURN] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public boolean equals(java.lang.Object r4) {
/*
r3 = this;
r0 = 0
if (r4 != 0) goto L4
return r0
L4:
com.google.android.gms.auth.api.signin.GoogleSignInOptions r4 = (com.google.android.gms.auth.api.signin.GoogleSignInOptions) r4 // Catch: java.lang.ClassCastException -> L90
java.util.ArrayList r1 = r3.zao // Catch: java.lang.ClassCastException -> L90
boolean r1 = r1.isEmpty() // Catch: java.lang.ClassCastException -> L90
if (r1 == 0) goto L90
java.util.ArrayList r1 = r4.zao // Catch: java.lang.ClassCastException -> L90
boolean r1 = r1.isEmpty() // Catch: java.lang.ClassCastException -> L90
if (r1 != 0) goto L18
goto L90
L18:
java.util.ArrayList r1 = r3.zah // Catch: java.lang.ClassCastException -> L90
int r1 = r1.size() // Catch: java.lang.ClassCastException -> L90
java.util.ArrayList r2 = r4.getScopes() // Catch: java.lang.ClassCastException -> L90
int r2 = r2.size() // Catch: java.lang.ClassCastException -> L90
if (r1 != r2) goto L90
java.util.ArrayList r1 = r3.zah // Catch: java.lang.ClassCastException -> L90
java.util.ArrayList r2 = r4.getScopes() // Catch: java.lang.ClassCastException -> L90
boolean r1 = r1.containsAll(r2) // Catch: java.lang.ClassCastException -> L90
if (r1 != 0) goto L35
goto L90
L35:
android.accounts.Account r1 = r3.zai // Catch: java.lang.ClassCastException -> L90
if (r1 != 0) goto L40
android.accounts.Account r1 = r4.getAccount() // Catch: java.lang.ClassCastException -> L90
if (r1 != 0) goto L90
goto L4a
L40:
android.accounts.Account r2 = r4.getAccount() // Catch: java.lang.ClassCastException -> L90
boolean r1 = r1.equals(r2) // Catch: java.lang.ClassCastException -> L90
if (r1 == 0) goto L90
L4a:
java.lang.String r1 = r3.zam // Catch: java.lang.ClassCastException -> L90
boolean r1 = android.text.TextUtils.isEmpty(r1) // Catch: java.lang.ClassCastException -> L90
if (r1 == 0) goto L5d
java.lang.String r1 = r4.getServerClientId() // Catch: java.lang.ClassCastException -> L90
boolean r1 = android.text.TextUtils.isEmpty(r1) // Catch: java.lang.ClassCastException -> L90
if (r1 == 0) goto L90
goto L6a
L5d:
java.lang.String r1 = r3.zam // Catch: java.lang.ClassCastException -> L90
java.lang.String r2 = r4.getServerClientId() // Catch: java.lang.ClassCastException -> L90
boolean r1 = r1.equals(r2) // Catch: java.lang.ClassCastException -> L90
if (r1 != 0) goto L6a
goto L90
L6a:
boolean r1 = r3.zal // Catch: java.lang.ClassCastException -> L90
boolean r2 = r4.isForceCodeForRefreshToken() // Catch: java.lang.ClassCastException -> L90
if (r1 != r2) goto L90
boolean r1 = r3.zaj // Catch: java.lang.ClassCastException -> L90
boolean r2 = r4.isIdTokenRequested() // Catch: java.lang.ClassCastException -> L90
if (r1 != r2) goto L90
boolean r1 = r3.zak // Catch: java.lang.ClassCastException -> L90
boolean r2 = r4.isServerAuthCodeRequested() // Catch: java.lang.ClassCastException -> L90
if (r1 != r2) goto L90
java.lang.String r1 = r3.zap // Catch: java.lang.ClassCastException -> L90
java.lang.String r4 = r4.getLogSessionId() // Catch: java.lang.ClassCastException -> L90
boolean r4 = android.text.TextUtils.equals(r1, r4) // Catch: java.lang.ClassCastException -> L90
if (r4 == 0) goto L90
r4 = 1
return r4
L90:
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.auth.api.signin.GoogleSignInOptions.equals(java.lang.Object):boolean");
}
public Account getAccount() {
return this.zai;
}
public ArrayList<GoogleSignInOptionsExtensionParcelable> getExtensions() {
return this.zao;
}
public String getLogSessionId() {
return this.zap;
}
public Scope[] getScopeArray() {
return (Scope[]) this.zah.toArray(new Scope[this.zah.size()]);
}
public ArrayList<Scope> getScopes() {
return new ArrayList<>(this.zah);
}
public String getServerClientId() {
return this.zam;
}
public int hashCode() {
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = this.zah;
int size = arrayList2.size();
for (int i = 0; i < size; i++) {
arrayList.add(((Scope) arrayList2.get(i)).getScopeUri());
}
Collections.sort(arrayList);
HashAccumulator hashAccumulator = new HashAccumulator();
hashAccumulator.addObject(arrayList);
hashAccumulator.addObject(this.zai);
hashAccumulator.addObject(this.zam);
hashAccumulator.zaa(this.zal);
hashAccumulator.zaa(this.zaj);
hashAccumulator.zaa(this.zak);
hashAccumulator.addObject(this.zap);
return hashAccumulator.hash();
}
public boolean isForceCodeForRefreshToken() {
return this.zal;
}
public boolean isIdTokenRequested() {
return this.zaj;
}
public boolean isServerAuthCodeRequested() {
return this.zak;
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
int i2 = this.zaf;
int iBeginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeInt(parcel, 1, i2);
SafeParcelWriter.writeTypedList(parcel, 2, getScopes(), false);
SafeParcelWriter.writeParcelable(parcel, 3, getAccount(), i, false);
SafeParcelWriter.writeBoolean(parcel, 4, isIdTokenRequested());
SafeParcelWriter.writeBoolean(parcel, 5, isServerAuthCodeRequested());
SafeParcelWriter.writeBoolean(parcel, 6, isForceCodeForRefreshToken());
SafeParcelWriter.writeString(parcel, 7, getServerClientId(), false);
SafeParcelWriter.writeString(parcel, 8, this.zan, false);
SafeParcelWriter.writeTypedList(parcel, 9, getExtensions(), false);
SafeParcelWriter.writeString(parcel, 10, getLogSessionId(), false);
SafeParcelWriter.finishObjectHeader(parcel, iBeginObjectHeader);
}
public final String zaf() {
JSONObject jSONObject = new JSONObject();
try {
JSONArray jSONArray = new JSONArray();
Collections.sort(this.zah, zag);
Iterator it = this.zah.iterator();
while (it.hasNext()) {
jSONArray.put(((Scope) it.next()).getScopeUri());
}
jSONObject.put("scopes", jSONArray);
Account account = this.zai;
if (account != null) {
jSONObject.put("accountName", account.name);
}
jSONObject.put("idTokenRequested", this.zaj);
jSONObject.put("forceCodeForRefreshToken", this.zal);
jSONObject.put("serverAuthRequested", this.zak);
if (!TextUtils.isEmpty(this.zam)) {
jSONObject.put("serverClientId", this.zam);
}
if (!TextUtils.isEmpty(this.zan)) {
jSONObject.put("hostedDomain", this.zan);
}
return jSONObject.toString();
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
private GoogleSignInOptions(int i, ArrayList arrayList, Account account, boolean z, boolean z2, boolean z3, String str, String str2, Map map, String str3) {
this.zaf = i;
this.zah = arrayList;
this.zai = account;
this.zaj = z;
this.zak = z2;
this.zal = z3;
this.zam = str;
this.zan = str2;
this.zao = new ArrayList(map.values());
this.zaq = map;
this.zap = str3;
}
}
@@ -0,0 +1,19 @@
package com.google.android.gms.auth.api.signin;
import android.os.Bundle;
import com.google.android.gms.common.api.Scope;
import java.util.List;
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
/* JADX INFO: loaded from: classes2.dex */
@Deprecated
public interface GoogleSignInOptionsExtension {
public static final int FITNESS = 3;
public static final int GAMES = 1;
int getExtensionType();
List<Scope> getImpliedScopes();
Bundle toBundle();
}
@@ -0,0 +1,40 @@
package com.google.android.gms.auth.api.signin.internal;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.auth.api.signin.GoogleSignInOptionsExtension;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
/* JADX INFO: loaded from: classes2.dex */
public class GoogleSignInOptionsExtensionParcelable extends AbstractSafeParcelable {
public static final Parcelable.Creator<GoogleSignInOptionsExtensionParcelable> CREATOR = new zaa();
final int zaa;
private int zab;
private Bundle zac;
GoogleSignInOptionsExtensionParcelable(int i, int i2, Bundle bundle) {
this.zaa = i;
this.zab = i2;
this.zac = bundle;
}
public int getType() {
return this.zab;
}
@Override // android.os.Parcelable
public final void writeToParcel(Parcel parcel, int i) {
int iBeginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeInt(parcel, 1, this.zaa);
SafeParcelWriter.writeInt(parcel, 2, getType());
SafeParcelWriter.writeBundle(parcel, 3, this.zac, false);
SafeParcelWriter.finishObjectHeader(parcel, iBeginObjectHeader);
}
public GoogleSignInOptionsExtensionParcelable(GoogleSignInOptionsExtension googleSignInOptionsExtension) {
this(1, googleSignInOptionsExtension.getExtensionType(), googleSignInOptionsExtension.toBundle());
}
}
@@ -0,0 +1,21 @@
package com.google.android.gms.auth.api.signin.internal;
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
/* JADX INFO: loaded from: classes2.dex */
public class HashAccumulator {
private int zaa = 1;
public HashAccumulator addObject(Object obj) {
this.zaa = (this.zaa * 31) + (obj == null ? 0 : obj.hashCode());
return this;
}
public int hash() {
return this.zaa;
}
public final HashAccumulator zaa(boolean z) {
this.zaa = (this.zaa * 31) + (z ? 1 : 0);
return this;
}
}
@@ -0,0 +1,132 @@
package com.google.android.gms.auth.api.signin.internal;
import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
import com.google.android.gms.common.internal.Preconditions;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import org.json.JSONException;
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
/* JADX INFO: loaded from: classes2.dex */
public class Storage {
private static final Lock zaa = new ReentrantLock();
private static Storage zab;
private final Lock zac = new ReentrantLock();
private final SharedPreferences zad;
Storage(Context context) {
this.zad = context.getSharedPreferences("com.google.android.gms.signin", 0);
}
public static Storage getInstance(Context context) {
Preconditions.checkNotNull(context);
Lock lock = zaa;
lock.lock();
try {
if (zab == null) {
zab = new Storage(context.getApplicationContext());
}
Storage storage = zab;
lock.unlock();
return storage;
} catch (Throwable th) {
zaa.unlock();
throw th;
}
}
private static final String zae(String str, String str2) {
return str + ":" + str2;
}
public void clear() {
this.zac.lock();
try {
this.zad.edit().clear().apply();
} finally {
this.zac.unlock();
}
}
public GoogleSignInAccount getSavedDefaultGoogleSignInAccount() {
String strZaa;
String strZaa2 = zaa("defaultGoogleSignInAccount");
if (TextUtils.isEmpty(strZaa2) || (strZaa = zaa(zae("googleSignInAccount", strZaa2))) == null) {
return null;
}
try {
return GoogleSignInAccount.zab(strZaa);
} catch (JSONException unused) {
return null;
}
}
public GoogleSignInOptions getSavedDefaultGoogleSignInOptions() {
String strZaa;
String strZaa2 = zaa("defaultGoogleSignInAccount");
if (TextUtils.isEmpty(strZaa2) || (strZaa = zaa(zae("googleSignInOptions", strZaa2))) == null) {
return null;
}
try {
return GoogleSignInOptions.zab(strZaa);
} catch (JSONException unused) {
return null;
}
}
public String getSavedRefreshToken() {
return zaa("refreshToken");
}
public void saveDefaultGoogleSignInAccount(GoogleSignInAccount googleSignInAccount, GoogleSignInOptions googleSignInOptions) {
Preconditions.checkNotNull(googleSignInAccount);
Preconditions.checkNotNull(googleSignInOptions);
zad("defaultGoogleSignInAccount", googleSignInAccount.zac());
Preconditions.checkNotNull(googleSignInAccount);
Preconditions.checkNotNull(googleSignInOptions);
String strZac = googleSignInAccount.zac();
zad(zae("googleSignInAccount", strZac), googleSignInAccount.zad());
zad(zae("googleSignInOptions", strZac), googleSignInOptions.zaf());
}
protected final String zaa(String str) {
this.zac.lock();
try {
return this.zad.getString(str, null);
} finally {
this.zac.unlock();
}
}
protected final void zab(String str) {
this.zac.lock();
try {
this.zad.edit().remove(str).apply();
} finally {
this.zac.unlock();
}
}
public final void zac() {
String strZaa = zaa("defaultGoogleSignInAccount");
zab("defaultGoogleSignInAccount");
if (TextUtils.isEmpty(strZaa)) {
return;
}
zab(zae("googleSignInAccount", strZaa));
zab(zae("googleSignInOptions", strZaa));
}
protected final void zad(String str, String str2) {
this.zac.lock();
try {
this.zad.edit().putString(str, str2).apply();
} finally {
this.zac.unlock();
}
}
}
@@ -0,0 +1,38 @@
package com.google.android.gms.auth.api.signin.internal;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
/* JADX INFO: loaded from: classes2.dex */
public final class zaa implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
int iValidateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
Bundle bundleCreateBundle = null;
int i = 0;
int i2 = 0;
while (parcel.dataPosition() < iValidateObjectHeader) {
int header = SafeParcelReader.readHeader(parcel);
int fieldId = SafeParcelReader.getFieldId(header);
if (fieldId == 1) {
i = SafeParcelReader.readInt(parcel, header);
} else if (fieldId == 2) {
i2 = SafeParcelReader.readInt(parcel, header);
} else if (fieldId != 3) {
SafeParcelReader.skipUnknownField(parcel, header);
} else {
bundleCreateBundle = SafeParcelReader.createBundle(parcel, header);
}
}
SafeParcelReader.ensureAtEnd(parcel, iValidateObjectHeader);
return new GoogleSignInOptionsExtensionParcelable(i, i2, bundleCreateBundle);
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new GoogleSignInOptionsExtensionParcelable[i];
}
}
@@ -0,0 +1,80 @@
package com.google.android.gms.auth.api.signin;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.api.Scope;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
import java.util.ArrayList;
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
/* JADX INFO: loaded from: classes2.dex */
public final class zab implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
int iValidateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
String strCreateString = null;
String strCreateString2 = null;
String strCreateString3 = null;
String strCreateString4 = null;
Uri uri = null;
String strCreateString5 = null;
String strCreateString6 = null;
ArrayList arrayListCreateTypedList = null;
String strCreateString7 = null;
String strCreateString8 = null;
long j = 0;
int i = 0;
while (parcel.dataPosition() < iValidateObjectHeader) {
int header = SafeParcelReader.readHeader(parcel);
switch (SafeParcelReader.getFieldId(header)) {
case 1:
i = SafeParcelReader.readInt(parcel, header);
break;
case 2:
strCreateString = SafeParcelReader.createString(parcel, header);
break;
case 3:
strCreateString2 = SafeParcelReader.createString(parcel, header);
break;
case 4:
strCreateString3 = SafeParcelReader.createString(parcel, header);
break;
case 5:
strCreateString4 = SafeParcelReader.createString(parcel, header);
break;
case 6:
uri = (Uri) SafeParcelReader.createParcelable(parcel, header, Uri.CREATOR);
break;
case 7:
strCreateString5 = SafeParcelReader.createString(parcel, header);
break;
case 8:
j = SafeParcelReader.readLong(parcel, header);
break;
case 9:
strCreateString6 = SafeParcelReader.createString(parcel, header);
break;
case 10:
arrayListCreateTypedList = SafeParcelReader.createTypedList(parcel, header, Scope.CREATOR);
break;
case 11:
strCreateString7 = SafeParcelReader.createString(parcel, header);
break;
case 12:
strCreateString8 = SafeParcelReader.createString(parcel, header);
break;
default:
SafeParcelReader.skipUnknownField(parcel, header);
break;
}
}
SafeParcelReader.ensureAtEnd(parcel, iValidateObjectHeader);
return new GoogleSignInAccount(i, strCreateString, strCreateString2, strCreateString3, strCreateString4, uri, strCreateString5, j, strCreateString6, arrayListCreateTypedList, strCreateString7, strCreateString8);
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new GoogleSignInAccount[i];
}
}
@@ -0,0 +1,16 @@
package com.google.android.gms.auth.api.signin;
import com.google.android.gms.common.api.Scope;
import java.util.Comparator;
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
/* JADX INFO: loaded from: classes2.dex */
final class zac implements Comparator {
zac() {
}
@Override // java.util.Comparator
public final /* bridge */ /* synthetic */ int compare(Object obj, Object obj2) {
return ((Scope) obj).getScopeUri().compareTo(((Scope) obj2).getScopeUri());
}
}
@@ -0,0 +1,73 @@
package com.google.android.gms.auth.api.signin;
import android.accounts.Account;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.auth.api.signin.internal.GoogleSignInOptionsExtensionParcelable;
import com.google.android.gms.common.api.Scope;
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
import java.util.ArrayList;
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
/* JADX INFO: loaded from: classes2.dex */
public final class zae implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
int iValidateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
ArrayList arrayListCreateTypedList = null;
Account account = null;
String strCreateString = null;
String strCreateString2 = null;
ArrayList arrayListCreateTypedList2 = null;
String strCreateString3 = null;
int i = 0;
boolean z = false;
boolean z2 = false;
boolean z3 = false;
while (parcel.dataPosition() < iValidateObjectHeader) {
int header = SafeParcelReader.readHeader(parcel);
switch (SafeParcelReader.getFieldId(header)) {
case 1:
i = SafeParcelReader.readInt(parcel, header);
break;
case 2:
arrayListCreateTypedList = SafeParcelReader.createTypedList(parcel, header, Scope.CREATOR);
break;
case 3:
account = (Account) SafeParcelReader.createParcelable(parcel, header, Account.CREATOR);
break;
case 4:
z = SafeParcelReader.readBoolean(parcel, header);
break;
case 5:
z2 = SafeParcelReader.readBoolean(parcel, header);
break;
case 6:
z3 = SafeParcelReader.readBoolean(parcel, header);
break;
case 7:
strCreateString = SafeParcelReader.createString(parcel, header);
break;
case 8:
strCreateString2 = SafeParcelReader.createString(parcel, header);
break;
case 9:
arrayListCreateTypedList2 = SafeParcelReader.createTypedList(parcel, header, GoogleSignInOptionsExtensionParcelable.CREATOR);
break;
case 10:
strCreateString3 = SafeParcelReader.createString(parcel, header);
break;
default:
SafeParcelReader.skipUnknownField(parcel, header);
break;
}
}
SafeParcelReader.ensureAtEnd(parcel, iValidateObjectHeader);
return new GoogleSignInOptions(i, arrayListCreateTypedList, account, z, z2, z3, strCreateString, strCreateString2, arrayListCreateTypedList2, strCreateString3);
}
@Override // android.os.Parcelable.Creator
public final /* synthetic */ Object[] newArray(int i) {
return new GoogleSignInOptions[i];
}
}