Currency Plus v2.10.8版本的 MD5 值为:8586f74edd9ace5aa261a19c9da51484

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


package com.inmobi.commons.core.configs;

import androidx.annotation.Keep;
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 com.inmobi.sdk.InMobiSdk;
import fi.a0;
import gi.g0;
import java.util.ArrayList;
import java.util.List;
import kotlin.Metadata;
import ll.t;
import ll.x;
import org.json.JSONObject;
import ti.l;
import xa.c;
@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", c.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;", InMobiSdk.IM_GDPR_CONSENT_GDPR_APPLIES, "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 a Companion = new a();
    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", c.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() {
            String type = getType();
            if (type != null) {
                if (x.T(type).toString().length() != 0 && getExpiry() >= 0 && getExpiry() <= 864000 && !f4.a(this.url)) {
                    return (l.a("root", getType()) && f4.a(this.fallbackUrl)) ? false : 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", "version", "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 getLatestVersion() {
            return this.version;
        }

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

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

    public static final class a {

        public static final class C0292a 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 C0292a(), 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 = g0.f19288a;
        this.latestSdkInfo = new LatestSdkInfo();
    }

    public final long getExpiryForType(String str) {
        l.f(str, c.TYPE);
        synchronized (sAcquisitionLock) {
            List<ComponentConfig> list = this.components;
            if (list != null) {
                for (ComponentConfig componentConfig : list) {
                    if (l.a(str, 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 (l.a("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 str) {
        l.f(str, c.TYPE);
        synchronized (sAcquisitionLock) {
            List<ComponentConfig> list = this.components;
            if (list != null) {
                for (ComponentConfig componentConfig : list) {
                    if (l.a(str, componentConfig.getType())) {
                        return componentConfig.getUrl();
                    }
                }
            }
            return "";
        }
    }

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

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

    public final boolean isSameAs(RootConfig rootConfig) {
        l.f(rootConfig, "config");
        return ((getAccountId$media_release() == null && rootConfig.getAccountId$media_release() == null) || (getAccountId$media_release() != null && t.i(getAccountId$media_release(), rootConfig.getAccountId$media_release(), false))) && rootConfig.maxRetries == this.maxRetries && rootConfig.retryInterval == this.retryInterval && rootConfig.waitTime == this.waitTime && rootConfig.monetizationDisabled == this.monetizationDisabled;
    }

    @Override
    public boolean isValid() {
        a0 a0Var;
        l.e(this.TAG, "TAG");
        l.k(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) {
                a0Var = null;
            } else {
                for (ComponentConfig componentConfig : list) {
                    if (!componentConfig.isValid()) {
                        return false;
                    }
                }
                a0Var = a0.f17744a;
            }
            if (a0Var == null) {
                return false;
            }
            a0 a0Var2 = a0.f17744a;
            GDPR gdpr = this.gdpr;
            return gdpr != null && gdpr.isValid();
        }
    }

    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 a10 = Companion.a().a((com.inmobi.commons.utils.json.a<RootConfig>) this);
        if (a10 == null) {
            l.e(this.TAG, "TAG");
            return new JSONObject();
        }
        return a10;
    }
}