导航菜单

页面标题

页面副标题

Crafto v9.3.3 - AFe1eSDK.java 源代码

正在查看: Crafto v9.3.3 应用的 AFe1eSDK.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.appsflyer.internal;

import android.util.Base64;
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.NoWhenBranchMatchedException;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.StringCompanionObject;
import kotlin.text.Charsets;
import kotlin.text.Regex;
import kotlin.text.StringsKt;
import org.jetbrains.annotations.NotNull;

@Metadata
public final class AFe1eSDK {
    private static AFe1fSDK areAllFieldsValid;

    @NotNull
    private final Hk.k component4;

    @NotNull
    public final Hk.k getCurrencyIso4217Code;

    @NotNull
    private final AFd1pSDK getMonetizationNetwork;

    @NotNull
    private final AFd1nSDK getRevenue;

    @NotNull
    public static final AFa1tSDK AFa1tSDK = new AFa1tSDK(null);

    @NotNull
    public static String AFAdRevenueData = "https://%scdn-%ssettings.%s/android/v1/%s/settings";

    @NotNull
    public static String getMediationNetwork = "https://%scdn-%stestsettings.%s/android/v1/%s/settings";

    @NotNull
    private static final List<String> component2 = kotlin.collections.t.i(new String[]{"googleplay", "playstore", "googleplaystore"});

    @Metadata
    public static final class AFa1tSDK {
        private AFa1tSDK() {
        }

        public static void getMediationNetwork(AFe1fSDK aFe1fSDK) {
            AFe1eSDK.areAllFieldsValid = aFe1fSDK;
        }

        @NotNull
        public static List<String> getMonetizationNetwork() {
            return AFe1eSDK.component2;
        }

        public AFa1tSDK(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }
    }

    public class AFa1ySDK {
        public static final int[] getCurrencyIso4217Code;

        static {
            int[] iArr = new int[AFe1bSDK.values().length];
            try {
                iArr[AFe1bSDK.DEFAULT.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                iArr[AFe1bSDK.API.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                iArr[AFe1bSDK.RC.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            getCurrencyIso4217Code = iArr;
        }
    }

    public AFe1eSDK(@NotNull AFd1nSDK aFd1nSDK, @NotNull AFd1pSDK aFd1pSDK) {
        Intrinsics.checkNotNullParameter(aFd1nSDK, "");
        Intrinsics.checkNotNullParameter(aFd1pSDK, "");
        this.getRevenue = aFd1nSDK;
        this.getMonetizationNetwork = aFd1pSDK;
        this.component4 = Hk.l.b(new Function0<String>() {
            {
                super(0);
            }

            @NotNull
            public final String invoke() {
                String currencyIso4217Code = AFb1tSDK.getCurrencyIso4217Code(AFe1eSDK.this.getMonetizationNetwork, AFe1eSDK.this.getRevenue.component1());
                if (currencyIso4217Code != null && !StringsKt.J(currencyIso4217Code)) {
                    String obj = StringsKt.a0(currencyIso4217Code).toString();
                    List<String> monetizationNetwork = AFa1tSDK.getMonetizationNetwork();
                    Locale locale = Locale.getDefault();
                    Intrinsics.checkNotNullExpressionValue(locale, "");
                    String lowerCase = obj.toLowerCase(locale);
                    Intrinsics.checkNotNullExpressionValue(lowerCase, "");
                    if (monetizationNetwork.contains(lowerCase)) {
                        StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
                        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);
                        currencyIso4217Code = "";
                    } else {
                        currencyIso4217Code = "-".concat(obj);
                    }
                }
                return StringsKt.a0(currencyIso4217Code != null ? currencyIso4217Code : "").toString();
            }
        });
        this.getCurrencyIso4217Code = Hk.l.b(new Function0<String>() {
            {
                super(0);
            }

            @NotNull
            public final String invoke() {
                String packageName = AFe1eSDK.this.getRevenue.getRevenue.getMonetizationNetwork.getPackageName();
                Intrinsics.checkNotNullExpressionValue(packageName, "");
                return AFe1eSDK.getMonetizationNetwork(packageName, AFe1eSDK.AFAdRevenueData(AFe1eSDK.this));
            }
        });
    }

    public static boolean AFAdRevenueData() {
        return areAllFieldsValid == null;
    }

    @NotNull
    public final String getMediationNetwork() {
        int i7 = AFa1ySDK.getCurrencyIso4217Code[(AFAdRevenueData() ? AFe1bSDK.DEFAULT : AFe1bSDK.API).ordinal()];
        if (i7 == 1) {
            return (String) this.getCurrencyIso4217Code.getValue();
        }
        if (i7 != 2) {
            if (i7 == 3) {
                return "";
            }
            throw new NoWhenBranchMatchedException();
        }
        AFe1fSDK aFe1fSDK = areAllFieldsValid;
        String str = aFe1fSDK != null ? aFe1fSDK.getCurrencyIso4217Code : null;
        return str == null ? "" : str;
    }

    public static final String AFAdRevenueData(AFe1eSDK aFe1eSDK) {
        return (String) aFe1eSDK.component4.getValue();
    }

    @NotNull
    public final String getMonetizationNetwork() {
        AFe1bSDK aFe1bSDK;
        if (AFAdRevenueData()) {
            aFe1bSDK = AFe1bSDK.DEFAULT;
        } else {
            aFe1bSDK = AFe1bSDK.API;
        }
        int i7 = AFa1ySDK.getCurrencyIso4217Code[aFe1bSDK.ordinal()];
        if (i7 == 1) {
            return "appsflyersdk.com";
        }
        if (i7 != 2) {
            if (i7 == 3) {
                return "";
            }
            throw new NoWhenBranchMatchedException();
        }
        AFe1fSDK aFe1fSDK = areAllFieldsValid;
        String str = aFe1fSDK != null ? aFe1fSDK.getMediationNetwork : null;
        return str == null ? "" : str;
    }

    public static final void getMediationNetwork(AFe1fSDK aFe1fSDK) {
        AFa1tSDK.getMediationNetwork(aFe1fSDK);
    }

    public static final String getMonetizationNetwork(String str, String str2) {
        String str3 = str + str2;
        Intrinsics.checkNotNullParameter(str3, "");
        MessageDigest messageDigest = MessageDigest.getInstance("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 + "-";
    }
}