GoooBet v1.0版本的 MD5 值为:ff9748f16167bfd7735b669c0a9931c5
以下内容为反编译后的 di.java 源代码,内容仅作参考
package com.my.target;
import android.content.Context;
import android.util.Base64;
import com.google.android.exoplayer2.C;
import com.mopub.common.Constants;
import com.my.target.fa;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
public final class di {
final Map<String, Object> eY = new HashMap();
private final Map<Integer, Long> eZ = new HashMap();
private final long fa = System.currentTimeMillis();
private final int fb;
private boolean fc;
public static final class a {
private boolean fd = false;
private final int slotId;
a(int i) {
this.slotId = i;
}
public void A(boolean z) {
this.fd = z;
}
public di a(String str, float f) {
di diVar = new di(this.slotId, str, 5);
diVar.z(this.fd);
diVar.eY.put("priority", Float.valueOf(f));
return diVar;
}
public di de() {
di diVar = new di(this.slotId, "myTarget", 0);
diVar.z(this.fd);
return diVar;
}
public di df() {
di diVar = new di(this.slotId, "myTarget", 4);
diVar.z(this.fd);
return diVar;
}
}
di(int i, String str, int i2) {
this.fb = i2;
this.eY.put("slot", Integer.valueOf(i));
this.eY.put("network", str);
}
public void m(Context context) {
String dc = dc();
ae.a("send metrics message:\n " + dc);
dd.cW().e("https://ad.mail.ru/sdk/ms/", Base64.encodeToString(dc.getBytes(Charset.forName(C.UTF8_NAME)), 0), context);
}
public static a z(int i) {
return new a(i);
}
public void a(int i, long j) {
Long l = this.eZ.get(Integer.valueOf(i));
if (l != null) {
j += l.longValue();
}
b(i, j);
}
public void b(int i, long j) {
this.eZ.put(Integer.valueOf(i), Long.valueOf(j));
}
String dc() {
JSONObject jSONObject = new JSONObject();
try {
for (Map.Entry<String, Object> entry : this.eY.entrySet()) {
jSONObject.put(entry.getKey(), entry.getValue());
}
JSONArray jSONArray = new JSONArray();
jSONObject.put(Constants.VIDEO_TRACKING_EVENTS_KEY, jSONArray);
for (Map.Entry<Integer, Long> entry2 : this.eZ.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 dd() {
b(this.fb, System.currentTimeMillis() - this.fa);
}
public void l(final Context context) {
if (!this.fc) {
ae.a("metrics sending disabled");
return;
}
if (this.eZ.isEmpty()) {
ae.a("metrics not send: empty");
return;
}
fa.a eh = fd.el().eh();
if (eh == null) {
ae.a("metrics not send: basic info not collected");
return;
}
this.eY.put("instanceId", eh.id);
this.eY.put("os", eh.hA);
this.eY.put("osver", eh.hB);
this.eY.put("app", eh.hC);
this.eY.put("appver", eh.hD);
this.eY.put("sdkver", eh.hE);
af.b(new Runnable() {
@Override
public final void run() {
di.this.m(context);
}
});
}
public void z(boolean z) {
this.fc = z;
}
}