Step Record v1.1.5版本的 MD5 值为:5797275f89198878d2f00ee92d534382

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


package com.inmobi.commons.core.configs;

import androidx.annotation.Keep;
import androidx.annotation.VisibleForTesting;
import com.chartboost.heliumsdk.impl.S1t1HtH;
import com.chartboost.heliumsdk.impl.ttHtzKt;
import com.chartboost.heliumsdk.impl.tttt1SH;
import com.chartboost.heliumsdk.impl.ztKKzKz;
import com.inmobi.commons.utils.json.Constructor;
import com.inmobi.media.b6;
import com.inmobi.media.f4;
import com.inmobi.media.k2;
import com.inmobi.media.u4;
import com.inmobi.media.wa;
import com.inmobi.media.xa;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.Unit;
import org.json.JSONObject;

@Keep
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000H\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\t\n\u0000\n\u0002\u0010\b\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u000f\b\u0007\u0018\u0000 ,2\u00020\u0001:\u0004-./0B\u0011\u0012\b\u0010)\u001a\u0004\u0018\u00010\u0005¢\u0006\u0004\b*\u0010+J\u0010\u0010\u0004\u001a\u00020\u00032\u0006\u0010\u0002\u001a\u00020\u0000H\u0007J\b\u0010\u0006\u001a\u00020\u0005H\u0016J\b\u0010\b\u001a\u00020\u0007H\u0016J\b\u0010\t\u001a\u00020\u0003H\u0016J\u000e\u0010\f\u001a\u00020\u000b2\u0006\u0010\n\u001a\u00020\u0005J\u0006\u0010\u000e\u001a\u00020\rJ\u0006\u0010\u000f\u001a\u00020\rJ\u0006\u0010\u0010\u001a\u00020\rJ\u0006\u0010\u0011\u001a\u00020\u0003J\u0006\u0010\u0012\u001a\u00020\u0003J\u000e\u0010\u0013\u001a\u00020\u00052\u0006\u0010\n\u001a\u00020\u0005J\u0006\u0010\u0014\u001a\u00020\u0005J\u0006\u0010\u0016\u001a\u00020\u0015R\u001e\u0010\u0018\u001a\n \u0017*\u0004\u0018\u00010\u00050\u00058\u0002@\u0003X\u0083\u0004¢\u0006\u0006\n\u0004\b\u0018\u0010\u0019R\u0016\u0010\u001a\u001a\u00020\r8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u001a\u0010\u001bR\u0016\u0010\u001c\u001a\u00020\r8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u001c\u0010\u001bR\u0016\u0010\u001d\u001a\u00020\r8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u001d\u0010\u001bR\u0018\u0010\u001f\u001a\u0004\u0018\u00010\u001e8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u001f\u0010 R\u001e\u0010#\u001a\n\u0012\u0004\u0012\u00020\"\u0018\u00010!8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b#\u0010$R\u0016\u0010%\u001a\u00020\u00158\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b%\u0010&R\u0016\u0010'\u001a\u00020\u00038\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b'\u0010(¨\u00061"}, d2 = {"Lcom/inmobi/commons/core/configs/RootConfig;", "Lcom/inmobi/commons/core/configs/Config;", "config", "", "isSameAs", "", "getType", "Lorg/json/JSONObject;", "toJson", "isValid", "type", "", "getExpiryForType", "", "getMaxRetries", "getRetryInterval", "getWaitTime", "isMonetizationDisabled", "shouldTransmitRequest", "getUrlForType", "getFallbackUrlForRootType", "Lcom/inmobi/commons/core/configs/RootConfig$LatestSdkInfo;", "getLatestSdkInfo", "kotlin.jvm.PlatformType", "TAG", "Ljava/lang/String;", "maxRetries", "I", "retryInterval", "waitTime", "Lcom/inmobi/commons/core/configs/RootConfig$GDPR;", "gdpr", "Lcom/inmobi/commons/core/configs/RootConfig$GDPR;", "", "Lcom/inmobi/commons/core/configs/RootConfig$ComponentConfig;", "components", "Ljava/util/List;", "latestSdkInfo", "Lcom/inmobi/commons/core/configs/RootConfig$LatestSdkInfo;", "monetizationDisabled", "Z", "accountId", "<init>", "(Ljava/lang/String;)V", "Companion", "a", "ComponentConfig", "GDPR", "LatestSdkInfo", "media_release"}, k = 1, mv = {1, 5, 1})
public final class RootConfig extends Config {
    public static final long DEFAULT_EXPIRY = 86400;
    public static final String DEFAULT_FALLBACK_URL = "https://config.inmobi.com/config-server/v1/config/secure.cfg";
    public static final int DEFAULT_MAX_RETRIES = 3;
    public static final int DEFAULT_RETRY_INTERVAL = 60;
    public static final String DEFAULT_URL = "";
    public static final int DEFAULT_WAIT_TIME = 3;

