Luno v7.28.0版本的 MD5 值为:08d81b3b88ef7df48c89cb5d56dc11a2
以下内容为反编译后的 a9.java 源代码,内容仅作参考
package com.plaid.internal;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import com.facebook.internal.ServerProtocol;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.gson.GsonBuilder;
import com.plaid.internal.core.crashreporting.internal.implementation.DebugImage;
import com.plaid.internal.core.crashreporting.internal.implementation.DebugMetaInterface;
import com.plaid.internal.core.crashreporting.internal.implementation.models.ExceptionInterface;
import com.sardine.ai.mdisdk.sentry.core.protocol.App;
import com.sardine.ai.mdisdk.sentry.core.protocol.Device;
import com.sardine.ai.mdisdk.sentry.core.protocol.OperatingSystem;
import io.reactivex.Completable;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
import java.util.UUID;
import kotlin.Lazy;
import kotlin.jvm.functions.Function0;
import mdi.sdk.my2;
import mdi.sdk.sl2;
import mdi.sdk.t55;
import mdi.sdk.u55;
import mdi.sdk.un2;
import mdi.sdk.w32;
public final class a9 extends t0 {
public final Context a;
public final s7 b;
public final o1 c;
public final Lazy d;
public u0 e;
public y0 f;
public final p8<e> g;
public static final class a extends sl2 implements Function0<b9> {
public a() {
super(0);
}
@Override
public b9 invoke() {
return (b9) a9.this.b.a("https://analytics.plaid.com/sentry/api/563/", new u7(new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss").registerTypeAdapter(w0.class, new x0()).create(), null, 2, null)).create(b9.class);
}
}
public a9(Context context, s7 s7Var, o1 o1Var) {
Lazy b;
w32.h(context, "application");
w32.h(s7Var, "plaidRetrofitFactory");
w32.h(o1Var, "deviceInfo");
this.a = context;
this.b = s7Var;
this.c = o1Var;
b = un2.b(new a());
this.d = b;
this.g = new p8<>(50);
}
@Override
public Completable a(String str, z0 z0Var) {
String G;
boolean R;
List D0;
List subList;
y0 y0Var;
w32.h(str, "message");
w32.h(z0Var, FirebaseAnalytics.Param.LEVEL);
Object value = this.d.getValue();
w32.g(value, "<get-sentryRetrofitApi>(...)");
b9 b9Var = (b9) value;
u0 u0Var = this.e;
y0 y0Var2 = null;
if (u0Var == null) {
w32.y("crashApiOptions");
u0Var = null;
}
String q = w32.q("Sentry sentry_version=6,sentry_key=", u0Var.a());
u0 u0Var2 = this.e;
if (u0Var2 == null) {
w32.y("crashApiOptions");
u0Var2 = null;
}
String a2 = u0Var2.a();
w32.h(str, "message");
w32.h(z0Var, FirebaseAnalytics.Param.LEVEL);
String uuid = UUID.randomUUID().toString();
w32.g(uuid, "randomUUID().toString()");
G = t55.G(uuid, "-", "", false, 4, null);
String a3 = a();
R = u55.R(str, "com.plaid.core.networking.models.NetworkException", false, 2, null);
if (R) {
try {
D0 = u55.D0(str, new String[]{"\n"}, false, 0, 6, null);
subList = D0.subList(0, 1);
} catch (Throwable unused) {
}
y0Var = this.f;
if (y0Var != null) {
w32.y("crashEnvironmentProvider");
} else {
y0Var2 = y0Var;
}
return b9Var.a(q, a2, a(new s0(G, str, a3, z0Var, null, null, null, null, null, null, null, null, null, y0Var2.a(), null, subList, null, null, b(), 221168, null)));
}
subList = null;
y0Var = this.f;
if (y0Var != null) {
}
return b9Var.a(q, a2, a(new s0(G, str, a3, z0Var, null, null, null, null, null, null, null, null, null, y0Var2.a(), null, subList, null, null, b(), 221168, null)));
}
public final DebugMetaInterface b() {
DebugMetaInterface debugMetaInterface = new DebugMetaInterface();
String[] strArr = {"db6c363f-d0e2-5123-a877-13efc1c12a9d"};
for (int i = 0; i < 1; i++) {
debugMetaInterface.getDebugImages().add(new DebugImage(strArr[i], null, 2, null));
}
return debugMetaInterface;
}
@Override
public void a(u0 u0Var, y0 y0Var) {
w32.h(u0Var, "crashApiOptions");
w32.h(y0Var, "crashEnvironmentProvider");
this.e = u0Var;
this.f = y0Var;
}
@Override
public void a(e eVar) {
w32.h(eVar, "crumb");
p8<e> p8Var = this.g;
if (p8Var.a.get(p8Var.c) != null) {
p8Var.b = (p8Var.b + 1) % 50;
}
p8Var.a.set(p8Var.c, eVar);
p8Var.c = (p8Var.c + 1) % 50;
int i = p8Var.d;
if (i != 50) {
p8Var.d = i + 1;
}
}
@Override
public void a(String str) {
w32.h(str, "message");
throw new RuntimeException(str);
}
@Override
public Completable a(List<s0> list) {
w32.h(list, "crashList");
ArrayList arrayList = new ArrayList();
for (s0 s0Var : list) {
Object value = this.d.getValue();
w32.g(value, "<get-sentryRetrofitApi>(...)");
b9 b9Var = (b9) value;
u0 u0Var = this.e;
u0 u0Var2 = null;
if (u0Var == null) {
w32.y("crashApiOptions");
u0Var = null;
}
String q = w32.q("Sentry sentry_version=6,sentry_key=", u0Var.a());
u0 u0Var3 = this.e;
if (u0Var3 == null) {
w32.y("crashApiOptions");
} else {
u0Var2 = u0Var3;
}
arrayList.add(b9Var.a(q, u0Var2.a(), s0Var));
}
Completable j = Completable.j(arrayList);
w32.g(j, "merge(completableList)");
return j;
}
@Override
public s0 a(Throwable th) {
String G;
w32.h(th, "error");
String uuid = UUID.randomUUID().toString();
w32.g(uuid, "randomUUID().toString()");
G = t55.G(uuid, "-", "", false, 4, null);
String a2 = a();
String message = th.getMessage();
z0 z0Var = z0.ERROR;
u0 u0Var = this.e;
y0 y0Var = null;
if (u0Var == null) {
w32.y("crashApiOptions");
u0Var = null;
}
String b = u0Var.b();
y0 y0Var2 = this.f;
if (y0Var2 == null) {
w32.y("crashEnvironmentProvider");
} else {
y0Var = y0Var2;
}
return a(new s0(G, message, a2, z0Var, null, null, null, null, null, null, null, b, null, y0Var.a(), null, null, null, new ExceptionInterface(th), b(), 120816, null));
}
public final s0 a(s0 s0Var) {
String str;
String str2;
String str3;
Map v;
Map map;
LinkedHashMap linkedHashMap;
Map v2;
Map map2;
LinkedHashMap linkedHashMap2;
s0Var.a().clear();
s0Var.a().addAll(this.g.a());
s0Var.b().clear();
Map<String, w0> b = s0Var.b();
Context context = this.a;
w32.h(context, "application");
LinkedHashMap linkedHashMap3 = new LinkedHashMap();
try {
PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
str = packageInfo.versionName;
try {
str2 = String.valueOf(packageInfo.versionCode);
} catch (PackageManager.NameNotFoundException e) {
e = e;
str2 = null;
}
try {
ApplicationInfo applicationInfo = packageInfo.applicationInfo;
str3 = String.valueOf(applicationInfo == null ? null : applicationInfo.loadLabel(context.getPackageManager()));
} catch (PackageManager.NameNotFoundException e2) {
e = e2;
e.printStackTrace();
str3 = null;
if (str != null) {
}
if (str2 != null) {
}
if (str3 != null) {
}
if (linkedHashMap3.isEmpty()) {
}
if (linkedHashMap3 != null) {
}
b.put(App.TYPE, new w0(0, null, null, null, map, 13, null));
Map<String, w0> b2 = s0Var.b();
o1 o1Var = this.c;
w32.h(o1Var, JsonPOJOBuilder.DEFAULT_BUILD_METHOD);
linkedHashMap = new LinkedHashMap();
linkedHashMap.put("id", o1Var.getId());
linkedHashMap.put("manufacturer", o1Var.getManufacturer());
linkedHashMap.put("model", o1Var.getModel());
linkedHashMap.put("name", o1Var.getDevice());
linkedHashMap.put("type", o1Var.getType());
linkedHashMap.put(ServerProtocol.FALLBACK_DIALOG_PARAM_VERSION, o1Var.b());
if (linkedHashMap.isEmpty()) {
}
if (linkedHashMap != null) {
}
b2.put(Device.TYPE, new w0(0, null, null, null, map2, 13, null));
Map<String, w0> b3 = s0Var.b();
o1 o1Var2 = this.c;
w32.h(o1Var2, JsonPOJOBuilder.DEFAULT_BUILD_METHOD);
linkedHashMap2 = new LinkedHashMap();
linkedHashMap2.put("name", o1Var2.a());
w32.h(o1Var2, JsonPOJOBuilder.DEFAULT_BUILD_METHOD);
String b4 = o1Var2.b();
linkedHashMap2.put(ServerProtocol.FALLBACK_DIALOG_PARAM_VERSION, o1Var2.c() + " (" + b4 + ')');
if (linkedHashMap2.isEmpty()) {
}
b3.put(OperatingSystem.TYPE, new w0(0, null, null, null, linkedHashMap2 != null ? my2.v(linkedHashMap2) : null, 13, null));
return s0Var;
}
} catch (PackageManager.NameNotFoundException e3) {
e = e3;
str = null;
str2 = null;
}
if (str != null) {
linkedHashMap3.put(ServerProtocol.FALLBACK_DIALOG_PARAM_VERSION, str);
}
if (str2 != null) {
linkedHashMap3.put(JsonPOJOBuilder.DEFAULT_BUILD_METHOD, str2);
}
if (str3 != null) {
linkedHashMap3.put("name", str3);
}
if (linkedHashMap3.isEmpty()) {
linkedHashMap3 = null;
}
if (linkedHashMap3 != null) {
map = null;
} else {
v = my2.v(linkedHashMap3);
map = v;
}
b.put(App.TYPE, new w0(0, null, null, null, map, 13, null));
Map<String, w0> b22 = s0Var.b();
o1 o1Var3 = this.c;
w32.h(o1Var3, JsonPOJOBuilder.DEFAULT_BUILD_METHOD);
linkedHashMap = new LinkedHashMap();
linkedHashMap.put("id", o1Var3.getId());
linkedHashMap.put("manufacturer", o1Var3.getManufacturer());
linkedHashMap.put("model", o1Var3.getModel());
linkedHashMap.put("name", o1Var3.getDevice());
linkedHashMap.put("type", o1Var3.getType());
linkedHashMap.put(ServerProtocol.FALLBACK_DIALOG_PARAM_VERSION, o1Var3.b());
if (linkedHashMap.isEmpty()) {
linkedHashMap = null;
}
if (linkedHashMap != null) {
map2 = null;
} else {
v2 = my2.v(linkedHashMap);
map2 = v2;
}
b22.put(Device.TYPE, new w0(0, null, null, null, map2, 13, null));
Map<String, w0> b32 = s0Var.b();
o1 o1Var22 = this.c;
w32.h(o1Var22, JsonPOJOBuilder.DEFAULT_BUILD_METHOD);
linkedHashMap2 = new LinkedHashMap();
linkedHashMap2.put("name", o1Var22.a());
w32.h(o1Var22, JsonPOJOBuilder.DEFAULT_BUILD_METHOD);
String b42 = o1Var22.b();
linkedHashMap2.put(ServerProtocol.FALLBACK_DIALOG_PARAM_VERSION, o1Var22.c() + " (" + b42 + ')');
if (linkedHashMap2.isEmpty()) {
linkedHashMap2 = null;
}
b32.put(OperatingSystem.TYPE, new w0(0, null, null, null, linkedHashMap2 != null ? my2.v(linkedHashMap2) : null, 13, null));
return s0Var;
}
public final String a() {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ", Locale.getDefault());
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("gmt"));
String format = simpleDateFormat.format(new Date());
w32.g(format, "df.format(Date())");
return format;
}
}