package com.alipay.sdk.data; import android.content.Context; import android.text.TextUtils; import com.alipay.sdk.sys.b; import com.alipay.sdk.util.j; import org.json.JSONObject; public final class a { /* renamed from: a reason: collision with root package name */ public static final int f3648a = 3500; public static final String b = "http://h5.m.taobao.com/trade/paySuccess.html?bizOrderId=$OrderId$&"; public static final int c = 1000; public static final int d = 20000; public static final String e = "alipay_cashier_dynamic_config"; public static final String f = "timeout"; public static final String g = "st_sdk_config"; public static final String h = "tbreturl"; private static a k; int i = f3648a; public String j = b; private static /* synthetic */ void a(a aVar) { try { JSONObject jSONObject = new JSONObject(); jSONObject.put(f, aVar.a()); jSONObject.put(h, aVar.j); j.a(b.a().f3664a, e, jSONObject.toString()); } catch (Exception unused) { } } private static /* synthetic */ void a(a aVar, String str) { if (!TextUtils.isEmpty(str)) { try { JSONObject optJSONObject = new JSONObject(str).optJSONObject(g); aVar.i = optJSONObject.optInt(f, f3648a); aVar.j = optJSONObject.optString(h, b).trim(); } catch (Throwable unused) { } } } private void a(String str) { if (!TextUtils.isEmpty(str)) { try { JSONObject jSONObject = new JSONObject(str); this.i = jSONObject.optInt(f, f3648a); this.j = jSONObject.optString(h, b).trim(); } catch (Throwable unused) { } } } public static a b() { if (k == null) { a aVar = new a(); k = aVar; String b2 = j.b(b.a().f3664a, e, null); if (!TextUtils.isEmpty(b2)) { try { JSONObject jSONObject = new JSONObject(b2); aVar.i = jSONObject.optInt(f, f3648a); aVar.j = jSONObject.optString(h, b).trim(); } catch (Throwable unused) { } } } return k; } private void b(String str) { if (!TextUtils.isEmpty(str)) { try { JSONObject optJSONObject = new JSONObject(str).optJSONObject(g); this.i = optJSONObject.optInt(f, f3648a); this.j = optJSONObject.optString(h, b).trim(); } catch (Throwable unused) { } } } private String c() { return this.j; } private void d() { String b2 = j.b(b.a().f3664a, e, null); if (!TextUtils.isEmpty(b2)) { try { JSONObject jSONObject = new JSONObject(b2); this.i = jSONObject.optInt(f, f3648a); this.j = jSONObject.optString(h, b).trim(); } catch (Throwable unused) { } } } private void e() { try { JSONObject jSONObject = new JSONObject(); jSONObject.put(f, a()); jSONObject.put(h, this.j); j.a(b.a().f3664a, e, jSONObject.toString()); } catch (Exception unused) { } } public final int a() { int i2 = this.i; if (i2 < 1000 || i2 > 20000) { return f3648a; } new StringBuilder("DynamicConfig::getJumpTimeout >").append(this.i); return this.i; } public final void a(Context context) { new Thread(new b(this, context)).start(); } }