柬埔寨通 v6.1.5版本的 MD5 值为:9b68581ac30883219d6a25858a099d6b
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.mobile.auth.x;
import android.content.Context;
import android.net.Network;
import android.os.Build;
import android.text.TextUtils;
import com.iflytek.cloud.SpeechEvent;
import com.mobile.auth.BuildConfig;
import com.mobile.auth.gatewayauth.ExceptionProcessor;
import com.mobile.auth.z.b;
import com.mobile.auth.z.c;
import com.mobile.auth.z.f;
import com.mobile.auth.z.g;
import com.tencent.connect.common.Constants;
import com.tencent.ijk.media.player.IjkMediaMeta;
import com.tencent.ijk.media.player.IjkMediaPlayer;
import java.net.URLDecoder;
import java.util.HashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.json.JSONObject;
public class a {
private b c;
private String d;
private ExecutorService b = Executors.newSingleThreadExecutor();
private ScheduledExecutorService a = Executors.newScheduledThreadPool(1);
static b a(a aVar) {
try {
return aVar.c;
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
static b a(a aVar, b bVar) {
try {
aVar.c = bVar;
return bVar;
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
private String a(Context context, int i, String str) {
try {
try {
String packageName = context.getPackageName();
String b = g.b(context, context.getPackageName());
if (packageName == null) {
packageName = "";
}
if (b == null) {
b = "";
}
String a = f.a();
String str2 = i != 2 ? "1" : "";
StringBuilder sb = new StringBuilder();
sb.append(System.currentTimeMillis());
String sb2 = sb.toString();
String a2 = com.mobile.auth.w.b.a(g.c(context).getBytes());
String d = g.d(str);
String a3 = g.a(str2 + a + "30100jsonp" + a2 + d + packageName + b + sb2 + BuildConfig.CUCC_SDK_VERSION + f.b());
JSONObject jSONObject = new JSONObject();
jSONObject.put(Constants.PARAM_CLIENT_ID, a);
jSONObject.put("client_type", "30100");
jSONObject.put(IjkMediaMeta.IJKM_KEY_FORMAT, com.mobile.auth.w.b.a("jsonp"));
jSONObject.put("version", com.mobile.auth.w.b.a(BuildConfig.CUCC_SDK_VERSION));
if (i != 2) {
jSONObject.put("business_type", com.mobile.auth.w.b.a(str2));
}
jSONObject.put("packname", com.mobile.auth.w.b.a(packageName));
jSONObject.put("packsign", com.mobile.auth.w.b.a(b));
jSONObject.put("timeStamp", com.mobile.auth.w.b.a(sb2));
jSONObject.put("key", com.mobile.auth.w.b.a(d));
jSONObject.put("fp", com.mobile.auth.w.b.a(a2));
jSONObject.put("sign", com.mobile.auth.w.b.a(a3));
return jSONObject.toString();
} catch (Exception e) {
e.printStackTrace();
return "";
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
private void a() {
try {
try {
ScheduledExecutorService scheduledExecutorService = this.a;
if (scheduledExecutorService != null) {
scheduledExecutorService.shutdownNow();
this.a = null;
}
} catch (Exception e) {
e.printStackTrace();
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
private void a(Context context, int i) {
try {
this.d = com.mobile.auth.w.a.a();
a(context, i, new com.mobile.auth.y.a() {
@Override
public void a(int i2, String str) {
try {
synchronized (a.this) {
if (a.a(a.this) == null) {
return;
}
if (i2 == 1) {
try {
JSONObject jSONObject = new JSONObject(str);
int optInt = jSONObject.optInt("code");
String optString = jSONObject.optString("msg");
String optString2 = jSONObject.optString("data");
if (optInt == 0) {
a.a(a.this).a(optString, URLDecoder.decode(com.mobile.auth.w.a.a(optString2, a.c(a.this)), "UTF-8"));
} else {
a.a(a.this).a(optInt, optString, optString2);
}
} catch (Exception e) {
a.a(a.this).a(10002, "异常" + e.getMessage(), str);
}
} else {
a.a(a.this).a(i2, str);
}
a.a(a.this, (b) null);
a.b(a.this);
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
});
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
private void a(final Context context, final int i, final com.mobile.auth.y.a aVar) {
try {
try {
int a = g.a(context.getApplicationContext());
f.b(a);
if (a == 1) {
com.mobile.auth.z.b.a().a(context, "https://opencloud.wostore.cn/openapi/netauth/precheck/wp?", new b.a() {
@Override
public void a(boolean z, Network network) {
try {
if (z) {
a.a(a.this, context, i, "https://opencloud.wostore.cn/openapi/netauth/precheck/wp?", network, aVar);
} else {
aVar.a(10003, "无法切换至数据网络");
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
});
} else if (a == 0) {
a(context, i, "https://opencloud.wostore.cn/openapi/netauth/precheck/wp?", null, aVar);
} else {
aVar.a(10004, "数据网络未开启");
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
} catch (Exception e) {
e.printStackTrace();
aVar.a(IjkMediaPlayer.FFP_PROP_FLOAT_AVDIFF, "网络判断异常" + e.getMessage());
}
}
private void a(Context context, int i, String str, final Network network, final com.mobile.auth.y.a aVar) {
try {
synchronized (this) {
try {
final String str2 = str + c.a(a(context, i, this.d), "&");
this.b.submit(new Runnable() {
@Override
public void run() {
try {
try {
String a = new com.mobile.auth.y.b().a(str2, a.d(a.this), network);
if (TextUtils.isEmpty(a)) {
aVar.a(10022, "网络请求响应为空");
} else {
aVar.a(1, a);
}
} catch (Exception e) {
e.printStackTrace();
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
});
} catch (Exception e) {
aVar.a(SpeechEvent.EVENT_IST_SYNC_ID, "10009" + e.getMessage());
}
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
static void a(a aVar, Context context, int i, String str, Network network, com.mobile.auth.y.a aVar2) {
try {
aVar.a(context, i, str, network, aVar2);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
private HashMap<String, String> b() {
try {
HashMap<String, String> hashMap = new HashMap<>();
hashMap.put(com.taobao.accs.common.Constants.KEY_MODEL, Build.MODEL);
hashMap.put("system", Build.VERSION.RELEASE);
hashMap.put("woodcock", f.i());
return hashMap;
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
static void b(a aVar) {
try {
aVar.a();
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
static String c(a aVar) {
try {
return aVar.d;
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
static HashMap d(a aVar) {
try {
return aVar.b();
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
public void a(Context context, int i, int i2, com.mobile.auth.v.a aVar) {
try {
b bVar = new b();
this.c = bVar;
bVar.a(aVar);
try {
this.a.schedule(new Runnable() {
@Override
public void run() {
try {
synchronized (a.this) {
if (a.a(a.this) != null) {
a.a(a.this).a(10000, "请求超时");
a.a(a.this, (b) null);
a.b(a.this);
}
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
}, i, TimeUnit.MILLISECONDS);
a(context, i2);
} catch (Exception e) {
e.printStackTrace();
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
}