导航菜单

页面标题

页面副标题

Hopscotch v9.7.2 - AFe1fSDK.java 源代码

正在查看: Hopscotch v9.7.2 应用的 AFe1fSDK.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.collections.w;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.StringCompanionObject;
import kotlin.l;
import kotlin.m;
import kotlin.text.Charsets;
import kotlin.text.Regex;
import kotlin.text.StringsKt;
import kotlin.text.r;
import org.jetbrains.annotations.NotNull;

@Metadata
public final class AFe1fSDK {
    private static AFe1iSDK component4;

    @NotNull
    private final l areAllFieldsValid;

    @NotNull
    public final l getCurrencyIso4217Code;

    @NotNull
    private final AFd1pSDK getMediationNetwork;

    @NotNull
    private final AFd1rSDK getRevenue;

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

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

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

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

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

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

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

        public static void AFAdRevenueData(AFe1iSDK aFe1iSDK) {
            AFe1fSDK.component4 = aFe1iSDK;
        }

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

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

    public AFe1fSDK(@NotNull AFd1pSDK aFd1pSDK, @NotNull AFd1rSDK aFd1rSDK) {
        Intrinsics.checkNotNullParameter(aFd1pSDK, "");
        Intrinsics.checkNotNullParameter(aFd1rSDK, "");
        this.getMediationNetwork = aFd1pSDK;
        this.getRevenue = aFd1rSDK;
        this.areAllFieldsValid = m.b(new Function0<String>() {
            {
                super(0);
            }

            @NotNull
            public final String invoke() {
                String str = (String) AFb1tSDK.AFAdRevenueData(new Object[]{AFe1fSDK.this.getRevenue, AFe1fSDK.this.getMediationNetwork.component4()}, -787116836, 787116860, (int) System.currentTimeMillis());
                if (str != null && !r.i(str)) {
                    String obj = StringsKt.d0(str).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)) {
                        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);
                        str = "";
                    } else {
                        str = "-".concat(obj);
                    }
                }
                return StringsKt.d0(str != null ? str : "").toString();
            }
        });
        this.getCurrencyIso4217Code = m.b(new Function0<String>() {
            {
                super(0);
            }

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

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

    @NotNull
    public final String getMonetizationNetwork() {
        int i = AFa1vSDK.getCurrencyIso4217Code[(AFAdRevenueData() ? AFe1bSDK.DEFAULT : AFe1bSDK.API).ordinal()];
        if (i == 1) {
            return (String) this.getCurrencyIso4217Code.getValue();
        }
        if (i != 2) {
            if (i == 3) {
                return "";
            }
            throw new NoWhenBranchMatchedException();
        }
        AFe1iSDK aFe1iSDK = component4;
        String str = aFe1iSDK != null ? aFe1iSDK.AFAdRevenueData : null;
        return str == null ? "" : str;
    }

    public static final String AFAdRevenueData(AFe1fSDK aFe1fSDK) {
        return (String) aFe1fSDK.areAllFieldsValid.getValue();
    }

    @NotNull
    public final String getMediationNetwork() {
        int i = AFa1vSDK.getCurrencyIso4217Code[(AFAdRevenueData() ? AFe1bSDK.DEFAULT : AFe1bSDK.API).ordinal()];
        if (i == 1) {
            return "appsflyersdk.com";
        }
        if (i != 2) {
            if (i == 3) {
                return "";
            }
            throw new NoWhenBranchMatchedException();
        }
        AFe1iSDK aFe1iSDK = component4;
        String str = aFe1iSDK != null ? aFe1iSDK.getRevenue : null;
        return str == null ? "" : str;
    }

    public static final String getMonetizationNetwork(String str, String str2) {
        StringBuilder sb = new StringBuilder();
        StringBuilder sb2 = new StringBuilder();
        sb2.append(str);
        sb2.append(str2);
        String obj = sb2.toString();
        Intrinsics.checkNotNullParameter(obj, "");
        MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
        byte[] bytes = obj.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, "");
        sb.append(substring);
        sb.append('-');
        return sb.toString();
    }

    public static final void getMonetizationNetwork(AFe1iSDK aFe1iSDK) {
        AFa1zSDK.AFAdRevenueData(aFe1iSDK);
    }
}