    @u4
    private final String TAG;
    private List<ComponentConfig> components;
    private GDPR gdpr;
    private LatestSdkInfo latestSdkInfo;
    private int maxRetries;
    private boolean monetizationDisabled;
    private int retryInterval;
    private int waitTime;

    public static final Companion INSTANCE = new Companion();
    private static final Object sAcquisitionLock = new Object();

    @Keep
    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\t\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\n\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0010\u0010\u0011J\u0006\u0010\u0003\u001a\u00020\u0002J\u0006\u0010\u0005\u001a\u00020\u0004J\u0006\u0010\u0006\u001a\u00020\u0002J\u0006\u0010\u0007\u001a\u00020\u0002J\u0006\u0010\t\u001a\u00020\bR\u0016\u0010\n\u001a\u00020\u00028\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\n\u0010\u000bR\u0016\u0010\f\u001a\u00020\u00048\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\f\u0010\rR\u0016\u0010\u000e\u001a\u00020\u00028\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u000e\u0010\u000bR\u0016\u0010\u000f\u001a\u00020\u00028\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u000f\u0010\u000b¨\u0006\u0012"}, d2 = {"Lcom/inmobi/commons/core/configs/RootConfig$ComponentConfig;", "", "", "getType", "", "getExpiry", "getUrl", "getFallbackUrl", "", "isValid", "type", "Ljava/lang/String;", "expiry", "J", "url", "fallbackUrl", "<init>", "()V", "media_release"}, k = 1, mv = {1, 5, 1})
    public static final class ComponentConfig {
        private String type = "";
        private long expiry = Long.MAX_VALUE;
        private String url = "";
        private String fallbackUrl = RootConfig.DEFAULT_FALLBACK_URL;

        public final long getExpiry() {
            return this.expiry;
        }

        public final String getFallbackUrl() {
            return this.fallbackUrl;
        }

        public final String getType() {
            return this.type;
        }

        public final String getUrl() {
            return this.url;
        }

        public final boolean isValid() {
            boolean z;
            String type = getType();
            if (type != null) {
                if (tttt1SH.tSKtHtK(type).toString().length() == 0) {
                    z = true;
                } else {
                    z = false;
                }
                if (z || getExpiry() < 0 || getExpiry() > 864000 || f4.a(this.url)) {
                    return false;
                }
                if (!ttHtzKt.SKHKzK("root", getType()) || !f4.a(this.fallbackUrl)) {
                    return true;
                }
                return false;
            }
            throw new NullPointerException("null cannot be cast to non-null type kotlin.CharSequence");
        }
    }

    @Keep
    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000b\n\u0002\b\b\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\b\u0010\tJ\u000f\u0010\u0003\u001a\u0004\u0018\u00010\u0002¢\u0006\u0004\b\u0003\u0010\u0004J\u0006\u0010\u0005\u001a\u00020\u0002R\u0018\u0010\u0006\u001a\u0004\u0018\u00010\u00028\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0006\u0010\u0007¨\u0006\n"}, d2 = {"Lcom/inmobi/commons/core/configs/RootConfig$GDPR;", "", "", "getTransmitRequest", "()Ljava/lang/Boolean;", "isValid", "transmitRequest", "Ljava/lang/Boolean;", "<init>", "()V", "media_release"}, k = 1, mv = {1, 5, 1})
    public static final class GDPR {
        private Boolean transmitRequest = Boolean.TRUE;

        public final Boolean getTransmitRequest() {
            return this.transmitRequest;
        }

        public final boolean isValid() {
            return this.transmitRequest != null;
        }
    }

    @Keep
    @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0007\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\n\u0010\u000bJ\u0006\u0010\u0003\u001a\u00020\u0002J\u0006\u0010\u0004\u001a\u00020\u0002J\u0006\u0010\u0006\u001a\u00020\u0005R\u0016\u0010\u0007\u001a\u00020\u00028\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0007\u0010\bR\u0016\u0010\t\u001a\u00020\u00028\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\t\u0010\b¨\u0006\f"}, d2 = {"Lcom/inmobi/commons/core/configs/RootConfig$LatestSdkInfo;", "", "", "getLatestVersion", "getLatestVersionUrl", "", "isValid", com.anythink.expressad.foundation.g.a.i, "Ljava/lang/String;", "url", "<init>", "()V", "media_release"}, k = 1, mv = {1, 5, 1})
    public static final class LatestSdkInfo {
        private String version = "10.6.2";
        private String url = "https://www.inmobi.com/products/sdk/#downloads";

        public final String getVersion() {
            return this.version;
        }

        public final String getUrl() {
            return this.url;
        }

        public final boolean isValid() {
            String str = this.version;
            if (str != null) {
                return k2.a(tttt1SH.tSKtHtK(str).toString()) && !f4.a(this.url);
            }
            throw new NullPointerException("null cannot be cast to non-null type kotlin.CharSequence");
        }
    }

