Perfume Of Love v2.14.9版本的 MD5 值为:16011aefc5a55805771706ce3b259b4e

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


package com.inmobi.media;

import com.inmobi.commons.utils.json.Constructor;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONObject;
public class gi extends fw {
    private static final long DEFAULT_EXPIRY = 86400;
    private static final String DEFAULT_FALLBACK_URL = "https://config.inmobi.com/config-server/v1/config/secure.cfg";
    private static final int DEFAULT_MAX_RETRIES = 3;
    private static final int DEFAULT_RETRY_INTERVAL = 60;
    private static final String DEFAULT_URL = "";
    private static final int DEFAULT_WAIT_TIME = 3;
    private static final Object sAcquisitionLock = new Object();
    private List<a> components;
    private b gdpr;
    c latestSdkInfo;
    private int maxRetries;
    private boolean monetizationDisabled;
    private int retryInterval;
    int waitTime;

    public static final class b {
        boolean transmitRequest = true;
    }

    public static final class c {
        String version = id.b();
        String url = id.e();
    }

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

    public static iz<gi> a() {
        return new iz().a(new je("components", gi.class), (jd) new jb(new Constructor<List<a>>() {
            @Override
            public final List<a> construct() {
                return new ArrayList();
            }
        }, a.class));
    }

    public gi(String str) {
        super(str);
        this.maxRetries = 3;
        this.retryInterval = 60;
        this.waitTime = 3;
        this.monetizationDisabled = false;
        this.components = new ArrayList();
        this.latestSdkInfo = new c();
        this.gdpr = new b();
    }

    public boolean a(gi giVar) {
        return ((g() == null && giVar.g() == null) || (g() != null && g().equals(giVar.g()))) && giVar.maxRetries == this.maxRetries && giVar.retryInterval == this.retryInterval && giVar.waitTime == this.waitTime && giVar.monetizationDisabled == this.monetizationDisabled;
    }

    @Override
    public JSONObject c() {
        return a().a((iz<gi>) this);
    }

    @Override
    public boolean d() {
        if (this.components != null && this.maxRetries >= 0 && this.retryInterval >= 0 && this.waitTime >= 0 && this.latestSdkInfo.version.trim().length() != 0 && (this.latestSdkInfo.url.startsWith("http://") || this.latestSdkInfo.url.startsWith("https://"))) {
            synchronized (sAcquisitionLock) {
                for (int i = 0; i < this.components.size(); i++) {
                    a aVar = this.components.get(i);
                    if (aVar.type != null && Long.valueOf(aVar.expiry) != null) {
                        if (aVar.type.trim().length() == 0) {
                            return false;
                        }
                        if (aVar.expiry >= 0 && aVar.expiry <= 864000) {
                            if (c(aVar.url)) {
                                return false;
                            }
                            if ("root".equals(aVar.type) && c(aVar.fallbackUrl)) {
                                return false;
                            }
                        }
                        return false;
                    }
                    return false;
                }
                return this.gdpr != null;
            }
        }
        return false;
    }

    private static boolean c(String str) {
        if (str == null || str.trim().length() == 0) {
            return true;
        }
        return (str.startsWith("http://") || str.startsWith("https://")) ? false : true;
    }

    public long a(String str) {
        synchronized (sAcquisitionLock) {
            for (int i = 0; i < this.components.size(); i++) {
                a aVar = this.components.get(i);
                if (str.equals(aVar.type)) {
                    return aVar.expiry;
                }
            }
            return DEFAULT_EXPIRY;
        }
    }

    public int e() {
        return this.maxRetries;
    }

    public int h() {
        return this.retryInterval;
    }

    public boolean i() {
        return this.monetizationDisabled;
    }

    public boolean j() {
        b bVar = this.gdpr;
        return bVar == null || bVar.transmitRequest;
    }

    public String b(String str) {
        synchronized (sAcquisitionLock) {
            for (int i = 0; i < this.components.size(); i++) {
                a aVar = this.components.get(i);
                if (str.equals(aVar.type)) {
                    return aVar.url;
                }
            }
            return "";
        }
    }

    public final String k() {
        synchronized (sAcquisitionLock) {
            for (a aVar : this.components) {
                if ("root".equals(aVar.type)) {
                    return aVar.fallbackUrl;
                }
            }
            return DEFAULT_FALLBACK_URL;
        }
    }

    public static final class a {
        long expiry;
        String fallbackUrl = gi.DEFAULT_FALLBACK_URL;
        String type;
        String url;
    }
}