Dynamic Spot Pro v1.0版本的 MD5 值为:5adb64d1f11ed2f16f84b684ff810780
以下内容为反编译后的 q.java 源代码,内容仅作参考
package a.b.a;
import android.util.Log;
import i.v;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
public class q {
public static q f766j;
public volatile String f768b;
public volatile v f769c;
public volatile String f770d;
public u f773g = new u("diagnosticThread");
public volatile boolean f767a = false;
public int f771e = 50;
public String f772f = "https://api.amplitude.com/diagnostic";
public List<String> f774h = new ArrayList(this.f771e);
public Map<String, JSONObject> f775i = new HashMap(this.f771e);
public class a implements Runnable {
public final String f776e;
public final Throwable f777f;
public a(String str, Throwable th) {
this.f776e = str;
this.f777f = th;
}
@Override
public void run() {
JSONObject jSONObject = q.this.f775i.get(this.f776e);
try {
if (jSONObject != null) {
jSONObject.put("count", jSONObject.optInt("count", 0) + 1);
return;
}
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("error", e.r(this.f776e));
jSONObject2.put("timestamp", System.currentTimeMillis());
jSONObject2.put("device_id", q.this.f770d);
jSONObject2.put("count", 1);
if (this.f777f != null) {
String stackTraceString = Log.getStackTraceString(this.f777f);
if (!t.c(stackTraceString)) {
jSONObject2.put("stack_trace", e.r(stackTraceString));
}
}
if (q.this.f774h.size() >= q.this.f771e) {
for (int i2 = 0; i2 < 5; i2++) {
q.this.f775i.remove(q.this.f774h.remove(0));
}
}
q.this.f775i.put(this.f776e, jSONObject2);
q.this.f774h.add(this.f776e);
} catch (JSONException unused) {
}
}
}
public q() {
this.f773g.start();
}
public static synchronized q a() {
q qVar;
synchronized (q.class) {
if (f766j == null) {
f766j = new q();
}
qVar = f766j;
}
return qVar;
}
public q b(String str, Throwable th) {
if (this.f767a && !t.c(str) && !t.c(this.f770d)) {
a aVar = new a(str, th);
Thread currentThread = Thread.currentThread();
u uVar = this.f773g;
if (currentThread != uVar) {
uVar.b();
uVar.f782e.post(aVar);
} else {
aVar.run();
}
}
return this;
}
}