正在查看: TodoCrédito v1.4 应用的 AFf1hSDK.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: TodoCrédito v1.4 应用的 AFf1hSDK.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.appsflyer.internal;
import android.net.Uri;
import android.os.Build;
import com.appsflyer.AFLogger;
import com.appsflyer.attribution.AppsFlyerRequestListener;
import com.appsflyer.deeplink.DeepLink;
import com.appsflyer.deeplink.DeepLinkResult;
import com.appsflyer.internal.AFj1zSDK;
import com.appsflyer.internal.components.network.http.ResponseNetwork;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Observable;
import java.util.Observer;
import java.util.TimeZone;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import kotlin.Pair;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsKt;
import me.jessyan.autosize.BuildConfig;
import org.jetbrains.annotations.NotNull;
import org.json.JSONObject;
public final class AFf1hSDK extends AFf1oSDK<AFc1jSDK> {
@NotNull
private final CountDownLatch AFInAppEventParameterName;
private int AFInAppEventType;
private int AFKeystoreWrapper;
@NotNull
private final AFc1qSDK component3;
@NotNull
private final AFc1sSDK copy;
@NotNull
private final AFd1mSDK copydefault;
@NotNull
private final AFj1vSDK equals;
@NotNull
private final AFh1qSDK hashCode;
@NotNull
private final AFd1pSDK toString;
private int valueOf;
@NotNull
private final List<AFj1zSDK> values;
public class AFa1ySDK {
public static final int[] getCurrencyIso4217Code;
public static final int[] getMonetizationNetwork;
static {
int[] iArr = new int[AFe1dSDK.values().length];
iArr[AFe1dSDK.SUCCESS.ordinal()] = 1;
iArr[AFe1dSDK.FAILURE.ordinal()] = 2;
getMonetizationNetwork = iArr;
int[] iArr2 = new int[AFj1zSDK.AFa1zSDK.values().length];
iArr2[AFj1zSDK.AFa1zSDK.FINISHED.ordinal()] = 1;
iArr2[AFj1zSDK.AFa1zSDK.STARTED.ordinal()] = 2;
getCurrencyIso4217Code = iArr2;
}
}
public AFf1hSDK(@NotNull AFc1qSDK aFc1qSDK, @NotNull AFd1fSDK aFd1fSDK) {
super(AFf1zSDK.DLSDK, new AFf1zSDK[]{AFf1zSDK.RC_CDN, AFf1zSDK.FETCH_ADVERTISING_ID}, aFd1fSDK, "DdlSdk");
Intrinsics.checkNotNullParameter(aFc1qSDK, "");
Intrinsics.checkNotNullParameter(aFd1fSDK, "");
this.component3 = aFc1qSDK;
this.AFInAppEventParameterName = new CountDownLatch(1);
this.values = new ArrayList();
AFd1pSDK mediationNetwork = aFd1fSDK.getMediationNetwork();
Intrinsics.checkNotNullExpressionValue(mediationNetwork, "");
this.toString = mediationNetwork;
AFd1mSDK e9 = aFd1fSDK.e();
Intrinsics.checkNotNullExpressionValue(e9, "");
this.copydefault = e9;
AFc1sSDK unregisterClient = aFd1fSDK.unregisterClient();
Intrinsics.checkNotNullExpressionValue(unregisterClient, "");
this.copy = unregisterClient;
AFh1qSDK component4 = aFd1fSDK.component4();
Intrinsics.checkNotNullExpressionValue(component4, "");
this.hashCode = component4;
AFj1vSDK equals = aFd1fSDK.equals();
Intrinsics.checkNotNullExpressionValue(equals, "");
this.equals = equals;
AFj1zSDK[] AFAdRevenueData = equals.AFAdRevenueData();
Intrinsics.checkNotNullExpressionValue(AFAdRevenueData, "");
ArrayList<AFj1zSDK> arrayList = new ArrayList();
int length = AFAdRevenueData.length;
for (int i9 = 0; i9 < length; i9++) {
AFj1zSDK aFj1zSDK = AFAdRevenueData[i9];
if ((aFj1zSDK == null || aFj1zSDK.component3 == AFj1zSDK.AFa1zSDK.NOT_STARTED) ? false : true) {
arrayList.add(aFj1zSDK);
}
}
this.AFInAppEventType = arrayList.size();
for (final AFj1zSDK aFj1zSDK2 : arrayList) {
AFj1zSDK.AFa1zSDK aFa1zSDK = aFj1zSDK2.component3;
int i10 = aFa1zSDK == null ? -1 : AFa1ySDK.getCurrencyIso4217Code[aFa1zSDK.ordinal()];
if (i10 == 1) {
AFLogger aFLogger = AFLogger.INSTANCE;
AFg1cSDK aFg1cSDK = AFg1cSDK.DDL;
StringBuilder sb = new StringBuilder();
sb.append(aFj1zSDK2.getMediationNetwork.get("source"));
sb.append(" referrer collected earlier");
AFh1ySDK.d$default(aFLogger, aFg1cSDK, sb.toString(), false, 4, null);
Intrinsics.checkNotNullExpressionValue(aFj1zSDK2, "");
getMediationNetwork(aFj1zSDK2);
} else if (i10 == 2) {
aFj1zSDK2.addObserver(new Observer() {
@Override
public final void update(Observable observable, Object obj) {
AFf1hSDK.AFAdRevenueData(AFj1zSDK.this, this, observable, obj);
}
});
}
}
}
public static final void AFAdRevenueData(AFj1zSDK aFj1zSDK, AFf1hSDK aFf1hSDK, Observable observable, Object obj) {
Intrinsics.checkNotNullParameter(aFf1hSDK, "");
AFLogger aFLogger = AFLogger.INSTANCE;
AFg1cSDK aFg1cSDK = AFg1cSDK.DDL;
StringBuilder sb = new StringBuilder();
sb.append(aFj1zSDK.getMediationNetwork.get("source"));
sb.append(" referrer collected via observer");
AFh1ySDK.d$default(aFLogger, aFg1cSDK, sb.toString(), false, 4, null);
if (observable == null) {
throw new NullPointerException("null cannot be cast to non-null type com.appsflyer.internal.referrer.Referrer");
}
aFf1hSDK.getMediationNetwork((AFj1zSDK) observable);
}
private final boolean copy() {
Object obj = this.component3.getRevenue().get("referrers");
List list = obj instanceof List ? (List) obj : null;
return (list != null ? list.size() : 0) < this.AFInAppEventType && !this.component3.getRevenue().containsKey("referrers");
}
private static boolean getCurrencyIso4217Code(AFj1zSDK aFj1zSDK) {
Object obj = aFj1zSDK.getMediationNetwork.get("click_ts");
Long l8 = obj instanceof Long ? (Long) obj : null;
if (l8 != null) {
if (System.currentTimeMillis() - TimeUnit.SECONDS.toMillis(l8.longValue()) < TimeUnit.DAYS.toMillis(1L)) {
return true;
}
}
return false;
}
private final void getMediationNetwork(AFj1zSDK aFj1zSDK) {
if (!getCurrencyIso4217Code(aFj1zSDK)) {
int i9 = this.AFKeystoreWrapper + 1;
this.AFKeystoreWrapper = i9;
if (i9 == this.AFInAppEventType) {
this.AFInAppEventParameterName.countDown();
return;
}
return;
}
this.values.add(aFj1zSDK);
this.AFInAppEventParameterName.countDown();
AFLogger aFLogger = AFLogger.INSTANCE;
AFg1cSDK aFg1cSDK = AFg1cSDK.DDL;
StringBuilder sb = new StringBuilder("Added non-organic ");
sb.append(aFj1zSDK.getClass().getSimpleName());
AFh1ySDK.d$default(aFLogger, aFg1cSDK, sb.toString(), false, 4, null);
}
@Override
public final boolean AFAdRevenueData() {
return false;
}
@Override
public final boolean a_() {
return false;
}
@Override
public final AppsFlyerRequestListener component1() {
return null;
}
@Override
public final boolean equals() {
return false;
}
@Override
@NotNull
public final AFe1dSDK getMonetizationNetwork() {
AFe1dSDK monetizationNetwork;
AFe1dSDK aFe1dSDK = AFe1dSDK.FAILURE;
try {
monetizationNetwork = super.getMonetizationNetwork();
Intrinsics.checkNotNullExpressionValue(monetizationNetwork, "");
} catch (Exception e9) {
e = e9;
}
try {
AFh1qSDK aFh1qSDK = this.hashCode;
int i9 = this.valueOf;
if (i9 <= 0 || i9 > 2) {
AFLogger.afErrorLogForExcManagerOnly("Unexpected ddl requestCount - end", new IllegalStateException("Metrics: Unexpected ddl requestCount = ".concat(String.valueOf(i9))));
} else {
int i10 = i9 - 1;
aFh1qSDK.areAllFieldsValid[i10] = System.currentTimeMillis();
long j9 = aFh1qSDK.component4[i10];
if (j9 != 0) {
long[] jArr = aFh1qSDK.component3;
jArr[i10] = aFh1qSDK.areAllFieldsValid[i10] - j9;
aFh1qSDK.getMonetizationNetwork.put("net", jArr);
aFh1qSDK.getMediationNetwork.getRevenue("ddl", new JSONObject(aFh1qSDK.getMonetizationNetwork).toString());
} else {
StringBuilder sb = new StringBuilder("Metrics: ddlStart[");
sb.append(i10);
sb.append("] ts is missing");
AFLogger.afInfoLog(sb.toString());
}
}
int i11 = AFa1ySDK.getMonetizationNetwork[monetizationNetwork.ordinal()];
if (i11 != 1) {
if (i11 != 2) {
return monetizationNetwork;
}
AFLogger aFLogger = AFLogger.INSTANCE;
AFg1cSDK aFg1cSDK = AFg1cSDK.DDL;
StringBuilder sb2 = new StringBuilder("Error occurred. Server response code = ");
ResponseNetwork responseNetwork = ((AFf1oSDK) this).component1;
sb2.append(responseNetwork != null ? Integer.valueOf(responseNetwork.getStatusCode()) : null);
AFh1ySDK.d$default(aFLogger, aFg1cSDK, sb2.toString(), false, 4, null);
DeepLinkResult deepLinkResult = new DeepLinkResult(null, DeepLinkResult.Error.HTTP_STATUS_CODE);
this.hashCode.getMediationNetwork(deepLinkResult, this.copy.component3);
this.copy.getRevenue(deepLinkResult);
return monetizationNetwork;
}
ResponseNetwork responseNetwork2 = ((AFf1oSDK) this).component1;
Intrinsics.c(responseNetwork2);
Object body = responseNetwork2.getBody();
Intrinsics.checkNotNullExpressionValue(body, "");
AFc1jSDK aFc1jSDK = (AFc1jSDK) body;
DeepLink deepLink = aFc1jSDK.AFAdRevenueData;
if (deepLink != null) {
DeepLinkResult deepLinkResult2 = new DeepLinkResult(deepLink, null);
this.hashCode.getMediationNetwork(deepLinkResult2, this.copy.component3);
this.copy.getRevenue(deepLinkResult2);
return monetizationNetwork;
}
if (this.valueOf > 1 || !aFc1jSDK.getMonetizationNetwork() || !copy()) {
DeepLinkResult deepLinkResult3 = new DeepLinkResult(null, null);
this.hashCode.getMediationNetwork(deepLinkResult3, this.copy.component3);
this.copy.getRevenue(deepLinkResult3);
return monetizationNetwork;
}
AFh1ySDK.d$default(AFLogger.INSTANCE, AFg1cSDK.DDL, "Waiting for referrers...", false, 4, null);
this.AFInAppEventParameterName.await();
AFh1qSDK aFh1qSDK2 = this.hashCode;
long currentTimeMillis = System.currentTimeMillis();
long j10 = aFh1qSDK2.areAllFieldsValid[0];
if (j10 != 0) {
aFh1qSDK2.getMonetizationNetwork.put("rfr_wait", Long.valueOf(currentTimeMillis - j10));
aFh1qSDK2.getMediationNetwork.getRevenue("ddl", new JSONObject(aFh1qSDK2.getMonetizationNetwork).toString());
} else {
AFLogger.afInfoLog("Metrics: ddlEnd[0] ts is missing");
}
if (this.AFKeystoreWrapper != this.AFInAppEventType) {
return getMonetizationNetwork();
}
DeepLinkResult deepLinkResult4 = new DeepLinkResult(null, null);
this.hashCode.getMediationNetwork(deepLinkResult4, this.copy.component3);
this.copy.getRevenue(deepLinkResult4);
return AFe1dSDK.SUCCESS;
} catch (Exception e10) {
e = e10;
aFe1dSDK = monetizationNetwork;
Throwable cause = e.getCause();
if (!(cause instanceof InterruptedException ? true : cause instanceof InterruptedIOException)) {
if (cause instanceof IOException) {
AFh1ySDK.d$default(AFLogger.INSTANCE, AFg1cSDK.DDL, "Http Exception: the request was not sent to the server", false, 4, null);
DeepLinkResult deepLinkResult5 = new DeepLinkResult(null, DeepLinkResult.Error.NETWORK);
this.hashCode.getMediationNetwork(deepLinkResult5, this.copy.component3);
this.copy.getRevenue(deepLinkResult5);
} else {
AFh1ySDK.d$default(AFLogger.INSTANCE, AFg1cSDK.DDL, "Unexpected Exception: ".concat(String.valueOf(e)), false, 4, null);
DeepLinkResult deepLinkResult6 = new DeepLinkResult(null, DeepLinkResult.Error.UNEXPECTED);
this.hashCode.getMediationNetwork(deepLinkResult6, this.copy.component3);
this.copy.getRevenue(deepLinkResult6);
}
return aFe1dSDK;
}
AFLogger.afErrorLogForExcManagerOnly("[DDL] Timeout", new TimeoutException());
AFLogger aFLogger2 = AFLogger.INSTANCE;
AFg1cSDK aFg1cSDK2 = AFg1cSDK.DDL;
StringBuilder sb3 = new StringBuilder("Timeout, didn't manage to find deferred deeplink after ");
sb3.append(this.valueOf);
sb3.append(" attempt(s) within ");
sb3.append(this.copy.component3);
sb3.append(" milliseconds");
AFh1ySDK.d$default(aFLogger2, aFg1cSDK2, sb3.toString(), false, 4, null);
DeepLinkResult deepLinkResult7 = new DeepLinkResult(null, DeepLinkResult.Error.TIMEOUT);
this.hashCode.getMediationNetwork(deepLinkResult7, this.copy.component3);
this.copy.getRevenue(deepLinkResult7);
return AFe1dSDK.TIMEOUT;
}
}
@Override
public final long getRevenue() {
return this.copy.component3;
}
@Override
@NotNull
public final AFe1rSDK<AFc1jSDK> AFAdRevenueData(@NotNull String str) {
CharSequence H0;
CharSequence H02;
Map map;
String[] strArr;
Intrinsics.checkNotNullParameter(str, "");
boolean z8 = true;
this.valueOf++;
AFLogger aFLogger = AFLogger.INSTANCE;
AFg1cSDK aFg1cSDK = AFg1cSDK.DDL;
StringBuilder sb = new StringBuilder("Preparing request ");
sb.append(this.valueOf);
AFh1ySDK.d$default(aFLogger, aFg1cSDK, sb.toString(), false, 4, null);
Map<String, Object> revenue = this.component3.getRevenue();
if (this.valueOf == 1) {
revenue.put("is_first", Boolean.valueOf(this.toString.getRevenue.getMonetizationNetwork("appsFlyerCount", 0) == 0));
StringBuilder sb2 = new StringBuilder();
sb2.append(Locale.getDefault().getLanguage());
sb2.append('-');
sb2.append(Locale.getDefault().getCountry());
revenue.put("lang", sb2.toString());
revenue.put("os", Build.VERSION.RELEASE);
revenue.put("type", Build.MODEL);
AFd1pSDK aFd1pSDK = this.toString;
revenue.put("request_id", AFb1lSDK.AFAdRevenueData(aFd1pSDK.AFAdRevenueData, aFd1pSDK.getRevenue));
AFd1uSDK aFd1uSDK = this.copydefault.getMonetizationNetwork;
if (aFd1uSDK != null && (strArr = aFd1uSDK.getCurrencyIso4217Code) != null) {
Intrinsics.checkNotNullExpressionValue(strArr, "");
revenue.put("sharing_filter", strArr);
}
AFh1pSDK aFh1pSDK = this.toString.getMonetizationNetwork.component4;
Map<String, String> mediationNetwork = getMediationNetwork(aFh1pSDK != null ? new AFb1ySDK(aFh1pSDK.getCurrencyIso4217Code, aFh1pSDK.AFAdRevenueData) : null);
if (mediationNetwork != null) {
revenue.put("gaid", mediationNetwork);
}
Map<String, String> mediationNetwork2 = getMediationNetwork(AFb1rSDK.getRevenue(this.toString.AFAdRevenueData.getCurrencyIso4217Code));
if (mediationNetwork2 != null) {
revenue.put("oaid", mediationNetwork2);
}
}
long currentTimeMillis = System.currentTimeMillis();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS", Locale.US);
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
revenue.put("timestamp", simpleDateFormat.format(new Date(currentTimeMillis)));
revenue.put("request_count", Integer.valueOf(this.valueOf));
List<AFj1zSDK> list = this.values;
ArrayList arrayList = new ArrayList();
for (AFj1zSDK aFj1zSDK : list) {
if (aFj1zSDK.component3 == AFj1zSDK.AFa1zSDK.FINISHED) {
Object obj = aFj1zSDK.getMediationNetwork.get("referrer");
String str2 = obj instanceof String ? (String) obj : null;
if (str2 != null) {
Pair[] pairArr = new Pair[2];
Object obj2 = aFj1zSDK.getMediationNetwork.get("source");
if (obj2 != null) {
pairArr[0] = x6.h.a("source", (String) obj2);
pairArr[1] = x6.h.a("value", str2);
map = kotlin.collections.c0.g(pairArr);
if (map == null) {
arrayList.add(map);
}
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.String");
}
}
}
map = null;
if (map == null) {
}
}
if (!arrayList.isEmpty()) {
revenue.put("referrers", arrayList);
}
AFc1qSDK aFc1qSDK = this.component3;
AFj1mSDK aFj1mSDK = new AFj1mSDK(this.toString, null, 2, null);
String str3 = ((AFf1oSDK) this).areAllFieldsValid.component1;
Object obj3 = this.component3.getRevenue().get("timestamp");
if (obj3 != null) {
String str4 = (String) obj3;
String packageName = aFj1mSDK.getMediationNetwork.AFAdRevenueData.getCurrencyIso4217Code.getPackageName();
Intrinsics.checkNotNullExpressionValue(packageName, "");
String component4 = aFj1mSDK.getMediationNetwork.component4();
if (component4 != null && !kotlin.text.n.q(component4)) {
z8 = false;
}
if (!z8) {
H02 = StringsKt__StringsKt.H0(component4);
component4 = "-".concat(String.valueOf(H02.toString()));
}
if (component4 == null) {
component4 = BuildConfig.FLAVOR;
}
H0 = StringsKt__StringsKt.H0(component4);
String obj4 = H0.toString();
Uri.Builder buildUpon = Uri.parse(aFj1mSDK.getRevenue.AFAdRevenueData("https://%sdlsdk.%s/v1.0/android/")).buildUpon();
StringBuilder sb3 = new StringBuilder();
sb3.append(packageName);
sb3.append(obj4);
Uri.Builder appendPath = buildUpon.appendPath(sb3.toString());
Intrinsics.checkNotNullExpressionValue(appendPath, "");
String obj5 = AFj1mSDK.L_(appendPath, str3, str4).appendQueryParameter("sdk_version", AFb1tSDK.getRevenue).build().toString();
Intrinsics.checkNotNullExpressionValue(obj5, "");
aFc1qSDK.getMonetizationNetwork(obj5);
AFh1qSDK aFh1qSDK = this.hashCode;
int i9 = this.valueOf;
if (i9 > 0 && i9 <= 2) {
int i10 = i9 - 1;
aFh1qSDK.component4[i10] = System.currentTimeMillis();
if (i10 == 0) {
long j9 = aFh1qSDK.component1;
if (j9 != 0) {
aFh1qSDK.getMonetizationNetwork.put("from_fg", Long.valueOf(aFh1qSDK.component4[i10] - j9));
aFh1qSDK.getMediationNetwork.getRevenue("ddl", new JSONObject(aFh1qSDK.getMonetizationNetwork).toString());
} else {
AFLogger.afInfoLog("Metrics: fg ts is missing");
}
}
} else {
AFLogger.afErrorLogForExcManagerOnly("Unexpected ddl requestCount - start", new IllegalStateException("Metrics: Unexpected ddl requestCount = ".concat(String.valueOf(i9))));
}
AFe1rSDK<AFc1jSDK> monetizationNetwork = ((AFf1oSDK) this).component4.getMonetizationNetwork(this.component3);
Intrinsics.checkNotNullExpressionValue(monetizationNetwork, "");
return monetizationNetwork;
}
throw new NullPointerException("null cannot be cast to non-null type kotlin.String");
}
private static Map<String, String> getMediationNetwork(AFb1ySDK aFb1ySDK) {
String str;
if (aFb1ySDK == null || (str = aFb1ySDK.AFAdRevenueData) == null) {
return null;
}
Intrinsics.checkNotNullExpressionValue(str, "");
Boolean bool = aFb1ySDK.getMediationNetwork;
if (bool == null || !bool.booleanValue()) {
return kotlin.collections.c0.g(x6.h.a("type", "unhashed"), x6.h.a("value", str));
}
return null;
}
}