Idle Tower v2.48版本的 MD5 值为:56f20496f6a85726b376356ed2ecee23
以下内容为反编译后的 z4.java 源代码,内容仅作参考
package com.my.target;
import android.content.Context;
import android.util.Base64;
import com.google.android.exoplayer2.source.rtsp.SessionDescription;
import com.ironsource.mediationsdk.impressionData.ImpressionData;
import com.mbridge.msdk.MBridgeConstans;
import com.my.target.d1;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
public final class z4 {
public final Map<String, Object> f7172a;
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 f7173a;
public boolean b = false;
public a(int i) {
this.f7173a = i;
}
public z4 a() {
z4 z4Var = new z4(this.f7173a, "myTarget", 0);
z4Var.a(this.b);
return z4Var;
}
public z4 a(String str, float f) {
z4 z4Var = new z4(this.f7173a, str, 5);
z4Var.a(this.b);
z4Var.f7172a.put("priority", Float.valueOf(f));
return z4Var;
}
public void a(boolean z) {
this.b = z;
}
public z4 b() {
z4 z4Var = new z4(this.f7173a, "myTarget", 4);
z4Var.a(this.b);
return z4Var;
}
}
public z4(int i, String str, int i2) {
HashMap hashMap = new HashMap();
this.f7172a = 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();
j9.a("MetricMessage: Send metrics message - \n " + a2);
s1.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.f7172a.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(SessionDescription.ATTR_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) {
j9.a("MetricMessage: Metrics sending disabled");
return;
}
if (this.b.isEmpty()) {
j9.a("MetricMessage: Metrics not send: empty");
return;
}
d1.a a2 = j1.c().a();
if (a2 == null) {
j9.a("MetricMessage: Metrics not send: basic info not collected");
return;
}
this.f7172a.put(ImpressionData.IMPRESSION_DATA_KEY_INSTANCE_ID, a2.f6942a);
this.f7172a.put("os", a2.b);
this.f7172a.put("osver", a2.c);
this.f7172a.put(MBridgeConstans.DYNAMIC_VIEW_WX_APP, a2.d);
this.f7172a.put("appver", a2.e);
this.f7172a.put("sdkver", a2.f);
z.b(new Runnable() {
@Override
public final void run() {
z4.this.a(context);
}
});
}
}