搜书大师 v23.2版本的 MD5 值为:5ee433f6456b6278bd6e80a5d44df55e
以下内容为反编译后的 uk0.java 源代码,内容仅作参考
package com.lygame.aaa;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.text.TextUtils;
import com.lygame.aaa.gi0;
import com.lygame.aaa.jg0;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
public class uk0 extends rj0 implements ik0 {
public class a implements gi0.d {
public final Message a;
public final Handler b;
public final String c;
public a(Message message, Handler handler, String str) {
this.a = message;
this.b = handler;
this.c = str;
}
@Override
public void onResponse(yi0 yi0Var) {
uk0.this.d(yi0Var, this.a, this.b, this.c);
}
}
public class b implements gi0.d {
public final String a;
public final String b;
public final Message c;
public final Handler d;
public class a extends Handler {
public final JSONObject a;
public a(Looper looper, JSONObject jSONObject) {
super(looper);
this.a = jSONObject;
}
@Override
public void handleMessage(Message message) {
super.handleMessage(message);
Message obtain = Message.obtain();
obtain.what = message.what;
obtain.arg1 = message.arg1;
if (message.arg1 == 0) {
HashMap hashMap = new HashMap();
hashMap.put(ih0.KEY_RESPONSE, this.a.toString());
hashMap.put("action_tag", b.this.b);
obtain.obj = hashMap;
} else {
obtain.obj = message.obj;
}
b.this.d.sendMessage(obtain);
}
}
public b(String str, String str2, Message message, Handler handler) {
this.a = str;
this.b = str2;
this.c = message;
this.d = handler;
}
@Override
public void onResponse(yi0 yi0Var) {
int i;
int i2;
String b;
boolean z = true;
int i3 = 0;
qg0 qg0Var = null;
if (yi0Var != null) {
try {
i2 = yi0Var.d;
} catch (Exception e) {
e = e;
} catch (Throwable th) {
th = th;
z = false;
i = 0;
}
try {
} catch (Exception e2) {
e = e2;
i3 = i2;
z = false;
try {
e.printStackTrace();
if (z) {
}
} catch (Throwable th2) {
th = th2;
i = i3;
if (!z) {
uk0.this.b(this.c, this.d, qg0Var == null ? new qg0() : qg0Var, i, this.b);
}
throw th;
}
} catch (Throwable th3) {
th = th3;
i = i2;
z = false;
}
if (yi0Var.a && (qg0Var = al0.a((b = yi0Var.b()))) != null && qg0Var.a() == 0) {
JSONArray optJSONArray = new JSONObject(b).optJSONObject("data").optJSONArray("missions");
if (optJSONArray != null && optJSONArray.length() != 0) {
try {
JSONObject optJSONObject = optJSONArray.optJSONObject(0);
String optString = optJSONObject.optString("missionName");
String optString2 = optJSONObject.optString("missionParams");
optJSONObject.put("status", 1);
if (!TextUtils.isEmpty(this.a)) {
optString2 = this.a;
}
uk0.this.h(this.b, optString, optString2, 1, this.c, new a(Looper.getMainLooper(), optJSONObject));
i3 = i2;
} catch (Exception e3) {
e = e3;
i3 = i2;
e.printStackTrace();
if (z) {
if (qg0Var == null) {
qg0Var = new qg0();
}
uk0.this.b(this.c, this.d, qg0Var, i3, this.b);
return;
}
return;
} catch (Throwable th4) {
th = th4;
i = i2;
if (!z) {
}
throw th;
}
if (z) {
if (qg0Var == null) {
qg0Var = new qg0();
}
uk0.this.b(this.c, this.d, qg0Var, i3, this.b);
return;
}
return;
}
qg0Var.b(-999L);
qg0Var.c("There is no unfinished task");
}
i3 = i2;
}
z = false;
if (z) {
}
}
}
public uk0() {
this.a = new gi0();
}
public void h(String str, String str2, String str3, int i, Message message, Handler handler) {
if (ki0.getInstance().a() == null) {
b(message, handler, new qg0(), 0, str);
} else {
this.a.j(jg0.d.b, tl0.b(str2, str3, i).toString().getBytes(StandardCharsets.UTF_8), null, new a(message, handler, str));
}
}
@Override
public void finishCloudMission(Message message, Handler handler) {
if (ki0.getInstance().q()) {
Message obtain = Message.obtain();
obtain.what = message.what;
Map map = (Map) message.obj;
this.a.j("http://47.105.86.145/sw/search", a(tl0.a((String) map.get("missionName")), 2).toString().getBytes(StandardCharsets.UTF_8), null, new b((String) map.get("missionParams"), (String) map.get("action_tag"), obtain, handler));
}
}
@Override
public void getAllCloudMissions(Message message, Handler handler) {
if (ki0.getInstance().q()) {
getCloudMissions(message, handler);
}
}
@Override
public void getAndFinishCloudMission(Message message, Handler handler) {
finishCloudMission(message, handler);
}
@Override
public void getCloudMission(Message message, Handler handler) {
if (ki0.getInstance().q()) {
getCloudMissions(message, handler);
}
}
@Override
public void getCloudMissions(Message message, Handler handler) {
if (ki0.getInstance().q()) {
Map map = (Map) message.obj;
String str = map != null ? (String) map.get("action_tag") : null;
Message obtain = Message.obtain();
obtain.what = message.what;
e(str, obtain, handler, tl0.c(map), 2);
}
}
@Override
public void setCloudMission(Message message, Handler handler) {
if (ki0.getInstance().q()) {
Map map = (Map) message.obj;
String str = (String) map.get("missionName");
String str2 = (String) map.get("missionParams");
String str3 = (String) map.get("action_tag");
Message obtain = Message.obtain();
obtain.what = message.what;
h(str3, str, str2, 0, obtain, handler);
}
}
}