APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Gizmo
版本号:1.7.0
包名称:ai.saveall.app

MD5 校验值:51aae3247d6bd20bca268c4c9a4dd21c

反编译源代码说明

AFa1dSDK.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package com.appsflyer.internal;

import E1.z;
import S1.a;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Application;
import android.app.UiModeManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.media.AudioTrack;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Process;
import android.text.AndroidCharacter;
import android.text.TextUtils;
import android.view.Display;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.ViewConfiguration;
import android.view.WindowManager;
import android.widget.ExpandableListView;
import androidx.annotation.NonNull;
import com.appsflyer.AFInAppEventParameterName;
import com.appsflyer.AFInAppEventType;
import com.appsflyer.AFKeystoreWrapper;
import com.appsflyer.AFLogger;
import com.appsflyer.AFVersionDeclaration;
import com.appsflyer.AppsFlyerConversionListener;
import com.appsflyer.AppsFlyerInAppPurchaseValidatorListener;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerProperties;
import com.appsflyer.PurchaseHandler;
import com.appsflyer.R;
import com.appsflyer.attribution.AppsFlyerRequestListener;
import com.appsflyer.deeplink.DeepLinkListener;
import com.appsflyer.deeplink.DeepLinkResult;
import com.appsflyer.internal.AFa1gSDK;
import com.appsflyer.internal.AFa1uSDK;
import com.appsflyer.internal.AFb1bSDK;
import com.appsflyer.internal.AFc1ySDK;
import com.appsflyer.internal.AFd1mSDK;
import com.appsflyer.internal.AFe1wSDK;
import com.appsflyer.internal.AFg1uSDK;
import com.appsflyer.internal.components.network.http.ResponseNetwork;
import com.appsflyer.internal.platform_extension.PluginInfo;
import com.google.android.gms.common.GoogleApiAvailability;
import com.google.android.gms.fido.fido2.api.common.UserVerificationMethods;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.HttpURLConnection;
import java.net.URI;
import java.nio.charset.Charset;
import java.security.KeyStoreException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Properties;
import java.util.TimeZone;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import kotlin.jvm.internal.Intrinsics;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public final class AFa1dSDK extends AppsFlyerLib {
    private static int $10 = 0;
    private static int $11 = 1;
    static AppsFlyerInAppPurchaseValidatorListener AFInAppEventType = null;
    public static final String AFKeystoreWrapper;
    private static AFa1dSDK afInfoLog = null;
    private static String afRDLog = null;
    private static char[] onAppOpenAttribution = null;
    private static boolean onAttributionFailure = false;
    private static int onConversionDataFail = 0;
    private static int onResponseError = 1;
    private static boolean onValidateInApp;
    private static int onValidateInAppFailure;
    static final String valueOf;
    public static final String values;
    private String AFVersionDeclaration;
    private boolean AppsFlyer2dXConversionCallback;
    String afDebugLog;
    public AFb1eSDK afErrorLog;
    private Map<Long, String> getLevel;
    private boolean init;
    private String onAttributionFailureNative;
    private Map<String, Object> onConversionDataSuccess;

    @NonNull
    private final AFc1wSDK onDeepLinking;
    private Application onInstallConversionFailureNative;
    private SharedPreferences onResponseErrorNative;
    private AFb1dSDK onResponseNative;
    public volatile AppsFlyerConversionListener AFInAppEventParameterName = null;
    private long AFLogger = -1;
    private long afWarnLog = -1;
    private long AFLogger$LogLevel = TimeUnit.SECONDS.toMillis(5);
    private boolean afErrorLogForExcManagerOnly = false;
    private final AFb1vSDK onAppOpenAttributionNative = new AFb1vSDK();
    private boolean onInstallConversionDataLoadedNative = false;
    private boolean onDeepLinkingNative = false;
    private final Executor onResponse = Executors.newSingleThreadExecutor();

    static class AnonymousClass2 {
        static final int[] AFInAppEventType;

        static {
            int[] iArr = new int[AppsFlyerProperties.EmailsCryptType.values().length];
            AFInAppEventType = iArr;
            try {
                iArr[AppsFlyerProperties.EmailsCryptType.SHA256.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                AFInAppEventType[AppsFlyerProperties.EmailsCryptType.NONE.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
        }
    }

    public class AFa1xSDK implements Runnable {
        private final AFa1rSDK valueOf;

        private AFa1xSDK(AFa1rSDK aFa1rSDK) {
            this.valueOf = aFa1rSDK;
        }

        @Override
        public final void run() {
            AFa1dSDK.valueOf(AFa1dSDK.this, this.valueOf);
        }

        AFa1xSDK(AFa1dSDK aFa1dSDK, AFa1rSDK aFa1rSDK, byte b5) {
            this(aFa1rSDK);
        }
    }

    class AFa1ySDK implements AFd1nSDK {
        private AFa1ySDK() {
        }

        private boolean values() {
            return AFa1dSDK.this.AFInAppEventParameterName != null;
        }

        @Override
        public final void AFInAppEventParameterName(AFd1jSDK<?> aFd1jSDK) {
            if (aFd1jSDK instanceof AFe1ySDK) {
                AFa1dSDK.this.values().afDebugLog().AFInAppEventType(((AFe1uSDK) aFd1jSDK).AFLogger.afDebugLog);
            }
        }

        @Override
        public final void AFInAppEventType(AFd1jSDK<?> aFd1jSDK) {
        }

        AFa1ySDK(AFa1dSDK aFa1dSDK, byte b5) {
            this();
        }

        @Override
        public final void AFInAppEventParameterName(AFd1jSDK<?> aFd1jSDK, AFd1sSDK aFd1sSDK) {
            JSONObject valueOf;
            AFe1fSDK valueOf2;
            if (!(aFd1jSDK instanceof AFe1uSDK)) {
                if (!(aFd1jSDK instanceof AFe1dSDK) || aFd1sSDK == AFd1sSDK.SUCCESS) {
                    return;
                }
                AFe1aSDK aFe1aSDK = new AFe1aSDK(AFa1dSDK.this.values());
                AFd1mSDK level = AFa1dSDK.this.values().getLevel();
                level.AFKeystoreWrapper.execute(new AFd1mSDK.AnonymousClass5(aFe1aSDK));
                return;
            }
            AFe1uSDK aFe1uSDK = (AFe1uSDK) aFd1jSDK;
            boolean z5 = aFd1jSDK instanceof AFe1ySDK;
            if (z5 && values()) {
                AFe1ySDK aFe1ySDK = (AFe1ySDK) aFd1jSDK;
                if (aFe1ySDK.values == AFd1sSDK.SUCCESS || aFe1ySDK.AFInAppEventParameterName == 1) {
                    AFe1dSDK aFe1dSDK = new AFe1dSDK(aFe1ySDK, AFa1dSDK.this.values().afErrorLog());
                    AFd1mSDK level2 = AFa1dSDK.this.values().getLevel();
                    level2.AFKeystoreWrapper.execute(new AFd1mSDK.AnonymousClass5(aFe1dSDK));
                }
            }
            if (aFd1sSDK == AFd1sSDK.SUCCESS) {
                AFa1dSDK aFa1dSDK = AFa1dSDK.this;
                aFa1dSDK.AFKeystoreWrapper(AFa1dSDK.valueOf(aFa1dSDK)).AFKeystoreWrapper("sentSuccessfully", "true");
                if (!(aFd1jSDK instanceof AFe1sSDK) && (valueOf2 = new AFe1jSDK(AFa1dSDK.valueOf(AFa1dSDK.this)).valueOf()) != null && valueOf2.AFInAppEventType()) {
                    String str = valueOf2.values;
                    AFLogger.afDebugLog("Resending Uninstall token to AF servers: ".concat(String.valueOf(str)));
                    AFe1jSDK.AFInAppEventParameterName(str);
                }
                ResponseNetwork responseNetwork = ((AFd1bSDK) aFe1uSDK).afInfoLog;
                if (responseNetwork != null && (valueOf = AFb1pSDK.valueOf((String) responseNetwork.getBody())) != null) {
                    AFa1dSDK.AFKeystoreWrapper(AFa1dSDK.this, valueOf.optBoolean("send_background", false));
                }
                if (z5) {
                    AFa1dSDK.valueOf(AFa1dSDK.this, System.currentTimeMillis());
                }
            }
        }
    }

    public class AFa1zSDK implements Runnable {
        private final AFa1rSDK AFInAppEventParameterName;

        private AFa1zSDK(AFa1rSDK aFa1rSDK) {
            this.AFInAppEventParameterName = aFa1rSDK;
        }

        @Override
        public final void run() {
            AFe1uSDK aFe1uSDK;
            if (this.AFInAppEventParameterName.valueOf()) {
                AFe1ySDK aFe1ySDK = new AFe1ySDK(this.AFInAppEventParameterName, AFa1dSDK.this.values());
                aFe1ySDK.AFLogger$LogLevel = AFa1dSDK.values(AFa1dSDK.this);
                aFe1uSDK = aFe1ySDK;
            } else {
                aFe1uSDK = new AFe1uSDK(this.AFInAppEventParameterName, AFa1dSDK.this.values());
            }
            AFd1mSDK level = AFa1dSDK.this.values().getLevel();
            level.AFKeystoreWrapper.execute(new AFd1mSDK.AnonymousClass5(aFe1uSDK));
        }

        AFa1zSDK(AFa1dSDK aFa1dSDK, AFa1rSDK aFa1rSDK, byte b5) {
            this(aFa1rSDK);
        }
    }

    static {
        AFKeystoreWrapper();
        valueOf = "248";
        Object[] objArr = new Object[1];
        values(null, "\u0094", null, TextUtils.lastIndexOf("", '0', 0, 0) + UserVerificationMethods.USER_VERIFY_PATTERN, objArr);
        String substring = "6.11.1".substring(0, "6.11.1".lastIndexOf(((String) objArr[0]).intern()));
        AFKeystoreWrapper = substring;
        afRDLog = "https://%sstats.%s/stats";
        StringBuilder sb = new StringBuilder();
        sb.append(substring);
        sb.append("/androidevent?buildnumber=6.11.1&app_id=");
        values = sb.toString();
        AFInAppEventType = null;
        afInfoLog = new AFa1dSDK();
        onValidateInAppFailure = (onResponseError + 119) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    public AFa1dSDK() {
        AFVersionDeclaration.init();
        this.onDeepLinking = new AFc1wSDK();
        AFd1mSDK level = values().getLevel();
        level.valueOf.add(new AFa1ySDK(this, (byte) 0));
    }

    public static synchronized SharedPreferences AFInAppEventParameterName(Context context) {
        SharedPreferences sharedPreferences;
        AFa1dSDK valueOf2;
        SharedPreferences sharedPreferences2;
        synchronized (AFa1dSDK.class) {
            try {
                onResponseError = (onValidateInAppFailure + 43) % UserVerificationMethods.USER_VERIFY_PATTERN;
                if (valueOf().onResponseErrorNative == null) {
                    int i5 = onValidateInAppFailure + 63;
                    onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
                    if (i5 % 2 == 0) {
                        valueOf2 = valueOf();
                        sharedPreferences2 = context.getApplicationContext().getSharedPreferences("appsflyer-data", 0);
                    } else {
                        valueOf2 = valueOf();
                        sharedPreferences2 = context.getApplicationContext().getSharedPreferences("appsflyer-data", 0);
                    }
                    valueOf2.onResponseErrorNative = sharedPreferences2;
                }
                sharedPreferences = valueOf().onResponseErrorNative;
            } catch (Throwable th) {
                throw th;
            }
        }
        return sharedPreferences;
    }

    private int AFInAppEventType(SharedPreferences sharedPreferences) {
        onValidateInAppFailure = (onResponseError + 89) % UserVerificationMethods.USER_VERIFY_PATTERN;
        int AFKeystoreWrapper2 = AFKeystoreWrapper(sharedPreferences, "appsFlyerAdRevenueCount", true);
        onResponseError = (onValidateInAppFailure + 39) % UserVerificationMethods.USER_VERIFY_PATTERN;
        return AFKeystoreWrapper2;
    }

    private int AFKeystoreWrapper(SharedPreferences sharedPreferences, String str, boolean z5) {
        onValidateInAppFailure = (onResponseError + 17) % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i5 = sharedPreferences.getInt(str, 0);
        if (z5) {
            i5++;
            sharedPreferences.edit().putInt(str, i5).apply();
            onValidateInAppFailure = (onResponseError + 15) % UserVerificationMethods.USER_VERIFY_PATTERN;
        }
        if (values().afErrorLogForExcManagerOnly().afRDLog()) {
            values().afErrorLogForExcManagerOnly().AFInAppEventType(String.valueOf(i5));
        }
        int i6 = onResponseError + 21;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 == 0) {
            return i5;
        }
        throw null;
    }

    private static void AFLogger(Context context) {
        try {
            if ((context.getPackageManager().getPackageInfo(context.getPackageName(), 0).applicationInfo.flags & 32768) != 0) {
                onValidateInAppFailure = (onResponseError + 59) % UserVerificationMethods.USER_VERIFY_PATTERN;
                if (context.getResources().getIdentifier("appsflyer_backup_rules", "xml", context.getPackageName()) != 0) {
                    int i5 = onResponseError + 9;
                    onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
                    if (i5 % 2 != 0) {
                        AFLogger.afInfoLog("appsflyer_backup_rules.xml detected, using AppsFlyer defined backup rules for AppsFlyer SDK data", false);
                        return;
                    } else {
                        AFLogger.afInfoLog("appsflyer_backup_rules.xml detected, using AppsFlyer defined backup rules for AppsFlyer SDK data", true);
                        return;
                    }
                }
                AFLogger.valueOf("'allowBackup' is set to true; appsflyer_backup_rules.xml not detected.\nAppsFlyer shared preferences should be excluded from auto backup by adding: <exclude domain=\"sharedpref\" path=\"appsflyer-data\"/> to the Application's <full-backup-content> rules");
            }
            onValidateInAppFailure = (onResponseError + 33) % UserVerificationMethods.USER_VERIFY_PATTERN;
        } catch (Exception e5) {
            AFLogger.afErrorLogForExcManagerOnly("checkBackupRules Exception", e5);
            AFLogger.afRDLog("checkBackupRules Exception: ".concat(String.valueOf(e5)));
        }
    }

    public void AFLogger$LogLevel() {
        onResponseError = (onValidateInAppFailure + 49) % UserVerificationMethods.USER_VERIFY_PATTERN;
        valueOf(values().values(), new Runnable() {
            @Override
            public final void run() {
                AFa1dSDK.this.getLevel();
            }
        }, 0L, TimeUnit.MILLISECONDS);
        onValidateInAppFailure = (onResponseError + 93) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    private String AFVersionDeclaration(Context context) {
        String str;
        SharedPreferences AFInAppEventParameterName = AFInAppEventParameterName(context);
        String AFInAppEventParameterName2 = AFInAppEventParameterName("preInstallName");
        if (AFInAppEventParameterName2 != null) {
            int i5 = (onValidateInAppFailure + 71) % UserVerificationMethods.USER_VERIFY_PATTERN;
            onResponseError = i5;
            int i6 = i5 + 5;
            onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i6 % 2 == 0) {
                return AFInAppEventParameterName2;
            }
            throw null;
        }
        if (AFInAppEventParameterName.contains("preInstallName")) {
            int i7 = onResponseError + 103;
            onValidateInAppFailure = i7 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i7 % 2 != 0) {
                str = AFInAppEventParameterName.getString("preInstallName", null);
                int i8 = 3 / 0;
            } else {
                str = AFInAppEventParameterName.getString("preInstallName", null);
            }
        } else {
            if (afRDLog(context)) {
                int i9 = onResponseError + 69;
                onValidateInAppFailure = i9 % UserVerificationMethods.USER_VERIFY_PATTERN;
                if (i9 % 2 != 0) {
                    afWarnLog(context);
                    throw null;
                }
                AFInAppEventParameterName2 = afWarnLog(context);
                if (AFInAppEventParameterName2 == null) {
                    AFInAppEventParameterName2 = AFKeystoreWrapper(context, "AF_PRE_INSTALL_NAME");
                }
            }
            if (AFInAppEventParameterName2 != null) {
                AFKeystoreWrapper(context).AFKeystoreWrapper("preInstallName", AFInAppEventParameterName2);
            }
            str = AFInAppEventParameterName2;
        }
        if (str != null) {
            AFInAppEventType("preInstallName", str);
        }
        return str;
    }

    private boolean afDebugLog() {
        String str;
        onResponseError = (onValidateInAppFailure + 47) % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (this.AFLogger <= 0) {
            if (!isStopped()) {
                onValidateInAppFailure = (onResponseError + 47) % UserVerificationMethods.USER_VERIFY_PATTERN;
                str = "Sending first launch for this session!";
                AFLogger.afInfoLog(str);
            }
            return false;
        }
        long currentTimeMillis = System.currentTimeMillis() - this.AFLogger;
        Locale locale = Locale.US;
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS Z", locale);
        String AFInAppEventParameterName = AFInAppEventParameterName(simpleDateFormat, this.AFLogger);
        String AFInAppEventParameterName2 = AFInAppEventParameterName(simpleDateFormat, this.afWarnLog);
        if (currentTimeMillis >= this.AFLogger$LogLevel || isStopped()) {
            if (!isStopped()) {
                int i5 = onValidateInAppFailure + 67;
                onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
                if (i5 % 2 == 0) {
                    Object[] objArr = new Object[5];
                    objArr[1] = AFInAppEventParameterName;
                    objArr[0] = AFInAppEventParameterName2;
                    objArr[3] = Long.valueOf(currentTimeMillis);
                    str = String.format(locale, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nSending launch (+%s ms)", objArr);
                } else {
                    str = String.format(locale, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nSending launch (+%s ms)", AFInAppEventParameterName, AFInAppEventParameterName2, Long.valueOf(currentTimeMillis));
                }
                AFLogger.afInfoLog(str);
            }
            return false;
        }
        int i6 = onResponseError + 39;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 != 0) {
            Object[] objArr2 = new Object[5];
            objArr2[1] = AFInAppEventParameterName;
            objArr2[1] = AFInAppEventParameterName2;
            objArr2[3] = Long.valueOf(currentTimeMillis);
            objArr2[5] = Long.valueOf(this.AFLogger$LogLevel);
            AFLogger.afInfoLog(String.format(locale, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nThis launch is blocked: %s ms < %s ms", objArr2));
            return false;
        }
        AFLogger.afInfoLog(String.format(locale, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nThis launch is blocked: %s ms < %s ms", AFInAppEventParameterName, AFInAppEventParameterName2, Long.valueOf(currentTimeMillis), Long.valueOf(this.AFLogger$LogLevel)));
        return true;
    }

    private static String afErrorLog() {
        onResponseError = (onValidateInAppFailure + 81) % UserVerificationMethods.USER_VERIFY_PATTERN;
        String AFInAppEventParameterName = AFInAppEventParameterName(AppsFlyerProperties.APP_ID);
        int i5 = onResponseError + 105;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            return AFInAppEventParameterName;
        }
        throw null;
    }

    private long afErrorLogForExcManagerOnly(Context context) {
        long j5;
        long currentTimeMillis;
        int i5 = onResponseError + 67;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            j5 = AFInAppEventParameterName(context).getLong("AppsFlyerTimePassedSincePrevLaunch", 0L);
            currentTimeMillis = System.currentTimeMillis();
            AFKeystoreWrapper(context).AFInAppEventType("AppsFlyerTimePassedSincePrevLaunch", currentTimeMillis);
        } else {
            j5 = AFInAppEventParameterName(context).getLong("AppsFlyerTimePassedSincePrevLaunch", 0L);
            currentTimeMillis = System.currentTimeMillis();
            AFKeystoreWrapper(context).AFInAppEventType("AppsFlyerTimePassedSincePrevLaunch", currentTimeMillis);
        }
    }

    private AFg1wSDK afInfoLog() {
        AFg1wSDK aFg1wSDK = new AFg1wSDK(new Runnable() {
            @Override
            public final void run() {
                AFa1dSDK.this.AFLogger$LogLevel();
            }
        }, values().valueOf());
        onValidateInAppFailure = (onResponseError + 45) % UserVerificationMethods.USER_VERIFY_PATTERN;
        return aFg1wSDK;
    }

    private void afRDLog() {
        AFg1vSDK AFVersionDeclaration = values().AFVersionDeclaration();
        AFg1wSDK afInfoLog2 = afInfoLog();
        Runnable valueOf2 = valueOf(afInfoLog2);
        AFVersionDeclaration.AFInAppEventParameterName(afInfoLog2);
        AFVersionDeclaration.AFInAppEventParameterName(new AFg1sSDK(valueOf2));
        AFVersionDeclaration.AFInAppEventParameterName(new AFg1ySDK(valueOf2, values()));
        AFVersionDeclaration.AFInAppEventParameterName(new AFg1tSDK(valueOf2, values()));
        if (!AFLogger()) {
            int i5 = onValidateInAppFailure + 91;
            onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i5 % 2 == 0) {
                AFVersionDeclaration.values(this.onInstallConversionFailureNative, valueOf2, values());
                throw null;
            }
            AFVersionDeclaration.values(this.onInstallConversionFailureNative, valueOf2, values());
        }
        AFg1uSDK[] AFInAppEventParameterName = AFVersionDeclaration.AFInAppEventParameterName();
        onResponseError = (onValidateInAppFailure + 11) % UserVerificationMethods.USER_VERIFY_PATTERN;
        for (AFg1uSDK aFg1uSDK : AFInAppEventParameterName) {
            aFg1uSDK.valueOf(this.onInstallConversionFailureNative);
        }
    }

    private String afWarnLog(Context context) {
        onResponseError = (onValidateInAppFailure + 9) % UserVerificationMethods.USER_VERIFY_PATTERN;
        File afInfoLog2 = afInfoLog(AFInAppEventType("ro.appsflyer.preinstall.path"));
        if (AFInAppEventType(afInfoLog2)) {
            afInfoLog2 = afInfoLog(AFKeystoreWrapper(context, "AF_PRE_INSTALL_PATH"));
            onValidateInAppFailure = (onResponseError + 1) % UserVerificationMethods.USER_VERIFY_PATTERN;
        }
        if (AFInAppEventType(afInfoLog2)) {
            afInfoLog2 = afInfoLog("/data/local/tmp/pre_install.appsflyer");
        }
        if (AFInAppEventType(afInfoLog2)) {
            afInfoLog2 = afInfoLog("/etc/pre_install.appsflyer");
            onResponseError = (onValidateInAppFailure + 35) % UserVerificationMethods.USER_VERIFY_PATTERN;
        }
        if (AFInAppEventType(afInfoLog2)) {
            return null;
        }
        String valueOf2 = valueOf(afInfoLog2, context.getPackageName());
        int i5 = onValidateInAppFailure + 103;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            return valueOf2;
        }
        throw null;
    }

    private String getLevel(Context context) {
        String string = AppsFlyerProperties.getInstance().getString("api_store_value");
        if (string == null) {
            return AFKeystoreWrapper(context, "AF_STORE");
        }
        onValidateInAppFailure = (onResponseError + R.styleable.AppCompatTheme_tooltipFrameBackground) % UserVerificationMethods.USER_VERIFY_PATTERN;
        return string;
    }

    private int valueOf(SharedPreferences sharedPreferences, boolean z5) {
        onResponseError = (onValidateInAppFailure + 21) % UserVerificationMethods.USER_VERIFY_PATTERN;
        int AFKeystoreWrapper2 = AFKeystoreWrapper(sharedPreferences, "appsFlyerInAppEventCount", z5);
        int i5 = onValidateInAppFailure + 1;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            return AFKeystoreWrapper2;
        }
        throw null;
    }

    @Override
    public final void addPushNotificationDeepLinkPath(String... strArr) {
        List<List<String>> list;
        int i5 = onValidateInAppFailure + 105;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        List<String> asList = Arrays.asList(strArr);
        if (i6 == 0) {
            list = values().onResponseErrorNative().AFInAppEventType;
            int i7 = 38 / 0;
        } else {
            list = values().onResponseErrorNative().AFInAppEventType;
        }
        onResponseError = (onValidateInAppFailure + 41) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void anonymizeUser(boolean z5) {
        onValidateInAppFailure = (onResponseError + 69) % UserVerificationMethods.USER_VERIFY_PATTERN;
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("anonymizeUser", String.valueOf(z5));
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, z5);
        onResponseError = (onValidateInAppFailure + 103) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void appendParametersToDeepLinkingURL(String str, Map<String, String> map) {
        int i5 = onValidateInAppFailure + 59;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            AFb1nSDK onResponseErrorNative = values().onResponseErrorNative();
            onResponseErrorNative.valueOf = str;
            onResponseErrorNative.AFInAppEventParameterName = map;
        } else {
            AFb1nSDK onResponseErrorNative2 = values().onResponseErrorNative();
            onResponseErrorNative2.valueOf = str;
            onResponseErrorNative2.AFInAppEventParameterName = map;
            throw null;
        }
    }

    @Override
    public final void enableFacebookDeferredApplinks(boolean z5) {
        int i5 = onResponseError + 25;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        this.onDeepLinkingNative = z5;
        if (i6 != 0) {
            throw null;
        }
    }

    @Override
    public final String getAppsFlyerUID(@NonNull Context context) {
        onValidateInAppFailure = (onResponseError + 1) % UserVerificationMethods.USER_VERIFY_PATTERN;
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("getAppsFlyerUID", new String[0]);
        if (context == null) {
            return null;
        }
        AFInAppEventType(context);
        String valueOf2 = AFb1rSDK.valueOf(new WeakReference(values().AFKeystoreWrapper().AFInAppEventParameterName.AFInAppEventType));
        onValidateInAppFailure = (onResponseError + 83) % UserVerificationMethods.USER_VERIFY_PATTERN;
        return valueOf2;
    }

    @Override
    public final String getAttributionId(Context context) {
        try {
            String AFInAppEventType2 = new AFb1zSDK(context, values()).AFInAppEventType();
            int i5 = onResponseError + 113;
            onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i5 % 2 == 0) {
                return AFInAppEventType2;
            }
            throw null;
        } catch (Throwable th) {
            AFLogger.afErrorLog("Could not collect facebook attribution id. ", th);
            return null;
        }
    }

    @Override
    public final String getHostName() {
        onValidateInAppFailure = (onResponseError + 65) % UserVerificationMethods.USER_VERIFY_PATTERN;
        String valueOf2 = values().onAppOpenAttributionNative().valueOf();
        int i5 = onValidateInAppFailure + 105;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            int i6 = 32 / 0;
        }
        return valueOf2;
    }

    @Override
    public final String getHostPrefix() {
        int i5 = onValidateInAppFailure + 111;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            values().onAppOpenAttributionNative().values();
            throw null;
        }
        String values2 = values().onAppOpenAttributionNative().values();
        int i6 = onResponseError + 107;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 == 0) {
            return values2;
        }
        throw null;
    }

    @Override
    public final String getOutOfStore(Context context) {
        int i5 = onResponseError + 113;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            AppsFlyerProperties.getInstance().getString("api_store_value");
            throw null;
        }
        String string = AppsFlyerProperties.getInstance().getString("api_store_value");
        if (string != null) {
            onResponseError = (onValidateInAppFailure + 31) % UserVerificationMethods.USER_VERIFY_PATTERN;
            return string;
        }
        String AFKeystoreWrapper2 = AFKeystoreWrapper(context, "AF_STORE");
        if (AFKeystoreWrapper2 == null) {
            AFLogger.afInfoLog("No out-of-store value set");
            return null;
        }
        int i6 = onValidateInAppFailure + 39;
        onResponseError = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 != 0) {
            return AFKeystoreWrapper2;
        }
        throw null;
    }

    @Override
    public final String getSdkVersion() {
        AFc1pSDK values2;
        int i5 = onResponseError + 9;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            values2 = values();
            values2.afErrorLogForExcManagerOnly().AFKeystoreWrapper("getSdkVersion", new String[0]);
        } else {
            values2 = values();
            values2.afErrorLogForExcManagerOnly().AFKeystoreWrapper("getSdkVersion", new String[0]);
        }
        values2.AFKeystoreWrapper();
        return AFc1vSDK.AFKeystoreWrapper();
    }

    @Override
    public final AppsFlyerLib init(@NonNull String str, AppsFlyerConversionListener appsFlyerConversionListener, @NonNull Context context) {
        if (this.init) {
            onValidateInAppFailure = (onResponseError + 9) % UserVerificationMethods.USER_VERIFY_PATTERN;
            return this;
        }
        this.init = true;
        values().AppsFlyer2dXConversionCallback().valueOf = str;
        AFb1tSDK.values(str);
        if (context != null) {
            onResponseError = (onValidateInAppFailure + 37) % UserVerificationMethods.USER_VERIFY_PATTERN;
            this.onInstallConversionFailureNative = (Application) context.getApplicationContext();
            AFInAppEventType(context);
            values().afDebugLog().AFInAppEventType = System.currentTimeMillis();
            values().onDeepLinking().AFInAppEventParameterName();
            values().afInfoLog().values(new AFe1qSDK() {
                @Override
                public final void onRemoteConfigUpdateFinished(AFe1rSDK aFe1rSDK) {
                    AFa1dSDK.this.values(aFe1rSDK);
                }
            });
            afRDLog();
            this.onDeepLinking.AppsFlyer2dXConversionCallback().AFInAppEventType();
            AFb1fSDK.AFKeystoreWrapper = this.onInstallConversionFailureNative;
        } else {
            AFLogger.afWarnLog("context is null, Google Install Referrer will be not initialized");
        }
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("init", str, appsFlyerConversionListener == null ? "null" : "conversionDataListener");
        AFLogger.AFKeystoreWrapper(String.format("Initializing AppsFlyer SDK: (v%s.%s)", "6.11.1", valueOf));
        this.AFInAppEventParameterName = appsFlyerConversionListener;
        return this;
    }

    @Override
    public final boolean isPreInstalledApp(Context context) {
        try {
            if ((context.getPackageManager().getApplicationInfo(context.getPackageName(), 0).flags & 1) != 0) {
                onResponseError = (onValidateInAppFailure + 67) % UserVerificationMethods.USER_VERIFY_PATTERN;
                return true;
            }
        } catch (PackageManager.NameNotFoundException e5) {
            AFLogger.afErrorLog("Could not check if app is pre installed", e5);
        }
        int i5 = onResponseError + 81;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            return false;
        }
        throw null;
    }

    @Override
    @Deprecated
    public final boolean isStopped() {
        int i5 = onResponseError + 19;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            values().AppsFlyer2dXConversionCallback().values();
            throw null;
        }
        boolean values2 = values().AppsFlyer2dXConversionCallback().values();
        int i6 = onValidateInAppFailure + 105;
        onResponseError = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 != 0) {
            return values2;
        }
        throw null;
    }

    @Override
    public final void logEvent(Context context, String str, Map<String, Object> map) {
        int i5 = onResponseError + 97;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        logEvent(context, str, map, null);
        if (i6 != 0) {
            throw null;
        }
    }

    @Override
    public final void logLocation(Context context, double d5, double d6) {
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("logLocation", String.valueOf(d5), String.valueOf(d6));
        HashMap hashMap = new HashMap();
        hashMap.put(AFInAppEventParameterName.LONGTITUDE, Double.toString(d6));
        hashMap.put(AFInAppEventParameterName.LATITUDE, Double.toString(d5));
        AFInAppEventType(context, AFInAppEventType.LOCATION_COORDINATES, hashMap);
        onResponseError = (onValidateInAppFailure + 29) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void logSession(Context context) {
        onResponseError = (onValidateInAppFailure + 117) % UserVerificationMethods.USER_VERIFY_PATTERN;
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("logSession", new String[0]);
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper();
        AFInAppEventParameterName(context, AFf1vSDK.logSession);
        AFInAppEventType(context, null, null);
        int i5 = onValidateInAppFailure + 53;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            throw null;
        }
    }

    @Override
    public final void onPause(Context context) {
        onResponseError = (onValidateInAppFailure + 61) % UserVerificationMethods.USER_VERIFY_PATTERN;
        values().onAttributionFailureNative().AFInAppEventType(context);
        onValidateInAppFailure = (onResponseError + 101) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    @Deprecated
    public final void performOnAppAttribution(@NonNull Context context, @NonNull URI uri) {
        int i5 = onValidateInAppFailure;
        int i6 = i5 + 83;
        onResponseError = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 == 0) {
            throw null;
        }
        if (uri != null) {
            int i7 = i5 + 113;
            onResponseError = i7 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i7 % 2 == 0) {
                uri.toString().isEmpty();
                throw null;
            }
            if (!uri.toString().isEmpty()) {
                if (context != null) {
                    values().onResponseErrorNative().AFKeystoreWrapper(context, new HashMap(), Uri.parse(uri.toString()));
                    return;
                }
                AFb1nSDK onResponseErrorNative = values().onResponseErrorNative();
                StringBuilder sb = new StringBuilder("Context is \"");
                sb.append(context);
                sb.append("\"");
                onResponseErrorNative.AFKeystoreWrapper(sb.toString(), DeepLinkResult.Error.NETWORK);
                return;
            }
        }
        AFb1nSDK onResponseErrorNative2 = values().onResponseErrorNative();
        StringBuilder sb2 = new StringBuilder("Link is \"");
        sb2.append(uri);
        sb2.append("\"");
        onResponseErrorNative2.AFKeystoreWrapper(sb2.toString(), DeepLinkResult.Error.NETWORK);
        onValidateInAppFailure = (onResponseError + 47) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void performOnDeepLinking(@NonNull final Intent intent, @NonNull Context context) {
        int i5 = onResponseError;
        int i6 = i5 + 5;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 != 0) {
            int i7 = 59 / 0;
        }
    }

    @Override
    public final void registerConversionListener(Context context, AppsFlyerConversionListener appsFlyerConversionListener) {
        int i5 = onResponseError + 37;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("registerConversionListener", new String[1]);
        } else {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("registerConversionListener", new String[0]);
        }
        valueOf(appsFlyerConversionListener);
        int i6 = onResponseError + 111;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 != 0) {
            throw null;
        }
    }

    @Override
    public final void registerValidatorListener(Context context, AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener) {
        int i5 = onValidateInAppFailure + 99;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("registerValidatorListener", new String[1]);
            AFLogger.afDebugLog("registerValidatorListener called");
        } else {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("registerValidatorListener", new String[0]);
            AFLogger.afDebugLog("registerValidatorListener called");
        }
    }

    @Override
    public final void sendAdRevenue(Context context, Map<String, Object> map) {
        AFInAppEventType(context);
        AFf1ySDK aFf1ySDK = new AFf1ySDK();
        int AFInAppEventType2 = AFInAppEventType(AFInAppEventParameterName(context));
        aFf1ySDK.AFInAppEventType().put("ad_network", map);
        aFf1ySDK.AFInAppEventType().put("adrevenue_counter", Integer.valueOf(AFInAppEventType2));
        Activity activity = null;
        if (context instanceof Activity) {
            int i5 = onValidateInAppFailure + 109;
            onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i5 % 2 == 0) {
                throw null;
            }
            activity = (Activity) context;
        } else {
            onResponseError = (onValidateInAppFailure + 9) % UserVerificationMethods.USER_VERIFY_PATTERN;
        }
        valueOf(aFf1ySDK, activity);
    }

    @Override
    public final void sendInAppPurchaseData(Context context, Map<String, Object> map, PurchaseHandler.PurchaseValidationCallback purchaseValidationCallback) {
        int i5 = onValidateInAppFailure + 39;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        AFInAppEventType(context);
        PurchaseHandler AFLogger = values().AFLogger();
        if (i6 == 0) {
            String[] strArr = new String[1];
            strArr[1] = "purchases";
        }
        int i7 = onResponseError + 45;
        onValidateInAppFailure = i7 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i7 % 2 != 0) {
            throw null;
        }
    }

    @Override
    public final void sendPurchaseData(Context context, Map<String, Object> map, PurchaseHandler.PurchaseValidationCallback purchaseValidationCallback) {
        onValidateInAppFailure = (onResponseError + 7) % UserVerificationMethods.USER_VERIFY_PATTERN;
        AFInAppEventType(context);
        PurchaseHandler AFLogger = values().AFLogger();
        if (AFLogger.values(map, purchaseValidationCallback, "subscriptions")) {
            AFd1hSDK aFd1hSDK = new AFd1hSDK(map, purchaseValidationCallback, AFLogger.AFInAppEventType);
            AFd1mSDK aFd1mSDK = AFLogger.AFInAppEventParameterName;
            aFd1mSDK.AFKeystoreWrapper.execute(new AFd1mSDK.AnonymousClass5(aFd1hSDK));
        }
        int i5 = onResponseError + 89;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            throw null;
        }
    }

    @Override
    public final void sendPushNotificationData(Activity activity) {
        String values2;
        long j5;
        if (activity != null) {
            onResponseError = (onValidateInAppFailure + 39) % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (activity.getIntent() != null) {
                AFb1uSDK afErrorLogForExcManagerOnly = values().afErrorLogForExcManagerOnly();
                String localClassName = activity.getLocalClassName();
                StringBuilder sb = new StringBuilder("activity_intent_");
                sb.append(activity.getIntent().toString());
                afErrorLogForExcManagerOnly.AFKeystoreWrapper("sendPushNotificationData", localClassName, sb.toString());
                values2 = values(activity);
                this.AFVersionDeclaration = values2;
                if (values2 == null) {
                    int i5 = onResponseError + 51;
                    onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
                    if (i5 % 2 != 0) {
                        System.currentTimeMillis();
                        throw null;
                    }
                    long currentTimeMillis = System.currentTimeMillis();
                    if (this.getLevel == null) {
                        AFLogger.afInfoLog("pushes: initializing pushes history..");
                        this.getLevel = new ConcurrentHashMap();
                        j5 = currentTimeMillis;
                    } else {
                        try {
                            long j6 = AppsFlyerProperties.getInstance().getLong("pushPayloadMaxAging", 1800000L);
                            j5 = currentTimeMillis;
                            for (Long l5 : this.getLevel.keySet()) {
                                try {
                                    JSONObject jSONObject = new JSONObject(this.AFVersionDeclaration);
                                    JSONObject jSONObject2 = new JSONObject(this.getLevel.get(l5));
                                    if (jSONObject.opt("pid").equals(jSONObject2.opt("pid"))) {
                                        onValidateInAppFailure = (onResponseError + 67) % UserVerificationMethods.USER_VERIFY_PATTERN;
                                        if (jSONObject.opt("c").equals(jSONObject2.opt("c"))) {
                                            StringBuilder sb2 = new StringBuilder("PushNotificationMeasurement: A previous payload with same PID and campaign was already acknowledged! (old: ");
                                            sb2.append(jSONObject2);
                                            sb2.append(", new: ");
                                            sb2.append(jSONObject);
                                            sb2.append(")");
                                            AFLogger.afInfoLog(sb2.toString());
                                            this.AFVersionDeclaration = null;
                                            return;
                                        }
                                    }
                                    if (currentTimeMillis - l5.longValue() > j6) {
                                        this.getLevel.remove(l5);
                                    }
                                    if (l5.longValue() <= j5) {
                                        j5 = l5.longValue();
                                    }
                                } catch (Throwable th) {
                                    th = th;
                                    StringBuilder sb3 = new StringBuilder("Error while handling push notification measurement: ");
                                    sb3.append(th.getClass().getSimpleName());
                                    AFLogger.afErrorLog(sb3.toString(), th);
                                    if (this.getLevel.size() == AppsFlyerProperties.getInstance().getInt("pushPayloadHistorySize", 2)) {
                                    }
                                    this.getLevel.put(Long.valueOf(currentTimeMillis), this.AFVersionDeclaration);
                                    start(activity);
                                    return;
                                }
                            }
                        } catch (Throwable th2) {
                            th = th2;
                            j5 = currentTimeMillis;
                        }
                    }
                    if (this.getLevel.size() == AppsFlyerProperties.getInstance().getInt("pushPayloadHistorySize", 2)) {
                        StringBuilder sb4 = new StringBuilder("pushes: removing oldest overflowing push (oldest push:");
                        sb4.append(j5);
                        sb4.append(")");
                        AFLogger.afInfoLog(sb4.toString());
                        this.getLevel.remove(Long.valueOf(j5));
                    }
                    this.getLevel.put(Long.valueOf(currentTimeMillis), this.AFVersionDeclaration);
                    start(activity);
                    return;
                }
                return;
            }
        }
        AFb1uSDK afErrorLogForExcManagerOnly2 = values().afErrorLogForExcManagerOnly();
        if (activity != null) {
            afErrorLogForExcManagerOnly2.AFKeystoreWrapper("sendPushNotificationData", activity.getLocalClassName(), "activity_intent_null");
        } else {
            afErrorLogForExcManagerOnly2.AFKeystoreWrapper("sendPushNotificationData", "activity_null");
        }
        values2 = values(activity);
        this.AFVersionDeclaration = values2;
        if (values2 == null) {
        }
    }

    @Override
    public final void setAdditionalData(Map<String, Object> map) {
        int i5 = onValidateInAppFailure + 11;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            throw null;
        }
        if (map != null) {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setAdditionalData", map.toString());
            AppsFlyerProperties.getInstance().setCustomData(new JSONObject(map).toString());
            onResponseError = (onValidateInAppFailure + 67) % UserVerificationMethods.USER_VERIFY_PATTERN;
        }
    }

    @Override
    public final void setAndroidIdData(String str) {
        int i5 = onValidateInAppFailure + 125;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            AFb1uSDK afErrorLogForExcManagerOnly = values().afErrorLogForExcManagerOnly();
            String[] strArr = new String[0];
            strArr[1] = str;
            afErrorLogForExcManagerOnly.AFKeystoreWrapper("setAndroidIdData", strArr);
        } else {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setAndroidIdData", str);
        }
        this.afDebugLog = str;
    }

    @Override
    public final void setAppId(String str) {
        onResponseError = (onValidateInAppFailure + 17) % UserVerificationMethods.USER_VERIFY_PATTERN;
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setAppId", str);
        AFInAppEventType(AppsFlyerProperties.APP_ID, str);
        onResponseError = (onValidateInAppFailure + 33) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void setAppInviteOneLink(String str) {
        int i5 = onResponseError + 41;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setAppInviteOneLink", str);
            AFLogger.afInfoLog("setAppInviteOneLink = ".concat(String.valueOf(str)));
        } else {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setAppInviteOneLink", str);
            AFLogger.afInfoLog("setAppInviteOneLink = ".concat(String.valueOf(str)));
        }
        AFInAppEventType(AppsFlyerProperties.ONELINK_ID, str);
        onResponseError = (onValidateInAppFailure + 35) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void setCollectAndroidID(boolean z5) {
        onValidateInAppFailure = (onResponseError + 123) % UserVerificationMethods.USER_VERIFY_PATTERN;
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setCollectAndroidID", String.valueOf(z5));
        AFInAppEventType(AppsFlyerProperties.COLLECT_ANDROID_ID, Boolean.toString(z5));
        AFInAppEventType(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, Boolean.toString(z5));
        int i5 = onValidateInAppFailure + 49;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            int i6 = 49 / 0;
        }
    }

    @Override
    public final void setCollectIMEI(boolean z5) {
        int i5 = onValidateInAppFailure + 15;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            AFb1uSDK afErrorLogForExcManagerOnly = values().afErrorLogForExcManagerOnly();
            String[] strArr = new String[0];
            strArr[0] = String.valueOf(z5);
            afErrorLogForExcManagerOnly.AFKeystoreWrapper("setCollectIMEI", strArr);
        } else {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setCollectIMEI", String.valueOf(z5));
        }
        AFInAppEventType(AppsFlyerProperties.COLLECT_IMEI, Boolean.toString(z5));
        AFInAppEventType(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, Boolean.toString(z5));
    }

    @Override
    @Deprecated
    public final void setCollectOaid(boolean z5) {
        onValidateInAppFailure = (onResponseError + 7) % UserVerificationMethods.USER_VERIFY_PATTERN;
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setCollectOaid", String.valueOf(z5));
        AFInAppEventType(AppsFlyerProperties.COLLECT_OAID, Boolean.toString(z5));
        int i5 = onResponseError + 67;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            throw null;
        }
    }

    @Override
    public final void setCurrencyCode(String str) {
        onResponseError = (onValidateInAppFailure + 67) % UserVerificationMethods.USER_VERIFY_PATTERN;
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setCurrencyCode", str);
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.CURRENCY_CODE, str);
        onValidateInAppFailure = (onResponseError + 103) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void setCustomerIdAndLogSession(String str, @NonNull Context context) {
        if (context != null) {
            boolean AFInAppEventType2 = AFInAppEventType();
            setCustomerUserId(str);
            if (!AFInAppEventType2) {
                AFLogger.afInfoLog("waitForCustomerUserId is false; setting CustomerUserID: ".concat(String.valueOf(str)), true);
                return;
            }
            StringBuilder sb = new StringBuilder("CustomerUserId set: ");
            sb.append(str);
            sb.append(" - Initializing AppsFlyer Tacking");
            AFLogger.afInfoLog(sb.toString(), true);
            String referrer = AppsFlyerProperties.getInstance().getReferrer(context);
            AFInAppEventParameterName(context, AFf1vSDK.setCustomerIdAndLogSession);
            String str2 = values().AppsFlyer2dXConversionCallback().valueOf;
            if (referrer == null) {
                referrer = "";
            }
            String str3 = referrer;
            if (context instanceof Activity) {
                onResponseError = (onValidateInAppFailure + 53) % UserVerificationMethods.USER_VERIFY_PATTERN;
                ((Activity) context).getIntent();
            }
            valueOf(context, null, null, str3, null);
            int i5 = onResponseError + 19;
            onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i5 % 2 != 0) {
                throw null;
            }
        }
    }

    @Override
    public final void setCustomerUserId(String str) {
        onValidateInAppFailure = (onResponseError + 121) % UserVerificationMethods.USER_VERIFY_PATTERN;
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setCustomerUserId", str);
        AFLogger.afInfoLog("setCustomerUserId = ".concat(String.valueOf(str)));
        AFInAppEventType(AppsFlyerProperties.APP_USER_ID, str);
        AFInAppEventType(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false);
        onResponseError = (onValidateInAppFailure + 77) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void setDebugLog(boolean z5) {
        AFLogger.LogLevel logLevel;
        int i5 = (onResponseError + 57) % UserVerificationMethods.USER_VERIFY_PATTERN;
        onValidateInAppFailure = i5;
        if (!z5) {
            logLevel = AFLogger.LogLevel.NONE;
        } else {
            int i6 = i5 + 3;
            onResponseError = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i6 % 2 == 0) {
                AFLogger.LogLevel logLevel2 = AFLogger.LogLevel.NONE;
                throw null;
            }
            logLevel = AFLogger.LogLevel.DEBUG;
        }
        setLogLevel(logLevel);
    }

    @Override
    public final void setDisableAdvertisingIdentifiers(boolean z5) {
        boolean z6;
        AFLogger.afDebugLog("setDisableAdvertisingIdentifiers: ".concat(String.valueOf(z5)));
        if (z5) {
            z6 = false;
        } else {
            onResponseError = (onValidateInAppFailure + 125) % UserVerificationMethods.USER_VERIFY_PATTERN;
            z6 = true;
        }
        AFa1fSDK.AFInAppEventType = Boolean.valueOf(z6);
        AppsFlyerProperties.getInstance().remove("advertiserIdEnabled");
        AppsFlyerProperties.getInstance().remove("advertiserId");
        onValidateInAppFailure = (onResponseError + 75) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void setDisableNetworkData(boolean z5) {
        int i5 = onValidateInAppFailure + 45;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            AFLogger.afDebugLog("setDisableNetworkData: ".concat(String.valueOf(z5)));
            AFInAppEventType(AppsFlyerProperties.DISABLE_NETWORK_DATA, z5);
            throw null;
        }
        AFLogger.afDebugLog("setDisableNetworkData: ".concat(String.valueOf(z5)));
        AFInAppEventType(AppsFlyerProperties.DISABLE_NETWORK_DATA, z5);
        int i6 = onResponseError + 91;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 != 0) {
            throw null;
        }
    }

    @Override
    public final void setExtension(String str) {
        int i5 = onValidateInAppFailure + 19;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            AFb1uSDK afErrorLogForExcManagerOnly = values().afErrorLogForExcManagerOnly();
            String[] strArr = new String[0];
            strArr[1] = str;
            afErrorLogForExcManagerOnly.AFKeystoreWrapper("setExtension", strArr);
        } else {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setExtension", str);
        }
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EXTENSION, str);
        onResponseError = (onValidateInAppFailure + 37) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void setHost(String str, @NonNull String str2) {
        String str3;
        if (AFb1qSDK.AFInAppEventParameterName(str2)) {
            AFLogger.afWarnLog("hostname was empty or null - call for setHost is skipped");
            return;
        }
        int i5 = (onResponseError + 29) % UserVerificationMethods.USER_VERIFY_PATTERN;
        onValidateInAppFailure = i5;
        if (str != null) {
            str3 = str.trim();
        } else {
            onResponseError = (i5 + 39) % UserVerificationMethods.USER_VERIFY_PATTERN;
            str3 = "";
        }
        AFd1qSDK.valueOf(new AFd1pSDK(str3, str2.trim()));
    }

    @Override
    public final void setImeiData(String str) {
        int i5 = onResponseError + 59;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            AFb1uSDK afErrorLogForExcManagerOnly = values().afErrorLogForExcManagerOnly();
            String[] strArr = new String[0];
            strArr[0] = str;
            afErrorLogForExcManagerOnly.AFKeystoreWrapper("setImeiData", strArr);
        } else {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setImeiData", str);
        }
        values().AppsFlyer2dXConversionCallback().AFKeystoreWrapper = str;
    }

    @Override
    public final void setIsUpdate(boolean z5) {
        onResponseError = (onValidateInAppFailure + 15) % UserVerificationMethods.USER_VERIFY_PATTERN;
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setIsUpdate", String.valueOf(z5));
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.IS_UPDATE, z5);
        int i5 = onResponseError + 117;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            throw null;
        }
    }

    @Override
    public final void setLogLevel(@NonNull AFLogger.LogLevel logLevel) {
        int i5 = onResponseError + 119;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            logLevel.getLevel();
            AFLogger.LogLevel.NONE.getLevel();
            throw null;
        }
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("log", String.valueOf(logLevel.getLevel() > AFLogger.LogLevel.NONE.getLevel()));
        AppsFlyerProperties.getInstance().set("logLevel", logLevel.getLevel());
        int i6 = onResponseError + 43;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 != 0) {
            throw null;
        }
    }

    @Override
    public final void setMinTimeBetweenSessions(int i5) {
        int i6 = onValidateInAppFailure + 75;
        onResponseError = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 == 0) {
            this.AFLogger$LogLevel = TimeUnit.SECONDS.toMillis(i5);
            int i7 = 50 / 0;
        } else {
            this.AFLogger$LogLevel = TimeUnit.SECONDS.toMillis(i5);
        }
        onValidateInAppFailure = (onResponseError + 51) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void setOaidData(String str) {
        int i5 = onValidateInAppFailure + 125;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setOaidData", str);
        } else {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setOaidData", str);
        }
        AFa1fSDK.AFInAppEventParameterName = str;
        onValidateInAppFailure = (onResponseError + 73) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void setOneLinkCustomDomain(String... strArr) {
        String format;
        int i5 = onResponseError + 97;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            Object[] objArr = new Object[1];
            objArr[1] = Arrays.toString(strArr);
            format = String.format("setOneLinkCustomDomain %s", objArr);
        } else {
            format = String.format("setOneLinkCustomDomain %s", Arrays.toString(strArr));
        }
        AFLogger.afDebugLog(format);
        values().onResponseErrorNative().afInfoLog = strArr;
    }

    @Override
    public final void setOutOfStore(String str) {
        int i5 = (onValidateInAppFailure + 45) % UserVerificationMethods.USER_VERIFY_PATTERN;
        onResponseError = i5;
        if (str == null) {
            AFLogger.valueOf("Cannot set setOutOfStore with null");
            return;
        }
        int i6 = i5 + 7;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i7 = i6 % 2;
        String lowerCase = str.toLowerCase(Locale.getDefault());
        AppsFlyerProperties.getInstance().set("api_store_value", lowerCase);
        AFLogger.afInfoLog("Store API set with value: ".concat(String.valueOf(lowerCase)), true);
    }

    @Override
    public final void setPartnerData(@NonNull String str, Map<String, Object> map) {
        onResponseError = (onValidateInAppFailure + 83) % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (this.onResponseNative == null) {
            this.onResponseNative = new AFb1dSDK();
        }
        AFb1dSDK aFb1dSDK = this.onResponseNative;
        if (str == null || str.isEmpty()) {
            AFLogger.afWarnLog("Partner ID is missing or `null`");
            return;
        }
        if (map != null) {
            int i5 = onResponseError + 41;
            onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i5 % 2 != 0) {
                map.isEmpty();
                throw null;
            }
            if (!map.isEmpty()) {
                StringBuilder sb = new StringBuilder("Setting partner data for ");
                sb.append(str);
                sb.append(": ");
                sb.append(map);
                AFLogger.afDebugLog(sb.toString());
                int length = new JSONObject(map).toString().length();
                if (length <= 1000) {
                    aFb1dSDK.AFInAppEventType.put(str, map);
                    aFb1dSDK.AFKeystoreWrapper.remove(str);
                    return;
                } else {
                    AFLogger.afWarnLog("Partner data 1000 characters limit exceeded");
                    HashMap hashMap = new HashMap();
                    hashMap.put("error", "limit exceeded: ".concat(String.valueOf(length)));
                    aFb1dSDK.AFKeystoreWrapper.put(str, hashMap);
                    return;
                }
            }
        }
        AFLogger.afWarnLog(aFb1dSDK.AFInAppEventType.remove(str) == null ? "Partner data is missing or `null`" : "Cleared partner data for ".concat(str));
    }

    @Override
    public final void setPhoneNumber(String str) {
        int i5 = onResponseError + 57;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        this.onAttributionFailureNative = AFa1aSDK.AFKeystoreWrapper(str);
        if (i6 != 0) {
            throw null;
        }
    }

    @Override
    public final void setPluginInfo(@NonNull PluginInfo pluginInfo) {
        int i5 = onResponseError + 107;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        Objects.requireNonNull(pluginInfo);
        if (i6 != 0) {
            values().onInstallConversionFailureNative().valueOf(pluginInfo);
            int i7 = 55 / 0;
        } else {
            values().onInstallConversionFailureNative().valueOf(pluginInfo);
        }
        int i8 = onResponseError + 25;
        onValidateInAppFailure = i8 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i8 % 2 != 0) {
            throw null;
        }
    }

    @Override
    public final void setPreinstallAttribution(String str, String str2, String str3) {
        AFLogger.afDebugLog("setPreinstallAttribution API called");
        JSONObject jSONObject = new JSONObject();
        try {
            if (str != null) {
                int i5 = onValidateInAppFailure + 109;
                onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
                if (i5 % 2 == 0) {
                    jSONObject.put("pid", str);
                    throw null;
                }
                jSONObject.put("pid", str);
            }
            if (str2 != null) {
                jSONObject.put("c", str2);
            }
            if (str3 != null) {
                jSONObject.put("af_siteid", str3);
            }
        } catch (JSONException e5) {
            AFLogger.afErrorLog(e5.getMessage(), e5);
        }
        if (!jSONObject.has("pid")) {
            AFLogger.afWarnLog("Cannot set preinstall attribution data without a media source");
            return;
        }
        AFInAppEventType("preInstallName", jSONObject.toString());
        int i6 = onValidateInAppFailure + 123;
        onResponseError = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 == 0) {
            int i7 = 41 / 0;
        }
    }

    @Override
    public final void setResolveDeepLinkURLs(String... strArr) {
        onValidateInAppFailure = (onResponseError + 119) % UserVerificationMethods.USER_VERIFY_PATTERN;
        AFLogger.afDebugLog(String.format("setResolveDeepLinkURLs %s", Arrays.toString(strArr)));
        AFb1nSDK onResponseErrorNative = values().onResponseErrorNative();
        onResponseErrorNative.afDebugLog.clear();
        onResponseErrorNative.afDebugLog.addAll(Arrays.asList(strArr));
        onResponseError = (onValidateInAppFailure + R.styleable.AppCompatTheme_tooltipFrameBackground) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    @Deprecated
    public final void setSharingFilter(@NonNull String... strArr) {
        int i5 = onValidateInAppFailure + 69;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        setSharingFilterForPartners(strArr);
        if (i6 == 0) {
            int i7 = 35 / 0;
        }
        int i8 = onValidateInAppFailure + 103;
        onResponseError = i8 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i8 % 2 == 0) {
            throw null;
        }
    }

    @Override
    @Deprecated
    public final void setSharingFilterForAllPartners() {
        int i5 = onResponseError + R.styleable.AppCompatTheme_tooltipFrameBackground;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            String[] strArr = new String[1];
            strArr[1] = "all";
            setSharingFilterForPartners(strArr);
        } else {
            setSharingFilterForPartners("all");
        }
        onResponseError = (onValidateInAppFailure + 111) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void setSharingFilterForPartners(String... strArr) {
        this.afErrorLog = new AFb1eSDK(strArr);
        int i5 = onValidateInAppFailure + 105;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            int i6 = 11 / 0;
        }
    }

    @Override
    public final void setUserEmails(AppsFlyerProperties.EmailsCryptType emailsCryptType, String... strArr) {
        ArrayList arrayList = new ArrayList(strArr.length + 1);
        arrayList.add(emailsCryptType.toString());
        arrayList.addAll(Arrays.asList(strArr));
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setUserEmails", (String[]) arrayList.toArray(new String[strArr.length + 1]));
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EMAIL_CRYPT_TYPE, emailsCryptType.getValue());
        HashMap hashMap = new HashMap();
        ArrayList arrayList2 = new ArrayList();
        int length = strArr.length;
        String str = null;
        int i5 = 0;
        while (i5 < length) {
            String str2 = strArr[i5];
            if (AnonymousClass2.AFInAppEventType[emailsCryptType.ordinal()] != 2) {
                arrayList2.add(AFa1aSDK.AFKeystoreWrapper(str2));
                onResponseError = (onValidateInAppFailure + 97) % UserVerificationMethods.USER_VERIFY_PATTERN;
                str = "sha256_el_arr";
            } else {
                arrayList2.add(str2);
                str = "plain_el_arr";
            }
            i5++;
            onValidateInAppFailure = (onResponseError + 125) % UserVerificationMethods.USER_VERIFY_PATTERN;
        }
        hashMap.put(str, arrayList2);
        AppsFlyerProperties.getInstance().setUserEmails(new JSONObject(hashMap).toString());
    }

    @Override
    public final void start(@NonNull Context context) {
        onResponseError = (onValidateInAppFailure + 119) % UserVerificationMethods.USER_VERIFY_PATTERN;
        start(context, null);
        int i5 = onResponseError + 101;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            int i6 = 45 / 0;
        }
    }

    @Override
    public final void stop(boolean z5, Context context) {
        onValidateInAppFailure = (onResponseError + 95) % UserVerificationMethods.USER_VERIFY_PATTERN;
        AFInAppEventType(context);
        values().AppsFlyer2dXConversionCallback().AFInAppEventParameterName = z5;
        values().onInstallConversionDataLoadedNative().AFInAppEventParameterName();
        if (!z5) {
            return;
        }
        onResponseError = (onValidateInAppFailure + 35) % UserVerificationMethods.USER_VERIFY_PATTERN;
        AFKeystoreWrapper(context).values("is_stop_tracking_used", true);
        onResponseError = (onValidateInAppFailure + 55) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void subscribeForDeepLink(@NonNull DeepLinkListener deepLinkListener) {
        onResponseError = (onValidateInAppFailure + 89) % UserVerificationMethods.USER_VERIFY_PATTERN;
        subscribeForDeepLink(deepLinkListener, TimeUnit.SECONDS.toMillis(3L));
        onValidateInAppFailure = (onResponseError + 69) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void unregisterConversionListener() {
        int i5 = onResponseError + 41;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("unregisterConversionListener", new String[1]);
        } else {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("unregisterConversionListener", new String[0]);
        }
        this.AFInAppEventParameterName = null;
        int i6 = onValidateInAppFailure + 123;
        onResponseError = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 == 0) {
            int i7 = 95 / 0;
        }
    }

    @Override
    public final void updateServerUninstallToken(Context context, String str) {
        AFInAppEventType(context);
        AFe1jSDK aFe1jSDK = new AFe1jSDK(context);
        if (str == null || str.trim().isEmpty()) {
            AFLogger.afWarnLog("[register] Firebase Token is either empty or null and was not registered.");
            return;
        }
        AFLogger.afInfoLog("[register] Firebase Refreshed Token = ".concat(str));
        AFe1fSDK valueOf2 = aFe1jSDK.valueOf();
        if (valueOf2 == null || !str.equals(valueOf2.values)) {
            long currentTimeMillis = System.currentTimeMillis();
            boolean z5 = valueOf2 == null || currentTimeMillis - valueOf2.AFInAppEventParameterName > TimeUnit.SECONDS.toMillis(2L);
            AFe1fSDK aFe1fSDK = new AFe1fSDK(str, currentTimeMillis, !z5);
            aFe1jSDK.values.AFKeystoreWrapper("afUninstallToken", aFe1fSDK.values);
            aFe1jSDK.values.AFInAppEventType("afUninstallToken_received_time", aFe1fSDK.AFInAppEventParameterName);
            aFe1jSDK.values.values("afUninstallToken_queued", aFe1fSDK.AFInAppEventType());
            if (z5) {
                AFe1jSDK.AFInAppEventParameterName(str);
            }
        }
    }

    @Override
    public final void validateAndLogInAppPurchase(Context context, String str, String str2, String str3, String str4, String str5, Map<String, String> map) {
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("validateAndTrackInAppPurchase", str, str2, str3, str4, str5, map == null ? "" : map.toString());
        if (!isStopped()) {
            StringBuilder sb = new StringBuilder("Validate in app called with parameters: ");
            sb.append(str3);
            sb.append(" ");
            sb.append(str4);
            sb.append(" ");
            sb.append(str5);
            AFLogger.afInfoLog(sb.toString());
        }
        if (str != null && str4 != null && str2 != null && str5 != null && str3 != null) {
            new Thread(new AFa1jSDK(context.getApplicationContext(), values().AppsFlyer2dXConversionCallback().valueOf, str, str2, str3, str4, str5, map, context instanceof Activity ? ((Activity) context).getIntent() : null)).start();
            return;
        }
        AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener = AFInAppEventType;
        if (appsFlyerInAppPurchaseValidatorListener != null) {
            appsFlyerInAppPurchaseValidatorListener.onValidateInAppFailure("Please provide purchase parameters");
        }
    }

    public final AFc1pSDK values() {
        int i5 = onResponseError;
        AFc1wSDK aFc1wSDK = this.onDeepLinking;
        int i6 = i5 + 41;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 == 0) {
            return aFc1wSDK;
        }
        throw null;
    }

    @Override
    public final void waitForCustomerUserId(boolean z5) {
        onValidateInAppFailure = (onResponseError + 79) % UserVerificationMethods.USER_VERIFY_PATTERN;
        AFLogger.afInfoLog("initAfterCustomerUserID: ".concat(String.valueOf(z5)), true);
        AFInAppEventType(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, z5);
        onResponseError = (onValidateInAppFailure + 63) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    public static String AFInAppEventParameterName() {
        onResponseError = (onValidateInAppFailure + 69) % UserVerificationMethods.USER_VERIFY_PATTERN;
        String AFInAppEventParameterName = AFInAppEventParameterName(AppsFlyerProperties.APP_USER_ID);
        int i5 = onValidateInAppFailure + R.styleable.AppCompatTheme_tooltipFrameBackground;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            return AFInAppEventParameterName;
        }
        throw null;
    }

    private boolean AFLogger() {
        int i5 = onValidateInAppFailure + 23;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            return values().AFKeystoreWrapper().AFInAppEventParameterName("AF_PREINSTALL_DISABLED");
        }
        values().AFKeystoreWrapper().AFInAppEventParameterName("AF_PREINSTALL_DISABLED");
        throw null;
    }

    private static boolean AFLogger$LogLevel(Context context) {
        NetworkCapabilities networkCapabilities;
        if (context != null) {
            onResponseError = (onValidateInAppFailure + 45) % UserVerificationMethods.USER_VERIFY_PATTERN;
            try {
                ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
                Network[] allNetworks = connectivityManager.getAllNetworks();
                int length = allNetworks.length;
                for (int i5 = 0; i5 < length; i5++) {
                    int i6 = onValidateInAppFailure + 113;
                    onResponseError = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
                    if (i6 % 2 == 0) {
                        networkCapabilities = connectivityManager.getNetworkCapabilities(allNetworks[i5]);
                        if (!networkCapabilities.hasTransport(2)) {
                            continue;
                        } else {
                            if (networkCapabilities.hasCapability(15)) {
                                return true;
                            }
                        }
                    } else {
                        networkCapabilities = connectivityManager.getNetworkCapabilities(allNetworks[i5]);
                        if (!networkCapabilities.hasTransport(4)) {
                            continue;
                        }
                        if (networkCapabilities.hasCapability(15)) {
                        }
                    }
                }
                return false;
            } catch (Exception e5) {
                AFLogger.afErrorLog("Failed collecting ivc data", e5);
            }
        }
        onResponseError = (onValidateInAppFailure + 49) % UserVerificationMethods.USER_VERIFY_PATTERN;
        return false;
    }

    private boolean AFVersionDeclaration() {
        int i5 = onResponseError + 9;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            int i6 = 81 / 0;
        }
        return false;
    }

    private static boolean afDebugLog(Context context) {
        if (!AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false)) {
            int i5 = onValidateInAppFailure + 41;
            onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i5 % 2 != 0 ? !AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, false) : !AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, false)) {
                return !values(context);
            }
        }
        onResponseError = (onValidateInAppFailure + 89) % UserVerificationMethods.USER_VERIFY_PATTERN;
        return true;
    }

    private String afErrorLog(Context context) {
        int i5 = onResponseError + 11;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        String str = null;
        if (i5 % 2 != 0) {
            AFInAppEventParameterName(context).contains("INSTALL_STORE");
            throw null;
        }
        SharedPreferences AFInAppEventParameterName = AFInAppEventParameterName(context);
        if (AFInAppEventParameterName.contains("INSTALL_STORE")) {
            return AFInAppEventParameterName.getString("INSTALL_STORE", null);
        }
        if (afRDLog(context)) {
            int i6 = onResponseError + 61;
            onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i6 % 2 != 0) {
                getLevel(context);
                throw null;
            }
            str = getLevel(context);
        } else {
            onValidateInAppFailure = (onResponseError + 59) % UserVerificationMethods.USER_VERIFY_PATTERN;
        }
        AFKeystoreWrapper(context).AFKeystoreWrapper("INSTALL_STORE", str);
        return str;
    }

    @NonNull
    private AFg1uSDK[] afErrorLogForExcManagerOnly() {
        onResponseError = (onValidateInAppFailure + 119) % UserVerificationMethods.USER_VERIFY_PATTERN;
        AFg1uSDK[] AFInAppEventParameterName = values().AFVersionDeclaration().AFInAppEventParameterName();
        int i5 = onResponseError + 117;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            return AFInAppEventParameterName;
        }
        throw null;
    }

    private static File afInfoLog(String str) {
        int i5 = onResponseError + 7;
        int i6 = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        onValidateInAppFailure = i6;
        if (i5 % 2 != 0) {
            try {
                int i7 = 31 / 0;
                if (str == null) {
                    return null;
                }
            } catch (Throwable th) {
                AFLogger.afErrorLog(th.getMessage(), th);
                return null;
            }
        } else if (str == null) {
            return null;
        }
        int i8 = i6 + 105;
        onResponseError = i8 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i8 % 2 == 0) {
            int i9 = 51 / 0;
            if (str.trim().length() <= 0) {
                return null;
            }
        } else if (str.trim().length() <= 0) {
            return null;
        }
        return new File(str.trim());
    }

    private static boolean afRDLog(Context context) {
        onValidateInAppFailure = (onResponseError + 123) % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (AFInAppEventParameterName(context).contains("appsFlyerCount")) {
            return false;
        }
        int i5 = onValidateInAppFailure + 63;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        return i5 % 2 != 0;
    }

    private void afWarnLog() {
        onResponseError = (onValidateInAppFailure + 71) % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (AFd1dSDK.afDebugLog()) {
            return;
        }
        AFc1pSDK values2 = values();
        AFd1mSDK level = values2.getLevel();
        level.AFKeystoreWrapper.execute(new AFd1mSDK.AnonymousClass5(new AFd1dSDK(values2)));
        int i5 = onValidateInAppFailure + 125;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            int i6 = 41 / 0;
        }
    }

    public void getLevel() {
        try {
            AFf1uSDK aFf1uSDK = new AFf1uSDK();
            if (valueOf(aFf1uSDK, AFInAppEventParameterName(this.onInstallConversionFailureNative))) {
                int i5 = onValidateInAppFailure + 75;
                onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
                if (i5 % 2 == 0) {
                    AFInAppEventParameterName(aFf1uSDK);
                    int i6 = 56 / 0;
                } else {
                    AFInAppEventParameterName(aFf1uSDK);
                }
                onResponseError = (onValidateInAppFailure + R.styleable.AppCompatTheme_tooltipFrameBackground) % UserVerificationMethods.USER_VERIFY_PATTERN;
            }
        } catch (Throwable th) {
            AFLogger.afErrorLog(th.getMessage(), th);
        }
    }

    static long valueOf(AFa1dSDK aFa1dSDK, long j5) {
        int i5 = onValidateInAppFailure + 11;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        aFa1dSDK.afWarnLog = j5;
        if (i6 == 0) {
            int i7 = 81 / 0;
        }
        return j5;
    }

    private AFe1wSDK.AFa1wSDK values(final Map<String, String> map) {
        AFe1wSDK.AFa1wSDK aFa1wSDK = new AFe1wSDK.AFa1wSDK() {
            @Override
            public final void AFInAppEventType(String str) {
                AFa1dSDK.this.values().onResponseErrorNative().AFKeystoreWrapper(str, DeepLinkResult.Error.NETWORK);
            }

            @Override
            public final void valueOf(Map<String, String> map2) {
                for (String str : map2.keySet()) {
                    map.put(str, map2.get(str));
                }
                AFa1dSDK.this.values().onResponseErrorNative().AFInAppEventType(map);
            }
        };
        onResponseError = (onValidateInAppFailure + 71) % UserVerificationMethods.USER_VERIFY_PATTERN;
        return aFa1wSDK;
    }

    public final int AFInAppEventType(SharedPreferences sharedPreferences, boolean z5) {
        int i5 = onValidateInAppFailure + 95;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            return AFKeystoreWrapper(sharedPreferences, "appsFlyerCount", z5);
        }
        AFKeystoreWrapper(sharedPreferences, "appsFlyerCount", z5);
        throw null;
    }

    public final AFb1aSDK AFKeystoreWrapper(Context context) {
        int i5 = onResponseError + 57;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        AFInAppEventType(context);
        AFc1pSDK values2 = values();
        if (i6 == 0) {
            return values2.afErrorLog();
        }
        values2.afErrorLog();
        throw null;
    }

    @Override
    public final void logEvent(@NonNull Context context, String str, Map<String, Object> map, AppsFlyerRequestListener appsFlyerRequestListener) {
        HashMap hashMap = map == null ? null : new HashMap(map);
        AFInAppEventType(context);
        AFf1tSDK aFf1tSDK = new AFf1tSDK();
        aFf1tSDK.afInfoLog = str;
        aFf1tSDK.AFInAppEventParameterName = appsFlyerRequestListener;
        if (hashMap != null && hashMap.containsKey(AFInAppEventParameterName.TOUCH_OBJ)) {
            HashMap hashMap2 = new HashMap();
            Object obj = hashMap.get(AFInAppEventParameterName.TOUCH_OBJ);
            if (obj instanceof MotionEvent) {
                MotionEvent motionEvent = (MotionEvent) obj;
                HashMap hashMap3 = new HashMap();
                hashMap3.put("x", Float.valueOf(motionEvent.getX()));
                hashMap3.put("y", Float.valueOf(motionEvent.getY()));
                hashMap2.put("loc", hashMap3);
                hashMap2.put("pf", Float.valueOf(motionEvent.getPressure()));
                hashMap2.put("rad", Float.valueOf(motionEvent.getTouchMajor() / 2.0f));
            } else {
                hashMap2.put("error", "Parsing failed due to invalid input in 'af_touch_obj'.");
                AFLogger.valueOf("Parsing failed due to invalid input in 'af_touch_obj'.");
            }
            Map<String, ?> singletonMap = Collections.singletonMap("tch_data", hashMap2);
            hashMap.remove(AFInAppEventParameterName.TOUCH_OBJ);
            aFf1tSDK.values(singletonMap);
        }
        aFf1tSDK.AFKeystoreWrapper = hashMap;
        AFb1uSDK afErrorLogForExcManagerOnly = values().afErrorLogForExcManagerOnly();
        Map map2 = aFf1tSDK.AFKeystoreWrapper;
        if (map2 == null) {
            map2 = new HashMap();
        }
        afErrorLogForExcManagerOnly.AFKeystoreWrapper("logEvent", str, new JSONObject(map2).toString());
        if (str == null) {
            AFInAppEventParameterName(context, AFf1vSDK.logEvent);
        }
        valueOf(aFf1tSDK, context instanceof Activity ? (Activity) context : null);
    }

    @Override
    public final void setUserEmails(String... strArr) {
        int i5 = onValidateInAppFailure + 95;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setUserEmails", strArr);
            setUserEmails(AppsFlyerProperties.EmailsCryptType.NONE, strArr);
            throw null;
        }
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("setUserEmails", strArr);
        setUserEmails(AppsFlyerProperties.EmailsCryptType.NONE, strArr);
        onResponseError = (onValidateInAppFailure + 15) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void start(@NonNull Context context, String str) {
        onResponseError = (onValidateInAppFailure + 5) % UserVerificationMethods.USER_VERIFY_PATTERN;
        start(context, str, null);
        onResponseError = (onValidateInAppFailure + 29) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    @Override
    public final void subscribeForDeepLink(@NonNull DeepLinkListener deepLinkListener, long j5) {
        int i5 = onResponseError + 105;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            values().onResponseErrorNative().values = deepLinkListener;
            values().onResponseErrorNative().afRDLog = j5;
        } else {
            values().onResponseErrorNative().values = deepLinkListener;
            values().onResponseErrorNative().afRDLog = j5;
            throw null;
        }
    }

    private static String AFInAppEventParameterName(String str) {
        onResponseError = (onValidateInAppFailure + 117) % UserVerificationMethods.USER_VERIFY_PATTERN;
        String string = AppsFlyerProperties.getInstance().getString(str);
        onResponseError = (onValidateInAppFailure + 15) % UserVerificationMethods.USER_VERIFY_PATTERN;
        return string;
    }

    @SuppressLint({"PrivateApi"})
    private static String AFInAppEventType(String str) {
        int i5 = onResponseError + 9;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        try {
            if (i5 % 2 != 0) {
                Class.forName("android.os.SystemProperties");
                throw null;
            }
            String str2 = (String) Class.forName("android.os.SystemProperties").getMethod("get", String.class).invoke(null, str);
            onValidateInAppFailure = (onResponseError + 97) % UserVerificationMethods.USER_VERIFY_PATTERN;
            return str2;
        } catch (Throwable th) {
            AFLogger.afErrorLog(th.getMessage(), th);
            return null;
        }
    }

    private String AFKeystoreWrapper(Context context, String str) {
        int i5 = onResponseError;
        int i6 = i5 + 105;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 != 0) {
            throw null;
        }
        if (context == null) {
            onValidateInAppFailure = (i5 + 45) % UserVerificationMethods.USER_VERIFY_PATTERN;
            return null;
        }
        AFInAppEventType(context);
        return values().AFKeystoreWrapper().values(str);
    }

    private static void afInfoLog(Context context) {
        int i5;
        if (AFa1bSDK.valueOf()) {
            AFLogger.afRDLog("OPPO device found");
            i5 = 23;
        } else {
            i5 = 18;
        }
        int i6 = Build.VERSION.SDK_INT;
        if (i6 < i5 || values(AppsFlyerProperties.DISABLE_KEYSTORE, true)) {
            StringBuilder sb = new StringBuilder("OS SDK is=");
            sb.append(i6);
            sb.append("; no KeyStore usage");
            AFLogger.afRDLog(sb.toString());
            return;
        }
        StringBuilder sb2 = new StringBuilder("OS SDK is=");
        sb2.append(i6);
        sb2.append("; use KeyStore");
        AFLogger.afRDLog(sb2.toString());
        AFKeystoreWrapper aFKeystoreWrapper = new AFKeystoreWrapper(context);
        if (aFKeystoreWrapper.values()) {
            String AFInAppEventType2 = aFKeystoreWrapper.AFInAppEventType();
            synchronized (aFKeystoreWrapper.AFInAppEventType) {
                aFKeystoreWrapper.values++;
                AFLogger.afInfoLog("Deleting key with alias: ".concat(String.valueOf(AFInAppEventType2)));
                try {
                    synchronized (aFKeystoreWrapper.AFInAppEventType) {
                        aFKeystoreWrapper.valueOf.deleteEntry(AFInAppEventType2);
                    }
                } catch (KeyStoreException e5) {
                    StringBuilder sb3 = new StringBuilder("Exception ");
                    sb3.append(e5.getMessage());
                    sb3.append(" occurred");
                    AFLogger.afErrorLog(sb3.toString(), e5);
                }
            }
        } else {
            aFKeystoreWrapper.AFInAppEventParameterName = AFb1rSDK.valueOf(new WeakReference(context));
            aFKeystoreWrapper.values = 0;
        }
        aFKeystoreWrapper.AFKeystoreWrapper(aFKeystoreWrapper.AFInAppEventType());
        AFInAppEventType("KSAppsFlyerId", aFKeystoreWrapper.AFKeystoreWrapper());
        AFInAppEventType("KSAppsFlyerRICounter", String.valueOf(aFKeystoreWrapper.valueOf()));
    }

    static Application valueOf(AFa1dSDK aFa1dSDK) {
        int i5 = onResponseError + 123;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        Application application = aFa1dSDK.onInstallConversionFailureNative;
        if (i6 == 0) {
            return application;
        }
        throw null;
    }

    private static String values(Activity activity) {
        Intent intent;
        onResponseError = (onValidateInAppFailure + 121) % UserVerificationMethods.USER_VERIFY_PATTERN;
        String str = null;
        if (activity != null && (intent = activity.getIntent()) != null) {
            int i5 = onValidateInAppFailure + 95;
            onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            try {
                if (i5 % 2 == 0) {
                    intent.getExtras();
                    throw null;
                }
                Bundle extras = intent.getExtras();
                if (extras != null && (str = extras.getString("af")) != null) {
                    onResponseError = (onValidateInAppFailure + 117) % UserVerificationMethods.USER_VERIFY_PATTERN;
                    AFLogger.afInfoLog("Push Notification received af payload = ".concat(str));
                    extras.remove("af");
                    activity.setIntent(intent.putExtras(extras));
                }
            } catch (Throwable th) {
                AFLogger.afErrorLog(th.getMessage(), th);
            }
        }
        return str;
    }

    @Override
    public final void start(@NonNull Context context, String str, final AppsFlyerRequestListener appsFlyerRequestListener) {
        if (values().onAttributionFailureNative().AFKeystoreWrapper()) {
            return;
        }
        if (!this.init) {
            AFLogger.afWarnLog("ERROR: AppsFlyer SDK is not initialized! The API call 'start()' must be called after the 'init(String, AppsFlyerConversionListener)' API method, which should be called on the Application's onCreate.");
            if (str == null) {
                if (appsFlyerRequestListener != null) {
                    int i5 = onValidateInAppFailure + 97;
                    onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
                    if (i5 % 2 == 0) {
                        appsFlyerRequestListener.onError(36, "No dev key");
                        return;
                    } else {
                        appsFlyerRequestListener.onError(41, "No dev key");
                        return;
                    }
                }
                return;
            }
        }
        AFInAppEventType(context);
        final AFf1xSDK afDebugLog = values().afDebugLog();
        afDebugLog.AFInAppEventParameterName(AFa1tSDK.AFInAppEventType(context));
        this.onInstallConversionFailureNative = (Application) context.getApplicationContext();
        values().afErrorLogForExcManagerOnly().AFKeystoreWrapper("start", str);
        String str2 = valueOf;
        AFLogger.afInfoLog(String.format("Starting AppsFlyer: (v%s.%s)", "6.11.1", str2));
        StringBuilder sb = new StringBuilder("Build Number: ");
        sb.append(str2);
        AFLogger.afInfoLog(sb.toString());
        AppsFlyerProperties.getInstance().loadProperties(this.onInstallConversionFailureNative.getApplicationContext());
        if (!TextUtils.isEmpty(str)) {
            onValidateInAppFailure = (onResponseError + 5) % UserVerificationMethods.USER_VERIFY_PATTERN;
            values().AppsFlyer2dXConversionCallback().valueOf = str;
            AFb1tSDK.values(str);
        } else if (!(!TextUtils.isEmpty(values().AppsFlyer2dXConversionCallback().valueOf))) {
            onResponseError = (onValidateInAppFailure + 27) % UserVerificationMethods.USER_VERIFY_PATTERN;
            AFLogger.afWarnLog("ERROR: AppsFlyer SDK is not initialized! You must provide AppsFlyer Dev-Key either in the 'init' API method (should be called on Application's onCreate),or in the start() API (should be called on Activity's onCreate).");
            if (appsFlyerRequestListener != null) {
                appsFlyerRequestListener.onError(41, "No dev key");
                return;
            }
            return;
        }
        values().afInfoLog().values(null);
        afWarnLog();
        AFLogger(this.onInstallConversionFailureNative.getBaseContext());
        if (this.onDeepLinkingNative) {
            valueOf(this.onInstallConversionFailureNative.getApplicationContext());
        }
        AFc1wSDK aFc1wSDK = this.onDeepLinking;
        if (aFc1wSDK.values == null) {
            aFc1wSDK.values = new AFc1xSDK(aFc1wSDK.AFInAppEventParameterName(), aFc1wSDK.onResponseErrorNative());
        }
        aFc1wSDK.values.AFInAppEventType(context, new AFc1ySDK.AFa1xSDK() {
            @Override
            public final void AFInAppEventType(Context context2) {
                AFLogger.afInfoLog("onBecameBackground");
                AFf1xSDK aFf1xSDK = afDebugLog;
                long currentTimeMillis = System.currentTimeMillis();
                long j5 = aFf1xSDK.afRDLog;
                if (j5 != 0) {
                    long j6 = currentTimeMillis - j5;
                    if (j6 > 0 && j6 < 1000) {
                        j6 = 1000;
                    }
                    long seconds = TimeUnit.MILLISECONDS.toSeconds(j6);
                    aFf1xSDK.afWarnLog = seconds;
                    aFf1xSDK.AFKeystoreWrapper.AFInAppEventType("prev_session_dur", seconds);
                } else {
                    AFLogger.afInfoLog("Metrics: fg ts is missing");
                }
                AFLogger.afInfoLog("callStatsBackground background call");
                AFa1dSDK.this.AFKeystoreWrapper(new WeakReference<>(context2));
                AFa1dSDK.this.values().onDeepLinking().values();
                AFb1uSDK afErrorLogForExcManagerOnly = AFa1dSDK.this.values().afErrorLogForExcManagerOnly();
                if (afErrorLogForExcManagerOnly.afRDLog()) {
                    afErrorLogForExcManagerOnly.values();
                    if (context2 != null && !AppsFlyerLib.getInstance().isStopped()) {
                        afErrorLogForExcManagerOnly.AFInAppEventParameterName(context2.getPackageName(), context2.getPackageManager(), AFa1dSDK.this.values());
                    }
                    afErrorLogForExcManagerOnly.valueOf();
                } else {
                    AFLogger.afDebugLog("RD status is OFF");
                }
                AFa1dSDK.this.values().AFLogger$LogLevel().AFKeystoreWrapper();
            }

            @Override
            public final void valueOf(Activity activity) {
                afDebugLog.AFInAppEventType();
                AFa1dSDK.this.values().afInfoLog().values(null);
                AFa1dSDK.AFInAppEventType(AFa1dSDK.this);
                int AFInAppEventType2 = AFa1dSDK.this.AFInAppEventType(AFa1dSDK.AFInAppEventParameterName(activity), false);
                AFLogger.afInfoLog("onBecameForeground");
                if (AFInAppEventType2 < 2) {
                    AFa1dSDK.this.values().AFLogger$LogLevel().AFInAppEventParameterName();
                }
                AFf1oSDK aFf1oSDK = new AFf1oSDK();
                if (activity != null) {
                    AFa1dSDK.this.values().onResponseErrorNative().values(aFf1oSDK.AFInAppEventType(), activity.getIntent(), activity.getApplication());
                }
                AFa1dSDK aFa1dSDK = AFa1dSDK.this;
                aFf1oSDK.AFInAppEventParameterName = appsFlyerRequestListener;
                aFa1dSDK.valueOf(aFf1oSDK, activity);
            }
        });
    }

    public static String AFInAppEventParameterName(SimpleDateFormat simpleDateFormat, long j5) {
        simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
        String format = simpleDateFormat.format(new Date(j5));
        int i5 = onValidateInAppFailure + 61;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            int i6 = 91 / 0;
        }
        return format;
    }

    private String AFInAppEventType(SimpleDateFormat simpleDateFormat, Context context) {
        String str;
        onValidateInAppFailure = (onResponseError + 61) % UserVerificationMethods.USER_VERIFY_PATTERN;
        String string = AFInAppEventParameterName(context).getString("appsFlyerFirstInstall", null);
        if (string == null) {
            if (afRDLog(context)) {
                AFLogger.afDebugLog("AppsFlyer: first launch detected");
                str = simpleDateFormat.format(new Date());
            } else {
                str = "";
            }
            string = str;
            AFKeystoreWrapper(context).AFKeystoreWrapper("appsFlyerFirstInstall", string);
            onResponseError = (onValidateInAppFailure + 125) % UserVerificationMethods.USER_VERIFY_PATTERN;
        }
        AFLogger.afInfoLog("AppsFlyer: first launch date: ".concat(String.valueOf(string)));
        return string;
    }

    private static String AFKeystoreWrapper(String str) {
        int indexOf = str.indexOf(63);
        if (indexOf != -1) {
            return str.substring(indexOf);
        }
        int i5 = onResponseError + 105;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            int i6 = 46 / 0;
        }
        return "";
    }

    public static AFa1dSDK valueOf() {
        int i5 = (onValidateInAppFailure + 45) % UserVerificationMethods.USER_VERIFY_PATTERN;
        onResponseError = i5;
        AFa1dSDK aFa1dSDK = afInfoLog;
        int i6 = i5 + 89;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 == 0) {
            return aFa1dSDK;
        }
        throw null;
    }

    public static String values(AFb1aSDK aFb1aSDK, String str) {
        onValidateInAppFailure = (onResponseError + 111) % UserVerificationMethods.USER_VERIFY_PATTERN;
        String AFInAppEventParameterName = aFb1aSDK.AFInAppEventParameterName("CACHED_CHANNEL", null);
        if (AFInAppEventParameterName == null) {
            aFb1aSDK.AFKeystoreWrapper("CACHED_CHANNEL", str);
            return str;
        }
        int i5 = onValidateInAppFailure + 103;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            return AFInAppEventParameterName;
        }
        throw null;
    }

    private void AFInAppEventParameterName(Context context, AFf1vSDK aFf1vSDK) {
        onValidateInAppFailure = (onResponseError + 35) % UserVerificationMethods.USER_VERIFY_PATTERN;
        AFInAppEventType(context);
        AFf1xSDK afDebugLog = values().afDebugLog();
        AFf1zSDK AFInAppEventType2 = AFa1tSDK.AFInAppEventType(context);
        if (!(!afDebugLog.values())) {
            onValidateInAppFailure = (onResponseError + 105) % UserVerificationMethods.USER_VERIFY_PATTERN;
            afDebugLog.valueOf.put("api_name", aFf1vSDK.toString());
            afDebugLog.AFInAppEventParameterName(AFInAppEventType2);
        }
        afDebugLog.AFInAppEventType();
        int i5 = onValidateInAppFailure + 101;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            throw null;
        }
    }

    public static Map<String, Object> AFInAppEventType(Map<String, Object> map) {
        int i5 = onValidateInAppFailure + 107;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            map.containsKey("meta");
            throw null;
        }
        if (map.containsKey("meta")) {
            onResponseError = (onValidateInAppFailure + 19) % UserVerificationMethods.USER_VERIFY_PATTERN;
            return (Map) map.get("meta");
        }
        HashMap hashMap = new HashMap();
        map.put("meta", hashMap);
        return hashMap;
    }

    @NonNull
    @Deprecated
    public static String AFKeystoreWrapper(HttpURLConnection httpURLConnection) {
        InputStreamReader inputStreamReader;
        String obj;
        Object obj2;
        StringBuilder sb = new StringBuilder();
        BufferedReader bufferedReader = null;
        try {
            try {
                InputStream errorStream = httpURLConnection.getErrorStream();
                if (errorStream == null) {
                    errorStream = httpURLConnection.getInputStream();
                }
                inputStreamReader = new InputStreamReader(errorStream, Charset.defaultCharset());
                try {
                    BufferedReader bufferedReader2 = new BufferedReader(inputStreamReader);
                    boolean z5 = false;
                    while (true) {
                        try {
                            String readLine = bufferedReader2.readLine();
                            if (readLine == null) {
                                break;
                            }
                            if (z5) {
                                onValidateInAppFailure = (onResponseError + 73) % UserVerificationMethods.USER_VERIFY_PATTERN;
                                obj2 = '\n';
                            } else {
                                obj2 = "";
                            }
                            sb.append(obj2);
                            sb.append(readLine);
                            z5 = true;
                        } catch (Throwable th) {
                            th = th;
                            bufferedReader = bufferedReader2;
                            try {
                                StringBuilder sb2 = new StringBuilder("Could not read connection response from: ");
                                sb2.append(httpURLConnection.getURL().toString());
                                AFLogger.afErrorLog(sb2.toString(), th);
                                if (bufferedReader != null) {
                                    bufferedReader.close();
                                }
                                if (inputStreamReader != null) {
                                    int i5 = onValidateInAppFailure + 113;
                                    onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
                                    if (i5 % 2 == 0) {
                                        inputStreamReader.close();
                                        int i6 = 81 / 0;
                                    } else {
                                        inputStreamReader.close();
                                    }
                                }
                                obj = sb.toString();
                                new JSONObject(obj);
                                return obj;
                            } catch (Throwable th2) {
                                if (bufferedReader != null) {
                                    try {
                                        bufferedReader.close();
                                    } catch (Throwable th3) {
                                        AFLogger.afErrorLogForExcManagerOnly("readServerResponse error", th3);
                                        throw th2;
                                    }
                                }
                                if (inputStreamReader != null) {
                                    onValidateInAppFailure = (onResponseError + 23) % UserVerificationMethods.USER_VERIFY_PATTERN;
                                    inputStreamReader.close();
                                    onValidateInAppFailure = (onResponseError + 73) % UserVerificationMethods.USER_VERIFY_PATTERN;
                                }
                                throw th2;
                            }
                        }
                    }
                    bufferedReader2.close();
                    inputStreamReader.close();
                } catch (Throwable th4) {
                    th = th4;
                }
            } catch (Throwable th5) {
                AFLogger.afErrorLogForExcManagerOnly("readServerResponse error", th5);
            }
        } catch (Throwable th6) {
            th = th6;
            inputStreamReader = null;
        }
        obj = sb.toString();
        try {
            new JSONObject(obj);
            return obj;
        } catch (JSONException e5) {
            AFLogger.afErrorLogForExcManagerOnly("error while parsing readServerResponse", e5);
            JSONObject jSONObject = new JSONObject();
            try {
                jSONObject.put("string_response", obj);
                return jSONObject.toString();
            } catch (JSONException e6) {
                AFLogger.afErrorLogForExcManagerOnly("RESPONSE_NOT_JSON error", e6);
                return new JSONObject().toString();
            }
        }
    }

    private Runnable valueOf(final AFg1wSDK aFg1wSDK) {
        onResponseError = (onValidateInAppFailure + 33) % UserVerificationMethods.USER_VERIFY_PATTERN;
        Runnable runnable = new Runnable() {
            @Override
            public final void run() {
                AFa1dSDK.this.AFInAppEventType(aFg1wSDK);
            }
        };
        int i5 = onResponseError + 99;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            int i6 = 44 / 0;
        }
        return runnable;
    }

    static Map values(AFa1dSDK aFa1dSDK) {
        int i5 = onResponseError;
        onValidateInAppFailure = (i5 + 93) % UserVerificationMethods.USER_VERIFY_PATTERN;
        Map<String, Object> map = aFa1dSDK.onConversionDataSuccess;
        onValidateInAppFailure = (i5 + 29) % UserVerificationMethods.USER_VERIFY_PATTERN;
        return map;
    }

    @android.annotation.SuppressLint({"HardwareIds"})
    private void AFInAppEventParameterName(android.content.Context r9, java.util.Map<java.lang.String, java.lang.Object> r10) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFa1dSDK.AFInAppEventParameterName(android.content.Context, java.util.Map):void");
    }

    static void AFKeystoreWrapper() {
        onConversionDataFail = -448549057;
        onAttributionFailure = true;
        onAppOpenAttribution = new char[]{44944, 44949, 44958, 44931, 44936, 44940, 44948, 44930, 44943, 44864, 44945, 44929, 44941, 44947, 44907, 44932, 44946, 44951, 44915, 44877};
        onValidateInApp = true;
    }

    private static String valueOf(File file, String str) {
        InputStreamReader inputStreamReader;
        Properties properties;
        try {
            try {
                try {
                    properties = new Properties();
                    inputStreamReader = new InputStreamReader(new FileInputStream(file), Charset.defaultCharset());
                } catch (Throwable th) {
                    if (inputStreamReader != null) {
                        try {
                            inputStreamReader.close();
                        } catch (Throwable th2) {
                            AFLogger.afErrorLog(th2.getMessage(), th2);
                            throw th;
                        }
                    }
                    onResponseError = (onValidateInAppFailure + 71) % UserVerificationMethods.USER_VERIFY_PATTERN;
                    throw th;
                }
            } catch (FileNotFoundException unused) {
                inputStreamReader = null;
            } catch (Throwable th3) {
                th = th3;
                inputStreamReader = null;
            }
        } catch (Throwable th4) {
            AFLogger.afErrorLog(th4.getMessage(), th4);
        }
        try {
            properties.load(inputStreamReader);
            AFLogger.afInfoLog("Found PreInstall property!");
            String property = properties.getProperty(str);
            try {
                inputStreamReader.close();
            } catch (Throwable th5) {
                AFLogger.afErrorLog(th5.getMessage(), th5);
            }
            return property;
        } catch (FileNotFoundException unused2) {
            StringBuilder sb = new StringBuilder("PreInstall file wasn't found: ");
            sb.append(file.getAbsolutePath());
            AFLogger.afDebugLog(sb.toString());
            if (inputStreamReader != null) {
                inputStreamReader.close();
                onValidateInAppFailure = (onResponseError + 29) % UserVerificationMethods.USER_VERIFY_PATTERN;
            }
            return null;
        } catch (Throwable th6) {
            th = th6;
            AFLogger.afErrorLog(th.getMessage(), th);
            if (inputStreamReader != null) {
                inputStreamReader.close();
            }
            return null;
        }
    }

    public void values(Context context, Intent intent) {
        AFb1nSDK onResponseErrorNative;
        AFb1aSDK afErrorLog;
        Uri data;
        int i5 = onResponseError + 125;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        boolean z5 = false;
        AFInAppEventType(context);
        if (i6 != 0) {
            onResponseErrorNative = values().onResponseErrorNative();
            afErrorLog = values().afErrorLog();
            int i7 = 15 / 0;
        } else {
            onResponseErrorNative = values().onResponseErrorNative();
            afErrorLog = values().afErrorLog();
        }
        if (data != null && !data.toString().isEmpty()) {
            onValidateInAppFailure = (onResponseError + 53) % UserVerificationMethods.USER_VERIFY_PATTERN;
            z5 = true;
        }
        if (afErrorLog.values("ddl_sent")) {
            int i8 = onResponseError + 67;
            onValidateInAppFailure = i8 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i8 % 2 != 0) {
                throw null;
            }
            if (!z5) {
                onResponseErrorNative.AFKeystoreWrapper("No direct deep link", null);
                return;
            }
        }
        onResponseErrorNative.values(new HashMap(), intent, context);
    }

    public final void AFInAppEventType(@NonNull Context context) {
        AFc1wSDK aFc1wSDK;
        int i5 = onValidateInAppFailure + 13;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            aFc1wSDK = this.onDeepLinking;
            int i6 = 43 / 0;
            if (context == null) {
                return;
            }
        } else {
            aFc1wSDK = this.onDeepLinking;
            if (context == null) {
                return;
            }
        }
        AFc1tSDK aFc1tSDK = aFc1wSDK.AFKeystoreWrapper;
        if (context != null) {
            aFc1tSDK.AFInAppEventType = context.getApplicationContext();
            onValidateInAppFailure = (onResponseError + 117) % UserVerificationMethods.USER_VERIFY_PATTERN;
        }
    }

    private static void AFInAppEventParameterName(Context context, Map<String, Object> map, String str) {
        onResponseError = (onValidateInAppFailure + 97) % UserVerificationMethods.USER_VERIFY_PATTERN;
        SharedPreferences AFInAppEventParameterName = AFInAppEventParameterName(context);
        SharedPreferences.Editor edit = AFInAppEventParameterName.edit();
        try {
            String string = AFInAppEventParameterName.getString("prev_event_name", null);
            if (string != null) {
                JSONObject jSONObject = new JSONObject();
                jSONObject.put("prev_event_timestamp", AFInAppEventParameterName.getLong("prev_event_timestamp", -1L));
                jSONObject.put("prev_event_name", string);
                map.put("prev_event", jSONObject);
            }
            edit.putString("prev_event_name", str).putLong("prev_event_timestamp", System.currentTimeMillis()).apply();
            onResponseError = (onValidateInAppFailure + 119) % UserVerificationMethods.USER_VERIFY_PATTERN;
        } catch (Exception e5) {
            AFLogger.afErrorLog("Error while processing previous event.", e5);
        }
    }

    private static void AFKeystoreWrapper(Context context, Map<String, Object> map) {
        WindowManager windowManager = (WindowManager) context.getSystemService("window");
        if (windowManager != null) {
            int i5 = onValidateInAppFailure + 99;
            onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            int i6 = i5 % 2;
            Display defaultDisplay = windowManager.getDefaultDisplay();
            if (i6 == 0) {
                defaultDisplay.getRotation();
                throw null;
            }
            int rotation = defaultDisplay.getRotation();
            map.put("sc_o", rotation != 0 ? rotation != 1 ? rotation != 2 ? rotation != 3 ? "" : "lr" : "pr" : "l" : "p");
            onResponseError = (onValidateInAppFailure + 99) % UserVerificationMethods.USER_VERIFY_PATTERN;
        }
    }

    private static String valueOf(String str) {
        int i5;
        int i6 = onResponseError + 41;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 != 0) {
            throw null;
        }
        if (str == null) {
            return null;
        }
        if (str.matches("fb\\d*?://authorize.*")) {
            int i7 = onValidateInAppFailure + 49;
            onResponseError = i7 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i7 % 2 == 0) {
                str.contains("access_token");
                throw null;
            }
            if (str.contains("access_token")) {
                onValidateInAppFailure = (onResponseError + 53) % UserVerificationMethods.USER_VERIFY_PATTERN;
                String AFKeystoreWrapper2 = AFKeystoreWrapper(str);
                if (AFKeystoreWrapper2.length() == 0) {
                    return str;
                }
                ArrayList arrayList = new ArrayList();
                if (AFKeystoreWrapper2.contains("&")) {
                    arrayList = new ArrayList(Arrays.asList(AFKeystoreWrapper2.split("&")));
                } else {
                    arrayList.add(AFKeystoreWrapper2);
                }
                StringBuilder sb = new StringBuilder();
                Iterator it = arrayList.iterator();
                while (it.hasNext()) {
                    int i8 = onResponseError + 49;
                    onValidateInAppFailure = i8 % UserVerificationMethods.USER_VERIFY_PATTERN;
                    if (i8 % 2 != 0) {
                        ((String) it.next()).contains("access_token");
                        throw null;
                    }
                    String str2 = (String) it.next();
                    if (str2.contains("access_token")) {
                        it.remove();
                    } else if (sb.length() != 0) {
                        int i9 = onResponseError + 37;
                        onValidateInAppFailure = i9 % UserVerificationMethods.USER_VERIFY_PATTERN;
                        int i10 = i9 % 2;
                        sb.append("&");
                        if (i10 != 0) {
                            i5 = 99;
                            int i11 = i5 / 0;
                        }
                        sb.append(str2);
                    } else {
                        if (!str2.startsWith("?")) {
                            int i12 = onResponseError + 3;
                            onValidateInAppFailure = i12 % UserVerificationMethods.USER_VERIFY_PATTERN;
                            int i13 = i12 % 2;
                            sb.append("?");
                            if (i13 != 0) {
                                i5 = 23;
                                int i112 = i5 / 0;
                            }
                        }
                        sb.append(str2);
                    }
                }
                return str.replace(AFKeystoreWrapper2, sb.toString());
            }
        }
        return str;
    }

    private void values(Context context, String str) {
        byte b5 = 0;
        AFa1rSDK AFInAppEventType2 = new AFf1qSDK().AFInAppEventType(values().AFKeystoreWrapper().values.AFInAppEventType("appsFlyerCount", 0));
        AFInAppEventType2.AFLogger = str;
        if (str != null) {
            onResponseError = (onValidateInAppFailure + 69) % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (str.length() > 5) {
                onValidateInAppFailure = (onResponseError + 111) % UserVerificationMethods.USER_VERIFY_PATTERN;
                if (valueOf(AFInAppEventType2, AFInAppEventParameterName(context))) {
                    valueOf(values().values(), new AFa1xSDK(this, AFInAppEventType2, b5), 5L, TimeUnit.MILLISECONDS);
                }
            }
        }
    }

    public final void AFInAppEventType(Context context, Intent intent) {
        if (intent.getStringExtra("appsflyer_preinstall") != null) {
            values(intent.getStringExtra("appsflyer_preinstall"));
        }
        AFLogger.afInfoLog("****** onReceive called *******");
        AppsFlyerProperties.getInstance();
        String stringExtra = intent.getStringExtra("referrer");
        AFLogger.afInfoLog("Play store referrer: ".concat(String.valueOf(stringExtra)));
        if (stringExtra != null) {
            int i5 = onResponseError + 105;
            onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i5 % 2 != 0) {
                AFKeystoreWrapper(context).AFKeystoreWrapper("referrer", stringExtra);
                AppsFlyerProperties appsFlyerProperties = AppsFlyerProperties.getInstance();
                appsFlyerProperties.set("AF_REFERRER", stringExtra);
                appsFlyerProperties.AFInAppEventType = stringExtra;
                AppsFlyerProperties.getInstance().AFKeystoreWrapper();
                throw null;
            }
            AFKeystoreWrapper(context).AFKeystoreWrapper("referrer", stringExtra);
            AppsFlyerProperties appsFlyerProperties2 = AppsFlyerProperties.getInstance();
            appsFlyerProperties2.set("AF_REFERRER", stringExtra);
            appsFlyerProperties2.AFInAppEventType = stringExtra;
            if (AppsFlyerProperties.getInstance().AFKeystoreWrapper()) {
                AFLogger.afInfoLog("onReceive: isLaunchCalled");
                AFInAppEventParameterName(context, AFf1vSDK.onReceive);
                values(context, stringExtra);
                onValidateInAppFailure = (onResponseError + 113) % UserVerificationMethods.USER_VERIFY_PATTERN;
            }
        }
    }

    private void AFInAppEventParameterName(AFa1rSDK aFa1rSDK) {
        String str;
        AFg1qSDK aFg1qSDK;
        String str2;
        String AFInAppEventType2;
        String str3;
        long j5;
        Context context = values().init().AFInAppEventType;
        if (context == null) {
            AFLogger.afDebugLog("sendWithEvent - got null context. skipping event/launch.");
            return;
        }
        SharedPreferences AFInAppEventParameterName = AFInAppEventParameterName(context);
        AppsFlyerProperties.getInstance().saveProperties(AFInAppEventParameterName);
        if (!values().AppsFlyer2dXConversionCallback().values()) {
            StringBuilder sb = new StringBuilder("sendWithEvent from activity: ");
            sb.append(context.getClass().getName());
            AFLogger.afInfoLog(sb.toString());
        }
        boolean valueOf2 = aFa1rSDK.valueOf();
        Map<String, ?> valueOf3 = valueOf(aFa1rSDK);
        String str4 = (String) valueOf3.get("appsflyerKey");
        if (str4 != null) {
            int i5 = onValidateInAppFailure + 97;
            onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i5 % 2 == 0) {
                throw null;
            }
            if (str4.length() != 0) {
                boolean z5 = true;
                if (!isStopped()) {
                    AFLogger.afInfoLog("AppsFlyerLib.sendWithEvent");
                }
                byte b5 = 0;
                int AFInAppEventType3 = AFInAppEventType(AFInAppEventParameterName, false);
                AFg1mSDK aFg1mSDK = new AFg1mSDK(this.onDeepLinking);
                Intrinsics.checkNotNullParameter(aFa1rSDK, "");
                boolean valueOf4 = aFa1rSDK.valueOf();
                boolean z6 = aFa1rSDK instanceof AFf1ySDK;
                boolean z7 = aFa1rSDK instanceof AFf1qSDK;
                if ((aFa1rSDK instanceof AFf1uSDK) || z7) {
                    str = AFg1mSDK.afErrorLog;
                    if (str == null) {
                        onValidateInAppFailure = (onResponseError + 25) % UserVerificationMethods.USER_VERIFY_PATTERN;
                        aFg1qSDK = aFg1mSDK.valueOf;
                        str2 = AFg1mSDK.AFInAppEventParameterName;
                        str = aFg1qSDK.AFInAppEventType(str2);
                    }
                    StringBuilder sb2 = new StringBuilder();
                    sb2.append(str);
                    sb2.append(aFg1mSDK.AFInAppEventType.AFKeystoreWrapper().AFInAppEventParameterName.AFInAppEventType.getPackageName());
                    String AFInAppEventParameterName2 = AFg1mSDK.AFInAppEventParameterName(sb2.toString(), z6);
                    StringBuilder sb3 = new StringBuilder();
                    sb3.append(AFInAppEventParameterName2);
                    AFInAppEventType2 = aFg1mSDK.AFInAppEventType.AFKeystoreWrapper().AFInAppEventType();
                    if (AFInAppEventType2 != null) {
                        str3 = "&channel=".concat(AFInAppEventType2);
                        onValidateInAppFailure = (onResponseError + 13) % UserVerificationMethods.USER_VERIFY_PATTERN;
                    } else {
                        str3 = null;
                    }
                    sb3.append(str3 != null ? str3 : "");
                    String obj = sb3.toString();
                    AFInAppEventParameterName(valueOf3);
                    AFa1zSDK aFa1zSDK = new AFa1zSDK(this, aFa1rSDK.AFInAppEventParameterName(obj).values(valueOf3).AFInAppEventType(AFInAppEventType3), b5);
                    if (valueOf2) {
                        boolean z8 = false;
                        for (AFg1uSDK aFg1uSDK : afErrorLogForExcManagerOnly()) {
                            if (aFg1uSDK.AFLogger == AFg1uSDK.AFa1xSDK.STARTED) {
                                StringBuilder sb4 = new StringBuilder("Failed to get ");
                                sb4.append(aFg1uSDK.values);
                                sb4.append(" referrer, wait ...");
                                AFLogger.afDebugLog(sb4.toString());
                                z8 = true;
                            }
                        }
                        if (this.onDeepLinkingNative) {
                            int i6 = onResponseError + 65;
                            onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
                            if (i6 % 2 != 0) {
                                AFVersionDeclaration();
                                throw null;
                            }
                            if (!AFVersionDeclaration()) {
                                int i7 = onResponseError + 107;
                                onValidateInAppFailure = i7 % UserVerificationMethods.USER_VERIFY_PATTERN;
                                int i8 = i7 % 2;
                                AFLogger.afDebugLog("fetching Facebook deferred AppLink data, wait ...");
                                z8 = i8 == 0;
                            }
                        }
                        if (values().AppsFlyer2dXConversionCallback().AFInAppEventParameterName()) {
                            int i9 = onValidateInAppFailure + 59;
                            onResponseError = i9 % UserVerificationMethods.USER_VERIFY_PATTERN;
                        } else {
                            z5 = z8;
                        }
                        ScheduledExecutorService values2 = values().values();
                        if (z5) {
                            j5 = 0;
                        } else {
                            onResponseError = (onValidateInAppFailure + 33) % UserVerificationMethods.USER_VERIFY_PATTERN;
                            j5 = 500;
                        }
                        valueOf(values2, aFa1zSDK, j5, TimeUnit.MILLISECONDS);
                        return;
                    }
                    z5 = false;
                    ScheduledExecutorService values22 = values().values();
                    if (z5) {
                    }
                    valueOf(values22, aFa1zSDK, j5, TimeUnit.MILLISECONDS);
                    return;
                }
                if (z6) {
                    str = AFg1mSDK.afRDLog;
                    if (str == null) {
                        int i10 = onValidateInAppFailure + 87;
                        onResponseError = i10 % UserVerificationMethods.USER_VERIFY_PATTERN;
                        if (i10 % 2 == 0) {
                            aFg1mSDK.valueOf.AFInAppEventType(AFg1mSDK.values);
                            throw null;
                        }
                        aFg1qSDK = aFg1mSDK.valueOf;
                        str2 = AFg1mSDK.values;
                        str = aFg1qSDK.AFInAppEventType(str2);
                    }
                    StringBuilder sb22 = new StringBuilder();
                    sb22.append(str);
                    sb22.append(aFg1mSDK.AFInAppEventType.AFKeystoreWrapper().AFInAppEventParameterName.AFInAppEventType.getPackageName());
                    String AFInAppEventParameterName22 = AFg1mSDK.AFInAppEventParameterName(sb22.toString(), z6);
                    StringBuilder sb32 = new StringBuilder();
                    sb32.append(AFInAppEventParameterName22);
                    AFInAppEventType2 = aFg1mSDK.AFInAppEventType.AFKeystoreWrapper().AFInAppEventType();
                    if (AFInAppEventType2 != null) {
                    }
                    sb32.append(str3 != null ? str3 : "");
                    String obj2 = sb32.toString();
                    AFInAppEventParameterName(valueOf3);
                    AFa1zSDK aFa1zSDK2 = new AFa1zSDK(this, aFa1rSDK.AFInAppEventParameterName(obj2).values(valueOf3).AFInAppEventType(AFInAppEventType3), b5);
                    if (valueOf2) {
                    }
                    z5 = false;
                    ScheduledExecutorService values222 = values().values();
                    if (z5) {
                    }
                    valueOf(values222, aFa1zSDK2, j5, TimeUnit.MILLISECONDS);
                    return;
                }
                if (!valueOf4) {
                    str = AFg1mSDK.AFLogger$LogLevel;
                    if (str == null) {
                        aFg1qSDK = aFg1mSDK.valueOf;
                        str2 = AFg1mSDK.afDebugLog;
                        str = aFg1qSDK.AFInAppEventType(str2);
                    }
                    StringBuilder sb222 = new StringBuilder();
                    sb222.append(str);
                    sb222.append(aFg1mSDK.AFInAppEventType.AFKeystoreWrapper().AFInAppEventParameterName.AFInAppEventType.getPackageName());
                    String AFInAppEventParameterName222 = AFg1mSDK.AFInAppEventParameterName(sb222.toString(), z6);
                    StringBuilder sb322 = new StringBuilder();
                    sb322.append(AFInAppEventParameterName222);
                    AFInAppEventType2 = aFg1mSDK.AFInAppEventType.AFKeystoreWrapper().AFInAppEventType();
                    if (AFInAppEventType2 != null) {
                    }
                    sb322.append(str3 != null ? str3 : "");
                    String obj22 = sb322.toString();
                    AFInAppEventParameterName(valueOf3);
                    AFa1zSDK aFa1zSDK22 = new AFa1zSDK(this, aFa1rSDK.AFInAppEventParameterName(obj22).values(valueOf3).AFInAppEventType(AFInAppEventType3), b5);
                    if (valueOf2) {
                    }
                    z5 = false;
                    ScheduledExecutorService values2222 = values().values();
                    if (z5) {
                    }
                    valueOf(values2222, aFa1zSDK22, j5, TimeUnit.MILLISECONDS);
                    return;
                }
                onValidateInAppFailure = (onResponseError + 101) % UserVerificationMethods.USER_VERIFY_PATTERN;
                if (AFInAppEventType3 < 2) {
                    str = AFg1mSDK.AFLogger;
                    if (str == null) {
                        aFg1qSDK = aFg1mSDK.valueOf;
                        str2 = AFg1mSDK.AFKeystoreWrapper;
                        str = aFg1qSDK.AFInAppEventType(str2);
                    }
                    StringBuilder sb2222 = new StringBuilder();
                    sb2222.append(str);
                    sb2222.append(aFg1mSDK.AFInAppEventType.AFKeystoreWrapper().AFInAppEventParameterName.AFInAppEventType.getPackageName());
                    String AFInAppEventParameterName2222 = AFg1mSDK.AFInAppEventParameterName(sb2222.toString(), z6);
                    StringBuilder sb3222 = new StringBuilder();
                    sb3222.append(AFInAppEventParameterName2222);
                    AFInAppEventType2 = aFg1mSDK.AFInAppEventType.AFKeystoreWrapper().AFInAppEventType();
                    if (AFInAppEventType2 != null) {
                    }
                    sb3222.append(str3 != null ? str3 : "");
                    String obj222 = sb3222.toString();
                    AFInAppEventParameterName(valueOf3);
                    AFa1zSDK aFa1zSDK222 = new AFa1zSDK(this, aFa1rSDK.AFInAppEventParameterName(obj222).values(valueOf3).AFInAppEventType(AFInAppEventType3), b5);
                    if (valueOf2) {
                    }
                    z5 = false;
                    ScheduledExecutorService values22222 = values().values();
                    if (z5) {
                    }
                    valueOf(values22222, aFa1zSDK222, j5, TimeUnit.MILLISECONDS);
                    return;
                }
                str = AFg1mSDK.getLevel;
                if (str == null) {
                    aFg1qSDK = aFg1mSDK.valueOf;
                    str2 = AFg1mSDK.afInfoLog;
                    str = aFg1qSDK.AFInAppEventType(str2);
                }
                StringBuilder sb22222 = new StringBuilder();
                sb22222.append(str);
                sb22222.append(aFg1mSDK.AFInAppEventType.AFKeystoreWrapper().AFInAppEventParameterName.AFInAppEventType.getPackageName());
                String AFInAppEventParameterName22222 = AFg1mSDK.AFInAppEventParameterName(sb22222.toString(), z6);
                StringBuilder sb32222 = new StringBuilder();
                sb32222.append(AFInAppEventParameterName22222);
                AFInAppEventType2 = aFg1mSDK.AFInAppEventType.AFKeystoreWrapper().AFInAppEventType();
                if (AFInAppEventType2 != null) {
                }
                sb32222.append(str3 != null ? str3 : "");
                String obj2222 = sb32222.toString();
                AFInAppEventParameterName(valueOf3);
                AFa1zSDK aFa1zSDK2222 = new AFa1zSDK(this, aFa1rSDK.AFInAppEventParameterName(obj2222).values(valueOf3).AFInAppEventType(AFInAppEventType3), b5);
                if (valueOf2) {
                }
                z5 = false;
                ScheduledExecutorService values222222 = values().values();
                if (z5) {
                }
                valueOf(values222222, aFa1zSDK2222, j5, TimeUnit.MILLISECONDS);
                return;
            }
        }
        AFLogger.afDebugLog("Not sending data yet, waiting for dev key");
        AppsFlyerRequestListener appsFlyerRequestListener = aFa1rSDK.AFInAppEventParameterName;
        if (appsFlyerRequestListener != null) {
            appsFlyerRequestListener.onError(41, "No dev key");
        }
    }

    private void AFInAppEventType(Context context, String str, Map<String, Object> map) {
        Activity activity;
        AFf1tSDK aFf1tSDK = new AFf1tSDK();
        aFf1tSDK.afInfoLog = str;
        aFf1tSDK.AFKeystoreWrapper = map;
        if (context instanceof Activity) {
            int i5 = onValidateInAppFailure;
            int i6 = i5 + 7;
            onResponseError = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
            activity = (Activity) context;
            if (i6 % 2 == 0) {
                int i7 = 13 / 0;
            }
            onResponseError = (i5 + 29) % UserVerificationMethods.USER_VERIFY_PATTERN;
        } else {
            activity = null;
        }
        valueOf(aFf1tSDK, activity);
    }

    final void AFKeystoreWrapper(WeakReference<Context> weakReference) {
        if (weakReference.get() == null) {
            return;
        }
        AFLogger.afInfoLog("app went to background");
        SharedPreferences AFInAppEventParameterName = AFInAppEventParameterName(weakReference.get());
        AppsFlyerProperties.getInstance().saveProperties(AFInAppEventParameterName);
        long j5 = values().afDebugLog().afWarnLog;
        HashMap hashMap = new HashMap();
        String str = values().AppsFlyer2dXConversionCallback().valueOf;
        if (str == null) {
            AFLogger.afWarnLog("[callStats] AppsFlyer's SDK cannot send any event without providing DevKey.");
            return;
        }
        String AFInAppEventParameterName2 = AFInAppEventParameterName("KSAppsFlyerId");
        if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, false)) {
            int i5 = onResponseError + 53;
            onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            int i6 = i5 % 2;
            hashMap.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
            if (i6 != 0) {
                int i7 = 61 / 0;
            }
        }
        AFa1eSDK AFInAppEventParameterName3 = AFa1fSDK.AFInAppEventParameterName(weakReference.get().getContentResolver());
        if (AFInAppEventParameterName3 != null) {
            int i8 = onValidateInAppFailure + 5;
            onResponseError = i8 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i8 % 2 == 0) {
                hashMap.put("amazon_aid", AFInAppEventParameterName3.AFKeystoreWrapper);
                hashMap.put("amazon_aid_limit", String.valueOf(AFInAppEventParameterName3.valueOf));
                throw null;
            }
            hashMap.put("amazon_aid", AFInAppEventParameterName3.AFKeystoreWrapper);
            hashMap.put("amazon_aid_limit", String.valueOf(AFInAppEventParameterName3.valueOf));
        }
        String string = AppsFlyerProperties.getInstance().getString("advertiserId");
        if (string != null) {
            hashMap.put("advertiserId", string);
        }
        hashMap.put("app_id", weakReference.get().getPackageName());
        hashMap.put("devkey", str);
        hashMap.put("uid", AFb1rSDK.valueOf(weakReference));
        hashMap.put("time_in_app", String.valueOf(j5));
        hashMap.put("statType", "user_closed_app");
        hashMap.put("platform", "Android");
        hashMap.put("launch_counter", Integer.toString(AFInAppEventType(AFInAppEventParameterName, false)));
        hashMap.put(AppsFlyerProperties.CHANNEL, values().AFKeystoreWrapper().AFInAppEventType());
        if (AFInAppEventParameterName2 != null) {
            onValidateInAppFailure = (onResponseError + 55) % UserVerificationMethods.USER_VERIFY_PATTERN;
        } else {
            AFInAppEventParameterName2 = "";
        }
        hashMap.put("originalAppsflyerId", AFInAppEventParameterName2);
        if (this.onInstallConversionDataLoadedNative) {
            AFf1nSDK aFf1nSDK = new AFf1nSDK();
            ((AFf1sSDK) aFf1nSDK).afRDLog = isStopped();
            AFe1uSDK aFe1uSDK = new AFe1uSDK((AFf1nSDK) aFf1nSDK.AFInAppEventType(values().AFKeystoreWrapper().values.AFInAppEventType("appsFlyerCount", 0)).values(hashMap).AFInAppEventParameterName(String.format(afRDLog, AppsFlyerLib.getInstance().getHostPrefix(), valueOf().getHostName())), values());
            AFd1mSDK level = values().getLevel();
            level.AFKeystoreWrapper.execute(new AFd1mSDK.AnonymousClass5(aFe1uSDK));
            return;
        }
        AFLogger.afDebugLog("Stats call is disabled, ignore ...");
        int i9 = onValidateInAppFailure + 55;
        onResponseError = i9 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i9 % 2 == 0) {
            int i10 = 39 / 0;
        }
    }

    public final Map<String, Object> valueOf(AFa1rSDK aFa1rSDK) {
        Object obj;
        String str;
        String str2;
        String str3;
        AppsFlyerProperties appsFlyerProperties;
        AFe1eSDK afWarnLog;
        String str4;
        Object string;
        String str5;
        String AFInAppEventParameterName;
        Object AFInAppEventParameterName2;
        String str6;
        PackageManager.NameNotFoundException nameNotFoundException;
        String str7;
        AppsFlyerProperties appsFlyerProperties2;
        AFa1eSDK AFInAppEventParameterName3;
        AFb1eSDK aFb1eSDK;
        Object obj2;
        PackageInfo packageInfo;
        Object valueOf2;
        Context context = values().init().AFInAppEventType;
        String str8 = values().AppsFlyer2dXConversionCallback().valueOf;
        String str9 = aFa1rSDK.afInfoLog;
        Map map = aFa1rSDK.AFKeystoreWrapper;
        if (map == null) {
            map = new HashMap();
        }
        Object jSONObject = new JSONObject(map).toString();
        String str10 = aFa1rSDK.AFLogger;
        SharedPreferences AFInAppEventParameterName4 = AFInAppEventParameterName(context);
        boolean valueOf3 = aFa1rSDK.valueOf();
        Object obj3 = aFa1rSDK.values;
        Map<String, Object> map2 = aFa1rSDK.AFInAppEventType;
        AFa1fSDK.AFKeystoreWrapper(context, map2);
        Boolean bool = AFa1fSDK.AFInAppEventType;
        if (bool == null || bool.booleanValue()) {
            obj = obj3;
            str = "Exception while collecting facebook's attribution ID. ";
            str2 = "yyyy-MM-dd_HHmmssZ";
        } else {
            obj = obj3;
            str2 = "yyyy-MM-dd_HHmmssZ";
            str = "Exception while collecting facebook's attribution ID. ";
            AFInAppEventType(map2).put("ad_ids_disabled", Boolean.TRUE);
        }
        long time = new Date().getTime();
        Object[] objArr = new Object[1];
        values(null, "\u0089\u0086\u0081\u0084\u0088\u0087\u0086\u0085\u0084\u0083\u0082\u0081", null, TextUtils.indexOf("", "", 0) + 127, objArr);
        map2.put(((String) objArr[0]).intern(), Long.toString(time));
        Object valueOf4 = AFc1uSDK.valueOf(context, time);
        if (valueOf4 != null) {
            map2.put("cksm_v1", valueOf4);
        }
        try {
            if (isStopped()) {
                str3 = "Reporting has been stopped";
            } else {
                StringBuilder sb = new StringBuilder("******* sendTrackingWithEvent: ");
                sb.append(valueOf3 ? "Launch" : str9);
                str3 = sb.toString();
            }
            AFLogger.afInfoLog(str3);
            values().onInstallConversionDataLoadedNative().AFKeystoreWrapper();
            try {
                List asList = Arrays.asList(context.getPackageManager().getPackageInfo(context.getPackageName(), 4096).requestedPermissions);
                if (!asList.contains("android.permission.INTERNET")) {
                    AFLogger.afWarnLog("Permission android.permission.INTERNET is missing in the AndroidManifest.xml");
                }
                if (!asList.contains("android.permission.ACCESS_NETWORK_STATE")) {
                    AFLogger.afWarnLog("Permission android.permission.ACCESS_NETWORK_STATE is missing in the AndroidManifest.xml");
                }
                if (Build.VERSION.SDK_INT > 32 && !asList.contains("com.google.android.gms.permission.AD_ID")) {
                    AFLogger.afWarnLog("Permission com.google.android.gms.permission.AD_ID is missing in the AndroidManifest.xml");
                }
            } catch (Exception e5) {
                AFLogger.afErrorLog("Exception while validation permissions. ", e5);
            }
            Object[] objArr2 = new Object[1];
            values(null, "\u008a", null, 127 - KeyEvent.normalizeMetaState(0), objArr2);
            map2.put("af_events_api", ((String) objArr2[0]).intern());
            Object[] objArr3 = new Object[1];
            values(null, "\u008e\u008d\u0081\u008c\u008b", null, 175 - AndroidCharacter.getMirror('0'), objArr3);
            map2.put(((String) objArr3[0]).intern(), Build.BRAND);
            map2.put("device", Build.DEVICE);
            map2.put("product", Build.PRODUCT);
            map2.put("sdk", Integer.toString(Build.VERSION.SDK_INT));
            map2.put("model", Build.MODEL);
            map2.put("deviceType", Build.TYPE);
            AFKeystoreWrapper(context, map2);
            appsFlyerProperties = AppsFlyerProperties.getInstance();
            afWarnLog = values().afWarnLog();
            AFf1xSDK afDebugLog = values().afDebugLog();
            if (valueOf3) {
                if (afRDLog(context)) {
                    if (!appsFlyerProperties.isOtherSdkStringDisabled()) {
                        map2.put("batteryLevel", String.valueOf(values().onResponseNative().valueOf(context).AFKeystoreWrapper));
                    }
                    afInfoLog(context);
                    UiModeManager uiModeManager = (UiModeManager) context.getSystemService(UiModeManager.class);
                    if (uiModeManager != null && uiModeManager.getCurrentModeType() == 4) {
                        map2.put("tv", Boolean.TRUE);
                    }
                    if (AFf1wSDK.AFKeystoreWrapper(context)) {
                        map2.put("inst_app", Boolean.TRUE);
                    }
                }
                map2.put("timepassedsincelastlaunch", Long.toString(afErrorLogForExcManagerOnly(context)));
                AFKeystoreWrapper(map2);
                AFInAppEventType(map2, afDebugLog);
                Object obj4 = this.onAttributionFailureNative;
                if (obj4 != null) {
                    map2.put("phone", obj4);
                }
                if (!TextUtils.isEmpty(str10)) {
                    map2.put("referrer", str10);
                }
                Object string2 = AFInAppEventParameterName4.getString("extraReferrers", null);
                if (string2 != null) {
                    map2.put("extraReferrers", string2);
                }
                String referrer = appsFlyerProperties.getReferrer(context);
                if (!TextUtils.isEmpty(referrer) && map2.get("referrer") == null) {
                    map2.put("referrer", referrer);
                }
                long j5 = afDebugLog.afWarnLog;
                str4 = AppsFlyerProperties.EXTENSION;
                if (j5 != 0) {
                    map2.put("prev_session_dur", Long.valueOf(j5));
                }
                Application application = AFb1fSDK.AFKeystoreWrapper;
                map2.put("exception_number", Long.valueOf(application == null ? -1L : AFInAppEventParameterName(application).getLong("exception_number", 0L)));
                AFb1dSDK aFb1dSDK = this.onResponseNative;
                if (aFb1dSDK != null) {
                    if (!aFb1dSDK.AFInAppEventType.isEmpty()) {
                        map2.put("partner_data", aFb1dSDK.AFInAppEventType);
                    }
                    if (!aFb1dSDK.AFKeystoreWrapper.isEmpty()) {
                        AFInAppEventType(map2).put("partner_data", aFb1dSDK.AFKeystoreWrapper);
                        aFb1dSDK.AFKeystoreWrapper = new HashMap();
                    }
                }
            } else {
                str4 = AppsFlyerProperties.EXTENSION;
                AFInAppEventParameterName(context, map2, str9);
            }
            Object AFInAppEventParameterName5 = AFInAppEventParameterName("KSAppsFlyerId");
            String AFInAppEventParameterName6 = AFInAppEventParameterName("KSAppsFlyerRICounter");
            if (AFInAppEventParameterName5 != null && AFInAppEventParameterName6 != null && Integer.parseInt(AFInAppEventParameterName6) > 0) {
                map2.put("reinstallCounter", AFInAppEventParameterName6);
                map2.put("originalAppsflyerId", AFInAppEventParameterName5);
            }
            Object AFInAppEventParameterName7 = AFInAppEventParameterName(AppsFlyerProperties.ADDITIONAL_CUSTOM_DATA);
            if (AFInAppEventParameterName7 != null) {
                map2.put("customData", AFInAppEventParameterName7);
            }
            map2.putAll(this.onDeepLinking.afRDLog().AFKeystoreWrapper());
            String string3 = appsFlyerProperties.getString(str4);
            if (string3 != null && string3.length() > 0) {
                map2.put(str4, string3);
            }
            String AFInAppEventType2 = values().AFKeystoreWrapper().AFInAppEventType();
            String values2 = values(AFKeystoreWrapper(context), AFInAppEventType2);
            if ((values2 != null && !values2.equals(AFInAppEventType2)) || (values2 == null && AFInAppEventType2 != null)) {
                map2.put("af_latestchannel", AFInAppEventType2);
            }
            String afErrorLog = afErrorLog(context);
            if (afErrorLog != null) {
                map2.put("af_installstore", afErrorLog.toLowerCase(Locale.getDefault()));
            }
            String AFVersionDeclaration = AFVersionDeclaration(context);
            if (AFVersionDeclaration != null) {
                map2.put("af_preinstall_name", AFVersionDeclaration.toLowerCase(Locale.getDefault()));
            }
            String level = getLevel(context);
            if (level != null) {
                map2.put("af_currentstore", level.toLowerCase(Locale.getDefault()));
            }
            if (str8 == null || str8.length() <= 0) {
                String str11 = values().AppsFlyer2dXConversionCallback().valueOf;
                if (str11 == null || str11.length() <= 0) {
                    AFLogger.afInfoLog("AppsFlyer dev key is missing!!! Please use  AppsFlyerLib.getInstance().setAppsFlyerKey(...) to set it. ");
                    AFLogger.afInfoLog("AppsFlyer will not track this event.");
                    return null;
                }
                map2.put("appsflyerKey", str11);
            } else {
                map2.put("appsflyerKey", str8);
            }
            Object AFInAppEventParameterName8 = AFInAppEventParameterName();
            if (AFInAppEventParameterName8 != null) {
                map2.put("appUserId", AFInAppEventParameterName8);
            }
            string = appsFlyerProperties.getString(AppsFlyerProperties.USER_EMAILS);
        } catch (Throwable th) {
            AFLogger.afErrorLog(th.getLocalizedMessage(), th, true);
        }
        if (string == null) {
            String AFInAppEventParameterName9 = AFInAppEventParameterName(AppsFlyerProperties.USER_EMAIL);
            if (AFInAppEventParameterName9 != null) {
                str5 = "sha1_el";
                string = AFa1aSDK.AFInAppEventParameterName(AFInAppEventParameterName9);
            }
            if (str9 != null) {
                map2.put("eventName", str9);
                map2.put("eventValue", jSONObject);
            }
            if (afErrorLog() != null) {
                map2.put(AppsFlyerProperties.APP_ID, AFInAppEventParameterName(AppsFlyerProperties.APP_ID));
            }
            AFInAppEventParameterName = AFInAppEventParameterName(AppsFlyerProperties.CURRENCY_CODE);
            if (AFInAppEventParameterName != null) {
                if (AFInAppEventParameterName.length() != 3) {
                    StringBuilder sb2 = new StringBuilder("WARNING: currency code should be 3 characters!!! '");
                    sb2.append(AFInAppEventParameterName);
                    sb2.append("' is not a legal value.");
                    AFLogger.afWarnLog(sb2.toString());
                }
                map2.put("currency", AFInAppEventParameterName);
            }
            AFInAppEventParameterName2 = AFInAppEventParameterName(AppsFlyerProperties.IS_UPDATE);
            if (AFInAppEventParameterName2 != null) {
                map2.put("isUpdate", AFInAppEventParameterName2);
            }
            map2.put("af_preinstalled", Boolean.toString(isPreInstalledApp(context)));
            if (appsFlyerProperties.getBoolean(AppsFlyerProperties.COLLECT_FACEBOOK_ATTR_ID, true)) {
                try {
                    try {
                    } catch (Throwable th2) {
                        AFLogger.afErrorLog(str, th2);
                        str7 = null;
                        if (str7 != null) {
                        }
                        AFInAppEventParameterName(context, map2);
                        valueOf2 = AFb1rSDK.valueOf(new WeakReference(context));
                        if (valueOf2 != null) {
                        }
                        map2.put("lang", Locale.getDefault().getDisplayLanguage());
                        map2.put("lang_code", Locale.getDefault().getLanguage());
                        map2.put("country", Locale.getDefault().getCountry());
                        valueOf(map2, valueOf3);
                        values(context, (Map<String, ? super String>) map2);
                        String str12 = str2;
                        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(str12, Locale.US);
                        map2.put("installDate", AFInAppEventParameterName(simpleDateFormat, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
                        packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                        if (packageInfo.versionCode > AFInAppEventParameterName4.getInt("versionCode", 0)) {
                        }
                        AFc1vSDK AFKeystoreWrapper2 = values().AFKeystoreWrapper();
                        map2.put("app_version_code", Integer.toString(packageInfo.versionCode));
                        Context context2 = AFKeystoreWrapper2.AFInAppEventParameterName.AFInAppEventType;
                        map2.put("app_version_name", AFa1bSDK.values(context2, context2.getPackageName()));
                        map2.put("targetSDKver", Integer.valueOf(AFKeystoreWrapper2.AFInAppEventParameterName.AFInAppEventType.getApplicationInfo().targetSdkVersion));
                        long j6 = packageInfo.firstInstallTime;
                        long j7 = packageInfo.lastUpdateTime;
                        AFe1eSDK aFe1eSDK = afWarnLog;
                        appsFlyerProperties2 = appsFlyerProperties;
                        Locale locale = Locale.US;
                        String str13 = str9;
                        map2.put("date1", new SimpleDateFormat(str12, locale).format(new Date(j6)));
                        map2.put("date2", new SimpleDateFormat(str12, locale).format(new Date(j7)));
                        Object AFInAppEventType3 = AFInAppEventType(simpleDateFormat, context);
                        Object[] objArr4 = new Object[1];
                        values(null, "\u0087\u0084\u0081\u0093\u0092\u0091\u008d\u0090\u0081\u008f\u0084\u0088\u008c\u0085\u0082", null, 128 - (AudioTrack.getMaxVolume() > 0.0f ? 1 : (AudioTrack.getMaxVolume() == 0.0f ? 0 : -1)), objArr4);
                        map2.put(((String) objArr4[0]).intern(), AFInAppEventType3);
                        this.AppsFlyer2dXConversionCallback = AFe1jSDK.values(context);
                        StringBuilder sb3 = new StringBuilder("didConfigureTokenRefreshService=");
                        sb3.append(this.AppsFlyer2dXConversionCallback);
                        AFLogger.afDebugLog(sb3.toString());
                        if (!this.AppsFlyer2dXConversionCallback) {
                        }
                        if (valueOf3) {
                        }
                        if (!valueOf3) {
                        }
                        if (AFInAppEventParameterName("advertiserId") == null) {
                        }
                        AFInAppEventParameterName3 = AFa1fSDK.AFInAppEventParameterName(context.getContentResolver());
                        if (AFInAppEventParameterName3 != null) {
                        }
                        map2.put("registeredUninstall", Boolean.valueOf(AFe1jSDK.AFInAppEventParameterName(AFInAppEventParameterName4)));
                        int AFInAppEventType4 = AFInAppEventType(AFInAppEventParameterName4, valueOf3);
                        map2.put("counter", Integer.toString(AFInAppEventType4));
                        map2.put("iaecounter", Integer.toString(valueOf(AFInAppEventParameterName4, str13 == null)));
                        if (valueOf3) {
                        }
                        map2.put("isFirstCall", Boolean.toString(!values(AFInAppEventParameterName4)));
                        values(context, valueOf3, map2, AFInAppEventType4);
                        new AFa1aSDK();
                        map2.put("af_v", AFa1aSDK.AFKeystoreWrapper(map2));
                        new AFa1aSDK();
                        map2.put("af_v2", AFa1aSDK.AFInAppEventParameterName(map2));
                        map2.put("ivc", Boolean.valueOf(AFLogger$LogLevel(context)));
                        if (AFInAppEventParameterName4.contains("is_stop_tracking_used")) {
                        }
                        HashMap hashMap = new HashMap();
                        hashMap.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
                        hashMap.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
                        map2.put("cell", hashMap);
                        map2.put("sig", aFe1eSDK.valueOf());
                        map2.put("last_boot_time", Long.valueOf(aFe1eSDK.AFInAppEventParameterName()));
                        map2.put("disk", aFe1eSDK.values());
                        aFb1eSDK = this.afErrorLog;
                        if (aFb1eSDK != null) {
                        }
                        return map2;
                    }
                    try {
                        context.getPackageManager().getApplicationInfo("com.facebook.katana", 0);
                        str7 = getAttributionId(context);
                    } catch (PackageManager.NameNotFoundException e6) {
                        nameNotFoundException = e6;
                        str6 = str;
                        AFLogger.afErrorLogForExcManagerOnly("com.facebook.katana not found", nameNotFoundException, true);
                        AFLogger.afWarnLog(str6);
                        str7 = null;
                        if (str7 != null) {
                        }
                        AFInAppEventParameterName(context, map2);
                        valueOf2 = AFb1rSDK.valueOf(new WeakReference(context));
                        if (valueOf2 != null) {
                        }
                        map2.put("lang", Locale.getDefault().getDisplayLanguage());
                        map2.put("lang_code", Locale.getDefault().getLanguage());
                        map2.put("country", Locale.getDefault().getCountry());
                        valueOf(map2, valueOf3);
                        values(context, (Map<String, ? super String>) map2);
                        String str122 = str2;
                        SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat(str122, Locale.US);
                        map2.put("installDate", AFInAppEventParameterName(simpleDateFormat2, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
                        packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                        if (packageInfo.versionCode > AFInAppEventParameterName4.getInt("versionCode", 0)) {
                        }
                        AFc1vSDK AFKeystoreWrapper22 = values().AFKeystoreWrapper();
                        map2.put("app_version_code", Integer.toString(packageInfo.versionCode));
                        Context context22 = AFKeystoreWrapper22.AFInAppEventParameterName.AFInAppEventType;
                        map2.put("app_version_name", AFa1bSDK.values(context22, context22.getPackageName()));
                        map2.put("targetSDKver", Integer.valueOf(AFKeystoreWrapper22.AFInAppEventParameterName.AFInAppEventType.getApplicationInfo().targetSdkVersion));
                        long j62 = packageInfo.firstInstallTime;
                        long j72 = packageInfo.lastUpdateTime;
                        AFe1eSDK aFe1eSDK2 = afWarnLog;
                        appsFlyerProperties2 = appsFlyerProperties;
                        Locale locale2 = Locale.US;
                        String str132 = str9;
                        map2.put("date1", new SimpleDateFormat(str122, locale2).format(new Date(j62)));
                        map2.put("date2", new SimpleDateFormat(str122, locale2).format(new Date(j72)));
                        Object AFInAppEventType32 = AFInAppEventType(simpleDateFormat2, context);
                        Object[] objArr42 = new Object[1];
                        values(null, "\u0087\u0084\u0081\u0093\u0092\u0091\u008d\u0090\u0081\u008f\u0084\u0088\u008c\u0085\u0082", null, 128 - (AudioTrack.getMaxVolume() > 0.0f ? 1 : (AudioTrack.getMaxVolume() == 0.0f ? 0 : -1)), objArr42);
                        map2.put(((String) objArr42[0]).intern(), AFInAppEventType32);
                        this.AppsFlyer2dXConversionCallback = AFe1jSDK.values(context);
                        StringBuilder sb32 = new StringBuilder("didConfigureTokenRefreshService=");
                        sb32.append(this.AppsFlyer2dXConversionCallback);
                        AFLogger.afDebugLog(sb32.toString());
                        if (!this.AppsFlyer2dXConversionCallback) {
                        }
                        if (valueOf3) {
                        }
                        if (!valueOf3) {
                        }
                        if (AFInAppEventParameterName("advertiserId") == null) {
                        }
                        AFInAppEventParameterName3 = AFa1fSDK.AFInAppEventParameterName(context.getContentResolver());
                        if (AFInAppEventParameterName3 != null) {
                        }
                        map2.put("registeredUninstall", Boolean.valueOf(AFe1jSDK.AFInAppEventParameterName(AFInAppEventParameterName4)));
                        int AFInAppEventType42 = AFInAppEventType(AFInAppEventParameterName4, valueOf3);
                        map2.put("counter", Integer.toString(AFInAppEventType42));
                        map2.put("iaecounter", Integer.toString(valueOf(AFInAppEventParameterName4, str132 == null)));
                        if (valueOf3) {
                        }
                        map2.put("isFirstCall", Boolean.toString(!values(AFInAppEventParameterName4)));
                        values(context, valueOf3, map2, AFInAppEventType42);
                        new AFa1aSDK();
                        map2.put("af_v", AFa1aSDK.AFKeystoreWrapper(map2));
                        new AFa1aSDK();
                        map2.put("af_v2", AFa1aSDK.AFInAppEventParameterName(map2));
                        map2.put("ivc", Boolean.valueOf(AFLogger$LogLevel(context)));
                        if (AFInAppEventParameterName4.contains("is_stop_tracking_used")) {
                        }
                        HashMap hashMap2 = new HashMap();
                        hashMap2.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
                        hashMap2.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
                        map2.put("cell", hashMap2);
                        map2.put("sig", aFe1eSDK2.valueOf());
                        map2.put("last_boot_time", Long.valueOf(aFe1eSDK2.AFInAppEventParameterName()));
                        map2.put("disk", aFe1eSDK2.values());
                        aFb1eSDK = this.afErrorLog;
                        if (aFb1eSDK != null) {
                        }
                        return map2;
                    }
                } catch (PackageManager.NameNotFoundException e7) {
                    str6 = str;
                    nameNotFoundException = e7;
                }
                if (str7 != null) {
                    map2.put("fb", str7);
                }
            }
            AFInAppEventParameterName(context, map2);
            valueOf2 = AFb1rSDK.valueOf(new WeakReference(context));
            if (valueOf2 != null) {
                map2.put("uid", valueOf2);
            }
            map2.put("lang", Locale.getDefault().getDisplayLanguage());
            map2.put("lang_code", Locale.getDefault().getLanguage());
            map2.put("country", Locale.getDefault().getCountry());
            valueOf(map2, valueOf3);
            values(context, (Map<String, ? super String>) map2);
            String str1222 = str2;
            SimpleDateFormat simpleDateFormat22 = new SimpleDateFormat(str1222, Locale.US);
            map2.put("installDate", AFInAppEventParameterName(simpleDateFormat22, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
            packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
            if (packageInfo.versionCode > AFInAppEventParameterName4.getInt("versionCode", 0)) {
                AFKeystoreWrapper(context).valueOf("versionCode", packageInfo.versionCode);
            }
            AFc1vSDK AFKeystoreWrapper222 = values().AFKeystoreWrapper();
            map2.put("app_version_code", Integer.toString(packageInfo.versionCode));
            Context context222 = AFKeystoreWrapper222.AFInAppEventParameterName.AFInAppEventType;
            map2.put("app_version_name", AFa1bSDK.values(context222, context222.getPackageName()));
            map2.put("targetSDKver", Integer.valueOf(AFKeystoreWrapper222.AFInAppEventParameterName.AFInAppEventType.getApplicationInfo().targetSdkVersion));
            long j622 = packageInfo.firstInstallTime;
            long j722 = packageInfo.lastUpdateTime;
            AFe1eSDK aFe1eSDK22 = afWarnLog;
            appsFlyerProperties2 = appsFlyerProperties;
            Locale locale22 = Locale.US;
            String str1322 = str9;
            map2.put("date1", new SimpleDateFormat(str1222, locale22).format(new Date(j622)));
            map2.put("date2", new SimpleDateFormat(str1222, locale22).format(new Date(j722)));
            Object AFInAppEventType322 = AFInAppEventType(simpleDateFormat22, context);
            Object[] objArr422 = new Object[1];
            values(null, "\u0087\u0084\u0081\u0093\u0092\u0091\u008d\u0090\u0081\u008f\u0084\u0088\u008c\u0085\u0082", null, 128 - (AudioTrack.getMaxVolume() > 0.0f ? 1 : (AudioTrack.getMaxVolume() == 0.0f ? 0 : -1)), objArr422);
            map2.put(((String) objArr422[0]).intern(), AFInAppEventType322);
            this.AppsFlyer2dXConversionCallback = AFe1jSDK.values(context);
            StringBuilder sb322 = new StringBuilder("didConfigureTokenRefreshService=");
            sb322.append(this.AppsFlyer2dXConversionCallback);
            AFLogger.afDebugLog(sb322.toString());
            if (!this.AppsFlyer2dXConversionCallback) {
                map2.put("tokenRefreshConfigured", Boolean.FALSE);
            }
            if (valueOf3) {
                if (this.AFVersionDeclaration != null) {
                    if (map2.get("af_deeplink") != null) {
                        AFLogger.afDebugLog("Skip 'af' payload as deeplink was found by path");
                    } else {
                        JSONObject jSONObject2 = new JSONObject(this.AFVersionDeclaration);
                        jSONObject2.put("isPush", "true");
                        map2.put("af_deeplink", jSONObject2.toString());
                    }
                }
                this.AFVersionDeclaration = null;
                map2.put("open_referrer", obj);
            }
            if (!valueOf3) {
                try {
                    map2.putAll(values().AFLogger$LogLevel().values());
                } catch (Exception e8) {
                    AFLogger.afErrorLogForExcManagerOnly("error while getting sensors data", e8);
                    StringBuilder sb4 = new StringBuilder("Unexpected exception from AFSensorManager: ");
                    sb4.append(e8.getMessage());
                    AFLogger.afRDLog(sb4.toString());
                }
            }
            if (AFInAppEventParameterName("advertiserId") == null) {
                AFa1fSDK.AFKeystoreWrapper(context, map2);
                map2.put("GAID_retry", String.valueOf(AFInAppEventParameterName("advertiserId") != null));
            }
            AFInAppEventParameterName3 = AFa1fSDK.AFInAppEventParameterName(context.getContentResolver());
            if (AFInAppEventParameterName3 != null) {
                map2.put("amazon_aid", AFInAppEventParameterName3.AFKeystoreWrapper);
                map2.put("amazon_aid_limit", String.valueOf(AFInAppEventParameterName3.valueOf));
            }
            map2.put("registeredUninstall", Boolean.valueOf(AFe1jSDK.AFInAppEventParameterName(AFInAppEventParameterName4)));
            int AFInAppEventType422 = AFInAppEventType(AFInAppEventParameterName4, valueOf3);
            map2.put("counter", Integer.toString(AFInAppEventType422));
            map2.put("iaecounter", Integer.toString(valueOf(AFInAppEventParameterName4, str1322 == null)));
            if (valueOf3 && AFInAppEventType422 == 1) {
                appsFlyerProperties2.values = true;
            }
            map2.put("isFirstCall", Boolean.toString(!values(AFInAppEventParameterName4)));
            values(context, valueOf3, map2, AFInAppEventType422);
            new AFa1aSDK();
            map2.put("af_v", AFa1aSDK.AFKeystoreWrapper(map2));
            new AFa1aSDK();
            map2.put("af_v2", AFa1aSDK.AFInAppEventParameterName(map2));
            map2.put("ivc", Boolean.valueOf(AFLogger$LogLevel(context)));
            if (AFInAppEventParameterName4.contains("is_stop_tracking_used")) {
                map2.put("istu", String.valueOf(AFInAppEventParameterName4.getBoolean("is_stop_tracking_used", false)));
            }
            HashMap hashMap22 = new HashMap();
            hashMap22.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
            hashMap22.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
            map2.put("cell", hashMap22);
            map2.put("sig", aFe1eSDK22.valueOf());
            map2.put("last_boot_time", Long.valueOf(aFe1eSDK22.AFInAppEventParameterName()));
            map2.put("disk", aFe1eSDK22.values());
            aFb1eSDK = this.afErrorLog;
            if (aFb1eSDK != null && (obj2 = aFb1eSDK.AFKeystoreWrapper) != null) {
                map2.put("sharing_filter", obj2);
            }
            return map2;
        }
        str5 = "user_emails";
        map2.put(str5, string);
        if (str9 != null) {
        }
        if (afErrorLog() != null) {
        }
        AFInAppEventParameterName = AFInAppEventParameterName(AppsFlyerProperties.CURRENCY_CODE);
        if (AFInAppEventParameterName != null) {
        }
        AFInAppEventParameterName2 = AFInAppEventParameterName(AppsFlyerProperties.IS_UPDATE);
        if (AFInAppEventParameterName2 != null) {
        }
        map2.put("af_preinstalled", Boolean.toString(isPreInstalledApp(context)));
        if (appsFlyerProperties.getBoolean(AppsFlyerProperties.COLLECT_FACEBOOK_ATTR_ID, true)) {
        }
        AFInAppEventParameterName(context, map2);
        valueOf2 = AFb1rSDK.valueOf(new WeakReference(context));
        if (valueOf2 != null) {
        }
        map2.put("lang", Locale.getDefault().getDisplayLanguage());
        map2.put("lang_code", Locale.getDefault().getLanguage());
        map2.put("country", Locale.getDefault().getCountry());
        valueOf(map2, valueOf3);
        values(context, (Map<String, ? super String>) map2);
        String str12222 = str2;
        SimpleDateFormat simpleDateFormat222 = new SimpleDateFormat(str12222, Locale.US);
        map2.put("installDate", AFInAppEventParameterName(simpleDateFormat222, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
        packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
        if (packageInfo.versionCode > AFInAppEventParameterName4.getInt("versionCode", 0)) {
        }
        AFc1vSDK AFKeystoreWrapper2222 = values().AFKeystoreWrapper();
        map2.put("app_version_code", Integer.toString(packageInfo.versionCode));
        Context context2222 = AFKeystoreWrapper2222.AFInAppEventParameterName.AFInAppEventType;
        map2.put("app_version_name", AFa1bSDK.values(context2222, context2222.getPackageName()));
        map2.put("targetSDKver", Integer.valueOf(AFKeystoreWrapper2222.AFInAppEventParameterName.AFInAppEventType.getApplicationInfo().targetSdkVersion));
        long j6222 = packageInfo.firstInstallTime;
        long j7222 = packageInfo.lastUpdateTime;
        AFe1eSDK aFe1eSDK222 = afWarnLog;
        appsFlyerProperties2 = appsFlyerProperties;
        Locale locale222 = Locale.US;
        String str13222 = str9;
        map2.put("date1", new SimpleDateFormat(str12222, locale222).format(new Date(j6222)));
        map2.put("date2", new SimpleDateFormat(str12222, locale222).format(new Date(j7222)));
        Object AFInAppEventType3222 = AFInAppEventType(simpleDateFormat222, context);
        Object[] objArr4222 = new Object[1];
        values(null, "\u0087\u0084\u0081\u0093\u0092\u0091\u008d\u0090\u0081\u008f\u0084\u0088\u008c\u0085\u0082", null, 128 - (AudioTrack.getMaxVolume() > 0.0f ? 1 : (AudioTrack.getMaxVolume() == 0.0f ? 0 : -1)), objArr4222);
        map2.put(((String) objArr4222[0]).intern(), AFInAppEventType3222);
        this.AppsFlyer2dXConversionCallback = AFe1jSDK.values(context);
        StringBuilder sb3222 = new StringBuilder("didConfigureTokenRefreshService=");
        sb3222.append(this.AppsFlyer2dXConversionCallback);
        AFLogger.afDebugLog(sb3222.toString());
        if (!this.AppsFlyer2dXConversionCallback) {
        }
        if (valueOf3) {
        }
        if (!valueOf3) {
        }
        if (AFInAppEventParameterName("advertiserId") == null) {
        }
        AFInAppEventParameterName3 = AFa1fSDK.AFInAppEventParameterName(context.getContentResolver());
        if (AFInAppEventParameterName3 != null) {
        }
        map2.put("registeredUninstall", Boolean.valueOf(AFe1jSDK.AFInAppEventParameterName(AFInAppEventParameterName4)));
        int AFInAppEventType4222 = AFInAppEventType(AFInAppEventParameterName4, valueOf3);
        map2.put("counter", Integer.toString(AFInAppEventType4222));
        map2.put("iaecounter", Integer.toString(valueOf(AFInAppEventParameterName4, str13222 == null)));
        if (valueOf3) {
            appsFlyerProperties2.values = true;
        }
        map2.put("isFirstCall", Boolean.toString(!values(AFInAppEventParameterName4)));
        values(context, valueOf3, map2, AFInAppEventType4222);
        new AFa1aSDK();
        map2.put("af_v", AFa1aSDK.AFKeystoreWrapper(map2));
        new AFa1aSDK();
        map2.put("af_v2", AFa1aSDK.AFInAppEventParameterName(map2));
        map2.put("ivc", Boolean.valueOf(AFLogger$LogLevel(context)));
        if (AFInAppEventParameterName4.contains("is_stop_tracking_used")) {
        }
        HashMap hashMap222 = new HashMap();
        hashMap222.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
        hashMap222.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
        map2.put("cell", hashMap222);
        map2.put("sig", aFe1eSDK222.valueOf());
        map2.put("last_boot_time", Long.valueOf(aFe1eSDK222.AFInAppEventParameterName()));
        map2.put("disk", aFe1eSDK222.values());
        aFb1eSDK = this.afErrorLog;
        if (aFb1eSDK != null) {
            map2.put("sharing_filter", obj2);
        }
        return map2;
    }

    public final void values(Context context, Map<String, ? super String> map) {
        onValidateInAppFailure = (onResponseError + 23) % UserVerificationMethods.USER_VERIFY_PATTERN;
        boolean values2 = values(AppsFlyerProperties.DISABLE_NETWORK_DATA, false);
        AFa1gSDK.AFa1wSDK AFInAppEventType2 = values().onDeepLinkingNative().AFInAppEventType(context);
        map.put("network", AFInAppEventType2.AFKeystoreWrapper);
        if (!values2) {
            int i5 = onResponseError + 47;
            onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i5 % 2 != 0) {
                throw null;
            }
            String str = AFInAppEventType2.valueOf;
            if (str != null) {
                map.put("operator", str);
            }
        }
        if (values2) {
            return;
        }
        int i6 = onResponseError + 121;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 != 0) {
            throw null;
        }
        String str2 = AFInAppEventType2.AFInAppEventType;
        if (str2 != null) {
            map.put("carrier", str2);
        }
    }

    private void AFInAppEventParameterName(Map<String, Object> map) {
        if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false) || AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, false)) {
            return;
        }
        onValidateInAppFailure = (onResponseError + 73) % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (map.get("advertiserId") != null) {
            try {
                if (AFb1qSDK.valueOf(this.afDebugLog) && map.remove("android_id") != null) {
                    onValidateInAppFailure = (onResponseError + 1) % UserVerificationMethods.USER_VERIFY_PATTERN;
                    AFLogger.afInfoLog("validateGaidAndIMEI :: removing: android_id");
                }
                if (AFb1qSDK.valueOf(values().AppsFlyer2dXConversionCallback().AFKeystoreWrapper)) {
                    onResponseError = (onValidateInAppFailure + 109) % UserVerificationMethods.USER_VERIFY_PATTERN;
                    if (map.remove("imei") != null) {
                        AFLogger.afInfoLog("validateGaidAndIMEI :: removing: imei");
                    }
                }
            } catch (Exception e5) {
                AFLogger.afErrorLog("failed to remove IMEI or AndroidID key from params; ", e5);
            }
        }
    }

    static void AFInAppEventType(AFa1dSDK aFa1dSDK) {
        onResponseError = (onValidateInAppFailure + 63) % UserVerificationMethods.USER_VERIFY_PATTERN;
        aFa1dSDK.afWarnLog();
        onValidateInAppFailure = (onResponseError + 73) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    private static void AFKeystoreWrapper(Map<String, Object> map) {
        String string = AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.ONELINK_ID);
        String string2 = AppsFlyerProperties.getInstance().getString("onelinkVersion");
        if (string != null) {
            map.put("onelink_id", string);
        }
        if (string2 != null) {
            onValidateInAppFailure = (onResponseError + 93) % UserVerificationMethods.USER_VERIFY_PATTERN;
            map.put("onelink_ver", string2);
        }
        onValidateInAppFailure = (onResponseError + 125) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    private void valueOf(Context context) {
        String str;
        this.onConversionDataSuccess = new HashMap();
        final long currentTimeMillis = System.currentTimeMillis();
        AFa1uSDK.AFa1xSDK aFa1xSDK = new AFa1uSDK.AFa1xSDK() {
            @Override
            public final void AFInAppEventParameterName(String str2) {
                AFa1dSDK.values(AFa1dSDK.this).put("error", str2);
            }

            @Override
            public final void AFKeystoreWrapper(String str2, String str3, String str4) {
                if (str2 != null) {
                    AFLogger.afInfoLog("Facebook Deferred AppLink data received: ".concat(str2));
                    AFa1dSDK.values(AFa1dSDK.this).put("link", str2);
                    if (str3 != null) {
                        AFa1dSDK.values(AFa1dSDK.this).put("target_url", str3);
                    }
                    if (str4 != null) {
                        HashMap hashMap = new HashMap();
                        HashMap hashMap2 = new HashMap();
                        hashMap2.put("promo_code", str4);
                        hashMap.put("deeplink_context", hashMap2);
                        AFa1dSDK.values(AFa1dSDK.this).put("extras", hashMap);
                    }
                } else {
                    AFa1dSDK.values(AFa1dSDK.this).put("link", "");
                }
                AFa1dSDK.values(AFa1dSDK.this).put("ttr", String.valueOf(System.currentTimeMillis() - currentTimeMillis));
            }
        };
        try {
            z zVar = z.f1708a;
            z.class.getMethod("sdkInitialize", Context.class).invoke(null, context);
            int i5 = S1.a.f3336h;
            Method method = S1.a.class.getMethod("fetchDeferredAppLinkData", Context.class, String.class, a.b.class);
            Object newProxyInstance = Proxy.newProxyInstance(a.b.class.getClassLoader(), new Class[]{a.b.class}, new InvocationHandler() {
                private AFa1xSDK AFInAppEventType;
                private Class values;

                public AnonymousClass1(Class cls, AFa1xSDK aFa1xSDK2) {
                    r1 = cls;
                    r2 = aFa1xSDK2;
                }

                @Override
                public final Object invoke(Object obj, Method method2, Object[] objArr) {
                    String str2;
                    String str3;
                    String str4;
                    Bundle bundle;
                    if (!method2.getName().equals("onDeferredAppLinkDataFetched")) {
                        AFa1xSDK aFa1xSDK2 = r2;
                        if (aFa1xSDK2 != null) {
                            aFa1xSDK2.AFInAppEventParameterName("onDeferredAppLinkDataFetched invocation failed");
                        }
                        return null;
                    }
                    Object obj2 = objArr[0];
                    if (obj2 != null) {
                        Bundle bundle2 = (Bundle) Bundle.class.cast(r1.getMethod("getArgumentBundle", null).invoke(r1.cast(obj2), null));
                        if (bundle2 != null) {
                            str3 = bundle2.getString("com.facebook.platform.APPLINK_NATIVE_URL");
                            str4 = bundle2.getString("target_url");
                            Bundle bundle3 = bundle2.getBundle("extras");
                            str2 = (bundle3 == null || (bundle = bundle3.getBundle("deeplink_context")) == null) ? null : bundle.getString("promo_code");
                        } else {
                            str2 = null;
                            str3 = null;
                            str4 = null;
                        }
                        AFa1xSDK aFa1xSDK3 = r2;
                        if (aFa1xSDK3 != null) {
                            aFa1xSDK3.AFKeystoreWrapper(str3, str4, str2);
                        }
                    } else {
                        AFa1xSDK aFa1xSDK4 = r2;
                        if (aFa1xSDK4 != null) {
                            aFa1xSDK4.AFKeystoreWrapper(null, null, null);
                        }
                    }
                    return null;
                }
            });
            String string = context.getString(context.getResources().getIdentifier("facebook_app_id", "string", context.getPackageName()));
            if (!TextUtils.isEmpty(string)) {
                method.invoke(null, context, string, newProxyInstance);
                onResponseError = (onValidateInAppFailure + 9) % UserVerificationMethods.USER_VERIFY_PATTERN;
                return;
            }
            int i6 = onResponseError + 31;
            onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i6 % 2 == 0) {
                aFa1xSDK2.AFInAppEventParameterName("Facebook app id not defined in resources");
            } else {
                aFa1xSDK2.AFInAppEventParameterName("Facebook app id not defined in resources");
                int i7 = 62 / 0;
            }
        } catch (ClassNotFoundException e5) {
            e = e5;
            str = "FB class missing error";
            AFLogger.afErrorLogForExcManagerOnly(str, e);
            aFa1xSDK2.AFInAppEventParameterName(e.toString());
        } catch (IllegalAccessException e6) {
            e = e6;
            str = "FB illegal access";
            AFLogger.afErrorLogForExcManagerOnly(str, e);
            aFa1xSDK2.AFInAppEventParameterName(e.toString());
        } catch (NoSuchMethodException e7) {
            e = e7;
            str = "FB method missing error";
            AFLogger.afErrorLogForExcManagerOnly(str, e);
            aFa1xSDK2.AFInAppEventParameterName(e.toString());
        } catch (InvocationTargetException e8) {
            e = e8;
            str = "FB invocation error";
            AFLogger.afErrorLogForExcManagerOnly(str, e);
            aFa1xSDK2.AFInAppEventParameterName(e.toString());
        }
    }

    private void values(Context context, boolean z5, Map<String, Object> map, int i5) {
        HashMap hashMap = new HashMap();
        hashMap.put("cpu_abi", AFInAppEventType("ro.product.cpu.abi"));
        hashMap.put("cpu_abi2", AFInAppEventType("ro.product.cpu.abi2"));
        hashMap.put("arch", AFInAppEventType("os.arch"));
        hashMap.put("build_display_id", AFInAppEventType("ro.build.display.id"));
        if (z5) {
            onValidateInAppFailure = (onResponseError + 47) % UserVerificationMethods.USER_VERIFY_PATTERN;
            valueOf(context, hashMap);
            if (i5 <= 2) {
                int i6 = onResponseError + 43;
                onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
                int i7 = i6 % 2;
                hashMap.putAll(values().AFLogger$LogLevel().valueOf());
                if (i7 != 0) {
                    int i8 = 38 / 0;
                }
            }
        }
        hashMap.put("dim", values().onConversionDataSuccess().valueOf(context));
        map.put("deviceData", hashMap);
    }

    private void AFInAppEventType(AFa1rSDK aFa1rSDK) {
        byte b5 = 0;
        boolean z5 = aFa1rSDK.afInfoLog == null;
        if (!(!AFInAppEventType())) {
            int i5 = onResponseError + 27;
            onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            int i6 = i5 % 2;
            AFLogger.afInfoLog("CustomerUserId not set, reporting is disabled", true);
            return;
        }
        if (z5) {
            if (!AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.LAUNCH_PROTECT_ENABLED, true)) {
                AFLogger.afInfoLog("Allowing multiple launches within a 5 second time window.");
            } else if (afDebugLog()) {
                onValidateInAppFailure = (onResponseError + 123) % UserVerificationMethods.USER_VERIFY_PATTERN;
                AppsFlyerRequestListener appsFlyerRequestListener = aFa1rSDK.AFInAppEventParameterName;
                if (appsFlyerRequestListener != null) {
                    appsFlyerRequestListener.onError(10, "Event timeout. Check 'minTimeBetweenSessions' param");
                    onResponseError = (onValidateInAppFailure + 29) % UserVerificationMethods.USER_VERIFY_PATTERN;
                    return;
                }
                return;
            }
            this.AFLogger = System.currentTimeMillis();
        }
        valueOf(values().values(), new AFa1xSDK(this, aFa1rSDK, b5), 0L, TimeUnit.MILLISECONDS);
    }

    static boolean AFKeystoreWrapper(AFa1dSDK aFa1dSDK, boolean z5) {
        int i5 = onValidateInAppFailure + 119;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        aFa1dSDK.onInstallConversionDataLoadedNative = z5;
        if (i6 != 0) {
            return z5;
        }
        throw null;
    }

    public void values(AFe1rSDK aFe1rSDK) {
        onValidateInAppFailure = (onResponseError + 99) % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (aFe1rSDK == AFe1rSDK.SUCCESS) {
            onValidateInAppFailure = (onResponseError + 71) % UserVerificationMethods.USER_VERIFY_PATTERN;
            values().onDeepLinking().valueOf();
        }
        onResponseError = (onValidateInAppFailure + 53) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    public final void valueOf(Context context, String str) {
        JSONArray jSONArray;
        JSONArray jSONArray2;
        JSONObject jSONObject;
        AFLogger.afDebugLog("received a new (extra) referrer: ".concat(String.valueOf(str)));
        try {
            long currentTimeMillis = System.currentTimeMillis();
            String string = AFInAppEventParameterName(context).getString("extraReferrers", null);
            if (string == null) {
                jSONObject = new JSONObject();
                jSONArray2 = new JSONArray();
            } else {
                JSONObject jSONObject2 = new JSONObject(string);
                if (jSONObject2.has(str)) {
                    jSONArray = new JSONArray((String) jSONObject2.get(str));
                } else {
                    jSONArray = new JSONArray();
                    onValidateInAppFailure = (onResponseError + 59) % UserVerificationMethods.USER_VERIFY_PATTERN;
                }
                jSONArray2 = jSONArray;
                jSONObject = jSONObject2;
            }
            if (jSONArray2.length() < 5) {
                jSONArray2.put(currentTimeMillis);
            }
            if (jSONObject.length() >= 4) {
                values(jSONObject);
            }
            jSONObject.put(str, jSONArray2.toString());
            AFKeystoreWrapper(context).AFKeystoreWrapper("extraReferrers", jSONObject.toString());
            int i5 = onValidateInAppFailure + 113;
            onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i5 % 2 == 0) {
                int i6 = 3 / 0;
            }
        } catch (JSONException e5) {
            AFLogger.afErrorLogForExcManagerOnly("error at addReferrer", e5);
        } catch (Throwable th) {
            StringBuilder sb = new StringBuilder("Couldn't save referrer - ");
            sb.append(str);
            sb.append(": ");
            AFLogger.afErrorLog(sb.toString(), th);
        }
    }

    public void AFInAppEventType(AFg1wSDK aFg1wSDK) {
        int AFInAppEventType2;
        boolean z5;
        int i5 = onValidateInAppFailure + R.styleable.AppCompatTheme_tooltipFrameBackground;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        boolean z6 = false;
        if (i5 % 2 == 0) {
            SharedPreferences AFInAppEventParameterName = AFInAppEventParameterName(this.onInstallConversionFailureNative);
            AFInAppEventType2 = values().AFKeystoreWrapper().values.AFInAppEventType("appsFlyerCount", 0);
            z5 = AFInAppEventParameterName.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, true);
        } else {
            SharedPreferences AFInAppEventParameterName2 = AFInAppEventParameterName(this.onInstallConversionFailureNative);
            AFInAppEventType2 = values().AFKeystoreWrapper().values.AFInAppEventType("appsFlyerCount", 0);
            z5 = AFInAppEventParameterName2.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false);
        }
        if (AFInAppEventType2 == 1) {
            onValidateInAppFailure = (onResponseError + 85) % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (z6 || z5) {
                AFInAppEventParameterName(new AFf1uSDK());
                onResponseError = (onValidateInAppFailure + 109) % UserVerificationMethods.USER_VERIFY_PATTERN;
            }
        }
        onResponseError = (onValidateInAppFailure + 7) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    private void valueOf(Context context, String str, Map<String, Object> map, String str2, String str3) {
        AFa1rSDK aFf1oSDK;
        if (str != null) {
            int i5 = onValidateInAppFailure + 85;
            onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i5 % 2 == 0) {
                str.trim().isEmpty();
                throw null;
            }
            if (!str.trim().isEmpty()) {
                aFf1oSDK = new AFf1tSDK();
                AFInAppEventType(context);
                aFf1oSDK.afInfoLog = str;
                aFf1oSDK.AFKeystoreWrapper = map;
                aFf1oSDK.AFLogger = str2;
                aFf1oSDK.values = str3;
                AFInAppEventType(aFf1oSDK);
            }
        }
        aFf1oSDK = new AFf1oSDK();
        onValidateInAppFailure = (onResponseError + 9) % UserVerificationMethods.USER_VERIFY_PATTERN;
        AFInAppEventType(context);
        aFf1oSDK.afInfoLog = str;
        aFf1oSDK.AFKeystoreWrapper = map;
        aFf1oSDK.AFLogger = str2;
        aFf1oSDK.values = str3;
        AFInAppEventType(aFf1oSDK);
    }

    private static void values(String str) {
        try {
            if (!new JSONObject(str).has("pid")) {
                AFLogger.afWarnLog("Cannot set preinstall attribution data without a media source");
                int i5 = onValidateInAppFailure + 75;
                onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
                if (i5 % 2 == 0) {
                    throw null;
                }
                return;
            }
            int i6 = onValidateInAppFailure + 5;
            onResponseError = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i6 % 2 != 0) {
                AFInAppEventType("preInstallName", str);
            } else {
                AFInAppEventType("preInstallName", str);
                throw null;
            }
        } catch (JSONException e5) {
            AFLogger.afErrorLog("Error parsing JSON for preinstall", e5);
        }
    }

    private static void AFInAppEventType(String str, String str2) {
        int i5 = onResponseError + 17;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0) {
            AppsFlyerProperties.getInstance().set(str, str2);
        } else {
            AppsFlyerProperties.getInstance().set(str, str2);
            throw null;
        }
    }

    private void valueOf(Context context, Map<String, Object> map) {
        AFb1bSDK.AFa1vSDK valueOf2 = values().onResponseNative().valueOf(context);
        map.put("btl", Float.toString(valueOf2.AFKeystoreWrapper));
        String str = valueOf2.valueOf;
        if (str != null) {
            int i5 = onValidateInAppFailure + 105;
            onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
            int i6 = i5 % 2;
            map.put("btch", str);
            if (i6 == 0) {
                int i7 = 4 / 0;
            }
        }
        onResponseError = (onValidateInAppFailure + 93) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    private static void values(String str, String str2, int[] iArr, int i5, Object[] objArr) {
        String str3 = str2;
        byte[] bArr = str3;
        if (str3 != null) {
            int i6 = $10 + 61;
            $11 = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i6 % 2 == 0) {
                str3.getBytes("ISO-8859-1");
                throw null;
            }
            bArr = str3.getBytes("ISO-8859-1");
        }
        byte[] bArr2 = bArr;
        char[] charArray = str != null ? str.toCharArray() : str;
        AFh1ySDK aFh1ySDK = new AFh1ySDK();
        char[] cArr = onAppOpenAttribution;
        if (cArr != null) {
            $10 = ($11 + 81) % UserVerificationMethods.USER_VERIFY_PATTERN;
            int length = cArr.length;
            char[] cArr2 = new char[length];
            int i7 = 0;
            while (i7 < length) {
                try {
                    Object[] objArr2 = {Integer.valueOf(cArr[i7])};
                    Map<Integer, Object> map = AFa1wSDK.onInstallConversionFailureNative;
                    Object obj = map.get(926988223);
                    if (obj == null) {
                        obj = ((Class) AFa1wSDK.AFKeystoreWrapper((char) ((ViewConfiguration.getScrollDefaultDelay() >> 16) + 47725), (ViewConfiguration.getKeyRepeatTimeout() >> 16) + 233, 36 - (ViewConfiguration.getEdgeSlop() >> 16))).getMethod("h", Integer.TYPE);
                        map.put(926988223, obj);
                    }
                    cArr2[i7] = ((Character) ((Method) obj).invoke(null, objArr2)).charValue();
                    i7++;
                    $10 = ($11 + 89) % UserVerificationMethods.USER_VERIFY_PATTERN;
                } catch (Throwable th) {
                    Throwable cause = th.getCause();
                    if (cause == null) {
                        throw th;
                    }
                    throw cause;
                }
            }
            cArr = cArr2;
        }
        try {
            Object[] objArr3 = {Integer.valueOf(onConversionDataFail)};
            Map<Integer, Object> map2 = AFa1wSDK.onInstallConversionFailureNative;
            Object obj2 = map2.get(-1572465360);
            long j5 = 0;
            if (obj2 == null) {
                obj2 = ((Class) AFa1wSDK.AFKeystoreWrapper((char) (63768 - ExpandableListView.getPackedPositionGroup(0L)), 305 - (KeyEvent.getMaxKeyCode() >> 16), (ExpandableListView.getPackedPositionForGroup(0) > 0L ? 1 : (ExpandableListView.getPackedPositionForGroup(0) == 0L ? 0 : -1)) + 37)).getMethod("j", Integer.TYPE);
                map2.put(-1572465360, obj2);
            }
            int intValue = ((Integer) ((Method) obj2).invoke(null, objArr3)).intValue();
            if (onValidateInApp) {
                int length2 = bArr2.length;
                aFh1ySDK.AFInAppEventParameterName = length2;
                char[] cArr3 = new char[length2];
                aFh1ySDK.AFKeystoreWrapper = 0;
                while (true) {
                    int i8 = aFh1ySDK.AFKeystoreWrapper;
                    int i9 = aFh1ySDK.AFInAppEventParameterName;
                    if (i8 >= i9) {
                        objArr[0] = new String(cArr3);
                        return;
                    }
                    cArr3[i8] = (char) (cArr[bArr2[(i9 - 1) - i8] + i5] - intValue);
                    try {
                        Object[] objArr4 = {aFh1ySDK, aFh1ySDK};
                        Map<Integer, Object> map3 = AFa1wSDK.onInstallConversionFailureNative;
                        Object obj3 = map3.get(-194173915);
                        if (obj3 == null) {
                            obj3 = ((Class) AFa1wSDK.AFKeystoreWrapper((char) (ExpandableListView.getPackedPositionForGroup(0) > j5 ? 1 : (ExpandableListView.getPackedPositionForGroup(0) == j5 ? 0 : -1)), TextUtils.lastIndexOf("", '0', 0) + 74, 'T' - AndroidCharacter.getMirror('0'))).getMethod("i", Object.class, Object.class);
                            map3.put(-194173915, obj3);
                        }
                        ((Method) obj3).invoke(null, objArr4);
                        j5 = 0;
                    } catch (Throwable th2) {
                        Throwable cause2 = th2.getCause();
                        if (cause2 == null) {
                            throw th2;
                        }
                        throw cause2;
                    }
                }
            } else {
                if (!onAttributionFailure) {
                    int length3 = iArr.length;
                    aFh1ySDK.AFInAppEventParameterName = length3;
                    char[] cArr4 = new char[length3];
                    aFh1ySDK.AFKeystoreWrapper = 0;
                    $11 = ($10 + 83) % UserVerificationMethods.USER_VERIFY_PATTERN;
                    while (true) {
                        int i10 = aFh1ySDK.AFKeystoreWrapper;
                        int i11 = aFh1ySDK.AFInAppEventParameterName;
                        if (i10 >= i11) {
                            break;
                        }
                        cArr4[i10] = (char) (cArr[iArr[(i11 - 1) - i10] - i5] - intValue);
                        aFh1ySDK.AFKeystoreWrapper = i10 + 1;
                    }
                    String str4 = new String(cArr4);
                    int i12 = $11 + 1;
                    $10 = i12 % UserVerificationMethods.USER_VERIFY_PATTERN;
                    if (i12 % 2 != 0) {
                        throw null;
                    }
                    objArr[0] = str4;
                    return;
                }
                $10 = ($11 + 53) % UserVerificationMethods.USER_VERIFY_PATTERN;
                int length4 = charArray.length;
                aFh1ySDK.AFInAppEventParameterName = length4;
                char[] cArr5 = new char[length4];
                aFh1ySDK.AFKeystoreWrapper = 0;
                while (true) {
                    int i13 = aFh1ySDK.AFKeystoreWrapper;
                    int i14 = aFh1ySDK.AFInAppEventParameterName;
                    if (i13 >= i14) {
                        objArr[0] = new String(cArr5);
                        return;
                    }
                    cArr5[i13] = (char) (cArr[charArray[(i14 - 1) - i13] - i5] - intValue);
                    try {
                        Object[] objArr5 = {aFh1ySDK, aFh1ySDK};
                        Map<Integer, Object> map4 = AFa1wSDK.onInstallConversionFailureNative;
                        Object obj4 = map4.get(-194173915);
                        if (obj4 == null) {
                            obj4 = ((Class) AFa1wSDK.AFKeystoreWrapper((char) (AudioTrack.getMinVolume() > 0.0f ? 1 : (AudioTrack.getMinVolume() == 0.0f ? 0 : -1)), 73 - (ViewConfiguration.getTapTimeout() >> 16), 37 - (Process.getElapsedCpuTime() > 0L ? 1 : (Process.getElapsedCpuTime() == 0L ? 0 : -1)))).getMethod("i", Object.class, Object.class);
                            map4.put(-194173915, obj4);
                        }
                        ((Method) obj4).invoke(null, objArr5);
                    } catch (Throwable th3) {
                        Throwable cause3 = th3.getCause();
                        if (cause3 == null) {
                            throw th3;
                        }
                        throw cause3;
                    }
                }
            }
        } catch (Throwable th4) {
            Throwable cause4 = th4.getCause();
            if (cause4 == null) {
                throw th4;
            }
            throw cause4;
        }
    }

    private static void AFInAppEventType(String str, boolean z5) {
        int i5 = onResponseError + 47;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            AppsFlyerProperties.getInstance().set(str, z5);
            int i6 = 84 / 0;
        } else {
            AppsFlyerProperties.getInstance().set(str, z5);
        }
        int i7 = onResponseError + 43;
        onValidateInAppFailure = i7 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i7 % 2 != 0) {
            throw null;
        }
    }

    private static void values(JSONObject jSONObject) {
        String str;
        ArrayList arrayList = new ArrayList();
        Iterator<String> keys = jSONObject.keys();
        while (true) {
            if (!keys.hasNext()) {
                break;
            }
            try {
                JSONArray jSONArray = new JSONArray((String) jSONObject.get(keys.next()));
                for (int i5 = 0; i5 < jSONArray.length(); i5++) {
                    arrayList.add(Long.valueOf(jSONArray.getLong(i5)));
                }
            } catch (JSONException e5) {
                AFLogger.afErrorLogForExcManagerOnly("error at timeStampArr", e5);
            }
        }
        Collections.sort(arrayList);
        Iterator<String> keys2 = jSONObject.keys();
        loop2: while (true) {
            str = null;
            while (keys2.hasNext()) {
                int i6 = onResponseError + 65;
                onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
                if (i6 % 2 != 0) {
                    throw null;
                }
                if (str != null) {
                    break loop2;
                }
                String next = keys2.next();
                try {
                    JSONArray jSONArray2 = new JSONArray((String) jSONObject.get(next));
                    onValidateInAppFailure = (onResponseError + 35) % UserVerificationMethods.USER_VERIFY_PATTERN;
                    int i7 = 0;
                    while (i7 < jSONArray2.length()) {
                        if (jSONArray2.getLong(i7) != ((Long) arrayList.get(0)).longValue()) {
                            int i8 = onValidateInAppFailure + 29;
                            onResponseError = i8 % UserVerificationMethods.USER_VERIFY_PATTERN;
                            if (i8 % 2 != 0) {
                                if (jSONArray2.getLong(i7) == ((Long) arrayList.get(1)).longValue()) {
                                    break;
                                }
                                if (jSONArray2.getLong(i7) != ((Long) arrayList.get(arrayList.size() - 1)).longValue()) {
                                }
                            } else if (jSONArray2.getLong(i7) != ((Long) arrayList.get(1)).longValue()) {
                                if (jSONArray2.getLong(i7) != ((Long) arrayList.get(arrayList.size() - 1)).longValue()) {
                                    break;
                                }
                                i7++;
                                str = next;
                            }
                        }
                    }
                } catch (JSONException e6) {
                    AFLogger.afErrorLogForExcManagerOnly("error at manageExtraReferrers", e6);
                }
            }
            break loop2;
        }
        if (str != null) {
            onResponseError = (onValidateInAppFailure + 105) % UserVerificationMethods.USER_VERIFY_PATTERN;
            jSONObject.remove(str);
        }
    }

    public final void valueOf(Context context, Map<String, Object> map, Uri uri) {
        AFInAppEventType(context);
        if (!map.containsKey("af_deeplink")) {
            onValidateInAppFailure = (onResponseError + 83) % UserVerificationMethods.USER_VERIFY_PATTERN;
            String valueOf2 = valueOf(uri.toString());
            AFb1nSDK onResponseErrorNative = values().onResponseErrorNative();
            String str = onResponseErrorNative.valueOf;
            if (str != null) {
                int i5 = onResponseError + 93;
                onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
                if (i5 % 2 != 0) {
                    throw null;
                }
                if (onResponseErrorNative.AFInAppEventParameterName != null && valueOf2.contains(str)) {
                    Uri.Builder buildUpon = Uri.parse(valueOf2).buildUpon();
                    Uri.Builder buildUpon2 = Uri.EMPTY.buildUpon();
                    for (Map.Entry<String, String> entry : onResponseErrorNative.AFInAppEventParameterName.entrySet()) {
                        buildUpon.appendQueryParameter(entry.getKey(), entry.getValue());
                        buildUpon2.appendQueryParameter(entry.getKey(), entry.getValue());
                        onResponseError = (onValidateInAppFailure + 81) % UserVerificationMethods.USER_VERIFY_PATTERN;
                    }
                    valueOf2 = buildUpon.build().toString();
                    map.put("appended_query_params", buildUpon2.build().getEncodedQuery());
                    onValidateInAppFailure = (onResponseError + 73) % UserVerificationMethods.USER_VERIFY_PATTERN;
                }
            }
            map.put("af_deeplink", valueOf2);
        }
        HashMap hashMap = new HashMap();
        hashMap.put("link", uri.toString());
        AFe1wSDK aFe1wSDK = new AFe1wSDK(values(), UUID.randomUUID(), uri);
        if (aFe1wSDK.AFLogger$LogLevel()) {
            onResponseError = (onValidateInAppFailure + 97) % UserVerificationMethods.USER_VERIFY_PATTERN;
            map.put("isBrandedDomain", Boolean.TRUE);
        }
        AFa1bSDK.AFInAppEventType(context, hashMap, uri);
        if (!aFe1wSDK.AFVersionDeclaration()) {
            values().onResponseErrorNative().AFInAppEventType(hashMap);
            return;
        }
        aFe1wSDK.AFLogger = values(hashMap);
        AFd1mSDK level = values().getLevel();
        level.AFKeystoreWrapper.execute(new AFd1mSDK.AnonymousClass5(aFe1wSDK));
    }

    private static void AFInAppEventType(Map<String, Object> map, AFf1xSDK aFf1xSDK) {
        HashMap hashMap = new HashMap(aFf1xSDK.AFInAppEventParameterName);
        aFf1xSDK.AFInAppEventParameterName.clear();
        aFf1xSDK.AFKeystoreWrapper.AFKeystoreWrapper("gcd");
        if (hashMap.isEmpty()) {
            return;
        }
        int i5 = onValidateInAppFailure + 77;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        AFInAppEventType(map).put("gcd", hashMap);
        if (i6 == 0) {
            throw null;
        }
    }

    private void valueOf(AppsFlyerConversionListener appsFlyerConversionListener) {
        int i5 = onValidateInAppFailure;
        int i6 = i5 + 41;
        onResponseError = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 == 0) {
            throw null;
        }
        if (appsFlyerConversionListener != null) {
            this.AFInAppEventParameterName = appsFlyerConversionListener;
            return;
        }
        int i7 = i5 + 13;
        onResponseError = i7 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i7 % 2 == 0) {
            int i8 = 40 / 0;
        }
    }

    public static boolean values(Context context) {
        onResponseError = (onValidateInAppFailure + 35) % UserVerificationMethods.USER_VERIFY_PATTERN;
        try {
        } catch (Throwable th) {
            AFLogger.afErrorLog("WARNING:  Google play services is unavailable. ", th);
        }
        if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) != 0) {
            onResponseError = (onValidateInAppFailure + 25) % UserVerificationMethods.USER_VERIFY_PATTERN;
            try {
                context.getPackageManager().getPackageInfo("com.google.android.gms", 0);
                return true;
            } catch (PackageManager.NameNotFoundException e5) {
                AFLogger.afErrorLog("WARNING:  Google Play Services is unavailable. ", e5);
                return false;
            }
        }
        int i5 = (onValidateInAppFailure + 63) % UserVerificationMethods.USER_VERIFY_PATTERN;
        onResponseError = i5;
        int i6 = i5 + 1;
        onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 == 0) {
            return true;
        }
        throw null;
    }

    static void valueOf(AFa1dSDK aFa1dSDK, AFa1rSDK aFa1rSDK) {
        onResponseError = (onValidateInAppFailure + 125) % UserVerificationMethods.USER_VERIFY_PATTERN;
        aFa1dSDK.AFInAppEventParameterName(aFa1rSDK);
        onValidateInAppFailure = (onResponseError + 71) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    private static boolean values(@NonNull SharedPreferences sharedPreferences) {
        int i5 = onValidateInAppFailure + 87;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        int i6 = i5 % 2;
        boolean parseBoolean = Boolean.parseBoolean(sharedPreferences.getString("sentSuccessfully", null));
        if (i6 == 0) {
            int i7 = 27 / 0;
        }
        return parseBoolean;
    }

    public final boolean AFInAppEventType() {
        int i5 = onValidateInAppFailure + 97;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0 ? values(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false) : !(!values(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false))) {
            if (AFInAppEventParameterName() == null) {
                int i6 = onValidateInAppFailure + 67;
                onResponseError = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
                return i6 % 2 != 0;
            }
        }
        return false;
    }

    private static boolean AFInAppEventType(File file) {
        int i5 = onValidateInAppFailure;
        int i6 = i5 + 19;
        onResponseError = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i6 % 2 == 0) {
            int i7 = 12 / 0;
            if (file == null) {
                return true;
            }
        } else if (file == null) {
            return true;
        }
        onResponseError = (i5 + 87) % UserVerificationMethods.USER_VERIFY_PATTERN;
        return !file.exists();
    }

    private static boolean values(String str, boolean z5) {
        onValidateInAppFailure = (onResponseError + 11) % UserVerificationMethods.USER_VERIFY_PATTERN;
        boolean z6 = AppsFlyerProperties.getInstance().getBoolean(str, z5);
        onResponseError = (onValidateInAppFailure + 49) % UserVerificationMethods.USER_VERIFY_PATTERN;
        return z6;
    }

    final void valueOf(@NonNull AFa1rSDK aFa1rSDK, Activity activity) {
        String str;
        Uri AFInAppEventType2;
        int i5 = onResponseError + 83;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 != 0) {
            Context context = values().init().AFInAppEventType;
            throw null;
        }
        Context context2 = values().init().AFInAppEventType;
        if (activity == null || activity.getIntent() == null || (AFInAppEventType2 = AFb1kSDK.AFInAppEventType(activity)) == null) {
            str = "";
        } else {
            int i6 = onResponseError + 111;
            onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i6 % 2 != 0) {
                AFInAppEventType2.toString();
                throw null;
            }
            str = AFInAppEventType2.toString();
        }
        if (values().AppsFlyer2dXConversionCallback().valueOf != null) {
            String referrer = AppsFlyerProperties.getInstance().getReferrer(context2);
            aFa1rSDK.AFLogger = referrer != null ? referrer : "";
            aFa1rSDK.values = str;
            AFInAppEventType(aFa1rSDK);
            return;
        }
        onResponseError = (onValidateInAppFailure + 77) % UserVerificationMethods.USER_VERIFY_PATTERN;
        AFLogger.afWarnLog("[LogEvent/Launch] AppsFlyer's SDK cannot send any event without providing DevKey.");
        AppsFlyerRequestListener appsFlyerRequestListener = aFa1rSDK.AFInAppEventParameterName;
        if (appsFlyerRequestListener != null) {
            onResponseError = (onValidateInAppFailure + 77) % UserVerificationMethods.USER_VERIFY_PATTERN;
            appsFlyerRequestListener.onError(41, "No dev key");
        }
    }

    private void valueOf(Map<String, Object> map, boolean z5) {
        onValidateInAppFailure = (onResponseError + 37) % UserVerificationMethods.USER_VERIFY_PATTERN;
        map.put("platformextension", this.onAppOpenAttributionNative.AFInAppEventParameterName());
        if (!(!z5)) {
            map.put("platform_extension_v2", values().onInstallConversionFailureNative().values());
            onValidateInAppFailure = (onResponseError + 89) % UserVerificationMethods.USER_VERIFY_PATTERN;
        }
        onResponseError = (onValidateInAppFailure + 61) % UserVerificationMethods.USER_VERIFY_PATTERN;
    }

    private static void valueOf(@NonNull ScheduledExecutorService scheduledExecutorService, Runnable runnable, long j5, TimeUnit timeUnit) {
        String str;
        int i5 = onValidateInAppFailure + 49;
        onResponseError = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        try {
            if (i5 % 2 == 0) {
                scheduledExecutorService.schedule(runnable, j5, timeUnit);
                int i6 = 97 / 0;
            } else {
                scheduledExecutorService.schedule(runnable, j5, timeUnit);
            }
            int i7 = onResponseError + 37;
            onValidateInAppFailure = i7 % UserVerificationMethods.USER_VERIFY_PATTERN;
            if (i7 % 2 != 0) {
                throw null;
            }
        } catch (RejectedExecutionException e5) {
            e = e5;
            str = "scheduleJob failed with RejectedExecutionException Exception";
            AFLogger.afErrorLog(str, e);
        } catch (Throwable th) {
            e = th;
            str = "scheduleJob failed with Exception";
            AFLogger.afErrorLog(str, e);
        }
    }

    private boolean valueOf(AFa1rSDK aFa1rSDK, SharedPreferences sharedPreferences) {
        boolean z5;
        int i5 = onResponseError + 49;
        onValidateInAppFailure = i5 % UserVerificationMethods.USER_VERIFY_PATTERN;
        if (i5 % 2 == 0 ? (r0 = AFInAppEventType(sharedPreferences, false)) == 1 : (r0 = AFInAppEventType(sharedPreferences, true)) == 0) {
            if (!(aFa1rSDK instanceof AFf1uSDK)) {
                z5 = true;
                if (!sharedPreferences.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false)) {
                    int i6 = onResponseError + 33;
                    onValidateInAppFailure = i6 % UserVerificationMethods.USER_VERIFY_PATTERN;
                    if (i6 % 2 == 0) {
                    }
                    onValidateInAppFailure = (onResponseError + 117) % UserVerificationMethods.USER_VERIFY_PATTERN;
                    return true;
                }
                if (!z5) {
                    return false;
                }
                onValidateInAppFailure = (onResponseError + 117) % UserVerificationMethods.USER_VERIFY_PATTERN;
                return true;
            }
        }
        z5 = false;
        if (!sharedPreferences.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false)) {
        }
        if (!z5) {
        }
        onValidateInAppFailure = (onResponseError + 117) % UserVerificationMethods.USER_VERIFY_PATTERN;
        return true;
    }
}