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


package bh1;

import ah1.b;
import ah1.c;
import ah1.e;
import ah1.f;
import android.text.TextUtils;
import android.util.Base64;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import java.nio.charset.StandardCharsets;
import org.json.JSONException;
import org.json.JSONObject;

/* compiled from: R8$$SyntheticClass */
public final /* synthetic */ class a implements Runnable {
    public static final /* synthetic */ a b = new a();

    public final void run() {
        String str;
        long j;
        if (!PatchProxy.proxy(new Object[0], null, b.changeQuickRedirect, true, 341456, new Class[0], Void.TYPE).isSupported) {
            String b2 = new b().b("https://app.dewu.com/static/sdk/verify/url");
            if (!TextUtils.isEmpty(b2)) {
                c b5 = c.b();
                String str2 = "";
                if (!PatchProxy.proxy(new Object[]{b2}, b5, c.changeQuickRedirect, false, 341458, new Class[]{String.class}, Void.TYPE).isSupported) {
                    try {
                        JSONObject jSONObject = new JSONObject(b2).getJSONObject("data");
                        b5.f1682a = jSONObject.getBoolean("blockStrategy") + str2;
                        b5.b = jSONObject.getBoolean("isAlwaysTrue") + str2;
                        b5.f1683c = jSONObject.getString("logurl");
                        b5.d = jSONObject.getString("whiteConfig");
                        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], null, f.changeQuickRedirect, true, 341448, new Class[0], Long.TYPE);
                        if (proxy.isSupported) {
                            j = ((Long) proxy.result).longValue();
                        } else {
                            j = System.currentTimeMillis();
                        }
                        b5.f = j;
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }
                if (!PatchProxy.proxy(new Object[]{b5}, null, c.changeQuickRedirect, true, 341441, new Class[]{c.class}, Void.TYPE).isSupported) {
                    PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], b5, c.changeQuickRedirect, false, 341459, new Class[0], String.class);
                    if (proxy2.isSupported) {
                        str = (String) proxy2.result;
                    } else {
                        JSONObject jSONObject2 = new JSONObject();
                        try {
                            jSONObject2.put("blockStrategy", b5.f1682a);
                            jSONObject2.put("isAlawaysTrue", b5.b);
                            jSONObject2.put("uploadUrl", b5.f1683c);
                            jSONObject2.put("whiteList", b5.d);
                            jSONObject2.put("updateTime", b5.f);
                            str = jSONObject2.toString();
                        } catch (JSONException e6) {
                            e6.printStackTrace();
                            str = str2;
                        }
                    }
                    PatchProxyResult proxy3 = PatchProxy.proxy(new Object[]{str}, null, e.changeQuickRedirect, true, 341445, new Class[]{String.class}, String.class);
                    if (proxy3.isSupported) {
                        str2 = (String) proxy3.result;
                    } else {
                        try {
                            byte[] b12 = e.b(str.getBytes(StandardCharsets.UTF_8), ah1.a.f1363a);
                            if (b12 != null) {
                                if (b12.length != 0) {
                                    str2 = Base64.encodeToString(b12, 2);
                                }
                            }
                        } catch (Exception e12) {
                            e12.printStackTrace();
                        }
                    }
                    c.c("whitelist", str2, "du_sdl");
                }
            }
        }
    }
}