九游游戏中心HD v4.6.8.1版本的 MD5 值为:78c397802cc5ffdcc7f5502ede90502e
以下内容为反编译后的 ei.java 源代码,内容仅作参考
package com.b;
import android.content.Context;
import android.util.Log;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
public final class ei {
private static eq c;
public static int f3949a = -1;
public static String b = "";
private static String d = "http://apiinit.amap.com/v3/log/init";
private static String e = null;
private static Map<String, String> a(Context context) {
HashMap hashMap = new HashMap();
try {
hashMap.put("resType", "json");
hashMap.put("encode", "UTF-8");
String a2 = ej.a();
hashMap.put("ts", a2);
hashMap.put("key", eh.f(context));
hashMap.put("scode", ej.a(context, a2, er.a("resType=json&encode=UTF-8&key=" + eh.f(context))));
} catch (Throwable th) {
d.a(th, "Auth", "gParams");
}
return hashMap;
}
public static void a(String str) {
eh.c(str);
}
public static synchronized boolean a(Context context, eq eqVar) {
boolean b2;
synchronized (ei.class) {
b2 = b(context, eqVar);
}
return b2;
}
private static boolean a(byte[] bArr) {
String str;
if (bArr == null) {
return true;
}
try {
try {
str = new String(bArr, "UTF-8");
} catch (UnsupportedEncodingException e2) {
str = new String(bArr);
}
JSONObject jSONObject = new JSONObject(str);
if (jSONObject.has("status")) {
int i = jSONObject.getInt("status");
if (i == 1) {
f3949a = 1;
} else if (i == 0) {
f3949a = 0;
}
}
if (jSONObject.has("info")) {
b = jSONObject.getString("info");
}
if (f3949a == 0) {
Log.i("AuthFailure", b);
}
return f3949a == 1;
} catch (JSONException e3) {
d.a(e3, "Auth", "lData");
return false;
} catch (Throwable th) {
d.a(th, "Auth", "lData");
return false;
}
}
private static boolean b(Context context, eq eqVar) {
c = eqVar;
try {
String str = d;
HashMap hashMap = new HashMap();
hashMap.put("Content-Type", "application/x-www-form-urlencoded");
hashMap.put("Accept-Encoding", "gzip");
hashMap.put("Connection", "Keep-Alive");
hashMap.put("User-Agent", c.b);
hashMap.put("X-INFO", ej.b(context));
hashMap.put("logversion", "2.1");
hashMap.put("platinfo", String.format("platform=Android&sdkversion=%s&product=%s", c.f3957a, c.c));
ay.a();
es esVar = new es();
esVar.c = eo.a(context);
esVar.d.clear();
esVar.d.putAll(hashMap);
Map<String, String> a2 = a(context);
esVar.f.clear();
esVar.f.putAll(a2);
esVar.e = str;
return a(ay.b(esVar));
} catch (Throwable th) {
d.a(th, "Auth", "getAuth");
return true;
}
}
}