热汗舞蹈 v1.24.1.0版本的 MD5 值为:f1dc6ef07903515a73f51f41f372123e
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.unicom.xiaowo.account.shield.c;
import android.content.Context;
import android.net.Network;
import android.os.Build;
import android.text.TextUtils;
import com.huawei.hms.framework.common.ContainerUtils;
import com.unicom.xiaowo.account.shield.e.c;
import com.unicom.xiaowo.account.shield.e.e;
import com.unicom.xiaowo.account.shield.e.g;
import com.unicom.xiaowo.account.shield.e.i;
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 f27697c;
private String f27698d;
private ExecutorService f27696b = Executors.newSingleThreadExecutor();
private ScheduledExecutorService f27695a = Executors.newScheduledThreadPool(1);
public interface InterfaceC0279a {
void a(String str);
}
private String a(Context context, int i10, String str) {
try {
String packageName = context.getPackageName();
String b10 = i.b(context, context.getPackageName());
if (packageName == null) {
packageName = "";
}
if (b10 == null) {
b10 = "";
}
String a10 = g.a();
String str2 = i10 != 2 ? "1" : "";
String str3 = "" + System.currentTimeMillis();
String a11 = com.unicom.xiaowo.account.shield.a.b.a(i.c(context).getBytes());
String d10 = i.d(str);
String a12 = i.a(str2 + a10 + "30100jsonp" + a11 + d10 + "1" + packageName + b10 + str3 + "5.2.2AR002B0325" + g.b());
JSONObject jSONObject = new JSONObject();
jSONObject.put("client_id", a10);
jSONObject.put("client_type", "30100");
jSONObject.put("format", com.unicom.xiaowo.account.shield.a.b.a("jsonp"));
jSONObject.put("version", com.unicom.xiaowo.account.shield.a.b.a("5.2.2AR002B0325"));
if (i10 != 2) {
jSONObject.put("business_type", com.unicom.xiaowo.account.shield.a.b.a(str2));
}
jSONObject.put("packname", com.unicom.xiaowo.account.shield.a.b.a(packageName));
jSONObject.put("packsign", com.unicom.xiaowo.account.shield.a.b.a(b10));
jSONObject.put("timeStamp", com.unicom.xiaowo.account.shield.a.b.a(str3));
jSONObject.put("key", com.unicom.xiaowo.account.shield.a.b.a(d10));
jSONObject.put("fp", com.unicom.xiaowo.account.shield.a.b.a(a11));
jSONObject.put("marking", "1");
jSONObject.put("sign", com.unicom.xiaowo.account.shield.a.b.a(a12));
return jSONObject.toString();
} catch (Exception e10) {
e10.printStackTrace();
return "";
}
}
public void a() {
try {
ScheduledExecutorService scheduledExecutorService = this.f27695a;
if (scheduledExecutorService != null) {
scheduledExecutorService.shutdownNow();
this.f27695a = null;
}
} catch (Exception unused) {
}
}
private void a(final Context context, final int i10) {
this.f27698d = com.unicom.xiaowo.account.shield.a.a.a();
a(context, i10, new com.unicom.xiaowo.account.shield.d.a() {
@Override
public void a(int i11, String str) {
synchronized (a.this) {
if (a.this.f27697c == null) {
if (i10 == 1 && g.e() && i11 == 0) {
try {
JSONObject jSONObject = new JSONObject(str);
if (jSONObject.optInt("code", 1) == 0) {
String decode = URLDecoder.decode(com.unicom.xiaowo.account.shield.a.a.a(jSONObject.optString("data"), a.this.f27698d), "UTF-8");
if (!TextUtils.isEmpty(decode)) {
g.a(context, decode);
}
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
return;
}
if (i11 == 0) {
try {
JSONObject jSONObject2 = new JSONObject(str);
int optInt = jSONObject2.optInt("code", 1);
String optString = jSONObject2.optString("msg", "未知错误");
String optString2 = jSONObject2.optString("data");
if (optInt == 0) {
String decode2 = URLDecoder.decode(com.unicom.xiaowo.account.shield.a.a.a(optString2, a.this.f27698d), "UTF-8");
if (a.this.f27697c != null) {
a.this.f27697c.a(optString, decode2);
}
} else if (a.this.f27697c != null) {
a.this.f27697c.a(optInt, optString, optString2);
}
} catch (Exception e11) {
e11.printStackTrace();
if (a.this.f27697c != null) {
b bVar = a.this.f27697c;
bVar.a(10002, "异常" + e11.getMessage(), str);
}
}
} else if (a.this.f27697c != null) {
a.this.f27697c.a(i11, str);
}
a.this.f27697c = null;
a.this.a();
return;
}
}
});
}
public void a(Context context, int i10, String str, final Network network, final com.unicom.xiaowo.account.shield.d.a aVar) {
synchronized (this) {
if (this.f27696b == null || this.f27697c == null) {
return;
}
try {
final String str2 = str + e.a(a(context, i10, this.f27698d), ContainerUtils.FIELD_DELIMITER);
this.f27696b.submit(new Runnable() {
@Override
public void run() {
try {
String a10 = new com.unicom.xiaowo.account.shield.d.b().a(str2, a.this.b(), network);
if (TextUtils.isEmpty(a10)) {
aVar.a(10022, "网络请求响应为空");
} else {
aVar.a(0, a10);
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
});
} catch (Exception e10) {
aVar.a(10009, "10009" + e10.getMessage());
}
}
}
public HashMap<String, String> b() {
HashMap<String, String> hashMap = new HashMap<>();
hashMap.put("model", Build.MODEL);
hashMap.put("system", Build.VERSION.RELEASE);
hashMap.put("woodcock", g.d());
return hashMap;
}
public void a(Context context, int i10, int i11, InterfaceC0279a interfaceC0279a) {
this.f27697c = new b(interfaceC0279a);
try {
a();
ScheduledExecutorService newScheduledThreadPool = Executors.newScheduledThreadPool(1);
this.f27695a = newScheduledThreadPool;
newScheduledThreadPool.schedule(new Runnable() {
@Override
public void run() {
synchronized (a.this) {
if (a.this.f27697c != null) {
a.this.f27697c.a(10000, "请求超时");
a.this.f27697c = null;
a.this.a();
}
}
}
}, i10, TimeUnit.MILLISECONDS);
a(context, i11);
} catch (Exception e10) {
e10.printStackTrace();
}
}
public void a(final Context context, final int i10, final com.unicom.xiaowo.account.shield.d.a aVar) {
try {
int a10 = i.a(context.getApplicationContext());
g.b(a10);
if (a10 == 1) {
com.unicom.xiaowo.account.shield.e.c.a().a(context, "https://opencloud.wostore.cn/openapi/netauth/precheck/wp?", new c.a() {
@Override
public void a(boolean z10, Network network) {
if (a.this.f27697c == null) {
return;
}
if (z10) {
a.this.a(context, i10, "https://opencloud.wostore.cn/openapi/netauth/precheck/wp?", network, aVar);
} else {
aVar.a(10003, "无法切换至数据网络");
}
}
});
} else if (a10 == 0) {
a(context, i10, "https://opencloud.wostore.cn/openapi/netauth/precheck/wp?", null, aVar);
} else {
aVar.a(10004, "数据网络未开启");
}
} catch (Exception e10) {
e10.printStackTrace();
aVar.a(10005, "网络判断异常" + e10.getMessage());
}
}
public void finalize() {
ScheduledExecutorService scheduledExecutorService = this.f27695a;
if (scheduledExecutorService != null) {
scheduledExecutorService.shutdownNow();
this.f27695a = null;
}
ExecutorService executorService = this.f27696b;
if (executorService != null) {
executorService.shutdownNow();
this.f27696b = null;
}
this.f27697c = null;
this.f27698d = null;
}
}