Idle Egg Factory v2.1.5版本的 MD5 值为:7d2ba6677008ca521af0101bb927d72a

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


package com.inmobi.media;

import com.inmobi.commons.utils.json.Constructor;
import com.inmobi.media.gh;
import java.util.LinkedList;
import java.util.List;
import org.json.JSONObject;

public class gk extends fw {
    private static final boolean DEFAULT_DISABLE_GENERAL_EVENTS = false;
    private static final long DEFAULT_EVENT_TTL_SEC = 604800;
    private static final long DEFAULT_INGESTION_LATENCY_SEC = 86400;
    private static final boolean DEFAULT_IS_ENABLED = true;
    private static final int DEFAULT_MAX_BATCH_SIZE = 20;
    private static final int DEFAULT_MAX_EVENTS_TO_PERSIST = 1000;
    private static final int DEFAULT_MAX_RETRIES = 1;
    private static final int DEFAULT_MIN_BATCH_SIZE = 5;
    private static final long DEFAULT_PROCESSING_INTERVAL_SEC = 30;
    private static final long DEFAULT_RETRY_INTERVAL_SEC = 60;
    private static final double DEFAULT_SAMPLING_FACTOR = 0.0d;
    private static final String DEFAULT_URL = "https://telemetry.sdk.inmobi.com/metrics";
    public a assetReporting;
    public b base;
    public boolean disableAllGeneralEvents;
    private long eventTTL;
    public int maxEventsToPersist;
    private int maxRetryCount;
    public gh networkType;
    public List<String> priorityEvents;
    private long processingInterval;
    public double samplingFactor;
    public String telemetryUrl;
    private long txLatency;

    public static final class a {
        public boolean gif;
        public boolean image;
        public boolean video;
    }

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

    public static iz<gk> a() {
        return new iz().a(new je("priorityEvents", gk.class), (jd) new jb(new Constructor<List<String>>() {
            @Override
            public final List<String> construct() {
                return new LinkedList();
            }
        }, String.class));
    }

    public gk(String str) {
        super(str);
        this.telemetryUrl = DEFAULT_URL;
        this.processingInterval = DEFAULT_PROCESSING_INTERVAL_SEC;
        this.maxRetryCount = 1;
        this.maxEventsToPersist = 1000;
        this.eventTTL = DEFAULT_EVENT_TTL_SEC;
        this.disableAllGeneralEvents = false;
        this.txLatency = DEFAULT_INGESTION_LATENCY_SEC;
        this.samplingFactor = DEFAULT_SAMPLING_FACTOR;
        LinkedList linkedList = new LinkedList();
        linkedList.add("SessionStarted");
        linkedList.add("ServerFill");
        linkedList.add("ServerNoFill");
        linkedList.add("ServerError");
        linkedList.add("AdLoadFailed");
        linkedList.add("AdLoadSuccessful");
        linkedList.add("BlockAutoRedirection");
        linkedList.add("AssetDownloaded");
        linkedList.add("CrashEventOccurred");
        linkedList.add("InvalidConfig");
        linkedList.add("ConfigFetched");
        linkedList.add("SdkInitialized");
        linkedList.add("AdGetSignalsFailed");
        linkedList.add("AdGetSignalsSucceeded");
        linkedList.add("AdShowFailed");
        linkedList.add("AdLoadCalled");
        linkedList.add("AdLoadDroppedAtSDK");
        linkedList.add("AdShowCalled");
        linkedList.add("AdShowSuccessful");
        linkedList.add("AdImpressionSuccessful");
        this.priorityEvents = linkedList;
        this.base = new b();
        gh ghVar = new gh();
        this.networkType = ghVar;
        ghVar.wifi = new gh.a();
        this.networkType.wifi.retryInterval = 60L;
        this.networkType.wifi.minBatchSize = 5;
        this.networkType.wifi.maxBatchSize = 20;
        this.networkType.others = new gh.a();
        this.networkType.others.retryInterval = 60L;
        this.networkType.others.minBatchSize = 5;
        this.networkType.others.maxBatchSize = 20;
        a aVar = new a();
        aVar.video = true;
        aVar.image = false;
        aVar.gif = false;
        this.assetReporting = aVar;
    }

    @Override
    public boolean d() {
        if (this.telemetryUrl.trim().length() != 0 && (this.telemetryUrl.startsWith("http://") || this.telemetryUrl.startsWith("https://"))) {
            long j = this.txLatency;
            if (j >= this.processingInterval && j <= this.eventTTL && this.networkType.a(this.maxEventsToPersist) && this.processingInterval > 0 && this.maxRetryCount >= 0 && this.txLatency > 0 && this.eventTTL > 0 && this.maxEventsToPersist > 0 && this.samplingFactor >= DEFAULT_SAMPLING_FACTOR) {
                return true;
            }
        }
        return false;
    }

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

    public final gp e() {
        return new gp(this.maxRetryCount, this.eventTTL, this.processingInterval, this.txLatency, this.networkType.wifi.minBatchSize, this.networkType.wifi.maxBatchSize, this.networkType.others.minBatchSize, this.networkType.others.maxBatchSize, this.networkType.wifi.retryInterval, this.networkType.others.retryInterval);
    }

    public static final class b {
        public boolean enabled;

        private b() {
            this.enabled = true;
        }
    }
}