Wolves Themes v1.0版本的 MD5 值为:cddc92b47f6b7c4a195c9625507eb51c

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


package com.inmobi.ads;

import android.graphics.Color;
import android.support.annotation.NonNull;
import com.evernote.android.job.JobStorage;
import com.facebook.ads.AdError;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import com.mobvista.msdk.base.entity.CampaignUnit;
import com.mopub.common.AdType;
import com.tapjoy.TJAdUnitConstants;
import com.tapjoy.TapjoyConstants;
import com.tonyodev.fetch.FetchService;
import com.vungle.warren.model.Advertisement;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class b extends com.inmobi.commons.core.configs.a {
    public static boolean a = true;
    public static boolean b = false;
    public static boolean c = true;
    public static boolean d = true;
    private static final String t = "b";
    private static final Object u = new Object();
    a j;
    Map<String, a> k;
    JSONObject p;
    private d w;
    private Map<String, d> x;
    String e = "https://i.w.inmobi.com/showad.asm";
    public String f = "https://sdktm.w.inmobi.com/sdkpubreq/v2";
    int g = 20;
    int h = 60;
    int i = 60;
    public e l = new e();
    public h m = new h();
    public f n = new f();
    public k o = new k();
    public j q = new j();
    public C0071b r = new C0071b();
    private g z = new g();
    private Map<String, g> y = new HashMap();
    private List<String> v = new LinkedList();

    public static final class C0071b {
        public int a = 3;
        public int b = 1;
        int c = 10;
        public long d = 104857600;
        public long e = 259200;
    }

    public static final class c {
        boolean a = false;
        int b = AdError.SERVER_ERROR_CODE;
    }

    public static final class e {
        public int a = 3;
        public int b = 60;
        public int c = 120;
        public int d = TJAdUnitConstants.DEFAULT_VOLUME_CHECK_INTERVAL;
        public int e = 10;
        public long f = 10800;
    }

    public static final class f {
        public long a = 432000;
        public int b = 3;
        public int c = 60;
        public String d = "https://i.l.inmobicdn.net/sdk/sdk/500/android/mraid.js";
    }

    public static final class h {
        int a = 60;
        int b = FetchService.ACTION_LOGGING;
        int c = FetchService.QUERY_SINGLE;
        int d = 100;
        String e = "#00000000";
        public int f = Color.parseColor("#00000000");
        int g = 5;
        int h = 20;
        long i = 5242880;
        ArrayList<String> j = new ArrayList<>(Arrays.asList("video/mp4"));
        public boolean k = false;
        public boolean l = false;
    }

    public static final class j {
        int a = 3;
        long b = 3145728;
        public long c = 31457280;
        c d = new c();
        public ArrayList<String> e = new ArrayList<>(Arrays.asList("video/mp4", "image/jpeg", "image/jpg", "image/gif", "image/png"));
    }

    public static final class k {
        int a = 50;
        int b = 1000;
        int c = 100;
        int d = IronSourceConstants.INTERSTITIAL_DAILY_CAPPED;
        int e = 67;
        int f = 50;
        public int g = AdError.SERVER_ERROR_CODE;
        int h = 50;
        boolean i = true;
        boolean j = true;
    }

    @Override
    public final String a() {
        return CampaignUnit.JSON_KEY_ADS;
    }

    private static JSONObject e() throws JSONException {
        JSONObject jSONObject = new JSONObject();
        JSONObject jSONObject2 = new JSONObject();
        jSONObject2.put("retryInterval", 3L);
        jSONObject2.put("maxBatchSize", 10);
        jSONObject.put("wifi", jSONObject2);
        JSONObject jSONObject3 = new JSONObject();
        jSONObject3.put("retryInterval", 3L);
        jSONObject3.put("maxBatchSize", 5);
        jSONObject.put("others", jSONObject3);
        return jSONObject;
    }

    public b() {
        this.v.add("bannerDict");
        this.v.add("intDict");
        this.v.add("nativeDict");
        try {
            JSONObject jSONObject = new JSONObject();
            JSONObject jSONObject2 = new JSONObject();
            jSONObject2.put("maxCacheSize", 1);
            jSONObject2.put("fetchLimit", 1);
            jSONObject2.put("minThreshold", 0);
            jSONObject2.put(TapjoyConstants.TJC_TIME_TO_LIVE, 3300);
            jSONObject.put("base", jSONObject2);
            JSONObject jSONObject3 = new JSONObject();
            jSONObject3.put("maxCacheSize", 1);
            jSONObject3.put("fetchLimit", 1);
            jSONObject3.put("minThreshold", 1);
            jSONObject3.put(TapjoyConstants.TJC_TIME_TO_LIVE, 3300);
            jSONObject.put("int", jSONObject3);
            JSONObject jSONObject4 = new JSONObject();
            jSONObject4.put("maxCacheSize", 100);
            jSONObject4.put("fetchLimit", 1);
            jSONObject4.put("minThreshold", 1);
            jSONObject4.put(TapjoyConstants.TJC_TIME_TO_LIVE, 3300);
            jSONObject.put(TapjoyConstants.TJC_PLUGIN_NATIVE, jSONObject4);
            c(jSONObject);
            JSONObject jSONObject5 = new JSONObject();
            jSONObject5.put(TJAdUnitConstants.String.ENABLED, true);
            jSONObject5.put("samplingFactor", 0);
            this.p = jSONObject5;
            JSONObject jSONObject6 = new JSONObject();
            JSONObject jSONObject7 = new JSONObject();
            jSONObject7.put(TJAdUnitConstants.String.ENABLED, a);
            jSONObject7.put("maxRetryCount", 1);
            jSONObject7.put("eventTTL", 14400L);
            jSONObject7.put("maxEventsToPersist", 1000);
            jSONObject7.put("txLatency", 60L);
            jSONObject7.put("processingInterval", 0L);
            jSONObject7.put(JobStorage.COLUMN_NETWORK_TYPE, e());
            JSONObject jSONObject8 = new JSONObject();
            jSONObject8.put(TJAdUnitConstants.String.ENABLED, b);
            jSONObject8.put("maxRetryCount", 1);
            jSONObject8.put("eventTTL", 14400L);
            jSONObject8.put("maxEventsToPersist", 1000);
            jSONObject8.put("txLatency", 60L);
            jSONObject8.put("processingInterval", 0L);
            jSONObject8.put(JobStorage.COLUMN_NETWORK_TYPE, e());
            JSONObject jSONObject9 = new JSONObject();
            jSONObject9.put(TJAdUnitConstants.String.ENABLED, c);
            jSONObject9.put("maxRetryCount", 1);
            jSONObject9.put("eventTTL", 14400L);
            jSONObject9.put("maxEventsToPersist", 1000);
            jSONObject9.put("txLatency", 60L);
            jSONObject9.put("processingInterval", 0L);
            jSONObject9.put(JobStorage.COLUMN_NETWORK_TYPE, e());
            JSONObject jSONObject10 = new JSONObject();
            jSONObject10.put(TJAdUnitConstants.String.ENABLED, d);
            jSONObject10.put("maxRetryCount", 1);
            jSONObject10.put("eventTTL", 14400L);
            jSONObject10.put("maxEventsToPersist", 1000);
            jSONObject10.put("txLatency", 60L);
            jSONObject10.put("processingInterval", 0L);
            jSONObject10.put(JobStorage.COLUMN_NETWORK_TYPE, e());
            jSONObject6.put("baseDict", jSONObject7);
            jSONObject6.put("bannerDict", jSONObject8);
            jSONObject6.put("intDict", jSONObject9);
            jSONObject6.put("nativeDict", jSONObject10);
            b(jSONObject6);
        } catch (JSONException unused) {
        }
    }

    @Override
    public final void a(JSONObject jSONObject) throws JSONException {
        super.a(jSONObject);
        if (jSONObject.has("url")) {
            this.e = jSONObject.getString("url");
        }
        if (jSONObject.has("trueRequestUrl")) {
            this.f = jSONObject.getString("trueRequestUrl");
        }
        this.g = jSONObject.getInt("minimumRefreshInterval");
        this.h = jSONObject.getInt("defaultRefreshInterval");
        this.i = jSONObject.getInt("fetchTimeout");
        c(jSONObject.getJSONObject("cache"));
        b(jSONObject.getJSONObject("trcFlagDict"));
        JSONObject jSONObject2 = jSONObject.getJSONObject("preload");
        JSONObject jSONObject3 = jSONObject2.getJSONObject("base");
        this.z = new g();
        this.z.a = jSONObject3.getBoolean(TJAdUnitConstants.String.ENABLED);
        this.z.b = jSONObject3.getLong("placementExpiry");
        this.z.c = jSONObject3.getInt("maxPreloadedAds");
        jSONObject2.remove("base");
        Iterator<String> keys = jSONObject2.keys();
        while (keys.hasNext()) {
            String next = keys.next();
            JSONObject jSONObject4 = jSONObject2.getJSONObject(next);
            g gVar = new g();
            gVar.a = jSONObject4.has(TJAdUnitConstants.String.ENABLED) ? jSONObject4.getBoolean(TJAdUnitConstants.String.ENABLED) : this.z.a;
            gVar.b = jSONObject4.has("placementExpiry") ? jSONObject4.getInt("placementExpiry") : this.z.b;
            gVar.c = jSONObject4.has("maxPreloadedAds") ? jSONObject4.getInt("maxPreloadedAds") : this.z.c;
            this.y.put(next, gVar);
        }
        JSONObject jSONObject5 = jSONObject.getJSONObject("imai");
        this.l.a = jSONObject5.getInt("maxRetries");
        this.l.b = jSONObject5.getInt("pingInterval");
        this.l.c = jSONObject5.getInt("pingTimeout");
        this.l.d = jSONObject5.getInt("maxDbEvents");
        this.l.e = jSONObject5.getInt("maxEventBatch");
        this.l.f = jSONObject5.getLong("pingCacheExpiry");
        JSONObject jSONObject6 = jSONObject.getJSONObject("rendering");
        this.m.a = jSONObject6.getInt("renderTimeout");
        this.m.c = jSONObject6.getInt("picHeight");
        this.m.b = jSONObject6.getInt("picWidth");
        this.m.d = jSONObject6.getInt("picQuality");
        this.m.e = jSONObject6.getString("webviewBackground");
        this.m.g = jSONObject6.getInt("maxVibrationDuration");
        this.m.h = jSONObject6.getInt("maxVibrationPatternLength");
        this.m.l = jSONObject6.optBoolean("enablePubMuteControl", false);
        this.m.i = jSONObject6.getJSONObject("savecontent").getInt("maxSaveSize");
        synchronized (u) {
            this.m.j.clear();
            JSONArray jSONArray = jSONObject6.getJSONObject("savecontent").getJSONArray("allowedContentType");
            for (int i2 = 0; i2 < jSONArray.length(); i2++) {
                this.m.j.add(jSONArray.getString(i2));
            }
        }
        this.m.k = jSONObject6.getBoolean("shouldRenderPopup");
        JSONObject jSONObject7 = jSONObject.getJSONObject(AdType.MRAID);
        this.n.a = jSONObject7.getLong("expiry");
        this.n.b = jSONObject7.getInt("maxRetries");
        this.n.c = jSONObject7.getInt("retryInterval");
        this.n.d = jSONObject7.getString("url");
        if (jSONObject.has("telemetry")) {
            this.p = jSONObject.getJSONObject("telemetry");
        }
        JSONObject jSONObject8 = jSONObject.getJSONObject("viewability");
        this.o.a = jSONObject8.getInt("impressionMinPercentageViewed");
        this.o.b = jSONObject8.getInt("impressionMinTimeViewed");
        this.o.e = jSONObject8.optInt("displayMinPercentageAnimate", 67);
        this.o.c = jSONObject8.optInt("visibilityThrottleMillis", 100);
        this.o.d = jSONObject8.optInt("impressionPollIntervalMillis", IronSourceConstants.INTERSTITIAL_DAILY_CAPPED);
        this.o.i = jSONObject8.optBoolean("moatEnabled", false);
        this.o.j = jSONObject8.optBoolean("iasEnabled", false);
        JSONObject jSONObject9 = jSONObject8.getJSONObject(Advertisement.KEY_VIDEO);
        this.o.f = jSONObject9.getInt("impressionMinPercentageViewed");
        this.o.g = jSONObject9.getInt("impressionMinTimeViewed");
        this.o.h = jSONObject9.optInt("videoMinPercentagePlay", 50);
        JSONObject jSONObject10 = jSONObject.getJSONObject("vastVideo");
        this.q.a = jSONObject10.getInt("maxWrapperLimit");
        this.q.b = jSONObject10.getLong("optimalVastVideoSize");
        this.q.c = jSONObject10.getLong("vastMaxAssetSize");
        synchronized (u) {
            this.q.e.clear();
            JSONArray jSONArray2 = jSONObject10.getJSONArray("allowedContentType");
            for (int i3 = 0; i3 < jSONArray2.length(); i3++) {
                this.q.e.add(jSONArray2.getString(i3));
            }
        }
        c cVar = this.q.d;
        JSONObject jSONObject11 = jSONObject10.getJSONObject("bitRate");
        cVar.a = jSONObject11.getBoolean("bitrate_mandatory");
        cVar.b = jSONObject11.getInt("headerTimeout");
        JSONObject jSONObject12 = jSONObject.getJSONObject("assetCache");
        this.r.b = jSONObject12.getInt("retryInterval");
        this.r.a = jSONObject12.getInt("maxRetries");
        this.r.c = jSONObject12.getInt("maxCachedAssets");
        this.r.d = jSONObject12.getInt("maxCacheSize");
        this.r.e = jSONObject12.getLong(TapjoyConstants.TJC_TIME_TO_LIVE);
    }

    private void b(JSONObject jSONObject) throws JSONException {
        JSONObject jSONObject2 = jSONObject.getJSONObject("baseDict");
        this.j = new a();
        this.j.h = jSONObject2.getBoolean(TJAdUnitConstants.String.ENABLED);
        this.j.a = jSONObject2.getInt("maxRetryCount");
        this.j.b = jSONObject2.getLong("eventTTL");
        this.j.c = jSONObject2.getInt("maxEventsToPersist");
        this.j.d = jSONObject2.getLong("processingInterval");
        this.j.e = jSONObject2.getLong("txLatency");
        a(jSONObject2.getJSONObject(JobStorage.COLUMN_NETWORK_TYPE), this.j);
        jSONObject.remove("baseDict");
        this.k = new HashMap();
        Iterator<String> keys = jSONObject.keys();
        while (keys.hasNext()) {
            String next = keys.next();
            if (next != null && this.v != null && this.v.contains(next)) {
                JSONObject jSONObject3 = jSONObject.getJSONObject(next);
                a aVar = new a();
                aVar.h = jSONObject3.has(TJAdUnitConstants.String.ENABLED) ? jSONObject3.getBoolean(TJAdUnitConstants.String.ENABLED) : this.j.h;
                aVar.a = jSONObject3.has("maxRetryCount") ? jSONObject3.getInt("maxRetryCount") : this.j.a;
                aVar.b = jSONObject3.has("eventTTL") ? jSONObject3.getLong("eventTTL") : this.j.b;
                aVar.c = jSONObject3.has("maxEventsToPersist") ? jSONObject3.getInt("maxEventsToPersist") : this.j.c;
                aVar.d = jSONObject3.has("processingInterval") ? jSONObject3.getLong("processingInterval") : this.j.d;
                aVar.e = jSONObject3.has("txLatency") ? jSONObject3.getLong("txLatency") : this.j.e;
                a(jSONObject3.getJSONObject(JobStorage.COLUMN_NETWORK_TYPE), aVar);
                this.k.put(next, aVar);
            }
        }
    }

    private static void a(JSONObject jSONObject, a aVar) throws JSONException {
        Iterator<String> keys = jSONObject.keys();
        while (keys.hasNext()) {
            String next = keys.next();
            JSONObject jSONObject2 = jSONObject.getJSONObject(next);
            i iVar = new i();
            iVar.a = jSONObject2.getLong("retryInterval");
            iVar.b = jSONObject2.getInt("maxBatchSize");
            char c2 = 65535;
            int hashCode = next.hashCode();
            if (hashCode != -1068855134) {
                if (hashCode != -1006804125) {
                    if (hashCode == 3649301 && next.equals("wifi")) {
                        c2 = 0;
                    }
                } else if (next.equals("others")) {
                    c2 = 2;
                }
            } else if (next.equals(TapjoyConstants.TJC_CONNECTION_TYPE_MOBILE)) {
                c2 = 1;
            }
            if (c2 == 0) {
                aVar.g = iVar;
            } else {
                aVar.f = iVar;
            }
        }
    }

    private void c(JSONObject jSONObject) throws JSONException {
        JSONObject jSONObject2 = jSONObject.getJSONObject("base");
        this.w = new d();
        this.w.a = jSONObject2.getInt("maxCacheSize");
        this.w.b = jSONObject2.getInt("fetchLimit");
        this.w.c = jSONObject2.getInt("minThreshold");
        this.w.d = jSONObject2.getLong(TapjoyConstants.TJC_TIME_TO_LIVE);
        jSONObject.remove("base");
        this.x = new HashMap();
        Iterator<String> keys = jSONObject.keys();
        while (keys.hasNext()) {
            String next = keys.next();
            JSONObject jSONObject3 = jSONObject.getJSONObject(next);
            d dVar = new d();
            dVar.a = jSONObject3.has("maxCacheSize") ? jSONObject3.getInt("maxCacheSize") : this.w.a;
            dVar.b = jSONObject3.has("fetchLimit") ? jSONObject3.getInt("fetchLimit") : this.w.b;
            dVar.c = jSONObject3.has("minThreshold") ? jSONObject3.getInt("minThreshold") : this.w.c;
            dVar.d = jSONObject3.has(TapjoyConstants.TJC_TIME_TO_LIVE) ? jSONObject3.getInt(TapjoyConstants.TJC_TIME_TO_LIVE) : this.w.d;
            this.x.put(next, dVar);
        }
    }

    @Override
    public final JSONObject b() throws JSONException {
        JSONObject b2 = super.b();
        b2.put("url", this.e);
        b2.put("trueRequestUrl", this.f);
        b2.put("minimumRefreshInterval", this.g);
        b2.put("defaultRefreshInterval", this.h);
        b2.put("fetchTimeout", this.i);
        JSONObject jSONObject = new JSONObject();
        JSONObject jSONObject2 = new JSONObject();
        jSONObject2.put("maxCacheSize", this.w.a);
        jSONObject2.put("fetchLimit", this.w.b);
        jSONObject2.put("minThreshold", this.w.c);
        jSONObject2.put(TapjoyConstants.TJC_TIME_TO_LIVE, this.w.d);
        jSONObject.put("base", jSONObject2);
        for (Map.Entry<String, d> entry : this.x.entrySet()) {
            JSONObject jSONObject3 = new JSONObject();
            d value = entry.getValue();
            jSONObject3.put("maxCacheSize", value.a);
            jSONObject3.put("fetchLimit", value.b);
            jSONObject3.put("minThreshold", value.c);
            jSONObject3.put(TapjoyConstants.TJC_TIME_TO_LIVE, value.d);
            jSONObject.put(entry.getKey(), jSONObject3);
        }
        b2.put("cache", jSONObject);
        b2.put("trcFlagDict", g());
        JSONObject jSONObject4 = new JSONObject();
        jSONObject4.put("maxRetries", this.l.a);
        jSONObject4.put("pingInterval", this.l.b);
        jSONObject4.put("pingTimeout", this.l.c);
        jSONObject4.put("maxDbEvents", this.l.d);
        jSONObject4.put("maxEventBatch", this.l.e);
        jSONObject4.put("pingCacheExpiry", this.l.f);
        b2.put("imai", jSONObject4);
        JSONObject jSONObject5 = new JSONObject();
        jSONObject5.put("renderTimeout", this.m.a);
        jSONObject5.put("picWidth", this.m.b);
        jSONObject5.put("picHeight", this.m.c);
        jSONObject5.put("picQuality", this.m.d);
        jSONObject5.put("webviewBackground", this.m.e);
        jSONObject5.put("maxVibrationDuration", this.m.g);
        jSONObject5.put("maxVibrationPatternLength", this.m.h);
        jSONObject5.put("enablePubMuteControl", this.m.l);
        JSONObject jSONObject6 = new JSONObject();
        jSONObject6.put("maxSaveSize", this.m.i);
        jSONObject6.put("allowedContentType", new JSONArray((Collection) this.m.j));
        jSONObject5.put("savecontent", jSONObject6);
        jSONObject5.put("shouldRenderPopup", this.m.k);
        b2.put("rendering", jSONObject5);
        JSONObject jSONObject7 = new JSONObject();
        jSONObject7.put("expiry", this.n.a);
        jSONObject7.put("maxRetries", this.n.b);
        jSONObject7.put("retryInterval", this.n.c);
        jSONObject7.put("url", this.n.d);
        b2.put(AdType.MRAID, jSONObject7);
        JSONObject jSONObject8 = new JSONObject();
        jSONObject8.put("impressionMinPercentageViewed", this.o.a);
        jSONObject8.put("impressionMinTimeViewed", this.o.b);
        jSONObject8.put("displayMinPercentageAnimate", this.o.e);
        jSONObject8.put("visibilityThrottleMillis", this.o.c);
        jSONObject8.put("impressionPollIntervalMillis", this.o.d);
        jSONObject8.put("moatEnabled", this.o.i);
        jSONObject8.put("iasEnabled", this.o.j);
        JSONObject jSONObject9 = new JSONObject();
        jSONObject9.put("impressionMinPercentageViewed", this.o.f);
        jSONObject9.put("impressionMinTimeViewed", this.o.g);
        jSONObject9.put("videoMinPercentagePlay", this.o.h);
        jSONObject8.put(Advertisement.KEY_VIDEO, jSONObject9);
        b2.put("viewability", jSONObject8);
        b2.put("preload", f());
        JSONObject jSONObject10 = new JSONObject();
        jSONObject10.put("maxWrapperLimit", this.q.a);
        jSONObject10.put("optimalVastVideoSize", this.q.b);
        jSONObject10.put("vastMaxAssetSize", this.q.c);
        jSONObject10.put("allowedContentType", new JSONArray((Collection) this.q.e));
        c cVar = this.q.d;
        JSONObject jSONObject11 = new JSONObject();
        jSONObject11.put("headerTimeout", cVar.b);
        jSONObject11.put("bitrate_mandatory", cVar.a);
        jSONObject10.put("bitRate", jSONObject11);
        b2.put("vastVideo", jSONObject10);
        JSONObject jSONObject12 = new JSONObject();
        jSONObject12.put("retryInterval", this.r.b);
        jSONObject12.put("maxRetries", this.r.a);
        jSONObject12.put("maxCachedAssets", this.r.c);
        jSONObject12.put("maxCacheSize", this.r.d);
        jSONObject12.put(TapjoyConstants.TJC_TIME_TO_LIVE, this.r.e);
        b2.put("assetCache", jSONObject12);
        if (this.p != null) {
            b2.put("telemetry", this.p);
        }
        return b2;
    }

    private JSONObject f() throws JSONException {
        JSONObject jSONObject = new JSONObject();
        JSONObject jSONObject2 = new JSONObject();
        jSONObject2.put(TJAdUnitConstants.String.ENABLED, this.z.a);
        jSONObject2.put("placementExpiry", this.z.b);
        jSONObject2.put("maxPreloadedAds", this.z.c);
        jSONObject.put("base", jSONObject2);
        for (Map.Entry<String, g> entry : this.y.entrySet()) {
            JSONObject jSONObject3 = new JSONObject();
            g value = entry.getValue();
            jSONObject3.put(TJAdUnitConstants.String.ENABLED, value.a);
            jSONObject3.put("placementExpiry", value.b);
            jSONObject3.put("maxPreloadedAds", value.c);
            jSONObject.put(entry.getKey(), jSONObject3);
        }
        return jSONObject;
    }

    private JSONObject g() throws JSONException {
        JSONObject jSONObject = new JSONObject();
        JSONObject jSONObject2 = new JSONObject();
        jSONObject2.put(TJAdUnitConstants.String.ENABLED, this.j.h);
        jSONObject2.put("maxRetryCount", this.j.a);
        jSONObject2.put("eventTTL", this.j.b);
        jSONObject2.put("maxEventsToPersist", this.j.c);
        jSONObject2.put("processingInterval", this.j.d);
        jSONObject2.put("txLatency", this.j.e);
        jSONObject2.put(JobStorage.COLUMN_NETWORK_TYPE, a(this.j));
        jSONObject.put("baseDict", jSONObject2);
        for (Map.Entry<String, a> entry : this.k.entrySet()) {
            JSONObject jSONObject3 = new JSONObject();
            a value = entry.getValue();
            jSONObject3.put(TJAdUnitConstants.String.ENABLED, value.h);
            jSONObject3.put("maxRetryCount", value.a);
            jSONObject3.put("eventTTL", value.b);
            jSONObject3.put("maxEventsToPersist", value.c);
            jSONObject3.put("processingInterval", value.d);
            jSONObject3.put("txLatency", value.e);
            jSONObject3.put(JobStorage.COLUMN_NETWORK_TYPE, a(value));
            jSONObject.put(entry.getKey(), jSONObject3);
        }
        return jSONObject;
    }

    private static JSONObject a(a aVar) throws JSONException {
        JSONObject jSONObject = new JSONObject();
        i iVar = aVar.g;
        JSONObject jSONObject2 = new JSONObject();
        jSONObject2.put("retryInterval", iVar.a);
        jSONObject2.put("maxBatchSize", iVar.b);
        jSONObject.put("wifi", jSONObject2);
        i iVar2 = aVar.f;
        JSONObject jSONObject3 = new JSONObject();
        jSONObject3.put("retryInterval", iVar2.a);
        jSONObject3.put("maxBatchSize", iVar2.b);
        jSONObject.put("others", jSONObject3);
        return jSONObject;
    }

    @Override
    public final boolean c() {
        if ((this.e.startsWith("http://") || this.e.startsWith("https://")) && ((this.f.startsWith("http://") || this.f.startsWith("https://")) && this.g >= 0 && this.h >= 0 && this.i > 0 && this.w != null && this.w.a())) {
            for (Map.Entry<String, d> entry : this.x.entrySet()) {
                if (!entry.getValue().a()) {
                    return false;
                }
            }
            if (this.j == null || !this.j.a()) {
                return false;
            }
            for (Map.Entry<String, a> entry2 : this.k.entrySet()) {
                if (!entry2.getValue().a()) {
                    return false;
                }
            }
            if (this.l.d < 0 || this.l.e < 0 || this.l.a < 0 || this.l.b < 0 || this.l.c <= 0 || this.l.f <= 0 || this.n.a < 0 || this.n.c < 0 || this.n.b < 0 || (!(this.n.d.startsWith("http://") || this.n.d.startsWith("https://")) || this.m.a < 0 || this.m.c < 0 || this.m.b < 0 || this.m.d < 0 || this.m.g < 0 || this.m.h < 0 || this.m.i < 0 || this.m.e == null || this.m.e.trim().length() == 0)) {
                return false;
            }
            try {
                this.m.f = Color.parseColor(this.m.e);
                if (this.n.b < 0 || this.n.c < 0 || this.n.d == null || this.n.d.trim().length() == 0 || this.o.a <= 0 || this.o.a > 100 || this.o.b < 0 || this.o.e <= 0 || this.o.e > 100 || this.o.f <= 0 || this.o.f > 100 || this.o.g < 0 || this.o.h <= 0 || this.o.h > 100 || this.o.c < 50 || this.o.c * 5 > this.o.b || this.o.d < 50 || this.o.d * 4 > this.o.b || this.z == null || !this.z.a()) {
                    return false;
                }
                for (Map.Entry<String, g> entry3 : this.y.entrySet()) {
                    if (!entry3.getValue().a()) {
                        return false;
                    }
                }
                return this.q.b <= 31457280 && this.q.b > 0 && this.q.a >= 0 && this.q.c > 0 && this.q.c <= 31457280 && this.r.b >= 0 && this.r.c <= 20 && this.r.c >= 0 && this.r.e >= 0 && this.r.d >= 0 && this.r.a >= 0;
            } catch (IllegalArgumentException unused) {
                return false;
            }
        }
        return false;
    }

    @Override
    public final com.inmobi.commons.core.configs.a d() {
        return new b();
    }

    public final d a(String str) {
        d dVar = this.x.get(str);
        return dVar == null ? this.w : dVar;
    }

    @NonNull
    public final a b(String str) {
        a aVar = this.k.get(str + "Dict");
        return aVar == null ? this.j : aVar;
    }

    public final g c(String str) {
        g gVar = this.y.get(str);
        return gVar == null ? this.z : gVar;
    }

    public static final class a {
        public int a;
        public long b;
        public int c;
        public long d;
        public long e;
        public i f;
        public i g;
        public boolean h;

        public final boolean a() {
            return this.e >= this.d && this.e <= this.b && this.b >= this.d && this.f.a() && this.g.a() && this.a >= 0 && this.a <= 3 && this.b > 0 && this.b <= 86400 && this.c > 0 && this.c <= 1000 && this.e > 0 && this.e <= 180 && this.d >= 0 && this.d <= 60;
        }
    }

    public static final class i {
        public long a;
        public int b;

        public final boolean a() {
            return this.a > 0 && this.a <= 60 && this.b > 0 && this.b <= 97;
        }
    }

    public static final class d {
        int a = 1;
        int b;
        int c;
        long d;

        d() {
        }

        public final boolean a() {
            return this.b > 0 && this.a >= 0 && this.c >= 0 && this.d >= 0;
        }
    }

    public static final class g {
        boolean a = false;
        long b = 259200;
        int c = 5;

        public final boolean a() {
            return this.b >= 0 && this.c > 0;
        }
    }
}