what-the-bank/sources/o/C15570guK.java

134 lines
4.3 KiB
Java

package o;
import android.text.TextUtils;
import com.airbnb.deeplinkdispatch.UrlTreeKt;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/* renamed from: o.guK, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C15570guK implements QmN {
private volatile Map<String, String> a;
private final Map<String, List<InterfaceC15098ggz>> b;
/* JADX INFO: Access modifiers changed from: package-private */
public C15570guK(Map<String, List<InterfaceC15098ggz>> map) {
this.b = Collections.unmodifiableMap(map);
}
@Override // o.QmN
public final Map<String, String> a() {
if (this.a == null) {
synchronized (this) {
if (this.a == null) {
HashMap hashMap = new HashMap();
for (Map.Entry<String, List<InterfaceC15098ggz>> entry : this.b.entrySet()) {
List<InterfaceC15098ggz> value = entry.getValue();
StringBuilder sb = new StringBuilder();
int size = value.size();
for (int i = 0; i < size; i++) {
String b = value.get(i).b();
if (!TextUtils.isEmpty(b)) {
sb.append(b);
if (i != value.size() - 1) {
sb.append(',');
}
}
}
String obj = sb.toString();
if (!TextUtils.isEmpty(obj)) {
hashMap.put(entry.getKey(), obj);
}
}
this.a = Collections.unmodifiableMap(hashMap);
}
}
}
return this.a;
}
public final String toString() {
StringBuilder sb = new StringBuilder("LazyHeaders{headers=");
sb.append(this.b);
sb.append(UrlTreeKt.componentParamSuffixChar);
return sb.toString();
}
public final boolean equals(Object obj) {
if (obj instanceof C15570guK) {
return this.b.equals(((C15570guK) obj).b);
}
return false;
}
public final int hashCode() {
return this.b.hashCode();
}
/* renamed from: o.guK$HBt */
/* loaded from: classes.dex */
static final class HBt implements InterfaceC15098ggz {
private final String d;
HBt(String str) {
this.d = str;
}
public final String toString() {
StringBuilder sb = new StringBuilder("StringHeaderFactory{value='");
sb.append(this.d);
sb.append("'}");
return sb.toString();
}
public final boolean equals(Object obj) {
if (obj instanceof HBt) {
return this.d.equals(((HBt) obj).d);
}
return false;
}
public final int hashCode() {
return this.d.hashCode();
}
@Override // o.InterfaceC15098ggz
public final String b() {
return this.d;
}
}
/* renamed from: o.guK$IeS */
/* loaded from: classes.dex */
public static final class IeS {
private static final Map<String, List<InterfaceC15098ggz>> e;
boolean c = true;
Map<String, List<InterfaceC15098ggz>> a = e;
private boolean b = true;
static {
String property = System.getProperty("http.agent");
if (!TextUtils.isEmpty(property)) {
int length = property.length();
StringBuilder sb = new StringBuilder(property.length());
for (int i = 0; i < length; i++) {
char charAt = property.charAt(i);
if ((charAt > 31 || charAt == '\t') && charAt < 127) {
sb.append(charAt);
} else {
sb.append('?');
}
}
property = sb.toString();
}
HashMap hashMap = new HashMap(2);
if (!TextUtils.isEmpty(property)) {
hashMap.put("User-Agent", Collections.singletonList(new HBt(property)));
}
e = Collections.unmodifiableMap(hashMap);
}
}
}