小爽音 v1.3版本的 MD5 值为:448355de843c720d712f30c7cdfbd99b

以下内容为反编译后的 a.java 源代码,内容仅作参考


package h.a.b.c;

import android.content.Context;
import android.text.TextUtils;
import g.a.a.f;
import h.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 f2363p;
    public int a = 10000;
    public boolean b = false;
    public String c = "https://h5.m.taobao.com/mlapp/olist.html";
    public int f2364d = 10;
    public boolean f2365e = true;
    public boolean f2366f = true;
    public boolean f2367g = false;
    public boolean f2368h = true;
    public boolean f2369i = true;
    public String f2370j = "";
    public boolean f2371k = false;
    public boolean f2372l = false;
    public boolean f2373m = false;
    public boolean f2374n = false;
    public List<b> f2375o = null;

    public class RunnableC0038a implements Runnable {
        public final h.a.b.h.a c;
        public final Context f2376d;

        public RunnableC0038a(h.a.b.h.a aVar, Context context) {
            this.c = aVar;
            this.f2376d = context;
        }

        @Override
        public void run() {
            try {
                h.a.b.f.a a = new h.a.b.f.d.b().a(this.c, this.f2376d, "");
                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 {
                            f.Z("DynCon", "empty config");
                        }
                    }
                    a aVar2 = a.this;
                    Objects.requireNonNull(aVar2);
                    try {
                        g.b(null, h.a.b.h.b.a().a, "alipay_cashier_dynamic_config", aVar2.e().toString());
                    } catch (Exception e2) {
                        f.l(e2);
                    }
                }
            } catch (Throwable th) {
                f.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) {
                f.l(e2);
                return null;
            }
        }

        public String toString() {
            return String.valueOf(a(this));
        }
    }

    public static a d() {
        if (f2363p == null) {
            a aVar = new a();
            f2363p = aVar;
            Objects.requireNonNull(aVar);
            String c = g.c(null, h.a.b.h.b.a().a, "alipay_cashier_dynamic_config", null);
            if (!TextUtils.isEmpty(c)) {
                try {
                    aVar.c(new JSONObject(c));
                } catch (Throwable th) {
                    f.l(th);
                }
            }
        }
        return f2363p;
    }

    public int a() {
        int i2 = this.a;
        if (i2 >= 1000 && i2 <= 20000) {
            StringBuilder P = h.b.a.a.a.P("time = ");
            P.append(this.a);
            f.Z("DynCon", P.toString());
            return this.a;
        }
        f.Z("DynCon", "time(def) = 10000");
        return 10000;
    }

    public void b(h.a.b.h.a aVar, Context context) {
        new Thread(new RunnableC0038a(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.f2364d = 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.f2375o = arrayList;
        this.f2365e = jSONObject.optBoolean("scheme_pay_2", true);
        this.f2366f = jSONObject.optBoolean("intercept_batch", true);
        this.f2367g = jSONObject.optBoolean("deg_log_mcgw", false);
        this.f2368h = jSONObject.optBoolean("deg_start_srv_first", true);
        this.f2369i = jSONObject.optBoolean("prev_jump_dual", true);
        this.f2370j = jSONObject.optString("use_sc_only", "");
        this.f2371k = jSONObject.optBoolean("bind_use_imp", false);
        this.f2372l = jSONObject.optBoolean("retry_bnd_once", false);
        this.f2373m = jSONObject.optBoolean("skip_trans", false);
        this.f2374n = 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.f2364d);
        List<b> list = this.f2375o;
        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.f2365e);
        jSONObject.put("intercept_batch", this.f2366f);
        jSONObject.put("deg_log_mcgw", this.f2367g);
        jSONObject.put("deg_start_srv_first", this.f2368h);
        jSONObject.put("prev_jump_dual", this.f2369i);
        jSONObject.put("use_sc_only", this.f2370j);
        jSONObject.put("bind_use_imp", this.f2371k);
        jSONObject.put("retry_bnd_once", this.f2372l);
        jSONObject.put("skip_trans", this.f2373m);
        jSONObject.put("up_before_pay", this.f2374n);
        return jSONObject;
    }
}