Proxy Master v3.4.9版本的 MD5 值为:14d0aa2468d13530c8f6e96bcc114bf5
以下内容为反编译后的 o5.java 源代码,内容仅作参考
package com.my.target;
import android.content.Context;
import android.util.Base64;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
public final class o5 {
public final Map<String, Object> f10152a;
public final Map<Integer, Long> f10153b;
public final long f10154c;
public final int f10155d;
public boolean f10156e;
public static final class a {
public final int f10157a;
public boolean f10158b = false;
public a(int i10) {
this.f10157a = i10;
}
public o5 a() {
o5 o5Var = new o5(this.f10157a, "myTarget", 0);
o5Var.a(this.f10158b);
return o5Var;
}
public o5 a(String str, float f10) {
o5 o5Var = new o5(this.f10157a, str, 5);
o5Var.a(this.f10158b);
o5Var.f10152a.put("priority", Float.valueOf(f10));
return o5Var;
}
public void a(boolean z6) {
this.f10158b = z6;
}
public o5 b() {
o5 o5Var = new o5(this.f10157a, "myTarget", 4);
o5Var.a(this.f10158b);
return o5Var;
}
}
public o5(int i10, String str, int i11) {
HashMap hashMap = new HashMap();
this.f10152a = hashMap;
this.f10153b = new HashMap();
this.f10155d = i11;
this.f10154c = System.currentTimeMillis();
hashMap.put("slot", Integer.valueOf(i10));
hashMap.put("network", str);
}
public static a a(int i10) {
return new a(i10);
}
public void a(Context context) {
String a8 = a();
ba.a("MetricMessage: Send metrics message - \n " + a8);
z1.a().a("https://ad.mail.ru/sdk/ms/", Base64.encodeToString(a8.getBytes(Charset.forName("UTF-8")), 0), context);
}
public static void a(o5 o5Var, Context context) {
o5Var.a(context);
}
public String a() {
JSONObject jSONObject = new JSONObject();
try {
for (Map.Entry<String, Object> entry : this.f10152a.entrySet()) {
jSONObject.put(entry.getKey(), entry.getValue());
}
JSONArray jSONArray = new JSONArray();
jSONObject.put("events", jSONArray);
for (Map.Entry<Integer, Long> entry2 : this.f10153b.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 i10, long j10) {
Long l10 = this.f10153b.get(Integer.valueOf(i10));
if (l10 != null) {
j10 += l10.longValue();
}
b(i10, j10);
}
public void a(boolean z6) {
this.f10156e = z6;
}
public void b() {
b(this.f10155d, System.currentTimeMillis() - this.f10154c);
}
public void b(int i10, long j10) {
this.f10153b.put(Integer.valueOf(i10), Long.valueOf(j10));
}
public void b(Context context) {
if (!this.f10156e) {
ba.a("MetricMessage: Metrics sending disabled");
} else if (this.f10153b.isEmpty()) {
ba.a("MetricMessage: Metrics not send: empty");
} else {
j1 a8 = q1.b().a();
if (a8 == null) {
ba.a("MetricMessage: Metrics not send: basic info not collected");
return;
}
this.f10152a.put("instanceId", a8.f9688a);
this.f10152a.put("os", a8.f9689b);
this.f10152a.put("osver", a8.f9690c);
this.f10152a.put("app", a8.f9691d);
this.f10152a.put("appver", a8.f9692e);
this.f10152a.put("sdkver", a8.f9693f);
c0.c(new androidx.appcompat.app.y(19, this, context));
}
}
}