抖阴.apk(点击下载) / a.java


package e.a.b.d;

import android.content.Context;
import android.text.TextUtils;
import com.alipay.sdk.util.e;
import com.alipay.sdk.util.h;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public final class a {
    private static final boolean A = false;
    private static final boolean B = false;
    private static final boolean C = false;
    private static final boolean D = false;
    private static final int E = 1000;
    private static final int F = 20000;
    private static final String G = "alipay_cashier_dynamic_config";
    private static final String H = "timeout";
    private static final String I = "h5_port_degrade";
    private static final String J = "st_sdk_config";
    private static final String K = "tbreturl";
    private static final String L = "launchAppSwitch";
    private static final String M = "configQueryInterval";
    private static final String N = "deg_log_mcgw";
    private static final String O = "deg_start_srv_first";
    private static final String P = "prev_jump_dual";
    private static final String Q = "use_sc_only";
    private static final String R = "bind_use_imp";
    private static final String S = "retry_bnd_once";
    private static final String T = "skip_trans";
    private static final String U = "up_before_pay";
    private static final String V = "scheme_pay_2";
    private static final String W = "intercept_batch";
    private static a X = null;
    private static final String q = "DynCon";
    private static final int r = 10000;
    private static final String s = "https://h5.m.taobao.com/mlapp/olist.html";
    private static final int t = 10;
    private static final boolean u = true;
    private static final boolean v = true;
    private static final boolean w = false;
    private static final boolean x = true;
    private static final boolean y = true;
    private static final String z = "";
    private int a = 10000;

    /* renamed from: b  reason: collision with root package name */
    private boolean f7208b = false;

    /* renamed from: c  reason: collision with root package name */
    private String f7209c = s;

    /* renamed from: d  reason: collision with root package name */
    private int f7210d = 10;

    /* renamed from: e  reason: collision with root package name */
    private boolean f7211e = true;

    /* renamed from: f  reason: collision with root package name */
    private boolean f7212f = true;
    public boolean g = false;
    private boolean h = false;
    private boolean i = true;
    private boolean j = true;
    private String k = "";
    private boolean l = false;
    private boolean m = false;
    private boolean n = false;
    private boolean o = false;
    private List<b> p = null;

    /* access modifiers changed from: package-private */
    /* renamed from: e.a.b.d.a$a  reason: collision with other inner class name */
    public class RunnableC0247a implements Runnable {
        final /* synthetic */ e.a.b.i.a t;
        final /* synthetic */ Context u;

        RunnableC0247a(e.a.b.i.a aVar, Context context) {
            this.t = aVar;
            this.u = context;
        }

        public void run() {
            try {
                e.a.b.h.b a = new e.a.b.h.f.b().a(this.t, this.u);
                if (a != null) {
                    a.this.b(a.b());
                    a.this.a((a) e.a.b.i.a.d());
                }
            } catch (Throwable th) {
                e.a(th);
            }
        }
    }

    public static a p() {
        if (X == null) {
            X = new a();
            X.q();
        }
        return X;
    }

    private void q() {
        a(h.b(e.a.b.i.a.d(), e.a.b.i.b.d().a(), G, null));
    }

    private JSONObject r() throws JSONException {
        JSONObject jSONObject = new JSONObject();
        jSONObject.put(H, a());
        jSONObject.put(I, b());
        jSONObject.put(K, e());
        jSONObject.put(M, f());
        jSONObject.put(L, b.a(o()));
        jSONObject.put(V, c());
        jSONObject.put(W, d());
        jSONObject.put(N, g());
        jSONObject.put(O, h());
        jSONObject.put(P, i());
        jSONObject.put(Q, j());
        jSONObject.put(R, k());
        jSONObject.put(S, l());
        jSONObject.put(T, m());
        jSONObject.put(U, n());
        return jSONObject;
    }

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

    public boolean c() {
        return this.f7211e;
    }

    public boolean d() {
        return this.f7212f;
    }

    public String e() {
        return this.f7209c;
    }

    public int f() {
        return this.f7210d;
    }

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

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

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

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

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

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

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

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

    public List<b> o() {
        return this.p;
    }

    /* access modifiers changed from: private */
    /* access modifiers changed from: public */
    private void b(String str) {
        if (!TextUtils.isEmpty(str)) {
            try {
                JSONObject optJSONObject = new JSONObject(str).optJSONObject(J);
                if (optJSONObject != null) {
                    a(optJSONObject);
                } else {
                    e.c(q, "empty config");
                }
            } catch (Throwable th) {
                e.a(th);
            }
        }
    }

    public static final class b {
        public final String a;

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

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

        public b(String str, int i, String str2) {
            this.a = str;
            this.f7213b = i;
            this.f7214c = str2;
        }

        public static b a(JSONObject jSONObject) {
            if (jSONObject == null) {
                return null;
            }
            return new b(jSONObject.optString("pn"), jSONObject.optInt("v", 0), jSONObject.optString("pk"));
        }

        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 a2 = a(jSONArray.optJSONObject(i));
                if (a2 != null) {
                    arrayList.add(a2);
                }
            }
            return arrayList;
        }

        public static JSONObject a(b bVar) {
            if (bVar == null) {
                return null;
            }
            try {
                return new JSONObject().put("pn", bVar.a).put("v", bVar.f7213b).put("pk", bVar.f7214c);
            } catch (JSONException e2) {
                e.a(e2);
                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 int a() {
        int i2 = this.a;
        if (i2 < 1000 || i2 > F) {
            e.a(q, "time(def) = 10000");
            return 10000;
        }
        e.a(q, "time = " + this.a);
        return this.a;
    }

    public void a(boolean z2) {
        this.g = z2;
    }

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

    /* access modifiers changed from: private */
    /* access modifiers changed from: public */
    private void a(e.a.b.i.a aVar) {
        try {
            h.a(aVar, e.a.b.i.b.d().a(), G, r().toString());
        } catch (Exception e2) {
            e.a(e2);
        }
    }

    private void a(JSONObject jSONObject) {
        this.a = jSONObject.optInt(H, 10000);
        this.f7208b = jSONObject.optBoolean(I, false);
        this.f7209c = jSONObject.optString(K, s).trim();
        this.f7210d = jSONObject.optInt(M, 10);
        this.p = b.a(jSONObject.optJSONArray(L));
        this.f7211e = jSONObject.optBoolean(V, true);
        this.f7212f = jSONObject.optBoolean(W, true);
        this.h = jSONObject.optBoolean(N, false);
        this.i = jSONObject.optBoolean(O, true);
        this.j = jSONObject.optBoolean(P, true);
        this.k = jSONObject.optString(Q, "");
        this.l = jSONObject.optBoolean(R, false);
        this.m = jSONObject.optBoolean(S, false);
        this.n = jSONObject.optBoolean(T, false);
        this.o = jSONObject.optBoolean(U, false);
    }

    public void a(e.a.b.i.a aVar, Context context) {
        new Thread(new RunnableC0247a(aVar, context)).start();
    }
}