51黑料 v2.0版本的 MD5 值为:cc00ad70c70d95f274d15d4654c16262
以下内容为反编译后的 a.java 源代码,内容仅作参考
package g.a.b.c;
import android.content.Context;
import android.text.TextUtils;
import g.a.b.j.g;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class a {
public static a p;
public int a = 10000;
public boolean b = false;
public String c = "https://h5.m.taobao.com/mlapp/olist.html";
public int f2035d = 10;
public boolean f2036e = true;
public boolean f2037f = true;
public boolean f2038g = false;
public boolean f2039h = true;
public boolean f2040i = true;
public String f2041j = "";
public boolean f2042k = false;
public boolean f2043l = false;
public boolean f2044m = false;
public boolean f2045n = false;
public List<b> f2046o = null;
public class RunnableC0036a implements Runnable {
public final g.a.b.h.a c;
public final Context f2047d;
public RunnableC0036a(g.a.b.h.a aVar, Context context) {
this.c = aVar;
this.f2047d = context;
}
@Override
public void run() {
try {
g.a.b.f.a a = new g.a.b.f.d.b().a(this.c, this.f2047d, "");
if (a != null) {
a aVar = a.this;
String str = a.b;
Objects.requireNonNull(aVar);
if (!TextUtils.isEmpty(str)) {
JSONObject optJSONObject = new JSONObject(str).optJSONObject("st_sdk_config");
if (optJSONObject != null) {
aVar.c(optJSONObject);
} else {
e.a.a.b.a.G("DynCon", "empty config");
}
}
a aVar2 = a.this;
Objects.requireNonNull(aVar2);
try {
g.b(null, g.a.b.h.b.a().a, "alipay_cashier_dynamic_config", aVar2.e().toString());
} catch (Exception e2) {
e.a.a.b.a.l(e2);
}
}
} catch (Throwable th) {
e.a.a.b.a.l(th);
}
}
}
public static final class b {
public final String a;
public final int b;
public final String c;
public b(String str, int i2, String str2) {
this.a = str;
this.b = i2;
this.c = str2;
}
public static JSONObject a(b bVar) {
if (bVar == null) {
return null;
}
try {
return new JSONObject().put("pn", bVar.a).put("v", bVar.b).put("pk", bVar.c);
} catch (JSONException e2) {
e.a.a.b.a.l(e2);
return null;
}
}
public String toString() {
return String.valueOf(a(this));
}
}
public static a d() {
if (p == null) {
a aVar = new a();
p = aVar;
Objects.requireNonNull(aVar);
String c = g.c(null, g.a.b.h.b.a().a, "alipay_cashier_dynamic_config", null);
if (!TextUtils.isEmpty(c)) {
try {
aVar.c(new JSONObject(c));
} catch (Throwable th) {
e.a.a.b.a.l(th);
}
}
}
return p;
}
public int a() {
int i2 = this.a;
if (i2 >= 1000 && i2 <= 20000) {
StringBuilder O = g.b.a.a.a.O("time = ");
O.append(this.a);
e.a.a.b.a.G("DynCon", O.toString());
return this.a;
}
e.a.a.b.a.G("DynCon", "time(def) = 10000");
return 10000;
}
public void b(g.a.b.h.a aVar, Context context) {
new Thread(new RunnableC0036a(aVar, context)).start();
}
public final void c(JSONObject jSONObject) {
this.a = jSONObject.optInt("timeout", 10000);
this.b = jSONObject.optBoolean("h5_port_degrade", false);
this.c = jSONObject.optString("tbreturl", "https://h5.m.taobao.com/mlapp/olist.html").trim();
this.f2035d = jSONObject.optInt("configQueryInterval", 10);
JSONArray optJSONArray = jSONObject.optJSONArray("launchAppSwitch");
ArrayList arrayList = null;
if (optJSONArray != null) {
ArrayList arrayList2 = new ArrayList();
int length = optJSONArray.length();
for (int i2 = 0; i2 < length; i2++) {
JSONObject optJSONObject = optJSONArray.optJSONObject(i2);
b bVar = optJSONObject == null ? null : new b(optJSONObject.optString("pn"), optJSONObject.optInt("v", 0), optJSONObject.optString("pk"));
if (bVar != null) {
arrayList2.add(bVar);
}
}
arrayList = arrayList2;
}
this.f2046o = arrayList;
this.f2036e = jSONObject.optBoolean("scheme_pay_2", true);
this.f2037f = jSONObject.optBoolean("intercept_batch", true);
this.f2038g = jSONObject.optBoolean("deg_log_mcgw", false);
this.f2039h = jSONObject.optBoolean("deg_start_srv_first", true);
this.f2040i = jSONObject.optBoolean("prev_jump_dual", true);
this.f2041j = jSONObject.optString("use_sc_only", "");
this.f2042k = jSONObject.optBoolean("bind_use_imp", false);
this.f2043l = jSONObject.optBoolean("retry_bnd_once", false);
this.f2044m = jSONObject.optBoolean("skip_trans", false);
this.f2045n = jSONObject.optBoolean("up_before_pay", false);
}
public final JSONObject e() {
JSONArray jSONArray;
JSONObject jSONObject = new JSONObject();
jSONObject.put("timeout", a());
jSONObject.put("h5_port_degrade", this.b);
jSONObject.put("tbreturl", this.c);
jSONObject.put("configQueryInterval", this.f2035d);
List<b> list = this.f2046o;
if (list == null) {
jSONArray = null;
} else {
JSONArray jSONArray2 = new JSONArray();
for (b bVar : list) {
jSONArray2.put(b.a(bVar));
}
jSONArray = jSONArray2;
}
jSONObject.put("launchAppSwitch", jSONArray);
jSONObject.put("scheme_pay_2", this.f2036e);
jSONObject.put("intercept_batch", this.f2037f);
jSONObject.put("deg_log_mcgw", this.f2038g);
jSONObject.put("deg_start_srv_first", this.f2039h);
jSONObject.put("prev_jump_dual", this.f2040i);
jSONObject.put("use_sc_only", this.f2041j);
jSONObject.put("bind_use_imp", this.f2042k);
jSONObject.put("retry_bnd_once", this.f2043l);
jSONObject.put("skip_trans", this.f2044m);
jSONObject.put("up_before_pay", this.f2045n);
return jSONObject;
}
}