Driving Zone: Germany v1.22.4版本的 MD5 值为:2b6e2d8e8733a3104dcc306c5770286c
以下内容为反编译后的 v4.java 源代码,内容仅作参考
package com.my.target;
import android.content.Context;
import android.util.Base64;
import com.ironsource.mediationsdk.impressionData.ImpressionData;
import com.my.target.a1;
import io.sentry.protocol.OperatingSystem;
import io.sentry.protocol.SentryThread;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
public final class v4 {
public final Map<String, Object> f5387a;
public final Map<Integer, Long> b;
public final long c;
public final int d;
public boolean e;
public static final class a {
public final int f5388a;
public boolean b = false;
public a(int i) {
this.f5388a = i;
}
public v4 a() {
v4 v4Var = new v4(this.f5388a, "myTarget", 0);
v4Var.a(this.b);
return v4Var;
}
public v4 a(String str, float f) {
v4 v4Var = new v4(this.f5388a, str, 5);
v4Var.a(this.b);
v4Var.f5387a.put(SentryThread.JsonKeys.PRIORITY, Float.valueOf(f));
return v4Var;
}
public void a(boolean z) {
this.b = z;
}
public v4 b() {
v4 v4Var = new v4(this.f5388a, "myTarget", 4);
v4Var.a(this.b);
return v4Var;
}
}
public v4(int i, String str, int i2) {
HashMap hashMap = new HashMap();
this.f5387a = hashMap;
this.b = new HashMap();
this.d = i2;
this.c = System.currentTimeMillis();
hashMap.put("slot", Integer.valueOf(i));
hashMap.put("network", str);
}
public static a a(int i) {
return new a(i);
}
public void a(Context context) {
String a2 = a();
w8.a("MetricMessage: Send metrics message - \n " + a2);
p1.d().a("https://ad.mail.ru/sdk/ms/", Base64.encodeToString(a2.getBytes(Charset.forName("UTF-8")), 0), context);
}
public String a() {
JSONObject jSONObject = new JSONObject();
try {
for (Map.Entry<String, Object> entry : this.f5387a.entrySet()) {
jSONObject.put(entry.getKey(), entry.getValue());
}
JSONArray jSONArray = new JSONArray();
jSONObject.put("events", jSONArray);
for (Map.Entry<Integer, Long> entry2 : this.b.entrySet()) {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("type", entry2.getKey());
jSONObject2.put("value", entry2.getValue());
jSONArray.put(jSONObject2);
}
} catch (Throwable unused) {
}
return jSONObject.toString();
}
public void a(int i, long j) {
Long l = this.b.get(Integer.valueOf(i));
if (l != null) {
j += l.longValue();
}
b(i, j);
}
public void a(boolean z) {
this.e = z;
}
public void b() {
b(this.d, System.currentTimeMillis() - this.c);
}
public void b(int i, long j) {
this.b.put(Integer.valueOf(i), Long.valueOf(j));
}
public void b(final Context context) {
if (!this.e) {
w8.a("MetricMessage: Metrics sending disabled");
return;
}
if (this.b.isEmpty()) {
w8.a("MetricMessage: Metrics not send: empty");
return;
}
a1.a a2 = g1.c().a();
if (a2 == null) {
w8.a("MetricMessage: Metrics not send: basic info not collected");
return;
}
this.f5387a.put(ImpressionData.IMPRESSION_DATA_KEY_INSTANCE_ID, a2.f5172a);
this.f5387a.put(OperatingSystem.TYPE, a2.b);
this.f5387a.put("osver", a2.c);
this.f5387a.put("app", a2.d);
this.f5387a.put("appver", a2.e);
this.f5387a.put("sdkver", a2.f);
x.b(new Runnable() {
@Override
public final void run() {
v4.this.a(context);
}
});
}
}