九游游戏中心HD v4.6.8.1版本的 MD5 值为:78c397802cc5ffdcc7f5502ede90502e
以下内容为反编译后的 ek.java 源代码,内容仅作参考
package com.b;
import android.content.Context;
import android.os.Build;
import android.text.TextUtils;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
public final class ek {
public static class a {
public JSONObject f3950a;
public JSONObject b;
public JSONObject c;
public JSONObject d;
public JSONObject e;
public JSONObject f;
public C0134a g;
public c h;
public b i;
public static class C0134a {
public boolean f3951a;
public boolean b;
}
public static class b {
public String f3952a;
public String b;
}
public static class c {
public String f3953a;
public String b;
public String c;
}
}
public static a a(Context context, eq eqVar, String str) {
try {
new ay();
return a(ay.a(new b(context, eqVar, str)));
} catch (eg e) {
d.a(e, "ConfigManager", "loadConfig");
return new a();
} catch (Throwable th) {
d.a(th, "ConfigManager", "loadConfig");
return new a();
}
}
private static String a(JSONObject jSONObject, String str) {
return (jSONObject == null || !jSONObject.has(str) || jSONObject.getString(str).equals("[]")) ? "" : jSONObject.optString(str);
}
private static boolean a(String str) {
return str != null && str.equals("1");
}
private static boolean a(JSONObject jSONObject) {
if (jSONObject == null) {
return false;
}
try {
return a(a(jSONObject.getJSONObject("commoninfo"), "com_isupload"));
} catch (JSONException e) {
d.a(e, "ConfigManager", "parseCommon");
return false;
} catch (Throwable th) {
d.a(th, "ConfigManager", "parseCommon");
return false;
}
}
private static boolean b(JSONObject jSONObject) {
if (jSONObject == null) {
return false;
}
try {
return a(a(jSONObject.getJSONObject("exceptinfo"), "ex_isupload"));
} catch (JSONException e) {
d.a(e, "ConfigManager", "parseException");
return false;
} catch (Throwable th) {
d.a(th, "ConfigManager", "parseException");
return false;
}
}
public static class b extends bc {
private Context d;
private eq e;
private String f;
b(Context context, eq eqVar, String str) {
this.f = "";
this.d = context;
this.e = eqVar;
this.f = str;
}
@Override
public final String c() {
return "https://restapi.amap.com/v3/config/resource?";
}
@Override
public final Map<String, String> a() {
HashMap hashMap = new HashMap();
hashMap.put("User-Agent", this.e.b);
hashMap.put("platinfo", String.format("platform=Android&sdkversion=%s&product=%s", this.e.f3957a, this.e.c));
hashMap.put("logversion", "2.0");
return hashMap;
}
@Override
public final Map<String, String> b() {
String n = el.n(this.d);
if (!TextUtils.isEmpty(n)) {
n = en.b(new StringBuilder(n).reverse().toString());
}
HashMap hashMap = new HashMap();
hashMap.put("key", eh.f(this.d));
hashMap.put("opertype", this.f);
hashMap.put("plattype", com.taobao.dp.client.b.OS);
hashMap.put("product", this.e.c);
hashMap.put("version", this.e.f3957a);
hashMap.put("output", "json");
hashMap.put("androidversion", new StringBuilder().append(Build.VERSION.SDK_INT).toString());
hashMap.put("deviceId", n);
hashMap.put("abitype", Build.CPU_ABI);
hashMap.put("ext", this.e.e);
String a2 = ej.a();
String a3 = ej.a(this.d, a2, er.a(er.a(hashMap)));
hashMap.put("ts", a2);
hashMap.put("scode", a3);
return hashMap;
}
}
private static a a(byte[] bArr) {
JSONObject jSONObject;
a aVar = new a();
if (bArr != null) {
try {
try {
if (bArr.length != 0) {
JSONObject jSONObject2 = new JSONObject(new String(bArr, "UTF-8"));
if ("1".equals(a(jSONObject2, "status")) && jSONObject2.has("result") && (jSONObject = jSONObject2.getJSONObject("result")) != null) {
boolean b2 = er.a(jSONObject, "exception") ? b(jSONObject.getJSONObject("exception")) : false;
boolean a2 = er.a(jSONObject, "common") ? a(jSONObject.getJSONObject("common")) : false;
a.C0134a c0134a = new a.C0134a();
c0134a.f3951a = b2;
c0134a.b = a2;
aVar.g = c0134a;
if (jSONObject.has("sdkupdate")) {
JSONObject jSONObject3 = jSONObject.getJSONObject("sdkupdate");
a.c cVar = new a.c();
if (jSONObject3 != null) {
try {
String a3 = a(jSONObject3, "md5");
String a4 = a(jSONObject3, "url");
String a5 = a(jSONObject3, "sdkversion");
if (!TextUtils.isEmpty(a3) && !TextUtils.isEmpty(a4) && !TextUtils.isEmpty(a5)) {
cVar.f3953a = a4;
cVar.b = a3;
cVar.c = a5;
}
} catch (JSONException e) {
d.a(e, "ConfigManager", "parseSDKUpdate");
} catch (Throwable th) {
d.a(th, "ConfigManager", "parseSDKUpdate");
}
}
aVar.h = cVar;
}
if (er.a(jSONObject, "sdkcoordinate")) {
JSONObject jSONObject4 = jSONObject.getJSONObject("sdkcoordinate");
a.b bVar = new a.b();
if (jSONObject4 != null) {
try {
String a6 = a(jSONObject4, "md5");
String a7 = a(jSONObject4, "url");
bVar.b = a6;
bVar.f3952a = a7;
} catch (JSONException e2) {
d.a(e2, "ConfigManager", "parseSDKCoordinate");
} catch (Throwable th2) {
d.a(th2, "ConfigManager", "parseSDKCoordinate");
}
}
aVar.i = bVar;
}
if (er.a(jSONObject, "callamap")) {
aVar.e = jSONObject.getJSONObject("callamap");
}
if (er.a(jSONObject, "ca")) {
aVar.f = jSONObject.getJSONObject("ca");
}
if (er.a(jSONObject, "locate")) {
aVar.d = jSONObject.getJSONObject("locate");
}
if (er.a(jSONObject, "callamappro")) {
aVar.c = jSONObject.getJSONObject("callamappro");
}
if (er.a(jSONObject, "opflag")) {
aVar.b = jSONObject.getJSONObject("opflag");
}
if (er.a(jSONObject, "amappushflag")) {
aVar.f3950a = jSONObject.getJSONObject("amappushflag");
}
}
}
} catch (UnsupportedEncodingException e3) {
d.a(e3, "ConfigManager", "loadConfig");
}
} catch (JSONException e4) {
d.a(e4, "ConfigManager", "loadConfig");
} catch (Throwable th3) {
d.a(th3, "ConfigManager", "loadConfig");
}
}
return aVar;
}
}