导航菜单

页面标题

页面副标题

Starpresta v4.0.3 - AFe1iSDK.java 源代码

正在查看: Starpresta v4.0.3 应用的 AFe1iSDK.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.text.Charsets;
import kotlin.text.Regex;
import kotlin.text.StringsKt;
import org.jetbrains.annotations.NotNull;

@Metadata
public final class AFe1iSDK {
    private static AFe1hSDK areAllFieldsValid;

    @NotNull
    private final i00ii0II.i0000Iii component3;

    @NotNull
    private final AFd1rSDK getCurrencyIso4217Code;

    @NotNull
    public final i00ii0II.i0000Iii getMonetizationNetwork;

    @NotNull
    private final AFd1qSDK getRevenue;

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

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

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

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

    public class AFa1uSDK {
        public static final int[] getRevenue;

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

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

        @NotNull
        public static List<String> getCurrencyIso4217Code() {
            return AFe1iSDK.component1;
        }

        public static void getMonetizationNetwork(AFe1hSDK aFe1hSDK) {
            AFe1iSDK.areAllFieldsValid = aFe1hSDK;
        }

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

    public AFe1iSDK(@NotNull AFd1qSDK aFd1qSDK, @NotNull AFd1rSDK aFd1rSDK) {
        Intrinsics.checkNotNullParameter(aFd1qSDK, "");
        Intrinsics.checkNotNullParameter(aFd1rSDK, "");
        this.getRevenue = aFd1qSDK;
        this.getCurrencyIso4217Code = aFd1rSDK;
        this.component3 = i00ii0II.i0000.IiiI00i(new Function0<String>() {
            {
                super(0);
            }

            @NotNull
            public final String invoke() {
                String monetizationNetwork = AFb1rSDK.getMonetizationNetwork(AFe1iSDK.this.getCurrencyIso4217Code, AFe1iSDK.this.getRevenue.component4());
                if (monetizationNetwork != null && !kotlin.text.Iiii0.IiiI(monetizationNetwork)) {
                    String obj = StringsKt.IiiiIii(monetizationNetwork).toString();
                    List<String> currencyIso4217Code = AFa1zSDK.getCurrencyIso4217Code();
                    Locale locale = Locale.getDefault();
                    Intrinsics.checkNotNullExpressionValue(locale, "");
                    String lowerCase = obj.toLowerCase(locale);
                    Intrinsics.checkNotNullExpressionValue(lowerCase, "");
                    if (currencyIso4217Code.contains(lowerCase)) {
                        kotlin.jvm.internal.IiiIi iiiIi = kotlin.jvm.internal.IiiIi.IiiI00i;
                        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);
                        monetizationNetwork = "";
                    } else {
                        monetizationNetwork = "-" + obj;
                    }
                }
                return StringsKt.IiiiIii(monetizationNetwork != null ? monetizationNetwork : "").toString();
            }
        });
        this.getMonetizationNetwork = i00ii0II.i0000.IiiI00i(new Function0<String>() {
            {
                super(0);
            }

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

    @NotNull
    public final String AFAdRevenueData() {
        int i = AFa1uSDK.getRevenue[(getCurrencyIso4217Code() ? AFe1fSDK.DEFAULT : AFe1fSDK.API).ordinal()];
        if (i == 1) {
            return "appsflyersdk.com";
        }
        if (i != 2) {
            if (i == 3) {
                return "";
            }
            throw new NoWhenBranchMatchedException();
        }
        AFe1hSDK aFe1hSDK = areAllFieldsValid;
        String str = aFe1hSDK != null ? aFe1hSDK.getMediationNetwork : null;
        return str == null ? "" : str;
    }

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

    public static final String getMonetizationNetwork(AFe1iSDK aFe1iSDK) {
        return (String) aFe1iSDK.component3.getValue();
    }

    @NotNull
    public final String getMediationNetwork() {
        int i = AFa1uSDK.getRevenue[(getCurrencyIso4217Code() ? AFe1fSDK.DEFAULT : AFe1fSDK.API).ordinal()];
        if (i == 1) {
            return (String) this.getMonetizationNetwork.getValue();
        }
        if (i != 2) {
            if (i == 3) {
                return "";
            }
            throw new NoWhenBranchMatchedException();
        }
        AFe1hSDK aFe1hSDK = areAllFieldsValid;
        String str = aFe1hSDK != null ? aFe1hSDK.AFAdRevenueData : null;
        return str == null ? "" : str;
    }

    public static final void getMonetizationNetwork(AFe1hSDK aFe1hSDK) {
        AFa1zSDK.getMonetizationNetwork(aFe1hSDK);
    }

    public static final String getMediationNetwork(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 + "-";
    }
}