正在查看: BetterTogether v3.0.0 应用的 AFe1gSDK.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: BetterTogether v3.0.0 应用的 AFe1gSDK.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.appsflyer.internal;
import android.util.Base64;
import com.adapty.internal.utils.HashingHelper;
import com.appsflyer.AFLogger;
import java.security.MessageDigest;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import kotlin.Metadata;
import kotlin.collections.e0;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.p;
import kotlin.text.Charsets;
import kotlin.text.Regex;
import kotlin.text.u;
import kotlin.text.y;
@Metadata
public final class AFe1gSDK {
private static AFe1jSDK component4;
public final lq.m AFAdRevenueData;
private final lq.m areAllFieldsValid;
private final AFd1pSDK getCurrencyIso4217Code;
private final AFd1rSDK getMonetizationNetwork;
public static final AFa1tSDK AFa1tSDK = new AFa1tSDK(null);
public static String getMediationNetwork = "https://%scdn-%ssettings.%s/android/v1/%s/settings";
public static String getRevenue = "https://%scdn-%stestsettings.%s/android/v1/%s/settings";
private static final List<String> component2 = e0.g("googleplay", "playstore", "googleplaystore");
@Metadata
public static final class AnonymousClass2 extends p implements Function0<String> {
public AnonymousClass2() {
super(0);
}
public final String invoke() {
String str = (String) AFb1rSDK.getRevenue(new Object[]{AFe1gSDK.this.getCurrencyIso4217Code, AFe1gSDK.this.getMonetizationNetwork.areAllFieldsValid()}, 983289703, -983289699, (int) System.currentTimeMillis());
if (!(str == null || u.i(str))) {
String obj = y.W(str).toString();
List<String> AFAdRevenueData = AFa1tSDK.AFAdRevenueData();
Locale locale = Locale.getDefault();
Intrinsics.checkNotNullExpressionValue(locale, "");
String lowerCase = obj.toLowerCase(locale);
Intrinsics.checkNotNullExpressionValue(lowerCase, "");
if (AFAdRevenueData.contains(lowerCase)) {
String format = String.format("AF detected using redundant Google-Play channel for attribution - %s. Using without channel postfix.", Arrays.copyOf(new Object[]{obj}, 1));
Intrinsics.checkNotNullExpressionValue(format, "");
AFLogger.afWarnLog(format);
str = "";
} else {
str = "-".concat(obj);
}
}
return y.W(str != null ? str : "").toString();
}
}
@Metadata
public static final class AnonymousClass4 extends p implements Function0<String> {
public AnonymousClass4() {
super(0);
}
public final String invoke() {
String packageName = AFe1gSDK.this.getMonetizationNetwork.getMonetizationNetwork.getCurrencyIso4217Code.getPackageName();
Intrinsics.checkNotNullExpressionValue(packageName, "");
return AFe1gSDK.getCurrencyIso4217Code(packageName, AFe1gSDK.getRevenue(AFe1gSDK.this));
}
}
@Metadata
public static final class AFa1tSDK {
private AFa1tSDK() {
}
public AFa1tSDK(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static List<String> AFAdRevenueData() {
return AFe1gSDK.component2;
}
public static void AFAdRevenueData(AFe1jSDK aFe1jSDK) {
AFe1gSDK.component4 = aFe1jSDK;
}
}
public class AFa1vSDK {
public static final int[] getRevenue;
static {
int[] iArr = new int[AFe1cSDK.values().length];
try {
iArr[AFe1cSDK.DEFAULT.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[AFe1cSDK.API.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[AFe1cSDK.RC.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
getRevenue = iArr;
}
}
public AFe1gSDK(AFd1rSDK aFd1rSDK, AFd1pSDK aFd1pSDK) {
Intrinsics.checkNotNullParameter(aFd1rSDK, "");
Intrinsics.checkNotNullParameter(aFd1pSDK, "");
this.getMonetizationNetwork = aFd1rSDK;
this.getCurrencyIso4217Code = aFd1pSDK;
this.areAllFieldsValid = lq.n.b(new AnonymousClass2());
this.AFAdRevenueData = lq.n.b(new AnonymousClass4());
}
public static boolean getMediationNetwork() {
return component4 == null;
}
public static final String getRevenue(AFe1gSDK aFe1gSDK) {
return (String) aFe1gSDK.areAllFieldsValid.getValue();
}
public static final void getRevenue(AFe1jSDK aFe1jSDK) {
AFa1tSDK.AFAdRevenueData(aFe1jSDK);
}
public final String getCurrencyIso4217Code() {
int i10 = AFa1vSDK.getRevenue[(getMediationNetwork() ? AFe1cSDK.DEFAULT : AFe1cSDK.API).ordinal()];
if (i10 == 1) {
return "appsflyersdk.com";
}
if (i10 != 2) {
if (i10 == 3) {
return "";
}
throw new lq.p();
}
AFe1jSDK aFe1jSDK = component4;
String str = aFe1jSDK != null ? aFe1jSDK.getCurrencyIso4217Code : null;
return str == null ? "" : str;
}
public final String getMonetizationNetwork() {
int i10 = AFa1vSDK.getRevenue[(getMediationNetwork() ? AFe1cSDK.DEFAULT : AFe1cSDK.API).ordinal()];
if (i10 == 1) {
return (String) this.AFAdRevenueData.getValue();
}
if (i10 != 2) {
if (i10 == 3) {
return "";
}
throw new lq.p();
}
AFe1jSDK aFe1jSDK = component4;
String str = aFe1jSDK != null ? aFe1jSDK.getMonetizationNetwork : null;
return str == null ? "" : str;
}
public static final String getCurrencyIso4217Code(String str, String str2) {
String str3 = str + str2;
Intrinsics.checkNotNullParameter(str3, "");
MessageDigest messageDigest = MessageDigest.getInstance(HashingHelper.SHA_256);
byte[] bytes = str3.getBytes(Charsets.UTF_8);
Intrinsics.checkNotNullExpressionValue(bytes, "");
byte[] digest = messageDigest.digest(bytes);
Intrinsics.checkNotNullExpressionValue(digest, "");
String encodeToString = Base64.encodeToString(digest, 2);
Intrinsics.checkNotNullExpressionValue(encodeToString, "");
String lowerCase = encodeToString.toLowerCase(Locale.ROOT);
Intrinsics.checkNotNullExpressionValue(lowerCase, "");
String substring = new Regex("[^\\w]+").replace(lowerCase, "").substring(0, 6);
Intrinsics.checkNotNullExpressionValue(substring, "");
return substring + "-";
}
}