Weather Tracker v1.0.0版本的 MD5 值为:3edef27647e42a8ea0e7c0d2dbf56f97
以下内容为反编译后的 TelemetryConfig.java 源代码,内容仅作参考
package com.inmobi.commons.core.configs;
import androidx.annotation.Keep;
import androidx.annotation.VisibleForTesting;
import com.google.android.exoplayer2.text.ttml.TtmlNode;
import com.inmobi.commons.utils.json.Constructor;
import com.inmobi.media.d4;
import com.inmobi.media.i8;
import com.inmobi.media.s4;
import com.inmobi.media.v3;
import com.inmobi.media.w5;
import com.inmobi.media.y9;
import com.inmobi.media.z9;
import java.util.ArrayList;
import java.util.List;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsJVMKt;
import org.json.JSONObject;
@Keep
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000h\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010 \n\u0002\b\u0004\n\u0002\u0010\u0006\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0012\n\u0002\u0010\t\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\f\b\u0007\u0018\u0000 E2\u00020\u0001:\u0003FGHB\u0011\u0012\b\u0010C\u001a\u0004\u0018\u00010\f¢\u0006\u0004\bD\u00101J\u000f\u0010\u0003\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\u0003\u0010\u0004J\u000f\u0010\u0006\u001a\u00020\u0005H\u0002¢\u0006\u0004\b\u0006\u0010\u0007J\u0017\u0010\n\u001a\u00020\t2\u0006\u0010\b\u001a\u00020\u0000H\u0007¢\u0006\u0004\b\n\u0010\u000bJ\u000f\u0010\r\u001a\u00020\fH\u0016¢\u0006\u0004\b\r\u0010\u000eJ\u000f\u0010\u000f\u001a\u00020\tH\u0016¢\u0006\u0004\b\u000f\u0010\u0010J\u000f\u0010\u0012\u001a\u00020\u0011H\u0016¢\u0006\u0004\b\u0012\u0010\u0013J\r\u0010\u0015\u001a\u00020\u0014¢\u0006\u0004\b\u0015\u0010\u0016J\r\u0010\u0017\u001a\u00020\u0014¢\u0006\u0004\b\u0017\u0010\u0016J\r\u0010\u0018\u001a\u00020\t¢\u0006\u0004\b\u0018\u0010\u0010J\u0013\u0010\u001a\u001a\b\u0012\u0004\u0012\u00020\f0\u0019¢\u0006\u0004\b\u001a\u0010\u001bJ\r\u0010\u001c\u001a\u00020\t¢\u0006\u0004\b\u001c\u0010\u0010J\r\u0010\u001d\u001a\u00020\f¢\u0006\u0004\b\u001d\u0010\u000eJ\r\u0010\u001f\u001a\u00020\u001e¢\u0006\u0004\b\u001f\u0010 J\r\u0010\"\u001a\u00020!¢\u0006\u0004\b\"\u0010#J\r\u0010$\u001a\u00020!¢\u0006\u0004\b$\u0010#J\r\u0010&\u001a\u00020%¢\u0006\u0004\b&\u0010'J\r\u0010(\u001a\u00020\u0005¢\u0006\u0004\b(\u0010\u0007R\u0016\u0010)\u001a\u00020!8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b)\u0010*R\u0016\u0010+\u001a\u00020\u001e8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b+\u0010,R\"\u0010-\u001a\u00020\f8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b-\u0010.\u001a\u0004\b/\u0010\u000e\"\u0004\b0\u00101R\u001c\u00102\u001a\b\u0012\u0004\u0012\u00020\f0\u00198\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b2\u00103R\u001e\u00105\u001a\n 4*\u0004\u0018\u00010\f0\f8\u0002@\u0003X\u0083\u0004¢\u0006\u0006\n\u0004\b5\u0010.R\u0016\u00106\u001a\u00020\t8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b6\u00107R\u0016\u00109\u001a\u0002088\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b9\u0010:R\u0016\u0010;\u001a\u0002088\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b;\u0010:R\u0016\u0010<\u001a\u0002088\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b<\u0010:R\u0016\u0010>\u001a\u00020=8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b>\u0010?R\u0016\u0010@\u001a\u00020!8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b@\u0010*R\u0016\u0010A\u001a\u00020\u00058\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\bA\u0010B¨\u0006I"}, d2 = {"Lcom/inmobi/commons/core/configs/TelemetryConfig;", "Lcom/inmobi/commons/core/configs/Config;", "", "setDefaultNetworkConfig", "()V", "Lcom/inmobi/commons/core/configs/TelemetryConfig$AssetReportingConfig;", "getDefaultAssetReportingConfig", "()Lcom/inmobi/commons/core/configs/TelemetryConfig$AssetReportingConfig;", "config", "", "isSameAs", "(Lcom/inmobi/commons/core/configs/TelemetryConfig;)Z", "", "getType", "()Ljava/lang/String;", "isValid", "()Z", "Lorg/json/JSONObject;", "toJson", "()Lorg/json/JSONObject;", "Lcom/inmobi/media/i8$a;", "getMobileConfig", "()Lcom/inmobi/media/i8$a;", "getWifiConfig", "isGeneralEventsDisabled", "", "getPriorityEventsList", "()Ljava/util/List;", "getEnabled", "getUrl", "", "getSamplingFactor", "()D", "", "getMaxRetryCount", "()I", "getMaxEventsToPersist", "Lcom/inmobi/media/v3;", "getEventConfig", "()Lcom/inmobi/media/v3;", "getAssetConfig", "maxRetryCount", "I", "samplingFactor", "D", "telemetryUrl", "Ljava/lang/String;", "getTelemetryUrl", "setTelemetryUrl", "(Ljava/lang/String;)V", "priorityEvents", "Ljava/util/List;", "kotlin.jvm.PlatformType", "TAG", "disableAllGeneralEvents", "Z", "", "eventTTL", "J", "txLatency", "processingInterval", "Lcom/inmobi/commons/core/configs/TelemetryConfig$Base;", TtmlNode.RUBY_BASE, "Lcom/inmobi/commons/core/configs/TelemetryConfig$Base;", "maxEventsToPersist", "assetReporting", "Lcom/inmobi/commons/core/configs/TelemetryConfig$AssetReportingConfig;", "accountId", "<init>", "Companion", "AssetReportingConfig", "Base", "a", "media_release"}, k = 1, mv = {1, 5, 1})
public final class TelemetryConfig extends Config {
public static final a Companion = new a();
public static final boolean DEFAULT_DISABLE_GENERAL_EVENTS = false;
public static final long DEFAULT_EVENT_TTL_SEC = 604800;
public static final long DEFAULT_INGESTION_LATENCY_SEC = 86400;
public static final boolean DEFAULT_IS_ENABLED = true;
public static final int DEFAULT_MAX_BATCH_SIZE = 20;
public static final int DEFAULT_MAX_EVENTS_TO_PERSIST = 1000;
public static final int DEFAULT_MAX_RETRIES = 1;
public static final int DEFAULT_MIN_BATCH_SIZE = 5;
public static final long DEFAULT_PROCESSING_INTERVAL_SEC = 30;
public static final long DEFAULT_RETRY_INTERVAL_SEC = 60;
public static final double DEFAULT_SAMPLING_FACTOR = 0.0d;
public static final String DEFAULT_URL = "https://telemetry.sdk.inmobi.com/metrics";
@s4
private final String TAG;
private AssetReportingConfig assetReporting;
private Base base;
private boolean disableAllGeneralEvents;
private long eventTTL;
private int maxEventsToPersist;
private int maxRetryCount;
private i8 networkType;
private List<String> priorityEvents;
private long processingInterval;
private double samplingFactor;
private String telemetryUrl;
private long txLatency;
@Keep
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000b\n\u0002\b\u0012\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0012\u0010\u0013J\r\u0010\u0003\u001a\u00020\u0002¢\u0006\u0004\b\u0003\u0010\u0004J\r\u0010\u0005\u001a\u00020\u0002¢\u0006\u0004\b\u0005\u0010\u0004J\r\u0010\u0006\u001a\u00020\u0002¢\u0006\u0004\b\u0006\u0010\u0004R\"\u0010\u0007\u001a\u00020\u00028\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0007\u0010\b\u001a\u0004\b\t\u0010\u0004\"\u0004\b\n\u0010\u000bR\"\u0010\f\u001a\u00020\u00028\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\f\u0010\b\u001a\u0004\b\r\u0010\u0004\"\u0004\b\u000e\u0010\u000bR\"\u0010\u000f\u001a\u00020\u00028\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u000f\u0010\b\u001a\u0004\b\u0010\u0010\u0004\"\u0004\b\u0011\u0010\u000b¨\u0006\u0014"}, d2 = {"Lcom/inmobi/commons/core/configs/TelemetryConfig$AssetReportingConfig;", "", "", "isGifEnabled", "()Z", "isImageEnabled", "isVideoEnabled", "image", "Z", "getImage", "setImage", "(Z)V", "gif", "getGif", "setGif", "video", "getVideo", "setVideo", "<init>", "()V", "media_release"}, k = 1, mv = {1, 5, 1})
public static final class AssetReportingConfig {
private boolean gif;
private boolean image;
private boolean video;
public final boolean getGif() {
return this.gif;
}
public final boolean getImage() {
return this.image;
}
public final boolean getVideo() {
return this.video;
}
public final boolean isGifEnabled() {
return this.gif;
}
public final boolean isImageEnabled() {
return this.image;
}
public final boolean isVideoEnabled() {
return this.video;
}
public final void setGif(boolean z) {
this.gif = z;
}
public final void setImage(boolean z) {
this.image = z;
}
public final void setVideo(boolean z) {
this.video = z;
}
}
@Keep
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000b\n\u0002\b\u0007\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0007\u0010\bJ\r\u0010\u0003\u001a\u00020\u0002¢\u0006\u0004\b\u0003\u0010\u0004R\u0016\u0010\u0005\u001a\u00020\u00028\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0005\u0010\u0006¨\u0006\t"}, d2 = {"Lcom/inmobi/commons/core/configs/TelemetryConfig$Base;", "", "", "getEnabled", "()Z", "enabled", "Z", "<init>", "()V", "media_release"}, k = 1, mv = {1, 5, 1})
public static final class Base {
private boolean enabled = true;
public final boolean getEnabled() {
return this.enabled;
}
}
public TelemetryConfig(String str) {
super(str);
this.telemetryUrl = DEFAULT_URL;
this.TAG = "TelemetryConfig";
this.processingInterval = 30L;
this.maxRetryCount = 1;
this.maxEventsToPersist = 1000;
this.eventTTL = DEFAULT_EVENT_TTL_SEC;
this.txLatency = 86400L;
this.priorityEvents = a.a(Companion);
this.base = new Base();
this.networkType = new i8();
setDefaultNetworkConfig();
this.assetReporting = getDefaultAssetReportingConfig();
}
private final AssetReportingConfig getDefaultAssetReportingConfig() {
AssetReportingConfig assetReportingConfig = new AssetReportingConfig();
assetReportingConfig.setVideo(true);
assetReportingConfig.setImage(false);
assetReportingConfig.setGif(false);
return assetReportingConfig;
}
private final void setDefaultNetworkConfig() {
i8 i8Var = this.networkType;
i8.a aVar = new i8.a();
aVar.a(60L);
aVar.c(5);
aVar.b(20);
Unit unit = Unit.INSTANCE;
i8Var.getClass();
Intrinsics.checkNotNullParameter(aVar, "<set-?>");
i8Var.wifi = aVar;
i8 i8Var2 = this.networkType;
i8.a aVar2 = new i8.a();
aVar2.a(60L);
aVar2.c(5);
aVar2.b(20);
i8Var2.getClass();
Intrinsics.checkNotNullParameter(aVar2, "<set-?>");
i8Var2.others = aVar2;
}
public final AssetReportingConfig getAssetConfig() {
return this.assetReporting;
}
public final boolean getEnabled() {
return this.base.getEnabled();
}
public final v3 getEventConfig() {
return new v3(this.maxRetryCount, this.eventTTL, this.processingInterval, this.txLatency, getWifiConfig().b(), getWifiConfig().a(), getMobileConfig().b(), getMobileConfig().a(), getWifiConfig().c(), getMobileConfig().c());
}
public final int getMaxEventsToPersist() {
return this.maxEventsToPersist;
}
public final int getMaxRetryCount() {
return this.maxRetryCount;
}
public final i8.a getMobileConfig() {
return this.networkType.a();
}
public final List<String> getPriorityEventsList() {
return this.priorityEvents;
}
public final double getSamplingFactor() {
return this.samplingFactor;
}
public final String getTelemetryUrl() {
return this.telemetryUrl;
}
@Override
public String getType() {
return "telemetry";
}
public final String getUrl() {
return this.telemetryUrl;
}
public final i8.a getWifiConfig() {
return this.networkType.b();
}
public final boolean isGeneralEventsDisabled() {
return this.disableAllGeneralEvents;
}
@VisibleForTesting
public final boolean isSameAs(TelemetryConfig config) {
boolean z;
boolean equals$default;
Intrinsics.checkNotNullParameter(config, "config");
if (getAccountId$media_release() != null || config.getAccountId$media_release() != null) {
if (getAccountId$media_release() != null) {
equals$default = StringsKt__StringsJVMKt.equals$default(getAccountId$media_release(), config.getAccountId$media_release(), false, 2, null);
}
z = false;
List<String> priorityEventsList = getPriorityEventsList();
for (String str : config.getPriorityEventsList()) {
if (!priorityEventsList.contains(str)) {
return false;
}
}
if (z && Intrinsics.areEqual(config.telemetryUrl, this.telemetryUrl)) {
if ((config.samplingFactor != this.samplingFactor) && config.eventTTL == this.eventTTL && config.maxEventsToPersist == this.maxEventsToPersist && config.maxRetryCount == this.maxRetryCount && config.getAssetConfig().isImageEnabled() == getAssetConfig().isImageEnabled() && config.getAssetConfig().isGifEnabled() == getAssetConfig().isGifEnabled() && config.getAssetConfig().isVideoEnabled() == getAssetConfig().isVideoEnabled()) {
return true;
}
}
return false;
}
z = true;
List<String> priorityEventsList2 = getPriorityEventsList();
while (r4.hasNext()) {
}
if (z) {
if (config.samplingFactor != this.samplingFactor) {
return true;
}
}
return false;
}
@Override
public boolean isValid() {
if (d4.a(this.telemetryUrl)) {
return false;
}
long j = this.txLatency;
if (j < this.processingInterval || j > this.eventTTL) {
return false;
}
i8 i8Var = this.networkType;
int i = this.maxEventsToPersist;
return (i8Var.b().a(i) && i8Var.a().a(i)) && this.processingInterval > 0 && this.maxRetryCount >= 0 && this.txLatency > 0 && this.eventTTL > 0 && this.maxEventsToPersist > 0 && this.samplingFactor >= DEFAULT_SAMPLING_FACTOR;
}
public final void setTelemetryUrl(String str) {
Intrinsics.checkNotNullParameter(str, "<set-?>");
this.telemetryUrl = str;
}
@Override
public JSONObject toJson() {
JSONObject a2 = Companion.a().a((com.inmobi.commons.utils.json.a<TelemetryConfig>) this);
if (a2 == null) {
String TAG = this.TAG;
Intrinsics.checkNotNullExpressionValue(TAG, "TAG");
return new JSONObject();
}
return a2;
}
public static final class a {
public static final class C0333a implements Constructor<List<? extends String>> {
@Override
public List<? extends String> construct() {
return new ArrayList();
}
}
public static final List a(a aVar) {
List mutableListOf;
aVar.getClass();
mutableListOf = CollectionsKt__CollectionsKt.mutableListOf("SessionStarted", "ServerFill", "ServerNoFill", "ServerError", "AdLoadFailed", "AdLoadSuccessful", "BlockAutoRedirection", "AssetDownloaded", "CrashEventOccurred", "InvalidConfig", "ConfigFetched", "SdkInitialized", "AdGetSignalsFailed", "AdGetSignalsSucceeded", "AdShowFailed", "AdLoadCalled", "AdLoadDroppedAtSDK", "AdShowCalled", "AdShowSuccessful", "AdImpressionSuccessful");
return mutableListOf;
}
public final com.inmobi.commons.utils.json.a<TelemetryConfig> a() {
return new com.inmobi.commons.utils.json.a().a(new z9("priorityEvents", TelemetryConfig.class), (y9<?>) new w5(new C0333a(), String.class));
}
}
}