Initial commit
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
package com.google.android.gms.common.server.converter;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.SparseArray;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
import com.google.android.gms.common.server.response.FastJsonResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class StringToIntConverter extends AbstractSafeParcelable implements FastJsonResponse.FieldConverter<String, Integer> {
|
||||
public static final Parcelable.Creator<StringToIntConverter> CREATOR = new zac();
|
||||
private final int zale;
|
||||
private final HashMap<String, Integer> zapl;
|
||||
private final SparseArray<String> zapm;
|
||||
private final ArrayList<zaa> zapn;
|
||||
|
||||
StringToIntConverter(int i, ArrayList<zaa> arrayList) {
|
||||
this.zale = i;
|
||||
this.zapl = new HashMap<>();
|
||||
this.zapm = new SparseArray<>();
|
||||
this.zapn = null;
|
||||
int size = arrayList.size();
|
||||
int i2 = 0;
|
||||
while (i2 < size) {
|
||||
zaa zaaVar = arrayList.get(i2);
|
||||
i2++;
|
||||
zaa zaaVar2 = zaaVar;
|
||||
add(zaaVar2.zapo, zaaVar2.zapp);
|
||||
}
|
||||
}
|
||||
|
||||
public final StringToIntConverter add(String str, int i) {
|
||||
this.zapl.put(str, Integer.valueOf(i));
|
||||
this.zapm.put(i, str);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.server.response.FastJsonResponse.FieldConverter
|
||||
public final /* synthetic */ Integer convert(String str) {
|
||||
Integer num = this.zapl.get(str);
|
||||
return num == null ? this.zapl.get("gms_unknown") : num;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.server.response.FastJsonResponse.FieldConverter
|
||||
public final /* synthetic */ String convertBack(Integer num) {
|
||||
String str = this.zapm.get(num.intValue());
|
||||
return (str == null && this.zapl.containsKey("gms_unknown")) ? "gms_unknown" : str;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, this.zale);
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (String str : this.zapl.keySet()) {
|
||||
arrayList.add(new zaa(str, this.zapl.get(str).intValue()));
|
||||
}
|
||||
SafeParcelWriter.c(parcel, 2, arrayList, false);
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.server.response.FastJsonResponse.FieldConverter
|
||||
public final int zacj() {
|
||||
return 7;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.server.response.FastJsonResponse.FieldConverter
|
||||
public final int zack() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static final class zaa extends AbstractSafeParcelable {
|
||||
public static final Parcelable.Creator<zaa> CREATOR = new zad();
|
||||
private final int versionCode;
|
||||
final String zapo;
|
||||
final int zapp;
|
||||
|
||||
zaa(int i, String str, int i2) {
|
||||
this.versionCode = i;
|
||||
this.zapo = str;
|
||||
this.zapp = i2;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, this.versionCode);
|
||||
SafeParcelWriter.a(parcel, 2, this.zapo, false);
|
||||
SafeParcelWriter.a(parcel, 3, this.zapp);
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
}
|
||||
|
||||
zaa(String str, int i) {
|
||||
this.versionCode = 1;
|
||||
this.zapo = str;
|
||||
this.zapp = i;
|
||||
}
|
||||
}
|
||||
|
||||
public StringToIntConverter() {
|
||||
this.zale = 1;
|
||||
this.zapl = new HashMap<>();
|
||||
this.zapm = new SparseArray<>();
|
||||
this.zapn = null;
|
||||
}
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
package com.google.android.gms.common.server.converter;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
import com.google.android.gms.common.server.response.FastJsonResponse;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zaa extends AbstractSafeParcelable {
|
||||
public static final Parcelable.Creator<zaa> CREATOR = new zab();
|
||||
private final int zale;
|
||||
private final StringToIntConverter zapk;
|
||||
|
||||
zaa(int i, StringToIntConverter stringToIntConverter) {
|
||||
this.zale = i;
|
||||
this.zapk = stringToIntConverter;
|
||||
}
|
||||
|
||||
public static zaa zaa(FastJsonResponse.FieldConverter<?, ?> fieldConverter) {
|
||||
if (fieldConverter instanceof StringToIntConverter) {
|
||||
return new zaa((StringToIntConverter) fieldConverter);
|
||||
}
|
||||
throw new IllegalArgumentException("Unsupported safe parcelable field converter class.");
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, this.zale);
|
||||
SafeParcelWriter.a(parcel, 2, (Parcelable) this.zapk, i, false);
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
}
|
||||
|
||||
public final FastJsonResponse.FieldConverter<?, ?> zaci() {
|
||||
StringToIntConverter stringToIntConverter = this.zapk;
|
||||
if (stringToIntConverter != null) {
|
||||
return stringToIntConverter;
|
||||
}
|
||||
throw new IllegalStateException("There was no converter wrapped in this ConverterWrapper.");
|
||||
}
|
||||
|
||||
private zaa(StringToIntConverter stringToIntConverter) {
|
||||
this.zale = 1;
|
||||
this.zapk = stringToIntConverter;
|
||||
}
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
package com.google.android.gms.common.server.converter;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zab implements Parcelable.Creator<zaa> {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ zaa createFromParcel(Parcel parcel) {
|
||||
int b = SafeParcelReader.b(parcel);
|
||||
int i = 0;
|
||||
StringToIntConverter stringToIntConverter = null;
|
||||
while (parcel.dataPosition() < b) {
|
||||
int a = SafeParcelReader.a(parcel);
|
||||
int a2 = SafeParcelReader.a(a);
|
||||
if (a2 == 1) {
|
||||
i = SafeParcelReader.x(parcel, a);
|
||||
} else if (a2 != 2) {
|
||||
SafeParcelReader.C(parcel, a);
|
||||
} else {
|
||||
stringToIntConverter = (StringToIntConverter) SafeParcelReader.a(parcel, a, StringToIntConverter.CREATOR);
|
||||
}
|
||||
}
|
||||
SafeParcelReader.q(parcel, b);
|
||||
return new zaa(i, stringToIntConverter);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ zaa[] newArray(int i) {
|
||||
return new zaa[i];
|
||||
}
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
package com.google.android.gms.common.server.converter;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
import com.google.android.gms.common.server.converter.StringToIntConverter;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zac implements Parcelable.Creator<StringToIntConverter> {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ StringToIntConverter createFromParcel(Parcel parcel) {
|
||||
int b = SafeParcelReader.b(parcel);
|
||||
int i = 0;
|
||||
ArrayList arrayList = null;
|
||||
while (parcel.dataPosition() < b) {
|
||||
int a = SafeParcelReader.a(parcel);
|
||||
int a2 = SafeParcelReader.a(a);
|
||||
if (a2 == 1) {
|
||||
i = SafeParcelReader.x(parcel, a);
|
||||
} else if (a2 != 2) {
|
||||
SafeParcelReader.C(parcel, a);
|
||||
} else {
|
||||
arrayList = SafeParcelReader.c(parcel, a, StringToIntConverter.zaa.CREATOR);
|
||||
}
|
||||
}
|
||||
SafeParcelReader.q(parcel, b);
|
||||
return new StringToIntConverter(i, arrayList);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ StringToIntConverter[] newArray(int i) {
|
||||
return new StringToIntConverter[i];
|
||||
}
|
||||
}
|
@@ -0,0 +1,37 @@
|
||||
package com.google.android.gms.common.server.converter;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
import com.google.android.gms.common.server.converter.StringToIntConverter;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zad implements Parcelable.Creator<StringToIntConverter.zaa> {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ StringToIntConverter.zaa createFromParcel(Parcel parcel) {
|
||||
int b = SafeParcelReader.b(parcel);
|
||||
int i = 0;
|
||||
String str = null;
|
||||
int i2 = 0;
|
||||
while (parcel.dataPosition() < b) {
|
||||
int a = SafeParcelReader.a(parcel);
|
||||
int a2 = SafeParcelReader.a(a);
|
||||
if (a2 == 1) {
|
||||
i = SafeParcelReader.x(parcel, a);
|
||||
} else if (a2 == 2) {
|
||||
str = SafeParcelReader.n(parcel, a);
|
||||
} else if (a2 != 3) {
|
||||
SafeParcelReader.C(parcel, a);
|
||||
} else {
|
||||
i2 = SafeParcelReader.x(parcel, a);
|
||||
}
|
||||
}
|
||||
SafeParcelReader.q(parcel, b);
|
||||
return new StringToIntConverter.zaa(i, str, i2);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ StringToIntConverter.zaa[] newArray(int i) {
|
||||
return new StringToIntConverter.zaa[i];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user