导航菜单

页面标题

页面副标题

PrestaMax v1.0.9 - AFd1ySDK.java 源代码

正在查看: PrestaMax v1.0.9 应用的 AFd1ySDK.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.Regex;
import kotlin.text.StringsKt__StringsKt;
import org.jetbrains.annotations.NotNull;

@Metadata
public class AFd1ySDK {
    private static AFc1cSDK afRDLog;

    @NotNull
    private final AFb1fSDK AFInAppEventParameterName;

    @NotNull
    private final AFb1gSDK AFKeystoreWrapper;

    @NotNull
    private final kotlin.slyvsmo afInfoLog;

    @NotNull
    public final kotlin.slyvsmo values;

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

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

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

    @NotNull
    private static final List<String> AFLogger = kotlin.collections.pzetpkg.vpqvb("googleplay", "playstore", "googleplaystore");

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

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

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

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

        @NotNull
        public static List<String> AFInAppEventType() {
            return AFd1ySDK.AFLogger;
        }

        public static void values(AFc1cSDK aFc1cSDK) {
            AFd1ySDK.afRDLog = aFc1cSDK;
        }
    }

    public AFd1ySDK(@NotNull AFb1gSDK aFb1gSDK, @NotNull AFb1fSDK aFb1fSDK) {
        Intrinsics.checkNotNullParameter(aFb1gSDK, "");
        Intrinsics.checkNotNullParameter(aFb1fSDK, "");
        this.AFKeystoreWrapper = aFb1gSDK;
        this.AFInAppEventParameterName = aFb1fSDK;
        this.afInfoLog = kotlin.zppskyagv.emazevgh(new Function0<String>() {
            {
                super(0);
            }

            @Override
            @NotNull
            public final String invoke() {
                String values = AFa1bSDK.values(AFd1ySDK.this.AFInAppEventParameterName, AFd1ySDK.this.AFKeystoreWrapper.AFKeystoreWrapper());
                if (!(values == null || kotlin.text.jzzsan.pzetpkg(values))) {
                    String obj = StringsKt__StringsKt.jresql(values).toString();
                    List<String> AFInAppEventType2 = AFa1wSDK.AFInAppEventType();
                    Locale locale = Locale.getDefault();
                    Intrinsics.checkNotNullExpressionValue(locale, "");
                    String lowerCase = obj.toLowerCase(locale);
                    Intrinsics.checkNotNullExpressionValue(lowerCase, "");
                    if (AFInAppEventType2.contains(lowerCase)) {
                        kotlin.jvm.internal.nzpf nzpfVar = kotlin.jvm.internal.nzpf.f15069mwowwskti;
                        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);
                        values = "";
                    } else {
                        values = "-".concat(obj);
                    }
                }
                return StringsKt__StringsKt.jresql(values != null ? values : "").toString();
            }
        });
        this.values = kotlin.zppskyagv.emazevgh(new Function0<String>() {
            {
                super(0);
            }

            @Override
            @NotNull
            public final String invoke() {
                String packageName = AFd1ySDK.this.AFKeystoreWrapper.values.values.getPackageName();
                Intrinsics.checkNotNullExpressionValue(packageName, "");
                return AFd1ySDK.AFInAppEventParameterName(packageName, AFd1ySDK.AFKeystoreWrapper(AFd1ySDK.this));
            }
        });
    }

    public static final void AFInAppEventType(AFc1cSDK aFc1cSDK) {
        AFa1wSDK.values(aFc1cSDK);
    }

    public static final String AFInAppEventParameterName(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(kotlin.text.emazevgh.f15251emazevgh);
        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 boolean AFKeystoreWrapper() {
        return afRDLog == null;
    }

    @NotNull
    public final String valueOf() {
        int i = AFa1vSDK.AFInAppEventParameterName[(AFKeystoreWrapper() ? AFd1zSDK.DEFAULT : AFd1zSDK.API).ordinal()];
        if (i == 1) {
            return "appsflyersdk.com";
        }
        if (i != 2) {
            if (i == 3) {
                return "";
            }
            throw new NoWhenBranchMatchedException();
        }
        AFc1cSDK aFc1cSDK = afRDLog;
        String str = aFc1cSDK != null ? aFc1cSDK.valueOf : null;
        return str == null ? "" : str;
    }

    public static final String AFKeystoreWrapper(AFd1ySDK aFd1ySDK) {
        return (String) aFd1ySDK.afInfoLog.getValue();
    }

    @NotNull
    public final String AFInAppEventType() {
        AFd1zSDK aFd1zSDK;
        if (AFKeystoreWrapper()) {
            aFd1zSDK = AFd1zSDK.DEFAULT;
        } else {
            aFd1zSDK = AFd1zSDK.API;
        }
        int i = AFa1vSDK.AFInAppEventParameterName[aFd1zSDK.ordinal()];
        if (i == 1) {
            return (String) this.values.getValue();
        }
        if (i != 2) {
            if (i == 3) {
                return "";
            }
            throw new NoWhenBranchMatchedException();
        }
        AFc1cSDK aFc1cSDK = afRDLog;
        String str = aFc1cSDK != null ? aFc1cSDK.AFInAppEventParameterName : null;
        return str == null ? "" : str;
    }
}