4399游戏盒 v7.2.1.31版本的 MD5 值为:951717f45e3fda95c8a358caf4ca93e1
以下内容为反编译后的 e.java 源代码,内容仅作参考
package cn.m4399.analy;
import android.support.v4.util.ArrayMap;
import cn.m4399.analy.support.network.HttpError;
import cn.m4399.analy.support.network.Request;
import com.huawei.hms.push.constant.RemoteMessageConst;
import com.loopj.android.http.AsyncHttpClient;
import com.loopj.android.http.RequestParams;
import java.util.Calendar;
import java.util.LinkedHashSet;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
public class e {
public class a implements Request.c<String> {
public a() {
}
@Override
public void a(Request request, s2<String> s2Var) {
try {
String str = s2Var.c;
if (str == null) {
return;
}
u1.b("cloud_config=%s", str);
JSONObject jSONObject = new JSONObject(s2Var.c);
if (jSONObject.getInt("code") != 1) {
return;
}
d0 i = n1.i();
JSONObject jSONObject2 = jSONObject.getJSONObject(RemoteMessageConst.DATA);
int optInt = jSONObject2.optInt("sendBatchNum", i.b());
int optInt2 = jSONObject2.optInt("sendInterval", i.c());
int optInt3 = jSONObject2.optInt("sessionInterval", 30000);
boolean optBoolean = jSONObject2.optBoolean("debuggable", i.g());
boolean optBoolean2 = jSONObject2.optBoolean("verifyVid", i.i());
boolean optBoolean3 = jSONObject2.optBoolean("autoTrace", i.f());
boolean optBoolean4 = jSONObject2.optBoolean("useHeartbeat", i.h());
JSONArray optJSONArray = jSONObject2.optJSONArray("cancelledEvents");
LinkedHashSet linkedHashSet = new LinkedHashSet();
if (optJSONArray != null) {
for (int i2 = 0; i2 < optJSONArray.length(); i2++) {
linkedHashSet.add(optJSONArray.getString(i2));
}
}
d0 d0Var = new d0(n1.i().d(), optInt, optInt2, optInt3, optBoolean, optBoolean2, optBoolean3, optBoolean4, (String[]) linkedHashSet.toArray(new String[0]));
n1.a(d0Var);
u1.b("newOptions=%s", d0Var);
v2 v2Var = v2.b;
v2Var.b("send_batch_size", optInt);
v2Var.b("send_interval", optInt2);
v2Var.b("session_interval", optInt3);
v2Var.b(com.umeng.analytics.pro.d.ar, linkedHashSet);
v2Var.b("verify_vid", optBoolean2);
v2Var.b("auto_trace", optBoolean3);
v2Var.b("heartbeat", optBoolean4);
} catch (Exception unused) {
}
}
}
public class b implements Request.a {
public b() {
}
@Override
public void a(Request request, HttpError httpError) {
u1.a((Throwable) httpError);
}
}
public static Map<String, String> b() {
ArrayMap arrayMap = new ArrayMap();
arrayMap.put("mediaId", n1.h());
return arrayMap;
}
public void a() {
v2 v2Var = v2.b;
if (b(v2Var.a("$previous_change_config", 0L))) {
return;
}
v2Var.b("$previous_change_config", System.currentTimeMillis());
u2.k().a(a(a2.a())).b(b()).b("https://gprp.4399.com/cg/sdk/mediaConfig").a(new b()).a(new a()).a();
}
public static boolean b(long j) {
Calendar calendar = Calendar.getInstance();
int i = calendar.get(1);
int i2 = calendar.get(6);
calendar.setTimeInMillis(j);
return i == calendar.get(1) && i2 == calendar.get(6);
}
public static Map<String, String> a(long j) {
String a2 = i2.a(String.format("{\"mediaId\":\"%s\"}", n1.h()) + "&4399analyze&" + j);
ArrayMap arrayMap = new ArrayMap();
arrayMap.put(AsyncHttpClient.HEADER_CONTENT_TYPE, RequestParams.APPLICATION_JSON);
arrayMap.put("timestamp", String.valueOf(j));
arrayMap.put(com.m4399.gamecenter.plugin.main.database.b.COLUMN_PACKAGE_SIGN, a2);
return arrayMap;
}
}