得物.apk(点击下载) / a.java


package com.alipay.sdk.m.l;

import a.f;
import android.content.Context;
import android.text.TextUtils;
import com.alipay.sdk.m.t.e;
import com.alipay.sdk.m.t.j;
import com.alipay.sdk.m.t.n;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.meizu.cloud.pushsdk.notification.model.NotifyType;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public final class a {
    public static a y0;

    /* renamed from: a  reason: collision with root package name */
    public int f3548a = 10000;
    public boolean b = false;

    /* renamed from: c  reason: collision with root package name */
    public String f3549c = "https://h5.m.taobao.com/mlapp/olist.html";
    public int d = 10;
    public boolean e = true;
    public boolean f = true;

    /* renamed from: g  reason: collision with root package name */
    public boolean f3550g = false;

    /* renamed from: h  reason: collision with root package name */
    public boolean f3551h = false;
    public boolean i = true;
    public boolean j = true;
    public String k = "";
    public boolean l = false;
    public boolean m = false;
    public boolean n = false;
    public boolean o = false;
    public boolean p = true;

    /* renamed from: q  reason: collision with root package name */
    public String f3552q = "";
    public String r = "";
    public boolean s = false;
    public boolean t = false;

    /* renamed from: u  reason: collision with root package name */
    public int f3553u = 1000;

    /* renamed from: v  reason: collision with root package name */
    public boolean f3554v = false;
    public JSONObject w;
    public boolean x = true;
    public List<b> y = null;
    public int z = -1;

    /* renamed from: com.alipay.sdk.m.l.a$a  reason: collision with other inner class name */
    public class RunnableC0080a implements Runnable {

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ com.alipay.sdk.m.r.a f3555a;
        public final /* synthetic */ Context b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ boolean f3556c;
        public final /* synthetic */ int d;

        public RunnableC0080a(com.alipay.sdk.m.r.a aVar, Context context, boolean z, int i) {
            this.f3555a = aVar;
            this.b = context;
            this.f3556c = z;
            this.d = i;
        }

        public void run() {
            try {
                com.alipay.sdk.m.o.b a5 = new com.alipay.sdk.m.p.b().a(this.f3555a, this.b);
                if (a5 != null) {
                    a.this.a((a) this.f3555a, (com.alipay.sdk.m.r.a) a5.a());
                    a.this.a((a) com.alipay.sdk.m.r.a.f());
                    com.alipay.sdk.m.r.a aVar = this.f3555a;
                    com.alipay.sdk.m.j.a.a(aVar, "biz", "offcfg|" + this.f3556c + "|" + this.d);
                }
            } catch (Throwable th2) {
                e.a(th2);
            }
        }
    }

    private JSONObject A() throws JSONException {
        JSONObject jSONObject = new JSONObject();
        jSONObject.put("timeout", k());
        jSONObject.put("h5_port_degrade", v());
        jSONObject.put("tbreturl", q());
        jSONObject.put("configQueryInterval", d());
        jSONObject.put("launchAppSwitch", b.a(l()));
        jSONObject.put("scheme_pay_2", i());
        jSONObject.put("intercept_batch", h());
        jSONObject.put("deg_log_mcgw", e());
        jSONObject.put("deg_start_srv_first", f());
        jSONObject.put("prev_jump_dual", m());
        jSONObject.put("use_sc_only", g());
        jSONObject.put("bind_use_imp", b());
        jSONObject.put("retry_bnd_once", n());
        jSONObject.put("skip_trans", p());
        jSONObject.put("start_trans", x());
        jSONObject.put("up_before_pay", r());
        jSONObject.put("use_sc_lck_a", o());
        jSONObject.put("lck_k", j());
        jSONObject.put("bind_with_startActivity", c());
        jSONObject.put("retry_aidl_activity_not_start", w());
        jSONObject.put("cfg_max_time", y());
        jSONObject.put("get_oa_id", u());
        jSONObject.put("notifyFailApp", t());
        jSONObject.put("ap_args", a());
        return jSONObject;
    }

    private int y() {
        return this.f3553u;
    }

    public static a z() {
        if (y0 == null) {
            a aVar = new a();
            y0 = aVar;
            aVar.s();
        }
        return y0;
    }

    public boolean b() {
        return this.l;
    }

    public String c() {
        return this.r;
    }

    public int d() {
        return this.d;
    }

    public boolean e() {
        return this.f3551h;
    }

    public boolean f() {
        return this.i;
    }

    public String g() {
        return this.k;
    }

    public boolean h() {
        return this.f;
    }

    public boolean i() {
        return this.e;
    }

    public String j() {
        return this.f3552q;
    }

    public int k() {
        int i3 = this.f3548a;
        if (i3 < 1000 || i3 > 20000) {
            e.b("DynCon", "time(def) = 10000");
            return 10000;
        }
        StringBuilder h12 = f.h("time = ");
        h12.append(this.f3548a);
        e.b("DynCon", h12.toString());
        return this.f3548a;
    }

    public List<b> l() {
        return this.y;
    }

    public boolean m() {
        return this.j;
    }

    public boolean n() {
        return this.m;
    }

    public boolean o() {
        return this.s;
    }

    public boolean p() {
        return this.n;
    }

    public String q() {
        return this.f3549c;
    }

    public boolean r() {
        return this.p;
    }

    public void s() {
        Context b2 = com.alipay.sdk.m.r.b.d().b();
        String a5 = j.a(com.alipay.sdk.m.r.a.f(), b2, "alipay_cashier_dynamic_config", null);
        try {
            this.z = Integer.parseInt(j.a(com.alipay.sdk.m.r.a.f(), b2, "utdid_factor", "-1"));
        } catch (Exception unused) {
        }
        a(a5);
    }

    public boolean t() {
        return this.f3554v;
    }

    public boolean u() {
        return this.x;
    }

    public boolean v() {
        return this.b;
    }

    public boolean w() {
        return this.t;
    }

    public boolean x() {
        return this.o;
    }

    public static final class b {

        /* renamed from: a  reason: collision with root package name */
        public final String f3557a;
        public final int b;

        /* renamed from: c  reason: collision with root package name */
        public final String f3558c;

        public b(String str, int i, String str2) {
            this.f3557a = str;
            this.b = i;
            this.f3558c = str2;
        }

        public static b a(JSONObject jSONObject) {
            if (jSONObject == null) {
                return null;
            }
            return new b(jSONObject.optString("pn"), jSONObject.optInt(NotifyType.VIBRATE, 0), jSONObject.optString(PushConstants.URI_PACKAGE_NAME));
        }

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

        public static List<b> a(JSONArray jSONArray) {
            if (jSONArray == null) {
                return null;
            }
            ArrayList arrayList = new ArrayList();
            int length = jSONArray.length();
            for (int i = 0; i < length; i++) {
                b a5 = a(jSONArray.optJSONObject(i));
                if (a5 != null) {
                    arrayList.add(a5);
                }
            }
            return arrayList;
        }

        public static JSONObject a(b bVar) {
            if (bVar == null) {
                return null;
            }
            try {
                return new JSONObject().put("pn", bVar.f3557a).put(NotifyType.VIBRATE, bVar.b).put(PushConstants.URI_PACKAGE_NAME, bVar.f3558c);
            } catch (JSONException e) {
                e.a(e);
                return null;
            }
        }

        public static JSONArray a(List<b> list) {
            if (list == null) {
                return null;
            }
            JSONArray jSONArray = new JSONArray();
            for (b bVar : list) {
                jSONArray.put(a(bVar));
            }
            return jSONArray;
        }
    }

    public JSONObject a() {
        return this.w;
    }

    public void a(boolean z4) {
        this.f3550g = z4;
    }

    private void a(String str) {
        if (!TextUtils.isEmpty(str)) {
            try {
                a(new JSONObject(str));
            } catch (Throwable th2) {
                e.a(th2);
            }
        }
    }

    /* access modifiers changed from: private */
    /* access modifiers changed from: public */
    private void a(com.alipay.sdk.m.r.a aVar) {
        try {
            JSONObject A = A();
            j.b(aVar, com.alipay.sdk.m.r.b.d().b(), "alipay_cashier_dynamic_config", A.toString());
        } catch (Exception e6) {
            e.a(e6);
        }
    }

    /* access modifiers changed from: private */
    /* access modifiers changed from: public */
    private void a(com.alipay.sdk.m.r.a aVar, String str) {
        if (!TextUtils.isEmpty(str)) {
            try {
                JSONObject jSONObject = new JSONObject(str);
                JSONObject optJSONObject = jSONObject.optJSONObject("st_sdk_config");
                com.alipay.sdk.m.t.a.a(aVar, optJSONObject, com.alipay.sdk.m.t.a.a(aVar, jSONObject));
                if (optJSONObject != null) {
                    a(optJSONObject);
                } else {
                    e.e("DynCon", "empty config");
                }
            } catch (Throwable th2) {
                e.a(th2);
            }
        }
    }

    private void a(JSONObject jSONObject) {
        this.f3548a = jSONObject.optInt("timeout", 10000);
        this.b = jSONObject.optBoolean("h5_port_degrade", false);
        this.f3549c = jSONObject.optString("tbreturl", "https://h5.m.taobao.com/mlapp/olist.html").trim();
        this.d = jSONObject.optInt("configQueryInterval", 10);
        this.y = b.a(jSONObject.optJSONArray("launchAppSwitch"));
        this.e = jSONObject.optBoolean("scheme_pay_2", true);
        this.f = jSONObject.optBoolean("intercept_batch", true);
        this.f3551h = jSONObject.optBoolean("deg_log_mcgw", false);
        this.i = jSONObject.optBoolean("deg_start_srv_first", true);
        this.j = jSONObject.optBoolean("prev_jump_dual", true);
        this.k = jSONObject.optString("use_sc_only", "");
        this.l = jSONObject.optBoolean("bind_use_imp", false);
        this.m = jSONObject.optBoolean("retry_bnd_once", false);
        this.n = jSONObject.optBoolean("skip_trans", false);
        this.o = jSONObject.optBoolean("start_trans", false);
        this.p = jSONObject.optBoolean("up_before_pay", true);
        this.f3552q = jSONObject.optString("lck_k", "");
        this.s = jSONObject.optBoolean("use_sc_lck_a", false);
        this.t = jSONObject.optBoolean("retry_aidl_activity_not_start", false);
        this.f3554v = jSONObject.optBoolean("notifyFailApp", false);
        this.r = jSONObject.optString("bind_with_startActivity", "");
        this.f3553u = jSONObject.optInt("cfg_max_time", 1000);
        this.x = jSONObject.optBoolean("get_oa_id", true);
        this.w = jSONObject.optJSONObject("ap_args");
    }

    public void a(com.alipay.sdk.m.r.a aVar, Context context, boolean z4, int i3) {
        com.alipay.sdk.m.j.a.a(aVar, "biz", "oncfg|" + z4 + "|" + i3);
        RunnableC0080a aVar2 = new RunnableC0080a(aVar, context, z4, i3);
        if (!z4 || n.h()) {
            p4.f fVar = new p4.f(aVar2, "​com.alipay.sdk.m.l.a");
            fVar.setName(p4.f.a("AlipayDCP", "​com.alipay.sdk.m.l.a"));
            fVar.setName(p4.f.a(fVar.getName(), "​com.alipay.sdk.m.l.a"));
            fVar.start();
            return;
        }
        int y4 = y();
        if (!n.a((long) y4, aVar2, "AlipayDCPBlok")) {
            com.alipay.sdk.m.j.a.b(aVar, "biz", "LogAppFetchConfigTimeout", "" + y4);
        }
    }

    public boolean a(Context context, int i3) {
        if (this.z == -1) {
            this.z = n.a();
            j.b(com.alipay.sdk.m.r.a.f(), context, "utdid_factor", String.valueOf(this.z));
        }
        return this.z < i3;
    }
}