Idle Tower v2.48版本的 MD5 值为:56f20496f6a85726b376356ed2ecee23
以下内容为反编译后的 gn.java 源代码,内容仅作参考
package com.inmobi.media;
import com.inmobi.commons.utils.json.Constructor;
import com.inmobi.media.gk;
import java.util.LinkedList;
import java.util.List;
import org.json.JSONObject;
public class gn extends fz {
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 gk 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 jc<gn> a() {
return new jc().a(new jh("priorityEvents", gn.class), (jg) new je(new Constructor<List<String>>() {
@Override
public final List<String> construct() {
return new LinkedList();
}
}, String.class));
}
public gn(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();
gk gkVar = new gk();
this.networkType = gkVar;
gkVar.wifi = new gk.a();
this.networkType.wifi.retryInterval = DEFAULT_RETRY_INTERVAL_SEC;
this.networkType.wifi.minBatchSize = 5;
this.networkType.wifi.maxBatchSize = 20;
this.networkType.others = new gk.a();
this.networkType.others.retryInterval = DEFAULT_RETRY_INTERVAL_SEC;
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((jc<gn>) this);
}
public final gs e() {
return new gs(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;
}
}
}