what-the-bank/sources/com/google/android/gms/internal/gtm/zzmg.java

72 lines
3.1 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.gtm;
import com.google.android.gms.common.internal.ImagesContract;
import com.google.android.gms.common.internal.Preconditions;
import io.grpc.internal.GrpcUtil;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/* loaded from: classes.dex */
public final class zzmg extends zzhb {
private static final Set<String> zzarz = new HashSet(Arrays.asList("GET", "HEAD", GrpcUtil.HTTP_METHOD, "PUT"));
private final zzei zzary;
public zzmg(zzei zzeiVar) {
this.zzary = zzeiVar;
}
@Override // com.google.android.gms.internal.gtm.zzhb
protected final zzoa<?> zza(zzfl zzflVar, zzoa<?>... zzoaVarArr) {
HashMap hashMap;
boolean z = true;
Preconditions.checkArgument(true);
Preconditions.checkArgument(zzoaVarArr.length == 1);
Preconditions.checkArgument(zzoaVarArr[0] instanceof zzok);
zzoa<?> zzco = zzoaVarArr[0].zzco(ImagesContract.URL);
Preconditions.checkArgument(zzco instanceof zzom);
String value = ((zzom) zzco).value();
zzoa<?> zzco2 = zzoaVarArr[0].zzco("method");
if (zzco2 == zzog.zzaum) {
zzco2 = new zzom("GET");
}
Preconditions.checkArgument(zzco2 instanceof zzom);
String value2 = ((zzom) zzco2).value();
Preconditions.checkArgument(zzarz.contains(value2));
zzoa<?> zzco3 = zzoaVarArr[0].zzco("uniqueId");
Preconditions.checkArgument(zzco3 == zzog.zzaum || zzco3 == zzog.zzaul || (zzco3 instanceof zzom));
String value3 = (zzco3 == zzog.zzaum || zzco3 == zzog.zzaul) ? null : ((zzom) zzco3).value();
zzoa<?> zzco4 = zzoaVarArr[0].zzco("headers");
Preconditions.checkArgument(zzco4 == zzog.zzaum || (zzco4 instanceof zzok));
HashMap hashMap2 = new HashMap();
if (zzco4 == zzog.zzaum) {
hashMap = null;
} else {
for (Map.Entry<String, zzoa<?>> entry : ((zzok) zzco4).value().entrySet()) {
String key = entry.getKey();
zzoa<?> value4 = entry.getValue();
if (!(value4 instanceof zzom)) {
zzev.zzac(String.format("Ignore the non-string value of header key %s.", key));
} else {
hashMap2.put(key, ((zzom) value4).value());
}
}
hashMap = hashMap2;
}
zzoa<?> zzco5 = zzoaVarArr[0].zzco("body");
if (zzco5 != zzog.zzaum && !(zzco5 instanceof zzom)) {
z = false;
}
Preconditions.checkArgument(z);
String value5 = zzco5 != zzog.zzaum ? ((zzom) zzco5).value() : null;
if ((value2.equals("GET") || value2.equals("HEAD")) && value5 != null) {
zzev.zzac(String.format("Body of %s hit will be ignored: %s.", value2, value5));
}
this.zzary.zza(value, value2, value3, hashMap, value5);
zzev.zzab(String.format("QueueRequest:\n url = %s,\n method = %s,\n uniqueId = %s,\n headers = %s,\n body = %s", value, value2, value3, hashMap, value5));
return zzog.zzaum;
}
}