    public static final class Companion {

        public static final class C0345a implements Constructor<List<? extends ComponentConfig>> {
            @Override
            public List<? extends ComponentConfig> construct() {
                return new ArrayList();
            }
        }

        public final com.inmobi.commons.utils.json.a<RootConfig> a() {
            return new com.inmobi.commons.utils.json.a().a(new xa("components", RootConfig.class), (wa<?>) new b6(new C0345a(), ComponentConfig.class));
        }
    }

    public RootConfig(String str) {
        super(str);
        this.TAG = "RootConfig";
        this.maxRetries = 3;
        this.retryInterval = 60;
        this.waitTime = 3;
        this.gdpr = new GDPR();
        this.components = ztKKzKz.tz;
        this.latestSdkInfo = new LatestSdkInfo();
    }

    public final long getExpiryForType(String type) {
        ttHtzKt.tzttS1SS1(type, "type");
        synchronized (sAcquisitionLock) {
            List<ComponentConfig> list = this.components;
            if (list != null) {
                for (ComponentConfig componentConfig : list) {
                    if (ttHtzKt.SKHKzK(type, componentConfig.getType())) {
                        return componentConfig.getExpiry();
                    }
                }
            }
            return 86400L;
        }
    }

    public final String getFallbackUrlForRootType() {
        synchronized (sAcquisitionLock) {
            List<ComponentConfig> list = this.components;
            if (list != null) {
                for (ComponentConfig componentConfig : list) {
                    if (ttHtzKt.SKHKzK("root", componentConfig.getType())) {
                        return componentConfig.getFallbackUrl();
                    }
                }
            }
            return DEFAULT_FALLBACK_URL;
        }
    }

    public final LatestSdkInfo getLatestSdkInfo() {
        return this.latestSdkInfo;
    }

    public final int getMaxRetries() {
        return this.maxRetries;
    }

    public final int getRetryInterval() {
        return this.retryInterval;
    }

    @Override
    public String getType() {
        return "root";
    }

    public final String getUrlForType(String type) {
        ttHtzKt.tzttS1SS1(type, "type");
        synchronized (sAcquisitionLock) {
            List<ComponentConfig> list = this.components;
            if (list != null) {
                for (ComponentConfig componentConfig : list) {
                    if (ttHtzKt.SKHKzK(type, componentConfig.getType())) {
                        return componentConfig.getUrl();
                    }
                }
            }
            return "";
        }
    }

    public final int getWaitTime() {
        return this.waitTime;
    }

    public final boolean getMonetizationDisabled() {
        return this.monetizationDisabled;
    }

    @VisibleForTesting
    public final boolean isSameAs(RootConfig config) {
        boolean z;
        ttHtzKt.tzttS1SS1(config, "config");
        if ((getAccountId$media_release() == null && config.getAccountId$media_release() == null) || (getAccountId$media_release() != null && S1t1HtH.tt11tzSSt(getAccountId$media_release(), config.getAccountId$media_release(), false))) {
            z = true;
        } else {
            z = false;
        }
        if (z && config.maxRetries == this.maxRetries && config.retryInterval == this.retryInterval && config.waitTime == this.waitTime && config.monetizationDisabled == this.monetizationDisabled) {
            return true;
        }
        return false;
    }

    @Override
    public boolean isValid() {
        Unit unit;
        ttHtzKt.tz(this.TAG, "TAG");
        ttHtzKt.HKS(this.gdpr, "isConfigInCache ");
        if (this.maxRetries < 0 || this.retryInterval < 0 || this.waitTime < 0 || !this.latestSdkInfo.isValid()) {
            return false;
        }
        synchronized (sAcquisitionLock) {
            List<ComponentConfig> list = this.components;
            if (list == null) {
                unit = null;
            } else {
                Iterator<T> it = list.iterator();
                while (it.hasNext()) {
                    if (!((ComponentConfig) it.next()).isValid()) {
                        return false;
                    }
                }
                unit = Unit.SKHKzK;
            }
            if (unit == null) {
                return false;
            }
            Unit unit2 = Unit.SKHKzK;
            GDPR gdpr = this.gdpr;
            if (gdpr == null || !gdpr.isValid()) {
                return false;
            }
            return true;
        }
    }

    public final boolean shouldTransmitRequest() {
        Boolean transmitRequest;
        GDPR gdpr = this.gdpr;
        if (gdpr == null || (transmitRequest = gdpr.getTransmitRequest()) == null) {
            return true;
        }
        return transmitRequest.booleanValue();
    }

    @Override
    public JSONObject toJson() {
        JSONObject a = INSTANCE.a().a((com.inmobi.commons.utils.json.a<RootConfig>) this);
        if (a == null) {
            ttHtzKt.tz(this.TAG, "TAG");
            return new JSONObject();
        }
        return a;
    }
}