142 lines
4.9 KiB
Java
142 lines
4.9 KiB
Java
|
package o;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import com.airbnb.deeplinkdispatch.UrlTreeKt;
|
||
|
import java.io.IOException;
|
||
|
import java.io.InputStream;
|
||
|
import java.util.HashMap;
|
||
|
import java.util.List;
|
||
|
import java.util.Map;
|
||
|
import org.json.JSONObject;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class Sal implements InterfaceC8452dLk {
|
||
|
public final List<kLX> a;
|
||
|
private final Context b;
|
||
|
private final PoK c;
|
||
|
private final String d;
|
||
|
private final String e;
|
||
|
private final Map<String, String> f = new HashMap();
|
||
|
private final Map<String, String> h;
|
||
|
private final vbd i;
|
||
|
private final FOx j;
|
||
|
|
||
|
public Sal(Context context, String str, PoK poK, InputStream inputStream, Map<String, String> map, List<kLX> list) {
|
||
|
context = context.getApplicationContext() != null ? context.getApplicationContext() : context;
|
||
|
this.b = context;
|
||
|
str = str == null ? context.getPackageName() : str;
|
||
|
this.d = str;
|
||
|
if (inputStream != null) {
|
||
|
this.i = new GXL(inputStream, str);
|
||
|
if (inputStream != null) {
|
||
|
try {
|
||
|
inputStream.close();
|
||
|
} catch (IOException unused) {
|
||
|
}
|
||
|
}
|
||
|
} else {
|
||
|
this.i = new C16631ppS(context, str);
|
||
|
}
|
||
|
this.j = new FOx(this.i);
|
||
|
if (poK != PoK.b && "1.0".equals(this.i.a("/configuration_version", null))) {
|
||
|
throw new RuntimeException("The file version does not match,please download the latest agconnect-services.json from the AGC website.");
|
||
|
}
|
||
|
this.c = (poK == null || poK == PoK.b) ? C5595bvy.c(this.i.a("/region", null), this.i.a("/agcgw/url", null)) : poK;
|
||
|
HashMap hashMap = new HashMap();
|
||
|
for (Map.Entry<String, String> entry : map.entrySet()) {
|
||
|
hashMap.put(C5595bvy.b(entry.getKey()), entry.getValue());
|
||
|
}
|
||
|
this.h = hashMap;
|
||
|
this.a = list;
|
||
|
StringBuilder sb = new StringBuilder("{packageName='");
|
||
|
sb.append(this.d);
|
||
|
sb.append("', routePolicy=");
|
||
|
sb.append(this.c);
|
||
|
sb.append(", reader=");
|
||
|
sb.append(this.i.toString().hashCode());
|
||
|
sb.append(", customConfigMap=");
|
||
|
sb.append(new JSONObject(hashMap).toString().hashCode());
|
||
|
sb.append(UrlTreeKt.componentParamSuffixChar);
|
||
|
this.e = String.valueOf(sb.toString().hashCode());
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Removed duplicated region for block: B:12:0x0044 A[RETURN] */
|
||
|
/* JADX WARN: Removed duplicated region for block: B:13:0x0045 */
|
||
|
@Override // o.InterfaceC8452dLk
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public final java.lang.String d(java.lang.String r4) {
|
||
|
/*
|
||
|
r3 = this;
|
||
|
r0 = 0
|
||
|
if (r4 != 0) goto L4
|
||
|
return r0
|
||
|
L4:
|
||
|
java.lang.String r4 = o.C5595bvy.b(r4)
|
||
|
java.util.Map<java.lang.String, java.lang.String> r1 = r3.h
|
||
|
java.lang.Object r1 = r1.get(r4)
|
||
|
java.lang.String r1 = (java.lang.String) r1
|
||
|
if (r1 == 0) goto L13
|
||
|
return r1
|
||
|
L13:
|
||
|
java.util.Map r1 = o.oKp.a()
|
||
|
boolean r2 = r1.containsKey(r4)
|
||
|
if (r2 != 0) goto L1f
|
||
|
L1d:
|
||
|
r1 = r0
|
||
|
goto L42
|
||
|
L1f:
|
||
|
java.util.Map<java.lang.String, java.lang.String> r2 = r3.f
|
||
|
boolean r2 = r2.containsKey(r4)
|
||
|
if (r2 == 0) goto L30
|
||
|
java.util.Map<java.lang.String, java.lang.String> r1 = r3.f
|
||
|
java.lang.Object r1 = r1.get(r4)
|
||
|
java.lang.String r1 = (java.lang.String) r1
|
||
|
goto L42
|
||
|
L30:
|
||
|
java.lang.Object r1 = r1.get(r4)
|
||
|
o.oKp$Sts r1 = (o.oKp.Sts) r1
|
||
|
if (r1 != 0) goto L39
|
||
|
goto L1d
|
||
|
L39:
|
||
|
java.lang.String r1 = r1.a(r3)
|
||
|
java.util.Map<java.lang.String, java.lang.String> r2 = r3.f
|
||
|
r2.put(r4, r1)
|
||
|
L42:
|
||
|
if (r1 == 0) goto L45
|
||
|
return r1
|
||
|
L45:
|
||
|
o.vbd r1 = r3.i
|
||
|
java.lang.String r4 = r1.a(r4, r0)
|
||
|
boolean r1 = android.text.TextUtils.isEmpty(r4)
|
||
|
if (r1 != 0) goto L5f
|
||
|
java.lang.String r1 = "^\\[!([A-Fa-f0-9]*)]"
|
||
|
boolean r1 = java.util.regex.Pattern.matches(r1, r4)
|
||
|
if (r1 == 0) goto L5f
|
||
|
o.FOx r1 = r3.j
|
||
|
java.lang.String r4 = r1.c(r4, r0)
|
||
|
L5f:
|
||
|
return r4
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: o.Sal.d(java.lang.String):java.lang.String");
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC8452dLk
|
||
|
public final PoK b() {
|
||
|
PoK poK = this.c;
|
||
|
return poK == null ? PoK.b : poK;
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC8452dLk
|
||
|
public final String e() {
|
||
|
return this.e;
|
||
|
}
|
||
|
|
||
|
@Override // o.InterfaceC8452dLk
|
||
|
public final Context c() {
|
||
|
return this.b;
|
||
|
}
|
||
|
}
|