导航菜单

页面标题

页面副标题

Pesohere v1.0.5 - AFb1zSDK.java 源代码

正在查看: Pesohere v1.0.5 应用的 AFb1zSDK.java JAVA 源代码文件

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


package com.appsflyer.internal;

import android.app.Activity;
import android.app.Application;
import android.app.UiModeManager;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ProviderInfo;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Process;
import android.os.StatFs;
import android.os.SystemClock;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.WindowManager;
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.attribution.AppsFlyerRequestListener;
import com.appsflyer.attribution.RequestError;
import com.appsflyer.deeplink.DeepLinkListener;
import com.appsflyer.deeplink.DeepLinkResult;
import com.appsflyer.internal.AFa1kSDK;
import com.appsflyer.internal.AFa1lSDK;
import com.appsflyer.internal.AFa1vSDK;
import com.appsflyer.internal.AFb1zSDK;
import com.appsflyer.internal.AFc1gSDK.AnonymousClass1;
import com.appsflyer.internal.AFd1oSDK;
import com.appsflyer.internal.AFe1dSDK;
import com.appsflyer.internal.components.network.http.ResponseNetwork;
import com.google.android.gms.common.GoogleApiAvailability;
import com.wang.avi.BuildConfig;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
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.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.Properties;
import java.util.TimeZone;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public final class AFb1zSDK extends AppsFlyerLib {
    public static volatile AppsFlyerConversionListener AFInAppEventParameterName = null;
    public static final String AFInAppEventType;
    public static final String AFKeystoreWrapper;
    public static String AFLogger = null;
    public static String AFLogger$LogLevel = null;
    public static String AFVersionDeclaration = null;
    public static int AppsFlyerConversionListener = 1;
    public static char AppsFlyerInAppPurchaseValidatorListener;
    public static String afDebugLog;
    public static AFb1zSDK afErrorLogForExcManagerOnly;
    public static final String afInfoLog;
    public static String afWarnLog;
    public static String getLevel;
    public static int onResponseError;
    public static char[] onValidateInApp;
    public static AppsFlyerInAppPurchaseValidatorListener valueOf;
    public static final String values;
    public AFa1dSDK afErrorLog;
    public String afRDLog;
    public String init;
    public SharedPreferences onAppOpenAttribution;
    public Map<Long, String> onAppOpenAttributionNative;
    public String onAttributionFailure;
    public boolean onAttributionFailureNative;
    public Map<String, Object> onConversionDataFail;
    public boolean onConversionDataSuccess;
    public Application onDeepLinkingNative;
    public AFb1dSDK onResponse;
    public final AFc1zSDK onValidateInAppFailure;
    public long AppsFlyer2dXConversionCallback = -1;
    public long onInstallConversionFailureNative = -1;
    public long onInstallConversionDataLoadedNative = TimeUnit.SECONDS.toMillis(5);
    public final AFb1uSDK onResponseErrorNative = new AFb1uSDK();
    public boolean onResponseNative = false;
    public boolean onDeepLinking = false;

    public class AnonymousClass1 implements Runnable {
        public AnonymousClass1() {
        }

        public void valueOf() {
            try {
                AFe1pSDK aFe1pSDK = new AFe1pSDK();
                Application AFKeystoreWrapper = AFb1zSDK.AFKeystoreWrapper(AFb1zSDK.this);
                if (AFKeystoreWrapper != null) {
                    aFe1pSDK.valueOf = (Application) AFKeystoreWrapper.getApplicationContext();
                }
                if (AFb1zSDK.valueOf(AFb1zSDK.this, aFe1pSDK, AFb1zSDK.AFKeystoreWrapper(AFb1zSDK.AFKeystoreWrapper(AFb1zSDK.this)))) {
                    AFb1zSDK.AFKeystoreWrapper(AFb1zSDK.this, aFe1pSDK);
                }
            } catch (Throwable th) {
                AFLogger.afErrorLog(th.getMessage(), th);
            }
        }

        @Override
        public final void run() {
            AFb1zSDK.AFInAppEventParameterName(AFb1zSDK.values(AFb1zSDK.this).AFInAppEventParameterName(), new Runnable() {
                @Override
                public final void run() {
                    AFb1zSDK.AnonymousClass1.this.valueOf();
                }
            }, TimeUnit.MILLISECONDS);
        }
    }

    public static class AnonymousClass10 {
        public static final int[] values;

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

    public class AFa1wSDK implements Runnable {
        public final AFa1qSDK valueOf;

        public AFa1wSDK(AFb1zSDK aFb1zSDK, AFa1qSDK aFa1qSDK, byte b) {
            this(aFa1qSDK);
        }

        @Override
        public final void run() {
            AFd1rSDK aFd1rSDK;
            if (this.valueOf.values()) {
                AFd1pSDK aFd1pSDK = new AFd1pSDK(this.valueOf, AFb1zSDK.this.valueOf());
                aFd1pSDK.afWarnLog = AFb1zSDK.AFInAppEventType(AFb1zSDK.this);
                aFd1rSDK = aFd1pSDK;
            } else {
                aFd1rSDK = new AFd1rSDK(this.valueOf, AFb1zSDK.this.valueOf());
            }
            AFc1gSDK afDebugLog = AFb1zSDK.this.valueOf().afDebugLog();
            afDebugLog.valueOf.execute(afDebugLog.new AnonymousClass1(aFd1rSDK));
        }

        public AFa1wSDK(AFa1qSDK aFa1qSDK) {
            this.valueOf = aFa1qSDK;
        }
    }

    public class AFa1ySDK implements AFc1hSDK {
        public AFa1ySDK() {
        }

        public static boolean AFKeystoreWrapper() {
            return AFb1zSDK.AFInAppEventParameterName != null;
        }

        @Override
        public final void AFInAppEventParameterName(AFc1eSDK<?> aFc1eSDK) {
        }

        @Override
        public final void AFInAppEventType(AFc1eSDK<?> aFc1eSDK, AFc1lSDK aFc1lSDK) {
            JSONObject AFInAppEventParameterName;
            AFb1rSDK AFInAppEventType;
            if (!(aFc1eSDK instanceof AFd1rSDK)) {
                if (!(aFc1eSDK instanceof AFd1cSDK) || aFc1lSDK == AFc1lSDK.SUCCESS) {
                    return;
                }
                AFd1aSDK aFd1aSDK = new AFd1aSDK(AFb1zSDK.values(AFb1zSDK.this));
                AFc1gSDK afDebugLog = AFb1zSDK.values(AFb1zSDK.this).afDebugLog();
                afDebugLog.valueOf.execute(afDebugLog.new AnonymousClass1(aFd1aSDK));
                return;
            }
            AFd1rSDK aFd1rSDK = (AFd1rSDK) aFc1eSDK;
            boolean z = aFc1eSDK instanceof AFd1pSDK;
            if (z && AFKeystoreWrapper()) {
                AFd1pSDK aFd1pSDK = (AFd1pSDK) aFc1eSDK;
                boolean z2 = true;
                if (aFd1pSDK.AFKeystoreWrapper != AFc1lSDK.SUCCESS && aFd1pSDK.valueOf != 1) {
                    z2 = false;
                }
                if (z2) {
                    Context context = AFb1zSDK.values(AFb1zSDK.this).AFInAppEventType.valueOf;
                    if (context == null) {
                        throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
                    }
                    AFd1cSDK aFd1cSDK = new AFd1cSDK(aFd1pSDK, new AFb1bSDK(AFb1zSDK.AFKeystoreWrapper(context)));
                    AFc1gSDK afDebugLog2 = AFb1zSDK.values(AFb1zSDK.this).afDebugLog();
                    afDebugLog2.valueOf.execute(afDebugLog2.new AnonymousClass1(aFd1cSDK));
                }
            }
            if (aFc1lSDK == AFc1lSDK.SUCCESS) {
                AFb1zSDK aFb1zSDK = AFb1zSDK.this;
                aFb1zSDK.AFInAppEventParameterName(AFb1zSDK.AFKeystoreWrapper(aFb1zSDK)).values("sentSuccessfully", "true");
                if (!(aFc1eSDK instanceof AFd1lSDK) && (AFInAppEventType = new AFd1dSDK(AFb1zSDK.AFKeystoreWrapper(AFb1zSDK.this)).AFInAppEventType()) != null && AFInAppEventType.AFKeystoreWrapper()) {
                    String str = AFInAppEventType.values;
                    AFLogger.afDebugLog("Resending Uninstall token to AF servers: ".concat(String.valueOf(str)));
                    AFd1dSDK.values(str);
                }
                ResponseNetwork responseNetwork = ((AFd1vSDK) aFd1rSDK).AFLogger;
                if (responseNetwork != null && (AFInAppEventParameterName = AFb1oSDK.AFInAppEventParameterName((String) responseNetwork.getBody())) != null) {
                    AFb1zSDK.AFKeystoreWrapper(AFb1zSDK.this, AFInAppEventParameterName.optBoolean("send_background", false));
                }
                if (z) {
                    AFb1zSDK.AFInAppEventParameterName(AFb1zSDK.this, System.currentTimeMillis());
                }
            }
        }

        @Override
        public final void values(AFc1eSDK<?> aFc1eSDK) {
            if (aFc1eSDK instanceof AFd1pSDK) {
                AFb1zSDK.this.valueOf().AFLogger().values(((AFd1rSDK) aFc1eSDK).afDebugLog.afInfoLog);
            }
        }

        public AFa1ySDK(AFb1zSDK aFb1zSDK, byte b) {
            this();
        }
    }

    public class AFa1zSDK implements Runnable {
        public final AFa1qSDK AFInAppEventType;

        public AFa1zSDK(AFb1zSDK aFb1zSDK, AFa1qSDK aFa1qSDK, byte b) {
            this(aFa1qSDK);
        }

        @Override
        public final void run() {
            AFb1zSDK.AFKeystoreWrapper(AFb1zSDK.this, this.AFInAppEventType);
        }

        public AFa1zSDK(AFa1qSDK aFa1qSDK) {
            this.AFInAppEventType = aFa1qSDK;
        }
    }

    static {
        values();
        AFInAppEventType = "225";
        Object[] objArr = new Object[1];
        AFKeystoreWrapper((byte) (7 - TextUtils.indexOf((CharSequence) BuildConfig.FLAVOR, '0')), "㖼", 1 - (ViewConfiguration.getMaximumFlingVelocity() >> 16), objArr);
        values = "6.9.4".substring(0, "6.9.4".lastIndexOf(((String) objArr[0]).intern()));
        afDebugLog = "https://%sstats.%s/stats";
        StringBuilder sb = new StringBuilder();
        sb.append(values);
        sb.append("/androidevent?buildnumber=6.9.4&app_id=");
        AFKeystoreWrapper = sb.toString();
        AFLogger = "https://%sadrevenue.%s/api/v2/generic/v6.9.4/android?app_id=";
        StringBuilder sb2 = new StringBuilder();
        sb2.append(values);
        sb2.append("/androidevent?app_id=");
        afInfoLog = sb2.toString();
        StringBuilder sb3 = new StringBuilder("https://%sconversions.%s/api/v");
        sb3.append(afInfoLog);
        AFLogger$LogLevel = sb3.toString();
        StringBuilder sb4 = new StringBuilder("https://%slaunches.%s/api/v");
        sb4.append(afInfoLog);
        AFVersionDeclaration = sb4.toString();
        StringBuilder sb5 = new StringBuilder("https://%sinapps.%s/api/v");
        sb5.append(afInfoLog);
        getLevel = sb5.toString();
        StringBuilder sb6 = new StringBuilder("https://%sattr.%s/api/v");
        sb6.append(afInfoLog);
        afWarnLog = sb6.toString();
        valueOf = null;
        AFInAppEventParameterName = null;
        afErrorLogForExcManagerOnly = new AFb1zSDK();
        int i2 = AppsFlyerConversionListener + 29;
        onResponseError = i2 % 128;
        if (i2 % 2 == 0) {
            return;
        }
        int i3 = 71 / 0;
    }

    public AFb1zSDK() {
        Executors.newSingleThreadExecutor();
        AFVersionDeclaration.init();
        AFc1zSDK aFc1zSDK = new AFc1zSDK();
        this.onValidateInAppFailure = aFc1zSDK;
        AFc1gSDK afDebugLog2 = aFc1zSDK.afDebugLog();
        afDebugLog2.AFInAppEventType.add(new AFa1ySDK(this, (byte) 0));
    }

    public static long AFInAppEventParameterName(AFb1zSDK aFb1zSDK, long j2) {
        int i2 = onResponseError + 27;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        aFb1zSDK.onInstallConversionFailureNative = j2;
        int i4 = onResponseError + 57;
        AppsFlyerConversionListener = i4 % 128;
        if ((i4 % 2 == 0 ? '3' : (char) 7) != '3') {
            return j2;
        }
        int i5 = 24 / 0;
        return j2;
    }

    public static Map AFInAppEventType(AFb1zSDK aFb1zSDK) {
        int i2 = onResponseError + 95;
        AppsFlyerConversionListener = i2 % 128;
        boolean z = i2 % 2 == 0;
        Map<String, Object> map = aFb1zSDK.onConversionDataFail;
        if (z) {
            int i3 = 48 / 0;
        }
        return map;
    }

    public static Application AFKeystoreWrapper(AFb1zSDK aFb1zSDK) {
        int i2 = onResponseError + 107;
        AppsFlyerConversionListener = i2 % 128;
        char c2 = i2 % 2 == 0 ? ';' : 'c';
        Application application = aFb1zSDK.onDeepLinkingNative;
        if (c2 == ';') {
            Object[] objArr = null;
            int length = objArr.length;
        }
        int i3 = onResponseError + 53;
        AppsFlyerConversionListener = i3 % 128;
        int i4 = i3 % 2;
        return application;
    }

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

    private String AFLogger$LogLevel(Context context) {
        int i2 = AppsFlyerConversionListener + 89;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        File afDebugLog2 = afDebugLog(AFInAppEventType("ro.appsflyer.preinstall.path"));
        if (AFKeystoreWrapper(afDebugLog2)) {
            int i4 = AppsFlyerConversionListener + 53;
            onResponseError = i4 % 128;
            int i5 = i4 % 2;
            afDebugLog2 = afDebugLog(values(context, "AF_PRE_INSTALL_PATH"));
        }
        if (!(!AFKeystoreWrapper(afDebugLog2))) {
            int i6 = onResponseError + 107;
            AppsFlyerConversionListener = i6 % 128;
            boolean z = i6 % 2 == 0;
            afDebugLog2 = afDebugLog("/data/local/tmp/pre_install.appsflyer");
            if (z) {
                int i7 = 58 / 0;
            }
        }
        if ((AFKeystoreWrapper(afDebugLog2) ? (char) 17 : '<') == 17) {
            int i8 = onResponseError + 51;
            AppsFlyerConversionListener = i8 % 128;
            int i9 = i8 % 2;
            afDebugLog2 = afDebugLog("/etc/pre_install.appsflyer");
        }
        if ((AFKeystoreWrapper(afDebugLog2) ? '\r' : (char) 20) != '\r') {
            return valueOf(afDebugLog2, context.getPackageName());
        }
        return null;
    }

    private String AFVersionDeclaration(Context context) {
        String str;
        SharedPreferences AFKeystoreWrapper2 = AFKeystoreWrapper(context);
        String AFInAppEventParameterName2 = AFInAppEventParameterName("preInstallName");
        if (AFInAppEventParameterName2 != null) {
            int i2 = onResponseError + 63;
            AppsFlyerConversionListener = i2 % 128;
            int i3 = i2 % 2;
            return AFInAppEventParameterName2;
        }
        if (AFKeystoreWrapper2.contains("preInstallName")) {
            str = AFKeystoreWrapper2.getString("preInstallName", null);
        } else {
            if (afInfoLog(context) && (AFInAppEventParameterName2 = AFLogger$LogLevel(context)) == null) {
                AFInAppEventParameterName2 = values(context, "AF_PRE_INSTALL_NAME");
            }
            if (AFInAppEventParameterName2 != null) {
                AFInAppEventParameterName(context).values("preInstallName", AFInAppEventParameterName2);
                int i4 = onResponseError + 33;
                AppsFlyerConversionListener = i4 % 128;
                int i5 = i4 % 2;
            }
            str = AFInAppEventParameterName2;
        }
        if (str != null) {
            values("preInstallName", str);
        }
        return str;
    }

    public static float AppsFlyer2dXConversionCallback(Context context) {
        int intExtra;
        int intExtra2;
        float f2 = 1.0f;
        try {
            Intent registerReceiver = context.getApplicationContext().registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
            intExtra = registerReceiver.getIntExtra("level", -1);
            intExtra2 = registerReceiver.getIntExtra("scale", -1);
        } catch (Throwable th) {
            AFLogger.afErrorLog(th.getMessage(), th);
        }
        if (intExtra == -1) {
            return 50.0f;
        }
        int i2 = onResponseError + 111;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        if (intExtra2 == -1) {
            return 50.0f;
        }
        f2 = (intExtra / intExtra2) * 100.0f;
        int i4 = onResponseError + 51;
        AppsFlyerConversionListener = i4 % 128;
        int i5 = i4 % 2;
        return f2;
    }

    public static void afDebugLog(Context context) {
        int i2 = onResponseError + 89;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        try {
            if (((context.getPackageManager().getPackageInfo(context.getPackageName(), 0).applicationInfo.flags & 32768) != 0 ? 'K' : (char) 27) != 'K') {
                return;
            }
            int i4 = onResponseError + 23;
            AppsFlyerConversionListener = i4 % 128;
            if (i4 % 2 == 0) {
                int identifier = context.getResources().getIdentifier("appsflyer_backup_rules", "xml", context.getPackageName());
                Object obj = null;
                super.hashCode();
            }
        } catch (Exception e2) {
            AFLogger.afErrorLogForExcManagerOnly("checkBackupRules Exception", e2);
            AFLogger.afRDLog("checkBackupRules Exception: ".concat(String.valueOf(e2)));
        }
    }

    private void afErrorLog(Context context) {
        this.onConversionDataFail = new HashMap();
        final long currentTimeMillis = System.currentTimeMillis();
        final AFa1lSDK.AFa1wSDK aFa1wSDK = new AFa1lSDK.AFa1wSDK() {
            @Override
            public final void AFInAppEventType(String str) {
                AFb1zSDK.AFInAppEventType(AFb1zSDK.this).put("error", str);
            }

            @Override
            public final void AFKeystoreWrapper(String str, String str2, String str3) {
                if (str != null) {
                    AFLogger.afInfoLog("Facebook Deferred AppLink data received: ".concat(String.valueOf(str)));
                    AFb1zSDK.AFInAppEventType(AFb1zSDK.this).put("link", str);
                    if (str2 != null) {
                        AFb1zSDK.AFInAppEventType(AFb1zSDK.this).put("target_url", str2);
                    }
                    if (str3 != null) {
                        HashMap hashMap = new HashMap();
                        HashMap hashMap2 = new HashMap();
                        hashMap2.put("promo_code", str3);
                        hashMap.put("deeplink_context", hashMap2);
                        AFb1zSDK.AFInAppEventType(AFb1zSDK.this).put("extras", hashMap);
                    }
                } else {
                    AFb1zSDK.AFInAppEventType(AFb1zSDK.this).put("link", BuildConfig.FLAVOR);
                }
                AFb1zSDK.AFInAppEventType(AFb1zSDK.this).put("ttr", String.valueOf(System.currentTimeMillis() - currentTimeMillis));
            }
        };
        try {
            Class.forName("com.facebook.FacebookSdk").getMethod("sdkInitialize", Context.class).invoke(null, context);
            final Class<?> cls = Class.forName("com.facebook.applinks.AppLinkData");
            Class<?> cls2 = Class.forName("com.facebook.applinks.AppLinkData$CompletionHandler");
            Method method = cls.getMethod("fetchDeferredAppLinkData", Context.class, String.class, cls2);
            Object newProxyInstance = Proxy.newProxyInstance(cls2.getClassLoader(), new Class[]{cls2}, new InvocationHandler() {
                @Override
                public final Object invoke(Object obj, Method method2, Object[] objArr) {
                    String str;
                    String str2;
                    String str3;
                    Bundle bundle;
                    if (!method2.getName().equals("onDeferredAppLinkDataFetched")) {
                        AFa1wSDK aFa1wSDK2 = aFa1wSDK;
                        if (aFa1wSDK2 != null) {
                            aFa1wSDK2.AFInAppEventType("onDeferredAppLinkDataFetched invocation failed");
                        }
                        return null;
                    }
                    if (objArr[0] != null) {
                        Bundle bundle2 = (Bundle) Bundle.class.cast(cls.getMethod("getArgumentBundle", new Class[0]).invoke(cls.cast(objArr[0]), new Object[0]));
                        if (bundle2 != null) {
                            str2 = bundle2.getString("com.facebook.platform.APPLINK_NATIVE_URL");
                            str3 = bundle2.getString("target_url");
                            Bundle bundle3 = bundle2.getBundle("extras");
                            str = (bundle3 == null || (bundle = bundle3.getBundle("deeplink_context")) == null) ? null : bundle.getString("promo_code");
                        } else {
                            str = null;
                            str2 = null;
                            str3 = null;
                        }
                        AFa1wSDK aFa1wSDK3 = aFa1wSDK;
                        if (aFa1wSDK3 != null) {
                            aFa1wSDK3.AFKeystoreWrapper(str2, str3, str);
                        }
                    } else {
                        AFa1wSDK aFa1wSDK4 = aFa1wSDK;
                        if (aFa1wSDK4 != null) {
                            aFa1wSDK4.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);
                return;
            }
            int i2 = AppsFlyerConversionListener + 123;
            onResponseError = i2 % 128;
            if ((i2 % 2 != 0 ? 'Q' : 'a') == 'a') {
                aFa1wSDK.AFInAppEventType("Facebook app id not defined in resources");
            } else {
                aFa1wSDK.AFInAppEventType("Facebook app id not defined in resources");
                int i3 = 68 / 0;
            }
        } catch (ClassNotFoundException e2) {
            AFLogger.afErrorLogForExcManagerOnly("FB class missing error", e2);
            aFa1wSDK.AFInAppEventType(e2.toString());
        } catch (IllegalAccessException e3) {
            AFLogger.afErrorLogForExcManagerOnly("FB illegal access", e3);
            aFa1wSDK.AFInAppEventType(e3.toString());
        } catch (NoSuchMethodException e4) {
            AFLogger.afErrorLogForExcManagerOnly("FB method missing error", e4);
            aFa1wSDK.AFInAppEventType(e4.toString());
        } catch (InvocationTargetException e5) {
            AFLogger.afErrorLogForExcManagerOnly("FB invocation error", e5);
            aFa1wSDK.AFInAppEventType(e5.toString());
        }
    }

    private String afErrorLogForExcManagerOnly(Context context) {
        SharedPreferences AFKeystoreWrapper2;
        int i2 = onResponseError + 111;
        AppsFlyerConversionListener = i2 % 128;
        Object[] objArr = null;
        Object[] objArr2 = 0;
        if (i2 % 2 == 0) {
            AFKeystoreWrapper2 = AFKeystoreWrapper(context);
            int i3 = 37 / 0;
        } else {
            AFKeystoreWrapper2 = AFKeystoreWrapper(context);
        }
    }

    public static boolean afInfoLog(Context context) {
        int i2 = AppsFlyerConversionListener + 57;
        onResponseError = i2 % 128;
        Object[] objArr = null;
        Object[] objArr2 = 0;
        if (i2 % 2 != 0) {
            boolean contains = AFKeystoreWrapper(context).contains("appsFlyerCount");
            int length = (objArr2 == true ? 1 : 0).length;
        }
    }

    private boolean afRDLog() {
        int i2 = AppsFlyerConversionListener + 95;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        if ((this.onConversionDataFail != null ? (char) 27 : '\t') == 27) {
            int i4 = AppsFlyerConversionListener + 39;
            onResponseError = i4 % 128;
            if (i4 % 2 != 0) {
                boolean isEmpty = this.onConversionDataFail.isEmpty();
                Object obj = null;
                super.hashCode();
                if (!isEmpty) {
                    return true;
                }
            } else {
                if ((!this.onConversionDataFail.isEmpty() ? '\'' : '$') != '\'') {
                }
            }
        }
        return false;
    }

    private String afWarnLog(Context context) {
        String string;
        int i2 = AppsFlyerConversionListener + 15;
        onResponseError = i2 % 128;
        if (!(i2 % 2 == 0)) {
            string = AppsFlyerProperties.getInstance().getString("api_store_value");
            Object[] objArr = null;
            int length = objArr.length;
        } else {
            string = AppsFlyerProperties.getInstance().getString("api_store_value");
        }
    }

    private long getLevel(Context context) {
        long j2 = AFKeystoreWrapper(context).getLong("AppsFlyerTimePassedSincePrevLaunch", 0L);
        long currentTimeMillis = System.currentTimeMillis();
        AFInAppEventParameterName(context).valueOf("AppsFlyerTimePassedSincePrevLaunch", currentTimeMillis);
        if ((j2 > 0 ? 'b' : (char) 28) == 28) {
            return -1L;
        }
        int i2 = onResponseError + 113;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        int i4 = AppsFlyerConversionListener + 101;
        onResponseError = i4 % 128;
        int i5 = i4 % 2;
        return (currentTimeMillis - j2) / 1000;
    }

    public static boolean onInstallConversionFailureNative(Context context) {
        if ((context != null ? '!' : '\f') != '\f') {
            int i2 = AppsFlyerConversionListener + 101;
            onResponseError = i2 % 128;
            if (i2 % 2 != 0) {
            }
        }
        return false;
    }

    public static boolean valueOf(AFb1zSDK aFb1zSDK, AFa1qSDK aFa1qSDK, SharedPreferences sharedPreferences) {
        int i2 = AppsFlyerConversionListener + 89;
        onResponseError = i2 % 128;
        char c2 = i2 % 2 != 0 ? '\'' : (char) 7;
        boolean AFInAppEventParameterName2 = aFb1zSDK.AFInAppEventParameterName(aFa1qSDK, sharedPreferences);
        if (c2 == '\'') {
            Object obj = null;
            super.hashCode();
        }
        return AFInAppEventParameterName2;
    }

    public static AFc1zSDK values(AFb1zSDK aFb1zSDK) {
        int i2 = AppsFlyerConversionListener + 75;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        AFc1zSDK aFc1zSDK = aFb1zSDK.onValidateInAppFailure;
        int i4 = AppsFlyerConversionListener + 77;
        onResponseError = i4 % 128;
        int i5 = i4 % 2;
        return aFc1zSDK;
    }

    public static void values() {
        onValidateInApp = new char[]{13800, 13748, 13815, 13820, 13811, 13802, 13801, 13804, 13810, 13803, 13805, 13819, 13806, 13765, 13812, 13739, 13782, 13822, 13807, 13817, 13823, 13808, 13816, 13790, 13809};
        AppsFlyerInAppPurchaseValidatorListener = (char) 5;
    }

    @Override
    public final void addPushNotificationDeepLinkPath(String... strArr) {
        List<String> asList;
        List<List<String>> list;
        int i2 = AppsFlyerConversionListener + 99;
        onResponseError = i2 % 128;
        if ((i2 % 2 != 0 ? 'V' : '5') != '5') {
            asList = Arrays.asList(strArr);
            list = AFa1sSDK.AFInAppEventType().afInfoLog;
            boolean contains = list.contains(asList);
            Object[] objArr = null;
            int length = objArr.length;
        } else {
            asList = Arrays.asList(strArr);
            list = AFa1sSDK.AFInAppEventType().afInfoLog;
        }
        int i3 = AppsFlyerConversionListener + 75;
        onResponseError = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void anonymizeUser(boolean z) {
        int i2 = onResponseError + 111;
        AppsFlyerConversionListener = i2 % 128;
        if ((i2 % 2 == 0 ? '2' : '9') != '9') {
            AFb1nSDK AFInAppEventType2 = AFb1nSDK.AFInAppEventType();
            String[] strArr = new String[0];
            strArr[0] = String.valueOf(z);
            AFInAppEventType2.values("anonymizeUser", strArr);
        } else {
            AFb1nSDK.AFInAppEventType().values("anonymizeUser", String.valueOf(z));
        }
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, z);
        int i3 = onResponseError + 65;
        AppsFlyerConversionListener = i3 % 128;
        if (i3 % 2 != 0) {
            return;
        }
        Object obj = null;
        super.hashCode();
    }

    @Override
    public final void appendParametersToDeepLinkingURL(String str, Map<String, String> map) {
        int i2 = onResponseError + 53;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        AFa1sSDK AFInAppEventType2 = AFa1sSDK.AFInAppEventType();
        AFInAppEventType2.AFInAppEventParameterName = str;
        AFInAppEventType2.afRDLog = map;
        int i4 = onResponseError + 51;
        AppsFlyerConversionListener = i4 % 128;
        if ((i4 % 2 == 0 ? '^' : (char) 20) != '^') {
            return;
        }
        Object[] objArr = null;
        int length = objArr.length;
    }

    @Override
    public final void enableFacebookDeferredApplinks(boolean z) {
        int i2 = onResponseError + 63;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        this.onDeepLinking = z;
        int i4 = AppsFlyerConversionListener + 21;
        onResponseError = i4 % 128;
        int i5 = i4 % 2;
    }

    @Override
    public final String getAppsFlyerUID(Context context) {
        AFc1xSDK aFc1xSDK;
        int i2 = onResponseError + 23;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        AFb1nSDK.AFInAppEventType().values("getAppsFlyerUID", new String[0]);
        if (context == null) {
            int i4 = onResponseError + 7;
            AppsFlyerConversionListener = i4 % 128;
            Object[] objArr = null;
            if (i4 % 2 != 0) {
                return null;
            }
            int length = objArr.length;
            return null;
        }
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            int i5 = onResponseError + 27;
            AppsFlyerConversionListener = i5 % 128;
            if ((i5 % 2 == 0 ? (char) 0 : 'O') != 0) {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
            } else {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
                int i6 = 11 / 0;
            }
        }
        return AFb1sSDK.AFInAppEventType((WeakReference<Context>) new WeakReference(this.onValidateInAppFailure.values().AFInAppEventParameterName.valueOf));
    }

    @Override
    public final String getAttributionId(Context context) {
        try {
            String valueOf2 = new AFa1aSDK(context, valueOf()).valueOf();
            int i2 = onResponseError + 65;
            AppsFlyerConversionListener = i2 % 128;
            int i3 = i2 % 2;
            return valueOf2;
        } catch (Throwable th) {
            AFLogger.afErrorLog("Could not collect facebook attribution id. ", th);
            return null;
        }
    }

    @Override
    public final String getHostName() {
        int i2 = AppsFlyerConversionListener + 111;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        String AFInAppEventParameterName2 = AFInAppEventParameterName("custom_host");
        if (AFInAppEventParameterName2 == null) {
            return "appsflyer.com";
        }
        int i4 = AppsFlyerConversionListener + 105;
        onResponseError = i4 % 128;
        int i5 = i4 % 2;
        return AFInAppEventParameterName2;
    }

    @Override
    public final String getHostPrefix() {
        int i2 = onResponseError + 41;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        String AFInAppEventParameterName2 = AFInAppEventParameterName("custom_host_prefix");
        if (AFInAppEventParameterName2 == null) {
            return BuildConfig.FLAVOR;
        }
        int i4 = AppsFlyerConversionListener + 77;
        onResponseError = i4 % 128;
        if ((i4 % 2 != 0 ? 'U' : 'b') != 'b') {
            Object obj = null;
            super.hashCode();
        }
        return AFInAppEventParameterName2;
    }

    @Override
    public final String getOutOfStore(Context context) {
        String string = AppsFlyerProperties.getInstance().getString("api_store_value");
        Object[] objArr = null;
        if (!(string == null)) {
            int i2 = AppsFlyerConversionListener + 39;
            onResponseError = i2 % 128;
            if (i2 % 2 != 0) {
                int length = objArr.length;
            }
            return string;
        }
        String values2 = values(context, "AF_STORE");
        if ((values2 != null ? '>' : '?') != '>') {
            AFLogger.afInfoLog("No out-of-store value set");
            return null;
        }
        int i3 = AppsFlyerConversionListener + 95;
        onResponseError = i3 % 128;
        int i4 = i3 % 2;
        return values2;
    }

    @Override
    public final String getSdkVersion() {
        AFb1aSDK valueOf2;
        int i2 = onResponseError + 89;
        AppsFlyerConversionListener = i2 % 128;
        if ((i2 % 2 == 0 ? (char) 5 : 'M') != 5) {
            valueOf2 = valueOf();
            valueOf2.getLevel().values("getSdkVersion", new String[0]);
        } else {
            valueOf2 = valueOf();
            valueOf2.getLevel().values("getSdkVersion", new String[0]);
        }
        valueOf2.values();
        String AFKeystoreWrapper2 = AFc1ySDK.AFKeystoreWrapper();
        int i3 = onResponseError + 81;
        AppsFlyerConversionListener = i3 % 128;
        if ((i3 % 2 == 0 ? (char) 19 : 'b') != 19) {
            return AFKeystoreWrapper2;
        }
        Object[] objArr = null;
        int length = objArr.length;
        return AFKeystoreWrapper2;
    }

    @Override
    public final AppsFlyerLib init(String str, AppsFlyerConversionListener appsFlyerConversionListener, Context context) {
        String str2;
        if (!this.onConversionDataSuccess) {
            this.onConversionDataSuccess = true;
            this.onValidateInAppFailure.AFLogger$LogLevel().AFInAppEventType = str;
            AFb1rSDK.values(str);
            if (context != null) {
                this.onDeepLinkingNative = (Application) context.getApplicationContext();
                AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
                if (context != null) {
                    AFc1xSDK aFc1xSDK = aFc1zSDK.AFInAppEventType;
                    if (context != null) {
                        int i2 = onResponseError + 59;
                        AppsFlyerConversionListener = i2 % 128;
                        if (i2 % 2 == 0) {
                            aFc1xSDK.valueOf = context.getApplicationContext();
                            int i3 = 10 / 0;
                        } else {
                            aFc1xSDK.valueOf = context.getApplicationContext();
                        }
                    }
                }
                valueOf().AFLogger().AFInAppEventType = System.currentTimeMillis();
                valueOf().afRDLog().AFInAppEventParameterName((AFd1mSDK) null);
                AFe1aSDK AFVersionDeclaration2 = valueOf().AFVersionDeclaration();
                final AFe1fSDK aFe1fSDK = new AFe1fSDK(new AnonymousClass1());
                Runnable runnable = new Runnable() {
                    @Override
                    public final void run() {
                        SharedPreferences AFKeystoreWrapper2 = AFb1zSDK.AFKeystoreWrapper(AFb1zSDK.AFKeystoreWrapper(AFb1zSDK.this));
                        int AFInAppEventParameterName2 = AFb1zSDK.AFInAppEventParameterName(AFKeystoreWrapper2, false);
                        boolean z = AFKeystoreWrapper2.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false);
                        boolean z2 = aFe1fSDK.afErrorLog == AFe1dSDK.AFa1zSDK.NOT_STARTED;
                        if (AFInAppEventParameterName2 == 1) {
                            if (z2 || z) {
                                AFb1zSDK aFb1zSDK = AFb1zSDK.this;
                                AFe1pSDK aFe1pSDK = new AFe1pSDK();
                                Application AFKeystoreWrapper3 = AFb1zSDK.AFKeystoreWrapper(AFb1zSDK.this);
                                if (AFKeystoreWrapper3 != null) {
                                    aFe1pSDK.valueOf = (Application) AFKeystoreWrapper3.getApplicationContext();
                                }
                                AFb1zSDK.AFKeystoreWrapper(aFb1zSDK, aFe1pSDK);
                            }
                        }
                    }
                };
                AFVersionDeclaration2.AFInAppEventType(aFe1fSDK);
                AFVersionDeclaration2.AFInAppEventType(new AFf1zSDK(runnable));
                AFVersionDeclaration2.AFInAppEventType(new AFe1cSDK(runnable, valueOf()));
                AFVersionDeclaration2.AFInAppEventType(new AFe1eSDK(runnable, valueOf()));
                Application application = this.onDeepLinkingNative;
                AFb1aSDK valueOf2 = valueOf();
                if (Build.VERSION.SDK_INT >= 19) {
                    List<ResolveInfo> queryIntentContentProviders = application.getPackageManager().queryIntentContentProviders(new Intent("com.appsflyer.referrer.INSTALL_PROVIDER"), 0);
                    if ((queryIntentContentProviders != null) && !queryIntentContentProviders.isEmpty()) {
                        ArrayList arrayList = new ArrayList();
                        Iterator<ResolveInfo> it = queryIntentContentProviders.iterator();
                        while (true) {
                            if (!it.hasNext()) {
                                break;
                            }
                            ProviderInfo providerInfo = it.next().providerInfo;
                            if (providerInfo != null) {
                                arrayList.add(new AFe1bSDK(providerInfo, runnable, valueOf2));
                            } else {
                                AFLogger.afWarnLog("[Preinstall]: com.appsflyer.referrer.INSTALL_PROVIDER Action is set for non ContentProvider component");
                            }
                        }
                        if (!arrayList.isEmpty()) {
                            AFVersionDeclaration2.AFInAppEventType.addAll(arrayList);
                            StringBuilder sb = new StringBuilder("[Preinstall]: Detected ");
                            sb.append(arrayList.size());
                            sb.append(" valid preinstall provider(s)");
                            AFLogger.afDebugLog(sb.toString());
                            int i4 = onResponseError + 39;
                            AppsFlyerConversionListener = i4 % 128;
                            int i5 = i4 % 2;
                        }
                    }
                }
                for (AFe1dSDK aFe1dSDK : AFVersionDeclaration2.valueOf()) {
                    aFe1dSDK.AFInAppEventType(this.onDeepLinkingNative);
                }
                this.onValidateInAppFailure.AFLogger$LogLevel().valueOf();
                AFb1gSDK.AFKeystoreWrapper = this.onDeepLinkingNative;
            } else {
                AFLogger.afWarnLog("context is null, Google Install Referrer will be not initialized");
            }
            AFb1nSDK AFInAppEventType2 = AFb1nSDK.AFInAppEventType();
            String[] strArr = new String[2];
            strArr[0] = str;
            if (appsFlyerConversionListener == null) {
                int i6 = AppsFlyerConversionListener + 117;
                onResponseError = i6 % 128;
                int i7 = i6 % 2;
                str2 = "null";
            } else {
                str2 = "conversionDataListener";
            }
            strArr[1] = str2;
            AFInAppEventType2.values("init", strArr);
            AFLogger.AFInAppEventType(String.format("Initializing AppsFlyer SDK: (v%s.%s)", "6.9.4", AFInAppEventType));
            AFInAppEventParameterName = appsFlyerConversionListener;
        }
        return this;
    }

    @Override
    public final boolean isPreInstalledApp(Context context) {
        int i2 = onResponseError + 115;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        try {
            if (((context.getPackageManager().getApplicationInfo(context.getPackageName(), 0).flags & 1) != 0 ? 'a' : (char) 6) != 6) {
                int i4 = onResponseError + 75;
                AppsFlyerConversionListener = i4 % 128;
                return (i4 % 2 == 0 ? '0' : 'S') != '0';
            }
        } catch (PackageManager.NameNotFoundException e2) {
            AFLogger.afErrorLog("Could not check if app is pre installed", e2);
        }
        return false;
    }

    @Override
    @Deprecated
    public final boolean isStopped() {
        int i2 = onResponseError + 15;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        boolean values2 = this.onValidateInAppFailure.AFLogger$LogLevel().values();
        int i4 = AppsFlyerConversionListener + 107;
        onResponseError = i4 % 128;
        if (i4 % 2 == 0) {
            return values2;
        }
        int i5 = 86 / 0;
        return values2;
    }

    @Override
    public final void logEvent(Context context, String str, Map<String, Object> map) {
        int i2 = onResponseError + 111;
        AppsFlyerConversionListener = i2 % 128;
        char c2 = i2 % 2 == 0 ? ')' : '=';
        Object[] objArr = null;
        logEvent(context, str, map, null);
        if (c2 != ')') {
            return;
        }
        int length = objArr.length;
    }

    @Override
    public final void logLocation(Context context, double d2, double d3) {
        AFb1nSDK.AFInAppEventType().values("logLocation", String.valueOf(d2), String.valueOf(d3));
        HashMap hashMap = new HashMap();
        hashMap.put(AFInAppEventParameterName.LONGTITUDE, Double.toString(d3));
        hashMap.put(AFInAppEventParameterName.LATITUDE, Double.toString(d2));
        AFInAppEventType(context, AFInAppEventType.LOCATION_COORDINATES, hashMap);
        int i2 = onResponseError + 99;
        AppsFlyerConversionListener = i2 % 128;
        if ((i2 % 2 == 0 ? 'L' : '\r') != 'L') {
            return;
        }
        Object[] objArr = null;
        int length = objArr.length;
    }

    @Override
    public final void logSession(Context context) {
        int i2 = AppsFlyerConversionListener + 123;
        onResponseError = i2 % 128;
        if (!(i2 % 2 != 0)) {
            AFb1nSDK.AFInAppEventType().values("logSession", new String[0]);
        } else {
            AFb1nSDK.AFInAppEventType().values("logSession", new String[1]);
        }
        AFb1nSDK.AFInAppEventType().afErrorLog();
        values(context, AFe1ySDK.logSession);
        AFInAppEventType(context, (String) null, (Map<String, Object>) null);
    }

    @Override
    public final void onPause(Context context) {
        int i2 = AppsFlyerConversionListener + 57;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        if (AFb1xSDK.AFKeystoreWrapper != null) {
            AFb1xSDK.AFKeystoreWrapper.values(context);
        }
        int i4 = onResponseError + 21;
        AppsFlyerConversionListener = i4 % 128;
        if ((i4 % 2 == 0 ? 'P' : '`') != 'P') {
            return;
        }
        Object obj = null;
        super.hashCode();
    }

    @Override
    @Deprecated
    public final void performOnAppAttribution(Context context, URI uri) {
        int i2 = onResponseError + 111;
        AppsFlyerConversionListener = i2 % 128;
        Object obj = null;
        if (i2 % 2 == 0) {
            super.hashCode();
        }
    }

    @Override
    public final void performOnDeepLinking(final Intent intent, Context context) {
        if (intent == null) {
            AFb1kSDK.AFKeystoreWrapper("performOnDeepLinking was called with null intent", DeepLinkResult.Error.DEVELOPER_ERROR);
            return;
        }
        if ((context == null ? (char) 2 : '0') != '0') {
            AFb1kSDK.AFKeystoreWrapper("performOnDeepLinking was called with null context", DeepLinkResult.Error.DEVELOPER_ERROR);
            int i2 = AppsFlyerConversionListener + 15;
            onResponseError = i2 % 128;
            int i3 = i2 % 2;
            return;
        }
        final Context applicationContext = context.getApplicationContext();
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if ((applicationContext != null ? '\"' : (char) 25) == '\"') {
            AFc1xSDK aFc1xSDK = aFc1zSDK.AFInAppEventType;
            if (applicationContext != null) {
                aFc1xSDK.valueOf = applicationContext.getApplicationContext();
                int i4 = AppsFlyerConversionListener + 27;
                onResponseError = i4 % 128;
                int i5 = i4 % 2;
            }
        }
        this.onValidateInAppFailure.AFKeystoreWrapper().execute(new Runnable() {
            @Override
            public final void run() {
                AFb1zSDK.this.AFInAppEventType(applicationContext, intent);
            }
        });
    }

    @Override
    public final void registerConversionListener(Context context, AppsFlyerConversionListener appsFlyerConversionListener) {
        int i2 = onResponseError + 81;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        AFb1nSDK.AFInAppEventType().values("registerConversionListener", new String[0]);
        valueOf(appsFlyerConversionListener);
        int i4 = onResponseError + 119;
        AppsFlyerConversionListener = i4 % 128;
        int i5 = i4 % 2;
    }

    @Override
    public final void registerValidatorListener(Context context, AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener) {
        int i2 = AppsFlyerConversionListener + 53;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        AFb1nSDK.AFInAppEventType().values("registerValidatorListener", new String[0]);
        AFLogger.afDebugLog("registerValidatorListener called");
        if (appsFlyerInAppPurchaseValidatorListener != null) {
            valueOf = appsFlyerInAppPurchaseValidatorListener;
            return;
        }
        int i4 = onResponseError + 95;
        AppsFlyerConversionListener = i4 % 128;
        boolean z = i4 % 2 == 0;
        AFLogger.afDebugLog("registerValidatorListener null listener");
        if (z) {
            Object obj = null;
            super.hashCode();
        }
    }

    @Override
    public final void sendAdRevenue(Context context, Map<String, Object> map) {
        int i2 = AppsFlyerConversionListener + 113;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            AFc1xSDK aFc1xSDK = aFc1zSDK.AFInAppEventType;
            if ((context != null ? (char) 30 : ']') == 30) {
                int i4 = AppsFlyerConversionListener + 81;
                onResponseError = i4 % 128;
                if ((i4 % 2 != 0 ? (char) 26 : 'S') != 'S') {
                    aFc1xSDK.valueOf = context.getApplicationContext();
                    int i5 = 15 / 0;
                } else {
                    aFc1xSDK.valueOf = context.getApplicationContext();
                }
            }
        }
        AFe1uSDK aFe1uSDK = new AFe1uSDK();
        if (!(context == null)) {
            int i6 = onResponseError + 1;
            AppsFlyerConversionListener = i6 % 128;
            int i7 = i6 % 2;
            aFe1uSDK.valueOf = (Application) context.getApplicationContext();
        }
        int valueOf2 = valueOf(AFKeystoreWrapper(context));
        aFe1uSDK.valueOf().put("ad_network", map);
        aFe1uSDK.valueOf().put("adrevenue_counter", Integer.valueOf(valueOf2));
        AFInAppEventParameterName(aFe1uSDK, context instanceof Activity ? (Activity) context : null);
    }

    @Override
    public final void sendInAppPurchaseData(Context context, Map<String, Object> map, PurchaseHandler.PurchaseValidationCallback purchaseValidationCallback) {
        AFc1xSDK aFc1xSDK;
        int i2 = onResponseError + 13;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        Context applicationContext = context.getApplicationContext();
        if (applicationContext != null) {
            int i4 = AppsFlyerConversionListener + 53;
            onResponseError = i4 % 128;
            if ((i4 % 2 != 0 ? (char) 29 : (char) 6) != 6) {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
                int i5 = 97 / 0;
            } else {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
            }
        }
        PurchaseHandler afErrorLog = valueOf().afErrorLog();
        if (afErrorLog.AFKeystoreWrapper(map, purchaseValidationCallback, "purchases")) {
            AFd1xSDK aFd1xSDK = new AFd1xSDK(map, purchaseValidationCallback, afErrorLog.values);
            AFc1gSDK aFc1gSDK = afErrorLog.AFInAppEventType;
            aFc1gSDK.valueOf.execute(aFc1gSDK.new AnonymousClass1(aFd1xSDK));
        }
        int i6 = onResponseError + 31;
        AppsFlyerConversionListener = i6 % 128;
        if (i6 % 2 == 0) {
            Object obj = null;
            super.hashCode();
        }
    }

    @Override
    public final void sendPurchaseData(Context context, Map<String, Object> map, PurchaseHandler.PurchaseValidationCallback purchaseValidationCallback) {
        AFc1xSDK aFc1xSDK;
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        Context applicationContext = context.getApplicationContext();
        if (applicationContext != null) {
            int i2 = AppsFlyerConversionListener + 45;
            onResponseError = i2 % 128;
            if (i2 % 2 != 0) {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
                Object obj = null;
                super.hashCode();
            } else {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
            }
        }
        PurchaseHandler afErrorLog = valueOf().afErrorLog();
        if (afErrorLog.AFKeystoreWrapper(map, purchaseValidationCallback, "subscriptions")) {
            AFd1ySDK aFd1ySDK = new AFd1ySDK(map, purchaseValidationCallback, afErrorLog.values);
            AFc1gSDK aFc1gSDK = afErrorLog.AFInAppEventType;
            aFc1gSDK.valueOf.execute(aFc1gSDK.new AnonymousClass1(aFd1ySDK));
        }
    }

    @Override
    public final void sendPushNotificationData(Activity activity) {
        long j2;
        String str;
        char c2;
        String str2 = "pid";
        if (activity != null && activity.getIntent() != null) {
            AFb1nSDK AFInAppEventType2 = AFb1nSDK.AFInAppEventType();
            StringBuilder sb = new StringBuilder("activity_intent_");
            sb.append(activity.getIntent().toString());
            AFInAppEventType2.values("sendPushNotificationData", activity.getLocalClassName(), sb.toString());
        } else if (activity != null) {
            int i2 = onResponseError + 99;
            AppsFlyerConversionListener = i2 % 128;
            if (i2 % 2 == 0) {
                AFb1nSDK.AFInAppEventType().values("sendPushNotificationData", activity.getLocalClassName(), "activity_intent_null");
            } else {
                AFb1nSDK.AFInAppEventType().values("sendPushNotificationData", activity.getLocalClassName(), "activity_intent_null");
            }
        } else {
            AFb1nSDK.AFInAppEventType().values("sendPushNotificationData", "activity_null");
        }
        String AFInAppEventParameterName2 = AFInAppEventParameterName(activity);
        this.init = AFInAppEventParameterName2;
        if (AFInAppEventParameterName2 == null) {
            return;
        }
        long currentTimeMillis = System.currentTimeMillis();
        if (this.onAppOpenAttributionNative == null) {
            AFLogger.afInfoLog("pushes: initializing pushes history..");
            this.onAppOpenAttributionNative = new ConcurrentHashMap();
            int i3 = AppsFlyerConversionListener + 79;
            onResponseError = i3 % 128;
            int i4 = i3 % 2;
            j2 = currentTimeMillis;
        } else {
            try {
                long j3 = AppsFlyerProperties.getInstance().getLong("pushPayloadMaxAging", 1800000L);
                j2 = currentTimeMillis;
                for (Long l2 : this.onAppOpenAttributionNative.keySet()) {
                    try {
                        JSONObject jSONObject = new JSONObject(this.init);
                        JSONObject jSONObject2 = new JSONObject(this.onAppOpenAttributionNative.get(l2));
                        if (jSONObject.opt(str2).equals(jSONObject2.opt(str2))) {
                            c2 = 15;
                            str = str2;
                        } else {
                            str = str2;
                            c2 = 18;
                        }
                        Object[] objArr = null;
                        Object[] objArr2 = 0;
                        if (c2 != 18 && 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.init = null;
                            int i5 = AppsFlyerConversionListener + 39;
                            onResponseError = i5 % 128;
                            if ((i5 % 2 != 0 ? (char) 20 : 'H') != 20) {
                                return;
                            }
                            super.hashCode();
                            return;
                        }
                        if (currentTimeMillis - l2.longValue() > j3) {
                            int i6 = AppsFlyerConversionListener + 101;
                            onResponseError = i6 % 128;
                            if (i6 % 2 != 0) {
                                this.onAppOpenAttributionNative.remove(l2);
                                int i7 = 18 / 0;
                            } else {
                                this.onAppOpenAttributionNative.remove(l2);
                            }
                        }
                        if (l2.longValue() <= j2) {
                            int i8 = AppsFlyerConversionListener + 59;
                            onResponseError = i8 % 128;
                            if (i8 % 2 != 0) {
                                j2 = l2.longValue();
                                int length = objArr.length;
                            } else {
                                j2 = l2.longValue();
                            }
                        }
                        str2 = str;
                    } 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.onAppOpenAttributionNative.size() == AppsFlyerProperties.getInstance().getInt("pushPayloadHistorySize", 2)) {
                        }
                        this.onAppOpenAttributionNative.put(Long.valueOf(currentTimeMillis), this.init);
                        start(activity);
                    }
                }
                int i9 = AppsFlyerConversionListener + 27;
                onResponseError = i9 % 128;
                int i10 = i9 % 2;
            } catch (Throwable th2) {
                th = th2;
                j2 = currentTimeMillis;
            }
        }
        if (this.onAppOpenAttributionNative.size() == AppsFlyerProperties.getInstance().getInt("pushPayloadHistorySize", 2)) {
            StringBuilder sb4 = new StringBuilder("pushes: removing oldest overflowing push (oldest push:");
            sb4.append(j2);
            sb4.append(")");
            AFLogger.afInfoLog(sb4.toString());
            this.onAppOpenAttributionNative.remove(Long.valueOf(j2));
        }
        this.onAppOpenAttributionNative.put(Long.valueOf(currentTimeMillis), this.init);
        start(activity);
    }

    @Override
    public final void setAdditionalData(Map<String, Object> map) {
        int i2 = AppsFlyerConversionListener + 125;
        onResponseError = i2 % 128;
        if (!(i2 % 2 == 0)) {
            Object obj = null;
            super.hashCode();
            if (map == null) {
                return;
            }
        } else if (map == null) {
            return;
        }
        AFb1nSDK.AFInAppEventType().values("setAdditionalData", map.toString());
        AppsFlyerProperties.getInstance().setCustomData(new JSONObject(map).toString());
        int i3 = onResponseError + 73;
        AppsFlyerConversionListener = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void setAndroidIdData(String str) {
        int i2 = onResponseError + 9;
        AppsFlyerConversionListener = i2 % 128;
        if ((i2 % 2 == 0 ? 'F' : '@') != 'F') {
            AFb1nSDK.AFInAppEventType().values("setAndroidIdData", str);
        } else {
            AFb1nSDK AFInAppEventType2 = AFb1nSDK.AFInAppEventType();
            String[] strArr = new String[1];
            strArr[1] = str;
            AFInAppEventType2.values("setAndroidIdData", strArr);
        }
        this.afRDLog = str;
    }

    @Override
    public final void setAppId(String str) {
        int i2 = onResponseError + 109;
        AppsFlyerConversionListener = i2 % 128;
        if ((i2 % 2 == 0 ? 'L' : '*') != '*') {
            AFb1nSDK.AFInAppEventType().values("setAppId", str);
        } else {
            AFb1nSDK.AFInAppEventType().values("setAppId", str);
        }
        values(AppsFlyerProperties.APP_ID, str);
        int i3 = AppsFlyerConversionListener + 29;
        onResponseError = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void setAppInviteOneLink(String str) {
        int i2;
        AFb1nSDK.AFInAppEventType().values("setAppInviteOneLink", str);
        AFLogger.afInfoLog("setAppInviteOneLink = ".concat(String.valueOf(str)));
        Object[] objArr = null;
        Object[] objArr2 = 0;
        if (!(str == null)) {
            int i3 = onResponseError + 99;
            AppsFlyerConversionListener = i3 % 128;
            if (!(i3 % 2 != 0)) {
                boolean equals = str.equals(AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.ONELINK_ID));
                super.hashCode();
            }
            values(AppsFlyerProperties.ONELINK_ID, str);
            i2 = onResponseError + 7;
            AppsFlyerConversionListener = i2 % 128;
            if (i2 % 2 != 0) {
                int length = objArr.length;
                return;
            }
            return;
        }
        AppsFlyerProperties.getInstance().remove(AppsFlyerProperties.ONELINK_DOMAIN);
        AppsFlyerProperties.getInstance().remove("onelinkVersion");
        AppsFlyerProperties.getInstance().remove(AppsFlyerProperties.ONELINK_SCHEME);
        values(AppsFlyerProperties.ONELINK_ID, str);
        i2 = onResponseError + 7;
        AppsFlyerConversionListener = i2 % 128;
        if (i2 % 2 != 0) {
        }
    }

    @Override
    public final void setCollectAndroidID(boolean z) {
        int i2 = AppsFlyerConversionListener + 19;
        onResponseError = i2 % 128;
        if (i2 % 2 == 0) {
            AFb1nSDK.AFInAppEventType().values("setCollectAndroidID", String.valueOf(z));
        } else {
            AFb1nSDK AFInAppEventType2 = AFb1nSDK.AFInAppEventType();
            String[] strArr = new String[0];
            strArr[1] = String.valueOf(z);
            AFInAppEventType2.values("setCollectAndroidID", strArr);
        }
        values(AppsFlyerProperties.COLLECT_ANDROID_ID, Boolean.toString(z));
        values(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, Boolean.toString(z));
    }

    @Override
    public final void setCollectIMEI(boolean z) {
        int i2 = AppsFlyerConversionListener + 97;
        onResponseError = i2 % 128;
        if (!(i2 % 2 == 0)) {
            AFb1nSDK AFInAppEventType2 = AFb1nSDK.AFInAppEventType();
            String[] strArr = new String[0];
            strArr[1] = String.valueOf(z);
            AFInAppEventType2.values("setCollectIMEI", strArr);
        } else {
            AFb1nSDK.AFInAppEventType().values("setCollectIMEI", String.valueOf(z));
        }
        values(AppsFlyerProperties.COLLECT_IMEI, Boolean.toString(z));
        values(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, Boolean.toString(z));
        int i3 = onResponseError + 25;
        AppsFlyerConversionListener = i3 % 128;
        if ((i3 % 2 == 0 ? '=' : 'J') != '=') {
            return;
        }
        Object[] objArr = null;
        int length = objArr.length;
    }

    @Override
    @Deprecated
    public final void setCollectOaid(boolean z) {
        int i2 = onResponseError + 113;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        AFb1nSDK.AFInAppEventType().values("setCollectOaid", String.valueOf(z));
        values(AppsFlyerProperties.COLLECT_OAID, Boolean.toString(z));
        int i4 = onResponseError + 7;
        AppsFlyerConversionListener = i4 % 128;
        int i5 = i4 % 2;
    }

    @Override
    public final void setCurrencyCode(String str) {
        int i2 = onResponseError + 37;
        AppsFlyerConversionListener = i2 % 128;
        if (i2 % 2 == 0) {
            AFb1nSDK.AFInAppEventType().values("setCurrencyCode", str);
        } else {
            AFb1nSDK.AFInAppEventType().values("setCurrencyCode", str);
        }
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.CURRENCY_CODE, str);
        int i3 = onResponseError + 85;
        AppsFlyerConversionListener = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void setCustomerIdAndLogSession(String str, Context context) {
        if (!(context == null)) {
            if (!AFInAppEventParameterName()) {
                setCustomerUserId(str);
                AFLogger.afInfoLog("waitForCustomerUserId is false; setting CustomerUserID: ".concat(String.valueOf(str)), true);
                int i2 = AppsFlyerConversionListener + 67;
                onResponseError = i2 % 128;
                int i3 = i2 % 2;
                return;
            }
            setCustomerUserId(str);
            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);
            values(context, AFe1ySDK.setCustomerIdAndLogSession);
            String str2 = this.onValidateInAppFailure.AFLogger$LogLevel().AFInAppEventType;
            if ((referrer == null ? (char) 22 : (char) 26) == 22) {
                int i4 = AppsFlyerConversionListener + 27;
                onResponseError = i4 % 128;
                int i5 = i4 % 2;
                referrer = BuildConfig.FLAVOR;
            }
            String str3 = referrer;
            if (context instanceof Activity) {
                int i6 = onResponseError + 85;
                AppsFlyerConversionListener = i6 % 128;
                int i7 = i6 % 2;
                ((Activity) context).getIntent();
            }
            AFKeystoreWrapper(context, null, null, str3, null);
        }
    }

    @Override
    public final void setCustomerUserId(String str) {
        int i2 = AppsFlyerConversionListener + 59;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        AFb1nSDK.AFInAppEventType().values("setCustomerUserId", str);
        AFLogger.afInfoLog("setCustomerUserId = ".concat(String.valueOf(str)));
        values(AppsFlyerProperties.APP_USER_ID, str);
        values(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false);
        int i4 = onResponseError + 27;
        AppsFlyerConversionListener = i4 % 128;
        int i5 = i4 % 2;
    }

    @Override
    public final void setDebugLog(boolean z) {
        AFLogger.LogLevel logLevel;
        if ((z ? 'Q' : '1') != 'Q') {
            logLevel = AFLogger.LogLevel.NONE;
            int i2 = AppsFlyerConversionListener + 113;
            onResponseError = i2 % 128;
            int i3 = i2 % 2;
        } else {
            int i4 = onResponseError + 105;
            AppsFlyerConversionListener = i4 % 128;
            int i5 = i4 % 2;
            logLevel = AFLogger.LogLevel.DEBUG;
        }
        setLogLevel(logLevel);
    }

    @Override
    public final void setDisableAdvertisingIdentifiers(boolean z) {
        boolean z2;
        int i2 = AppsFlyerConversionListener + 59;
        onResponseError = i2 % 128;
        Object[] objArr = null;
        Object[] objArr2 = 0;
        if ((i2 % 2 != 0 ? '\n' : 'H') != 'H') {
            AFLogger.afDebugLog("setDisableAdvertisingIdentifiers: ".concat(String.valueOf(z)));
            super.hashCode();
        } else {
            AFLogger.afDebugLog("setDisableAdvertisingIdentifiers: ".concat(String.valueOf(z)));
        }
        AFb1ySDK.AFKeystoreWrapper = Boolean.valueOf(z2);
        AppsFlyerProperties.getInstance().remove("advertiserIdEnabled");
        AppsFlyerProperties.getInstance().remove("advertiserId");
        int i3 = onResponseError + 43;
        AppsFlyerConversionListener = i3 % 128;
        if (i3 % 2 == 0) {
            int length = objArr.length;
        }
    }

    @Override
    public final void setDisableNetworkData(boolean z) {
        int i2 = AppsFlyerConversionListener + 3;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        AFLogger.afDebugLog("setDisableNetworkData: ".concat(String.valueOf(z)));
        values(AppsFlyerProperties.DISABLE_NETWORK_DATA, z);
        int i4 = AppsFlyerConversionListener + 117;
        onResponseError = i4 % 128;
        int i5 = i4 % 2;
    }

    @Override
    public final void setExtension(String str) {
        int i2 = onResponseError + 59;
        AppsFlyerConversionListener = i2 % 128;
        if (i2 % 2 != 0) {
            AFb1nSDK.AFInAppEventType().values("setExtension", str);
        } else {
            AFb1nSDK AFInAppEventType2 = AFb1nSDK.AFInAppEventType();
            String[] strArr = new String[1];
            strArr[1] = str;
            AFInAppEventType2.values("setExtension", strArr);
        }
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EXTENSION, str);
    }

    @Override
    public final void setHost(String str, String str2) {
        if (str != null) {
            int i2 = AppsFlyerConversionListener + 23;
            onResponseError = i2 % 128;
            int i3 = i2 % 2;
            values("custom_host_prefix", str);
        }
        if (!(str2 == null)) {
            if ((!str2.isEmpty() ? 'T' : (char) 11) == 'T') {
                int i4 = AppsFlyerConversionListener + 123;
                onResponseError = i4 % 128;
                boolean z = i4 % 2 != 0;
                values("custom_host", str2);
                if (z) {
                    int i5 = 80 / 0;
                    return;
                }
                return;
            }
        }
        AFLogger.afWarnLog("hostName cannot be null or empty");
    }

    @Override
    public final void setImeiData(String str) {
        int i2 = AppsFlyerConversionListener + 115;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        AFb1nSDK.AFInAppEventType().values("setImeiData", str);
        this.onValidateInAppFailure.AFLogger$LogLevel().values = str;
        int i4 = AppsFlyerConversionListener + 117;
        onResponseError = i4 % 128;
        if (i4 % 2 == 0) {
            return;
        }
        int i5 = 11 / 0;
    }

    @Override
    public final void setIsUpdate(boolean z) {
        int i2 = onResponseError + 67;
        AppsFlyerConversionListener = i2 % 128;
        if (i2 % 2 == 0) {
            AFb1nSDK AFInAppEventType2 = AFb1nSDK.AFInAppEventType();
            String[] strArr = new String[0];
            strArr[1] = String.valueOf(z);
            AFInAppEventType2.values("setIsUpdate", strArr);
        } else {
            AFb1nSDK.AFInAppEventType().values("setIsUpdate", String.valueOf(z));
        }
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.IS_UPDATE, z);
        int i3 = AppsFlyerConversionListener + 49;
        onResponseError = i3 % 128;
        if ((i3 % 2 != 0 ? (char) 29 : 'H') != 29) {
            return;
        }
        Object obj = null;
        super.hashCode();
    }

    @Override
    public final void setLogLevel(AFLogger.LogLevel logLevel) {
        boolean z;
        if (!(logLevel.getLevel() <= AFLogger.LogLevel.NONE.getLevel())) {
            int i2 = AppsFlyerConversionListener + 65;
            onResponseError = i2 % 128;
            int i3 = i2 % 2;
            int i4 = onResponseError + 73;
            AppsFlyerConversionListener = i4 % 128;
            int i5 = i4 % 2;
            z = true;
        } else {
            z = false;
        }
        this.onValidateInAppFailure.getLevel().values("log", String.valueOf(z));
        AppsFlyerProperties.getInstance().set("logLevel", logLevel.getLevel());
    }

    @Override
    public final void setMinTimeBetweenSessions(int i2) {
        int i3 = onResponseError + 123;
        AppsFlyerConversionListener = i3 % 128;
        if ((i3 % 2 == 0 ? '=' : 'X') != '=') {
            this.onInstallConversionDataLoadedNative = TimeUnit.SECONDS.toMillis(i2);
            return;
        }
        this.onInstallConversionDataLoadedNative = TimeUnit.SECONDS.toMillis(i2);
        Object[] objArr = null;
        int length = objArr.length;
    }

    @Override
    public final void setOaidData(String str) {
        int i2 = AppsFlyerConversionListener + 13;
        onResponseError = i2 % 128;
        if ((i2 % 2 != 0 ? '%' : 'X') != 'X') {
            AFb1nSDK AFInAppEventType2 = AFb1nSDK.AFInAppEventType();
            String[] strArr = new String[1];
            strArr[1] = str;
            AFInAppEventType2.values("setOaidData", strArr);
        } else {
            AFb1nSDK.AFInAppEventType().values("setOaidData", str);
        }
        AFb1ySDK.AFInAppEventParameterName = str;
    }

    @Override
    public final void setOneLinkCustomDomain(String... strArr) {
        int i2 = AppsFlyerConversionListener + 33;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        AFLogger.afDebugLog(String.format("setOneLinkCustomDomain %s", Arrays.toString(strArr)));
        AFa1sSDK.valueOf = strArr;
        int i4 = onResponseError + 31;
        AppsFlyerConversionListener = i4 % 128;
        if (!(i4 % 2 == 0)) {
            return;
        }
        Object obj = null;
        super.hashCode();
    }

    @Override
    public final void setOutOfStore(String str) {
        if ((str != null ? '\f' : 'B') == 'B') {
            AFLogger.AFKeystoreWrapper("Cannot set setOutOfStore with null");
            int i2 = AppsFlyerConversionListener + 81;
            onResponseError = i2 % 128;
            int i3 = i2 % 2;
            return;
        }
        int i4 = onResponseError + 61;
        AppsFlyerConversionListener = i4 % 128;
        int i5 = i4 % 2;
        String lowerCase = str.toLowerCase();
        AppsFlyerProperties.getInstance().set("api_store_value", lowerCase);
        AFLogger.afInfoLog("Store API set with value: ".concat(String.valueOf(lowerCase)), true);
    }

    @Override
    public final void setPartnerData(String str, Map<String, Object> map) {
        String str2;
        if (this.onResponse == null) {
            this.onResponse = new AFb1dSDK();
        }
        AFb1dSDK aFb1dSDK = this.onResponse;
        if (str != null) {
            int i2 = onResponseError + 59;
            AppsFlyerConversionListener = i2 % 128;
            int i3 = i2 % 2;
            if (!str.isEmpty()) {
                if (map != null) {
                    int i4 = onResponseError + 57;
                    AppsFlyerConversionListener = i4 % 128;
                    if (i4 % 2 == 0) {
                        boolean isEmpty = map.isEmpty();
                        Object[] objArr = null;
                        int length = objArr.length;
                    }
                }
                if (!(aFb1dSDK.values.remove(str) == null)) {
                    str2 = "Cleared partner data for ".concat(String.valueOf(str));
                    int i5 = onResponseError + 53;
                    AppsFlyerConversionListener = i5 % 128;
                    int i6 = i5 % 2;
                } else {
                    str2 = "Partner data is missing or `null`";
                }
                AFLogger.afWarnLog(str2);
                return;
            }
        }
        AFLogger.afWarnLog("Partner ID is missing or `null`");
    }

    @Override
    public final void setPhoneNumber(String str) {
        int i2 = onResponseError + 35;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        this.onAttributionFailure = AFb1vSDK.AFInAppEventParameterName(str);
        int i4 = onResponseError + 113;
        AppsFlyerConversionListener = i4 % 128;
        int i5 = i4 % 2;
    }

    @Override
    public final void setPreinstallAttribution(String str, String str2, String str3) {
        AFLogger.afDebugLog("setPreinstallAttribution API called");
        JSONObject jSONObject = new JSONObject();
        if ((str != null ? '>' : (char) 3) == '>') {
            int i2 = onResponseError + 123;
            AppsFlyerConversionListener = i2 % 128;
            int i3 = i2 % 2;
            try {
                jSONObject.put("pid", str);
            } catch (JSONException e2) {
                AFLogger.afErrorLog(e2.getMessage(), e2);
            }
        }
        if (str2 != null) {
            jSONObject.put("c", str2);
        }
        if ((str3 != null ? (char) 30 : (char) 22) != 22) {
            jSONObject.put("af_siteid", str3);
        }
        int i4 = onResponseError + 75;
        AppsFlyerConversionListener = i4 % 128;
        int i5 = i4 % 2;
        if (!jSONObject.has("pid")) {
            AFLogger.afWarnLog("Cannot set preinstall attribution data without a media source");
            int i6 = AppsFlyerConversionListener + 61;
            onResponseError = i6 % 128;
            int i7 = i6 % 2;
            return;
        }
        int i8 = onResponseError + 47;
        AppsFlyerConversionListener = i8 % 128;
        if (i8 % 2 != 0) {
            values("preInstallName", jSONObject.toString());
            return;
        }
        values("preInstallName", jSONObject.toString());
        Object[] objArr = null;
        int length = objArr.length;
    }

    @Override
    public final void setResolveDeepLinkURLs(String... strArr) {
        int i2 = AppsFlyerConversionListener + 75;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        AFLogger.afDebugLog(String.format("setResolveDeepLinkURLs %s", Arrays.toString(strArr)));
        AFa1sSDK.values.clear();
        AFa1sSDK.values.addAll(Arrays.asList(strArr));
        int i4 = onResponseError + 25;
        AppsFlyerConversionListener = i4 % 128;
        if ((i4 % 2 == 0 ? (char) 27 : (char) 11) != 11) {
            int i5 = 84 / 0;
        }
    }

    @Override
    @Deprecated
    public final void setSharingFilter(String... strArr) {
        int i2 = AppsFlyerConversionListener + 31;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        setSharingFilterForPartners(strArr);
        int i4 = AppsFlyerConversionListener + 39;
        onResponseError = i4 % 128;
        if (!(i4 % 2 != 0)) {
            return;
        }
        Object[] objArr = null;
        int length = objArr.length;
    }

    @Override
    @Deprecated
    public final void setSharingFilterForAllPartners() {
        int i2 = onResponseError + 57;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        setSharingFilterForPartners("all");
        int i4 = onResponseError + 43;
        AppsFlyerConversionListener = i4 % 128;
        if ((i4 % 2 == 0 ? 'G' : 'P') != 'G') {
            return;
        }
        int i5 = 84 / 0;
    }

    @Override
    public final void setSharingFilterForPartners(String... strArr) {
        this.afErrorLog = new AFa1dSDK(strArr);
        int i2 = AppsFlyerConversionListener + 47;
        onResponseError = i2 % 128;
        if (!(i2 % 2 != 0)) {
            return;
        }
        Object[] objArr = null;
        int length = objArr.length;
    }

    @Override
    public final void setUserEmails(String... strArr) {
        int i2 = AppsFlyerConversionListener + 83;
        onResponseError = i2 % 128;
        if (!(i2 % 2 != 0)) {
            AFb1nSDK.AFInAppEventType().values("setUserEmails", strArr);
            setUserEmails(AppsFlyerProperties.EmailsCryptType.NONE, strArr);
        } else {
            AFb1nSDK.AFInAppEventType().values("setUserEmails", strArr);
            setUserEmails(AppsFlyerProperties.EmailsCryptType.NONE, strArr);
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    @Override
    public final void start(Context context) {
        int i2 = AppsFlyerConversionListener + 57;
        onResponseError = i2 % 128;
        boolean z = i2 % 2 == 0;
        start(context, null);
        if (!z) {
            int i3 = 22 / 0;
        }
    }

    @Override
    public final void stop(boolean z, Context context) {
        AFc1xSDK aFc1xSDK;
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        int i2 = 0;
        if ((context != null ? (char) 27 : (char) 29) != 29) {
            int i3 = AppsFlyerConversionListener + 3;
            onResponseError = i3 % 128;
            if (i3 % 2 != 0) {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
                Object obj = null;
                super.hashCode();
            } else {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
            }
        }
        this.onValidateInAppFailure.AFLogger$LogLevel().valueOf = z;
        try {
            File file = new File(this.onValidateInAppFailure.afErrorLogForExcManagerOnly().AFKeystoreWrapper.valueOf.getFilesDir(), "AFRequestCache");
            if (!(!file.exists())) {
                File[] listFiles = file.listFiles();
                if (listFiles != null) {
                    int length = listFiles.length;
                    while (i2 < length) {
                        File file2 = listFiles[i2];
                        StringBuilder sb = new StringBuilder("CACHE: Found cached request");
                        sb.append(file2.getName());
                        AFLogger.afInfoLog(sb.toString());
                        StringBuilder sb2 = new StringBuilder("CACHE: Deleting ");
                        sb2.append(file2.getName());
                        sb2.append(" from cache");
                        AFLogger.afInfoLog(sb2.toString());
                        file2.delete();
                        i2++;
                        int i4 = onResponseError + 15;
                        AppsFlyerConversionListener = i4 % 128;
                        int i5 = i4 % 2;
                    }
                }
            } else {
                int i6 = onResponseError + 39;
                AppsFlyerConversionListener = i6 % 128;
                int i7 = i6 % 2;
                file.mkdir();
            }
        } catch (Exception e2) {
            AFLogger.afErrorLog("CACHE: Could not cache request", e2);
        }
        if ((z ? ')' : (char) 5) == ')') {
            AFInAppEventParameterName(context).AFInAppEventParameterName("is_stop_tracking_used", true);
        }
        int i8 = onResponseError + 3;
        AppsFlyerConversionListener = i8 % 128;
        int i9 = i8 % 2;
    }

    @Override
    public final void subscribeForDeepLink(DeepLinkListener deepLinkListener) {
        int i2 = onResponseError + 87;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        subscribeForDeepLink(deepLinkListener, TimeUnit.SECONDS.toMillis(3L));
        int i4 = onResponseError + 57;
        AppsFlyerConversionListener = i4 % 128;
        int i5 = i4 % 2;
    }

    @Override
    public final void unregisterConversionListener() {
        int i2 = AppsFlyerConversionListener + 59;
        onResponseError = i2 % 128;
        if (!(i2 % 2 != 0)) {
            AFb1nSDK.AFInAppEventType().values("unregisterConversionListener", new String[0]);
        } else {
            AFb1nSDK.AFInAppEventType().values("unregisterConversionListener", new String[0]);
        }
        AFInAppEventParameterName = null;
        int i3 = AppsFlyerConversionListener + 51;
        onResponseError = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void updateServerUninstallToken(Context context, String str) {
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            AFc1xSDK aFc1xSDK = aFc1zSDK.AFInAppEventType;
            if (context != null) {
                aFc1xSDK.valueOf = context.getApplicationContext();
            }
        }
        AFd1dSDK aFd1dSDK = new AFd1dSDK(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(String.valueOf(str)));
        AFb1rSDK AFInAppEventType2 = aFd1dSDK.AFInAppEventType();
        if (AFInAppEventType2 == null || !str.equals(AFInAppEventType2.values)) {
            long currentTimeMillis = System.currentTimeMillis();
            boolean z = AFInAppEventType2 == null || currentTimeMillis - AFInAppEventType2.AFInAppEventParameterName > TimeUnit.SECONDS.toMillis(2L);
            AFb1rSDK aFb1rSDK = new AFb1rSDK(str, currentTimeMillis, !z);
            aFd1dSDK.AFInAppEventType.values("afUninstallToken", aFb1rSDK.values);
            aFd1dSDK.AFInAppEventType.valueOf("afUninstallToken_received_time", aFb1rSDK.AFInAppEventParameterName);
            aFd1dSDK.AFInAppEventType.AFInAppEventParameterName("afUninstallToken_queued", aFb1rSDK.AFKeystoreWrapper());
            if (z) {
                AFd1dSDK.values(str);
            }
        }
    }

    @Override
    public final void validateAndLogInAppPurchase(Context context, String str, String str2, String str3, String str4, String str5, Map<String, String> map) {
        AFb1nSDK AFInAppEventType2 = AFb1nSDK.AFInAppEventType();
        String[] strArr = new String[6];
        strArr[0] = str;
        strArr[1] = str2;
        strArr[2] = str3;
        strArr[3] = str4;
        strArr[4] = str5;
        strArr[5] = map == null ? BuildConfig.FLAVOR : map.toString();
        AFInAppEventType2.values("validateAndTrackInAppPurchase", strArr);
        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) {
            AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener = valueOf;
            if (appsFlyerInAppPurchaseValidatorListener != null) {
                appsFlyerInAppPurchaseValidatorListener.onValidateInAppFailure("Please provide purchase parameters");
                return;
            }
            return;
        }
        Context applicationContext = context.getApplicationContext();
        String str6 = this.onValidateInAppFailure.AFLogger$LogLevel().AFInAppEventType;
        if (context instanceof Activity) {
            ((Activity) context).getIntent();
        }
        new Thread(new AFa1fSDK(applicationContext, str6, str, str2, str3, str4, str5, map)).start();
    }

    @Override
    public final void waitForCustomerUserId(boolean z) {
        String concat;
        boolean z2;
        int i2 = AppsFlyerConversionListener + 95;
        onResponseError = i2 % 128;
        if ((i2 % 2 != 0 ? '%' : 'C') != '%') {
            concat = "initAfterCustomerUserID: ".concat(String.valueOf(z));
            z2 = true;
        } else {
            concat = "initAfterCustomerUserID: ".concat(String.valueOf(z));
            z2 = false;
        }
        AFLogger.afInfoLog(concat, z2);
        values(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, z);
        int i3 = onResponseError + 73;
        AppsFlyerConversionListener = i3 % 128;
        int i4 = i3 % 2;
    }

    public static void AFInAppEventParameterName(AFb1zSDK aFb1zSDK) {
        int i2 = onResponseError + 91;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        aFb1zSDK.afInfoLog();
        int i4 = onResponseError + 81;
        AppsFlyerConversionListener = i4 % 128;
        if (!(i4 % 2 == 0)) {
            return;
        }
        Object obj = null;
        super.hashCode();
    }

    public static AFb1zSDK AFInAppEventType() {
        int i2 = onResponseError + 63;
        AppsFlyerConversionListener = i2 % 128;
        if ((i2 % 2 == 0 ? '.' : 'D') == 'D') {
            return afErrorLogForExcManagerOnly;
        }
        AFb1zSDK aFb1zSDK = afErrorLogForExcManagerOnly;
        Object[] objArr = null;
        int length = objArr.length;
        return aFb1zSDK;
    }

    public static void AFKeystoreWrapper(AFb1zSDK aFb1zSDK, AFa1qSDK aFa1qSDK) {
        int i2 = onResponseError + 109;
        AppsFlyerConversionListener = i2 % 128;
        char c2 = i2 % 2 == 0 ? '[' : '!';
        aFb1zSDK.AFKeystoreWrapper(aFa1qSDK);
        if (c2 != '!') {
            Object[] objArr = null;
            int length = objArr.length;
        }
        int i3 = AppsFlyerConversionListener + 119;
        onResponseError = i3 % 128;
        int i4 = i3 % 2;
    }

    public static boolean afRDLog(Context context) {
        boolean z;
        int i2;
        int i3 = onResponseError + 5;
        AppsFlyerConversionListener = i3 % 128;
        int i4 = i3 % 2;
        if (!AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false)) {
            int i5 = AppsFlyerConversionListener + 95;
            onResponseError = i5 % 128;
            if ((i5 % 2 != 0 ? '*' : (char) 1) != 1) {
            }
            if (!z) {
                if (AFInAppEventType(context)) {
                    return false;
                }
            }
            i2 = AppsFlyerConversionListener + 125;
            onResponseError = i2 % 128;
            if (i2 % 2 != 0) {
                return true;
            }
            Object obj = null;
            super.hashCode();
            return true;
        }
        z = true;
        if (!z) {
        }
        i2 = AppsFlyerConversionListener + 125;
        onResponseError = i2 % 128;
        if (i2 % 2 != 0) {
        }
    }

    public static void values(JSONObject jSONObject) {
        String str;
        ArrayList arrayList = new ArrayList();
        Iterator<String> keys = jSONObject.keys();
        int i2 = onResponseError + 51;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        while (keys.hasNext()) {
            try {
                JSONArray jSONArray = new JSONArray((String) jSONObject.get(keys.next()));
                int i4 = 0;
                while (true) {
                    if (i4 < jSONArray.length()) {
                        int i5 = AppsFlyerConversionListener + 97;
                        onResponseError = i5 % 128;
                        if (i5 % 2 != 0) {
                            arrayList.add(Long.valueOf(jSONArray.getLong(i4)));
                            i4 += 14;
                        } else {
                            arrayList.add(Long.valueOf(jSONArray.getLong(i4)));
                            i4++;
                        }
                    }
                }
            } catch (JSONException e2) {
                AFLogger.afErrorLogForExcManagerOnly("error at timeStampArr", e2);
            }
        }
        Collections.sort(arrayList);
        Iterator<String> keys2 = jSONObject.keys();
        loop2: while (true) {
            str = null;
            while (true) {
                if (!(keys2.hasNext())) {
                    break loop2;
                }
                int i6 = AppsFlyerConversionListener + 65;
                onResponseError = i6 % 128;
                int i7 = i6 % 2;
                if (str != null) {
                    break loop2;
                }
                String next = keys2.next();
                try {
                    JSONArray jSONArray2 = new JSONArray((String) jSONObject.get(next));
                    int i8 = 0;
                    while (i8 < jSONArray2.length()) {
                        int i9 = AppsFlyerConversionListener + 45;
                        onResponseError = i9 % 128;
                        if (i9 % 2 != 0) {
                            if ((jSONArray2.getLong(i8) != ((Long) arrayList.get(1)).longValue() ? 'P' : 'F') != 'F') {
                                if (jSONArray2.getLong(i8) == ((Long) arrayList.get(1)).longValue() && jSONArray2.getLong(i8) != ((Long) arrayList.get(arrayList.size() - 1)).longValue()) {
                                    i8++;
                                    str = next;
                                }
                            }
                        } else {
                            if (jSONArray2.getLong(i8) == ((Long) arrayList.get(0)).longValue()) {
                                break;
                            }
                            if (jSONArray2.getLong(i8) == ((Long) arrayList.get(1)).longValue()) {
                                break;
                            }
                            i8++;
                            str = next;
                        }
                    }
                } catch (JSONException e3) {
                    AFLogger.afErrorLogForExcManagerOnly("error at manageExtraReferrers", e3);
                }
            }
        }
        if ((str != null ? '^' : '\\') != '\\') {
            jSONObject.remove(str);
        }
    }

    @Override
    public final void logEvent(Context context, String str, Map<String, Object> map, AppsFlyerRequestListener appsFlyerRequestListener) {
        HashMap hashMap = map == null ? null : new HashMap(map);
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            AFc1xSDK aFc1xSDK = aFc1zSDK.AFInAppEventType;
            if (context != null) {
                aFc1xSDK.valueOf = context.getApplicationContext();
            }
        }
        AFe1tSDK aFe1tSDK = new AFe1tSDK();
        if (context != null) {
            aFe1tSDK.valueOf = (Application) context.getApplicationContext();
        }
        aFe1tSDK.afDebugLog = str;
        aFe1tSDK.values = 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.AFKeystoreWrapper("Parsing failed due to invalid input in 'af_touch_obj'.");
            }
            Map<String, ?> singletonMap = Collections.singletonMap("tch_data", hashMap2);
            hashMap.remove(AFInAppEventParameterName.TOUCH_OBJ);
            aFe1tSDK.values(singletonMap);
        }
        aFe1tSDK.AFKeystoreWrapper = hashMap;
        AFb1nSDK level = valueOf().getLevel();
        String[] strArr = new String[2];
        strArr[0] = str;
        Map map2 = aFe1tSDK.AFKeystoreWrapper;
        if (map2 == null) {
            map2 = new HashMap();
        }
        strArr[1] = new JSONObject(map2).toString();
        level.values("logEvent", strArr);
        if (str == null) {
            values(context, AFe1ySDK.logEvent);
        }
        AFInAppEventParameterName(aFe1tSDK, context instanceof Activity ? (Activity) context : null);
    }

    @Override
    public final void start(Context context, String str) {
        int i2 = onResponseError + 119;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        Object obj = null;
        start(context, str, null);
        int i4 = AppsFlyerConversionListener + 49;
        onResponseError = i4 % 128;
        if (i4 % 2 == 0) {
            return;
        }
        super.hashCode();
    }

    @Override
    public final void subscribeForDeepLink(DeepLinkListener deepLinkListener, long j2) {
        int i2 = onResponseError + 105;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        AFa1sSDK.AFInAppEventType().AFInAppEventType = deepLinkListener;
        AFb1mSDK.getLevel = j2;
        int i4 = onResponseError + 123;
        AppsFlyerConversionListener = i4 % 128;
        if (!(i4 % 2 != 0)) {
            Object obj = null;
            super.hashCode();
        }
    }

    public final AFb1aSDK valueOf() {
        int i2 = onResponseError + 41;
        AppsFlyerConversionListener = i2 % 128;
        if (i2 % 2 != 0) {
            return this.onValidateInAppFailure;
        }
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        Object[] objArr = null;
        int length = objArr.length;
        return aFc1zSDK;
    }

    public static void AFInAppEventParameterName(ScheduledExecutorService scheduledExecutorService, Runnable runnable, TimeUnit timeUnit) {
        int i2 = AppsFlyerConversionListener + 13;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        AFKeystoreWrapper(scheduledExecutorService, runnable, 0L, timeUnit);
        int i4 = AppsFlyerConversionListener + 85;
        onResponseError = i4 % 128;
        if ((i4 % 2 != 0 ? 'T' : (char) 16) != 'T') {
            return;
        }
        int i5 = 57 / 0;
    }

    public void AFInAppEventType(Context context, Intent intent) {
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            AFc1xSDK aFc1xSDK = aFc1zSDK.AFInAppEventType;
            if (context != null) {
                aFc1xSDK.valueOf = context.getApplicationContext();
            }
        }
        AFa1sSDK.AFInAppEventType();
        Context context2 = this.onValidateInAppFailure.AFInAppEventType.valueOf;
        if (context2 != null) {
            AFb1bSDK aFb1bSDK = new AFb1bSDK(AFKeystoreWrapper(context2));
            Uri values2 = AFa1sSDK.values(intent);
            boolean z = (values2 == null || values2.toString().isEmpty()) ? false : true;
            if (aFb1bSDK.values("ddl_sent") && !z) {
                AFb1kSDK.AFKeystoreWrapper("No direct deep link", null);
                return;
            } else {
                AFa1sSDK.AFInAppEventType().AFInAppEventType(new HashMap(), intent, context);
                return;
            }
        }
        throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
    }

    public static boolean AFKeystoreWrapper(AFb1zSDK aFb1zSDK, boolean z) {
        int i2 = AppsFlyerConversionListener + 17;
        onResponseError = i2 % 128;
        boolean z2 = i2 % 2 == 0;
        Object obj = null;
        aFb1zSDK.onResponseNative = z;
        if (!z2) {
            super.hashCode();
        }
        int i3 = onResponseError + 7;
        AppsFlyerConversionListener = i3 % 128;
        if (!(i3 % 2 == 0)) {
            return z;
        }
        super.hashCode();
        return z;
    }

    @Override
    public final void start(Context context, String str, final AppsFlyerRequestListener appsFlyerRequestListener) {
        int i2 = AppsFlyerConversionListener + 13;
        onResponseError = i2 % 128;
        Object obj = null;
        if (i2 % 2 != 0) {
            int i3 = 4 / 0;
        }
    }

    public final void valueOf(Context context, Intent intent) {
        if (intent.getStringExtra("appsflyer_preinstall") != null) {
            valueOf(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 i2 = AppsFlyerConversionListener + 23;
            onResponseError = i2 % 128;
            if (i2 % 2 != 0) {
                AFInAppEventParameterName(context).values("referrer", stringExtra);
                AppsFlyerProperties appsFlyerProperties = AppsFlyerProperties.getInstance();
                appsFlyerProperties.set("AF_REFERRER", stringExtra);
                appsFlyerProperties.AFInAppEventParameterName = stringExtra;
                boolean AFInAppEventParameterName2 = AppsFlyerProperties.getInstance().AFInAppEventParameterName();
                Object obj = null;
                super.hashCode();
            } else {
                AFInAppEventParameterName(context).values("referrer", stringExtra);
                AppsFlyerProperties appsFlyerProperties2 = AppsFlyerProperties.getInstance();
                appsFlyerProperties2.set("AF_REFERRER", stringExtra);
                appsFlyerProperties2.AFInAppEventParameterName = stringExtra;
            }
        }
        int i3 = AppsFlyerConversionListener + 55;
        onResponseError = i3 % 128;
        int i4 = i3 % 2;
    }

    public static String AFInAppEventParameterName(String str) {
        String string;
        int i2 = onResponseError + 47;
        AppsFlyerConversionListener = i2 % 128;
        if ((i2 % 2 == 0 ? (char) 3 : '<') != '<') {
            string = AppsFlyerProperties.getInstance().getString(str);
            int i3 = 75 / 0;
        } else {
            string = AppsFlyerProperties.getInstance().getString(str);
        }
        int i4 = onResponseError + 117;
        AppsFlyerConversionListener = i4 % 128;
        if (i4 % 2 != 0) {
            return string;
        }
        int i5 = 65 / 0;
        return string;
    }

    public static String AFKeystoreWrapper() {
        int i2 = onResponseError + 25;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        String AFInAppEventParameterName2 = AFInAppEventParameterName(AppsFlyerProperties.APP_USER_ID);
        int i4 = AppsFlyerConversionListener + 43;
        onResponseError = i4 % 128;
        if (i4 % 2 == 0) {
            return AFInAppEventParameterName2;
        }
        Object obj = null;
        super.hashCode();
        return AFInAppEventParameterName2;
    }

    public final boolean AFInAppEventParameterName() {
        int i2 = onResponseError + 59;
        AppsFlyerConversionListener = i2 % 128;
        if (i2 % 2 == 0) {
        }
        return false;
    }

    public final void AFKeystoreWrapper(WeakReference<Context> weakReference) {
        int i2 = AppsFlyerConversionListener + 27;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        if (weakReference.get() == null) {
            return;
        }
        AFLogger.afInfoLog("app went to background");
        SharedPreferences AFKeystoreWrapper2 = AFKeystoreWrapper(weakReference.get());
        AppsFlyerProperties.getInstance().saveProperties(AFKeystoreWrapper2);
        long j2 = valueOf().AFLogger().afWarnLog;
        HashMap hashMap = new HashMap();
        String str = this.onValidateInAppFailure.AFLogger$LogLevel().AFInAppEventType;
        if ((str == null ? '$' : '7') != '7') {
            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 i4 = onResponseError + 27;
            AppsFlyerConversionListener = i4 % 128;
            if (i4 % 2 == 0) {
                hashMap.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
                Object[] objArr = null;
                int length = objArr.length;
            } else {
                hashMap.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
            }
        }
        AFa1rSDK values2 = AFb1ySDK.values(weakReference.get().getContentResolver());
        if (values2 != null) {
            hashMap.put("amazon_aid", values2.AFKeystoreWrapper);
            hashMap.put("amazon_aid_limit", String.valueOf(values2.values));
        }
        String string = AppsFlyerProperties.getInstance().getString("advertiserId");
        if (string != null) {
            int i5 = onResponseError + 73;
            AppsFlyerConversionListener = i5 % 128;
            int i6 = i5 % 2;
            hashMap.put("advertiserId", string);
        }
        hashMap.put("app_id", weakReference.get().getPackageName());
        hashMap.put("devkey", str);
        hashMap.put("uid", AFb1sSDK.AFInAppEventType(weakReference));
        hashMap.put("time_in_app", String.valueOf(j2));
        hashMap.put("statType", "user_closed_app");
        hashMap.put("platform", "Android");
        hashMap.put("launch_counter", Integer.toString(AFInAppEventParameterName(AFKeystoreWrapper2, false)));
        hashMap.put(AppsFlyerProperties.CHANNEL, values(weakReference.get()));
        if (!(AFInAppEventParameterName2 != null)) {
            int i7 = onResponseError + 23;
            AppsFlyerConversionListener = i7 % 128;
            int i8 = i7 % 2;
            AFInAppEventParameterName2 = BuildConfig.FLAVOR;
        }
        hashMap.put("originalAppsflyerId", AFInAppEventParameterName2);
        if (!this.onResponseNative) {
            AFLogger.afDebugLog("Stats call is disabled, ignore ...");
            return;
        }
        AFe1nSDK aFe1nSDK = new AFe1nSDK();
        aFe1nSDK.afWarnLog = isStopped();
        AFd1rSDK aFd1rSDK = new AFd1rSDK((AFe1nSDK) aFe1nSDK.AFInAppEventParameterName(this.onValidateInAppFailure.values().valueOf.AFInAppEventType("appsFlyerCount")).values(hashMap).AFInAppEventType(String.format(afDebugLog, AppsFlyerLib.getInstance().getHostPrefix(), AFInAppEventType().getHostName())), this.onValidateInAppFailure);
        AFc1gSDK afDebugLog2 = this.onValidateInAppFailure.afDebugLog();
        afDebugLog2.valueOf.execute(afDebugLog2.new AnonymousClass1(aFd1rSDK));
        int i9 = AppsFlyerConversionListener + 107;
        onResponseError = i9 % 128;
        int i10 = i9 % 2;
    }

    private void afInfoLog() {
        int i2 = AppsFlyerConversionListener + 103;
        onResponseError = i2 % 128;
        if (!(i2 % 2 == 0)) {
            boolean AFLogger2 = AFd1wSDK.AFLogger();
            Object obj = null;
            super.hashCode();
        }
    }

    public final void AFInAppEventParameterName(AFa1qSDK aFa1qSDK, Activity activity) {
        String str;
        int i2 = AppsFlyerConversionListener + 69;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        Application application = aFa1qSDK.valueOf;
        String str2 = BuildConfig.FLAVOR;
        if (activity != null) {
            int i4 = onResponseError + 119;
            AppsFlyerConversionListener = i4 % 128;
            int i5 = i4 % 2;
            if (activity.getIntent() != null) {
                int i6 = AppsFlyerConversionListener + 67;
                onResponseError = i6 % 128;
                int i7 = i6 % 2;
                Uri AFInAppEventType2 = AFb1iSDK.AFInAppEventType(activity);
                if (AFInAppEventType2 != null) {
                    int i8 = AppsFlyerConversionListener + 39;
                    onResponseError = i8 % 128;
                    boolean z = i8 % 2 != 0;
                    str = AFInAppEventType2.toString();
                    if (z) {
                        Object[] objArr = null;
                        int length = objArr.length;
                    }
                    if (this.onValidateInAppFailure.AFLogger$LogLevel().AFInAppEventType != null) {
                        AFLogger.afWarnLog("[LogEvent/Launch] AppsFlyer's SDK cannot send any event without providing DevKey.");
                        AppsFlyerRequestListener appsFlyerRequestListener = aFa1qSDK.values;
                        if ((appsFlyerRequestListener != null ? '>' : '4') != '4') {
                            appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1eSDK.AFInAppEventParameterName);
                            return;
                        }
                        return;
                    }
                    String referrer = AppsFlyerProperties.getInstance().getReferrer(application);
                    if (referrer == null) {
                        int i9 = onResponseError + 9;
                        AppsFlyerConversionListener = i9 % 128;
                        int i10 = i9 % 2;
                    } else {
                        str2 = referrer;
                    }
                    aFa1qSDK.afRDLog = str2;
                    aFa1qSDK.AFInAppEventParameterName = str;
                    valueOf(aFa1qSDK);
                    int i11 = onResponseError + 83;
                    AppsFlyerConversionListener = i11 % 128;
                    int i12 = i11 % 2;
                    return;
                }
            }
        }
        str = BuildConfig.FLAVOR;
        if (this.onValidateInAppFailure.AFLogger$LogLevel().AFInAppEventType != null) {
        }
    }

    @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));
        AFb1nSDK.AFInAppEventType().values("setUserEmails", (String[]) arrayList.toArray(new String[strArr.length + 1]));
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EMAIL_CRYPT_TYPE, emailsCryptType.getValue());
        HashMap hashMap = new HashMap();
        String str = null;
        ArrayList arrayList2 = new ArrayList();
        int length = strArr.length;
        int i2 = 0;
        while (true) {
            if (i2 < length) {
                int i3 = onResponseError + 11;
                AppsFlyerConversionListener = i3 % 128;
                int i4 = i3 % 2;
                String str2 = strArr[i2];
                if (AnonymousClass10.values[emailsCryptType.ordinal()] != 2) {
                    arrayList2.add(AFb1vSDK.AFInAppEventParameterName(str2));
                    int i5 = onResponseError + 23;
                    AppsFlyerConversionListener = i5 % 128;
                    int i6 = i5 % 2;
                    str = "sha256_el_arr";
                } else {
                    arrayList2.add(str2);
                    str = "plain_el_arr";
                }
                i2++;
            } else {
                hashMap.put(str, arrayList2);
                AppsFlyerProperties.getInstance().setUserEmails(new JSONObject(hashMap).toString());
                return;
            }
        }
    }

    public static File afDebugLog(String str) {
        int i2 = onResponseError + 111;
        AppsFlyerConversionListener = i2 % 128;
        Object[] objArr = null;
        if (i2 % 2 == 0) {
            try {
                int length = objArr.length;
            } catch (Throwable th) {
                AFLogger.afErrorLog(th.getMessage(), th);
            }
        }
        int i3 = onResponseError + 15;
        AppsFlyerConversionListener = i3 % 128;
        if (!(i3 % 2 != 0)) {
            int i4 = 0 / 0;
            if (str.trim().length() > 0) {
            }
            return null;
        }
        return new File(str.trim());
    }

    public static boolean AFInAppEventType(String str, boolean z) {
        int i2 = onResponseError + 27;
        AppsFlyerConversionListener = i2 % 128;
        if (!(i2 % 2 == 0)) {
            return AppsFlyerProperties.getInstance().getBoolean(str, z);
        }
        boolean z2 = AppsFlyerProperties.getInstance().getBoolean(str, z);
        Object[] objArr = null;
        int length = objArr.length;
        return z2;
    }

    private void AFInAppEventType(Context context, String str, Map<String, Object> map) {
        Activity activity;
        AFe1tSDK aFe1tSDK = new AFe1tSDK();
        if (!(context == null)) {
            int i2 = onResponseError + 11;
            AppsFlyerConversionListener = i2 % 128;
            int i3 = i2 % 2;
            aFe1tSDK.valueOf = (Application) context.getApplicationContext();
        }
        aFe1tSDK.afDebugLog = str;
        aFe1tSDK.AFKeystoreWrapper = map;
        Activity activity2 = null;
        if (!(context instanceof Activity ? false : true)) {
            int i4 = onResponseError + 99;
            AppsFlyerConversionListener = i4 % 128;
            if (i4 % 2 == 0) {
                activity = (Activity) context;
                super.hashCode();
            } else {
                activity = (Activity) context;
            }
            activity2 = activity;
        }
        AFInAppEventParameterName(aFe1tSDK, activity2);
    }

    private AFe1dSDK[] afDebugLog() {
        int i2 = AppsFlyerConversionListener + 29;
        onResponseError = i2 % 128;
        if ((i2 % 2 != 0 ? '^' : (char) 1) == 1) {
            return valueOf().AFVersionDeclaration().valueOf();
        }
        AFe1dSDK[] valueOf2 = valueOf().AFVersionDeclaration().valueOf();
        Object obj = null;
        super.hashCode();
        return valueOf2;
    }

    public static String AFLogger() {
        String AFInAppEventParameterName2;
        int i2 = onResponseError + 63;
        AppsFlyerConversionListener = i2 % 128;
        if ((i2 % 2 == 0 ? 'A' : 'N') != 'A') {
            AFInAppEventParameterName2 = AFInAppEventParameterName(AppsFlyerProperties.APP_ID);
        } else {
            AFInAppEventParameterName2 = AFInAppEventParameterName(AppsFlyerProperties.APP_ID);
            int i3 = 71 / 0;
        }
        int i4 = AppsFlyerConversionListener + 97;
        onResponseError = i4 % 128;
        if (i4 % 2 == 0) {
            return AFInAppEventParameterName2;
        }
        Object obj = null;
        super.hashCode();
        return AFInAppEventParameterName2;
    }

    public static void values(String str, String str2) {
        int i2 = AppsFlyerConversionListener + 59;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        AppsFlyerProperties.getInstance().set(str, str2);
        int i4 = AppsFlyerConversionListener + 103;
        onResponseError = i4 % 128;
        int i5 = i4 % 2;
    }

    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 = AFKeystoreWrapper(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();
                }
                jSONArray2 = jSONArray;
                jSONObject = jSONObject2;
            }
            if (!(((long) jSONArray2.length()) >= 5)) {
                int i2 = AppsFlyerConversionListener + 117;
                onResponseError = i2 % 128;
                int i3 = i2 % 2;
                jSONArray2.put(currentTimeMillis);
            }
            if ((((long) jSONObject.length()) >= 4 ? '\"' : 'G') == '\"') {
                values(jSONObject);
            }
            jSONObject.put(str, jSONArray2.toString());
            AFInAppEventParameterName(context).values("extraReferrers", jSONObject.toString());
            int i4 = AppsFlyerConversionListener + 121;
            onResponseError = i4 % 128;
            int i5 = i4 % 2;
        } catch (JSONException e2) {
            AFLogger.afErrorLogForExcManagerOnly("error at addReferrer", e2);
        } catch (Throwable th) {
            StringBuilder sb = new StringBuilder("Couldn't save referrer - ");
            sb.append(str);
            sb.append(": ");
            AFLogger.afErrorLog(sb.toString(), th);
        }
    }

    private boolean AFInAppEventParameterName(AFa1qSDK aFa1qSDK, SharedPreferences sharedPreferences) {
        int AFInAppEventParameterName2;
        boolean z;
        boolean z2;
        int i2;
        int i3 = onResponseError + 27;
        AppsFlyerConversionListener = i3 % 128;
        if (i3 % 2 == 0) {
            AFInAppEventParameterName2 = AFInAppEventParameterName(sharedPreferences, false);
        } else {
            AFInAppEventParameterName2 = AFInAppEventParameterName(sharedPreferences, false);
        }
        if (!(sharedPreferences.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false))) {
            int i4 = onResponseError + 123;
            AppsFlyerConversionListener = i4 % 128;
            if ((i4 % 2 != 0) ? AFInAppEventParameterName2 == 1 : AFInAppEventParameterName2 == 1) {
                int i5 = AppsFlyerConversionListener + 19;
                onResponseError = i5 % 128;
                int i6 = i5 % 2;
                z2 = true;
                if (z2 && !z) {
                    return false;
                }
                i2 = onResponseError + 23;
                AppsFlyerConversionListener = i2 % 128;
                if (i2 % 2 == 0) {
                    return true;
                }
                Object[] objArr = null;
                int length = objArr.length;
                return true;
            }
        }
        z2 = false;
        if (z2) {
        }
        i2 = onResponseError + 23;
        AppsFlyerConversionListener = i2 % 128;
        if (i2 % 2 == 0) {
        }
    }

    public static Map<String, Object> AFInAppEventType(Map<String, Object> map) {
        int i2 = onResponseError + 17;
        AppsFlyerConversionListener = i2 % 128;
        if ((i2 % 2 == 0 ? '6' : (char) 25) == '6') {
            int i3 = 36 / 0;
        }
    }

    public static void values(String str, boolean z) {
        int i2 = onResponseError + 35;
        AppsFlyerConversionListener = i2 % 128;
        if ((i2 % 2 == 0 ? '\r' : '@') != '\r') {
            AppsFlyerProperties.getInstance().set(str, z);
        } else {
            AppsFlyerProperties.getInstance().set(str, z);
            int i3 = 95 / 0;
        }
    }

    private boolean afErrorLog() {
        int i2 = onResponseError + 31;
        AppsFlyerConversionListener = i2 % 128;
        if (i2 % 2 != 0 ? this.AppsFlyer2dXConversionCallback > 0 : this.AppsFlyer2dXConversionCallback > 0) {
            long currentTimeMillis = System.currentTimeMillis() - this.AppsFlyer2dXConversionCallback;
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS Z", Locale.US);
            String values2 = values(simpleDateFormat, this.AppsFlyer2dXConversionCallback);
            String values3 = values(simpleDateFormat, this.onInstallConversionFailureNative);
            if (currentTimeMillis < this.onInstallConversionDataLoadedNative) {
                if (!isStopped()) {
                    int i3 = onResponseError + 23;
                    AppsFlyerConversionListener = i3 % 128;
                    int i4 = i3 % 2;
                    AFLogger.afInfoLog(String.format(Locale.US, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nThis launch is blocked: %s ms < %s ms", values2, values3, Long.valueOf(currentTimeMillis), Long.valueOf(this.onInstallConversionDataLoadedNative)));
                    int i5 = AppsFlyerConversionListener + 93;
                    onResponseError = i5 % 128;
                    int i6 = i5 % 2;
                    return true;
                }
            }
            if ((!isStopped() ? (char) 16 : '&') != '&') {
                int i7 = onResponseError + 49;
                AppsFlyerConversionListener = i7 % 128;
                int i8 = i7 % 2;
                AFLogger.afInfoLog(String.format(Locale.US, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nSending launch (+%s ms)", values2, values3, Long.valueOf(currentTimeMillis)));
            }
        } else if (!isStopped()) {
            AFLogger.afInfoLog("Sending first launch for this session!");
            int i9 = AppsFlyerConversionListener + 29;
            onResponseError = i9 % 128;
            int i10 = i9 % 2;
        }
        return false;
    }

    public static String values(SimpleDateFormat simpleDateFormat, long j2) {
        simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
        String format = simpleDateFormat.format(new Date(j2));
        int i2 = AppsFlyerConversionListener + 49;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        return format;
    }

    public static void values(Context context, boolean z, Map<String, Object> map, int i2) {
        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 ((z ? 'M' : '+') == 'M') {
            int i3 = AppsFlyerConversionListener + 93;
            onResponseError = i3 % 128;
            if (i3 % 2 == 0) {
                valueOf(context, hashMap);
            } else {
                valueOf(context, hashMap);
            }
        }
        hashMap.put("dim", AFa1bSDK.valueOf(context));
        map.put("deviceData", hashMap);
    }

    private void AFInAppEventParameterName(Map<String, Object> map) {
        boolean z;
        int i2 = onResponseError + 39;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        if (!AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false)) {
            if (!(AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, false))) {
                z = false;
                if (!z && map.get("advertiserId") != null) {
                    try {
                    } catch (Exception e2) {
                        AFLogger.afErrorLog("failed to remove IMEI or AndroidID key from params; ", e2);
                    }
                    if (!(AFb1qSDK.values(this.afRDLog))) {
                        int i4 = AppsFlyerConversionListener + 35;
                        onResponseError = i4 % 128;
                        if (i4 % 2 != 0) {
                            int i5 = 42 / 0;
                        }
                        AFLogger.afErrorLog("failed to remove IMEI or AndroidID key from params; ", e2);
                    }
                    if ((!AFb1qSDK.values(this.onValidateInAppFailure.AFLogger$LogLevel().values) ? 'c' : 'X') == 'c') {
                        return;
                    }
                    int i6 = onResponseError + 109;
                    AppsFlyerConversionListener = i6 % 128;
                    if (i6 % 2 == 0) {
                        Object remove = map.remove("imei");
                        Object[] objArr = null;
                        int length = objArr.length;
                        if (remove == null) {
                            return;
                        }
                    } else if (map.remove("imei") == null) {
                        return;
                    }
                    AFLogger.afInfoLog("validateGaidAndIMEI :: removing: imei");
                    return;
                }
                int i7 = onResponseError + 65;
                AppsFlyerConversionListener = i7 % 128;
                int i8 = i7 % 2;
            }
        }
        z = true;
        if (!z) {
            if (!(AFb1qSDK.values(this.afRDLog))) {
            }
            if ((!AFb1qSDK.values(this.onValidateInAppFailure.AFLogger$LogLevel().values) ? 'c' : 'X') == 'c') {
            }
        }
        int i72 = onResponseError + 65;
        AppsFlyerConversionListener = i72 % 128;
        int i82 = i72 % 2;
    }

    public static boolean AFInAppEventType(SharedPreferences sharedPreferences) {
        int i2 = onResponseError + 75;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        Object[] objArr = null;
        boolean parseBoolean = Boolean.parseBoolean(sharedPreferences.getString("sentSuccessfully", null));
        int i4 = onResponseError + 111;
        AppsFlyerConversionListener = i4 % 128;
        if (i4 % 2 != 0) {
            return parseBoolean;
        }
        int length = objArr.length;
        return parseBoolean;
    }

    public final void AFInAppEventType(Context context, Map<String, Object> map, Uri uri) {
        String AFKeystoreWrapper2;
        AFa1sSDK AFInAppEventType2;
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            AFc1xSDK aFc1xSDK = aFc1zSDK.AFInAppEventType;
            if ((context != null ? '<' : (char) 20) != 20) {
                int i2 = onResponseError + 51;
                AppsFlyerConversionListener = i2 % 128;
                if (i2 % 2 == 0) {
                    aFc1xSDK.valueOf = context.getApplicationContext();
                    int i3 = 39 / 0;
                } else {
                    aFc1xSDK.valueOf = context.getApplicationContext();
                }
            }
        }
        boolean z = true;
        if (!map.containsKey("af_deeplink")) {
            int i4 = AppsFlyerConversionListener + 31;
            onResponseError = i4 % 128;
            if (i4 % 2 != 0) {
                AFKeystoreWrapper2 = AFKeystoreWrapper(uri.toString());
                AFInAppEventType2 = AFa1sSDK.AFInAppEventType();
                String str = AFInAppEventType2.AFInAppEventParameterName;
                Object obj = null;
                super.hashCode();
            } else {
                AFKeystoreWrapper2 = AFKeystoreWrapper(uri.toString());
                AFInAppEventType2 = AFa1sSDK.AFInAppEventType();
            }
        }
        HashMap hashMap = new HashMap();
        hashMap.put("link", uri.toString());
        AFd1oSDK aFd1oSDK = new AFd1oSDK(valueOf(), UUID.randomUUID(), uri);
        if (aFd1oSDK.afWarnLog()) {
            int i5 = onResponseError + 101;
            AppsFlyerConversionListener = i5 % 128;
            if (i5 % 2 == 0) {
                map.put("isBrandedDomain", Boolean.TRUE);
                int i6 = 49 / 0;
            } else {
                map.put("isBrandedDomain", Boolean.TRUE);
            }
        }
        AFb1wSDK.AFKeystoreWrapper(context, hashMap, uri);
        if (aFd1oSDK.afErrorLogForExcManagerOnly()) {
            aFd1oSDK.afDebugLog = values(hashMap);
            AFc1gSDK afDebugLog2 = this.onValidateInAppFailure.afDebugLog();
            afDebugLog2.valueOf.execute(afDebugLog2.new AnonymousClass1(aFd1oSDK));
            return;
        }
        AFb1kSDK.valueOf(hashMap);
    }

    public static void values(Context context, Map<String, ? super String> map) {
        String str;
        int i2 = onResponseError + 113;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        boolean AFInAppEventType2 = AFInAppEventType(AppsFlyerProperties.DISABLE_NETWORK_DATA, false);
        AFa1kSDK aFa1kSDK = AFa1kSDK.AFa1zSDK.valueOf;
        AFa1kSDK.AFa1xSDK AFInAppEventParameterName2 = AFa1kSDK.AFInAppEventParameterName(context);
        map.put("network", AFInAppEventParameterName2.valueOf);
        if ((AFInAppEventType2 ? false : true) && (str = AFInAppEventParameterName2.values) != null) {
            map.put("operator", str);
            int i4 = AppsFlyerConversionListener + 45;
            onResponseError = i4 % 128;
            int i5 = i4 % 2;
        }
        if (AFInAppEventType2 || AFInAppEventParameterName2.AFInAppEventType == null) {
            return;
        }
        int i6 = AppsFlyerConversionListener + 105;
        onResponseError = i6 % 128;
        if ((i6 % 2 != 0 ? '\b' : (char) 21) != '\b') {
            map.put("carrier", AFInAppEventParameterName2.AFInAppEventType);
            return;
        }
        map.put("carrier", AFInAppEventParameterName2.AFInAppEventType);
        Object obj = null;
        super.hashCode();
    }

    public static void valueOf(AppsFlyerConversionListener appsFlyerConversionListener) {
        int i2 = AppsFlyerConversionListener + 109;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        if (appsFlyerConversionListener != null) {
            AFInAppEventParameterName = appsFlyerConversionListener;
            return;
        }
        int i4 = AppsFlyerConversionListener + 39;
        onResponseError = i4 % 128;
        if ((i4 % 2 != 0 ? 'W' : 'F') != 'F') {
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    public static void valueOf(Context context, Map<String, Object> map) {
        AFa1vSDK.AFa1ySDK AFInAppEventType2;
        int i2 = AppsFlyerConversionListener + 61;
        onResponseError = i2 % 128;
        if ((i2 % 2 != 0 ? '7' : ' ') != ' ') {
            AFInAppEventType2 = AFa1vSDK.AFa1wSDK.AFInAppEventType.AFInAppEventType(context);
            map.put("btl", Float.toString(AFInAppEventType2.AFKeystoreWrapper));
            String str = AFInAppEventType2.AFInAppEventType;
            Object obj = null;
            super.hashCode();
            if (str == null) {
                return;
            }
        } else {
            AFInAppEventType2 = AFa1vSDK.AFa1wSDK.AFInAppEventType.AFInAppEventType(context);
            map.put("btl", Float.toString(AFInAppEventType2.AFKeystoreWrapper));
            if ((AFInAppEventType2.AFInAppEventType != null ? '9' : '=') == '=') {
                return;
            }
        }
        int i3 = AppsFlyerConversionListener + 43;
        onResponseError = i3 % 128;
        int i4 = i3 % 2;
        map.put("btch", AFInAppEventType2.AFInAppEventType);
        int i5 = AppsFlyerConversionListener + 25;
        onResponseError = i5 % 128;
        int i6 = i5 % 2;
    }

    public static String AFInAppEventParameterName(Activity activity) {
        String str;
        int i2 = onResponseError + 51;
        AppsFlyerConversionListener = i2 % 128;
        Object[] objArr = null;
        if (i2 % 2 == 0) {
            int i3 = 40 / 0;
        }
        int i4 = onResponseError + 79;
        AppsFlyerConversionListener = i4 % 128;
        if ((i4 % 2 != 0 ? (char) 30 : (char) 26) == 30) {
            return str;
        }
        int length = objArr.length;
        return str;
    }

    private void AFKeystoreWrapper(Context context, String str, Map<String, Object> map, String str2, String str3) {
        AFa1qSDK aFe1lSDK;
        int i2 = AppsFlyerConversionListener + 113;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        if ((str == null) || str.trim().isEmpty()) {
            aFe1lSDK = new AFe1lSDK();
        } else {
            aFe1lSDK = new AFe1tSDK();
        }
        if (!(context == null)) {
            aFe1lSDK.valueOf = (Application) context.getApplicationContext();
        }
        aFe1lSDK.afDebugLog = str;
        aFe1lSDK.AFKeystoreWrapper = map;
        aFe1lSDK.afRDLog = str2;
        aFe1lSDK.AFInAppEventParameterName = str3;
        valueOf(aFe1lSDK);
        int i4 = AppsFlyerConversionListener + 23;
        onResponseError = i4 % 128;
        int i5 = i4 % 2;
    }

    public static String values(String str) {
        int indexOf;
        int i2 = AppsFlyerConversionListener + 95;
        onResponseError = i2 % 128;
        if (i2 % 2 == 0) {
            indexOf = str.indexOf(63);
        } else {
            indexOf = str.indexOf(19);
        }
    }

    private AFd1oSDK.AFa1zSDK values(final Map<String, String> map) {
        AFd1oSDK.AFa1zSDK aFa1zSDK = new AFd1oSDK.AFa1zSDK() {
            @Override
            public final void AFKeystoreWrapper(Map<String, String> map2) {
                for (String str : map2.keySet()) {
                    map.put(str, map2.get(str));
                }
                AFb1kSDK.valueOf((Map<String, String>) map);
            }

            @Override
            public final void AFKeystoreWrapper(String str) {
                AFb1kSDK.AFKeystoreWrapper(str, DeepLinkResult.Error.NETWORK);
            }
        };
        int i2 = onResponseError + 45;
        AppsFlyerConversionListener = i2 % 128;
        if (!(i2 % 2 == 0)) {
            return aFa1zSDK;
        }
        Object[] objArr = null;
        int length = objArr.length;
        return aFa1zSDK;
    }

    public static int valueOf(SharedPreferences sharedPreferences) {
        int i2 = onResponseError + 71;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        int AFInAppEventParameterName2 = AFInAppEventParameterName(sharedPreferences, "appsFlyerAdRevenueCount", true);
        int i4 = AppsFlyerConversionListener + 89;
        onResponseError = i4 % 128;
        if (i4 % 2 == 0) {
            return AFInAppEventParameterName2;
        }
        int i5 = 88 / 0;
        return AFInAppEventParameterName2;
    }

    public static void values(Context context, Map<String, Object> map, String str) {
        int i2 = AppsFlyerConversionListener + 17;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        SharedPreferences AFKeystoreWrapper2 = AFKeystoreWrapper(context);
        SharedPreferences.Editor edit = AFKeystoreWrapper2.edit();
        Object obj = null;
        try {
            String string = AFKeystoreWrapper2.getString("prev_event_name", null);
            if (string != null) {
                JSONObject jSONObject = new JSONObject();
                jSONObject.put("prev_event_timestamp", AFKeystoreWrapper2.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();
            int i4 = onResponseError + 91;
            AppsFlyerConversionListener = i4 % 128;
            if ((i4 % 2 == 0 ? 'Y' : ' ') != 'Y') {
                return;
            }
            super.hashCode();
        } catch (Exception e2) {
            AFLogger.afErrorLog("Error while processing previous event.", e2);
        }
    }

    public static void valueOf(String str) {
        try {
            if (!(!new JSONObject(str).has("pid"))) {
                int i2 = AppsFlyerConversionListener + 87;
                onResponseError = i2 % 128;
                int i3 = i2 % 2;
                values("preInstallName", str);
                int i4 = AppsFlyerConversionListener + 19;
                onResponseError = i4 % 128;
                int i5 = i4 % 2;
                return;
            }
            AFLogger.afWarnLog("Cannot set preinstall attribution data without a media source");
        } catch (JSONException e2) {
            AFLogger.afErrorLog("Error parsing JSON for preinstall", e2);
        }
    }

    private void AFInAppEventParameterName(Context context, Map<String, Object> map) {
        AppsFlyerProperties appsFlyerProperties = AppsFlyerProperties.getInstance();
        if (appsFlyerProperties.getBoolean(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, false)) {
            map.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
            return;
        }
        Context context2 = this.onValidateInAppFailure.AFInAppEventType.valueOf;
        if (context2 != null) {
            AFb1bSDK aFb1bSDK = new AFb1bSDK(AFKeystoreWrapper(context2));
            String AFInAppEventParameterName2 = this.onValidateInAppFailure.AFLogger$LogLevel().AFInAppEventParameterName(aFb1bSDK);
            if (!AFb1qSDK.values(AFInAppEventParameterName2)) {
                map.put("imei", AFInAppEventParameterName2);
            }
            boolean z = appsFlyerProperties.getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID, false);
            String str = null;
            String AFKeystoreWrapper2 = aFb1bSDK.AFKeystoreWrapper("androidIdCached", (String) null);
            if (z && AFb1qSDK.values(this.afRDLog)) {
                if (afRDLog(context)) {
                    try {
                        String string = Settings.Secure.getString(context.getContentResolver(), "android_id");
                        if (string != null) {
                            str = string;
                        } else if (AFKeystoreWrapper2 != null) {
                            AFLogger.afDebugLog("use cached AndroidId: ".concat(String.valueOf(AFKeystoreWrapper2)));
                            str = AFKeystoreWrapper2;
                        }
                    } catch (Exception e2) {
                        if (AFKeystoreWrapper2 != null) {
                            AFLogger.afDebugLog("use cached AndroidId: ".concat(String.valueOf(AFKeystoreWrapper2)));
                            str = AFKeystoreWrapper2;
                        }
                        AFLogger.afErrorLog(e2.getMessage(), e2);
                    }
                }
            } else {
                String str2 = this.afRDLog;
                if (str2 != null) {
                    str = str2;
                }
            }
            if (str != null) {
                aFb1bSDK.values("androidIdCached", str);
                map.put("android_id", str);
            } else {
                AFLogger.afInfoLog("Android ID was not collected.");
            }
            AFa1rSDK AFInAppEventParameterName3 = AFb1ySDK.AFInAppEventParameterName(context);
            if (AFInAppEventParameterName3 != null) {
                HashMap hashMap = new HashMap();
                hashMap.put("isManual", AFInAppEventParameterName3.AFInAppEventParameterName);
                hashMap.put("val", AFInAppEventParameterName3.AFKeystoreWrapper);
                Boolean bool = AFInAppEventParameterName3.values;
                if (bool != null) {
                    hashMap.put("isLat", bool);
                }
                map.put("oaid", hashMap);
                return;
            }
            return;
        }
        throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
    }

    private void AFKeystoreWrapper(Context context, String str) {
        AFe1qSDK aFe1qSDK = new AFe1qSDK();
        if (context != null) {
            aFe1qSDK.valueOf = (Application) context.getApplicationContext();
        }
        AFa1qSDK AFInAppEventParameterName2 = aFe1qSDK.AFInAppEventParameterName(this.onValidateInAppFailure.values().valueOf.AFInAppEventType("appsFlyerCount"));
        AFInAppEventParameterName2.afRDLog = str;
        if ((str != null ? '[' : '_') != '[') {
            return;
        }
        int i2 = AppsFlyerConversionListener + 111;
        onResponseError = i2 % 128;
        byte b = 0;
        if (i2 % 2 != 0) {
            if ((str.length() > 4 ? 'U' : '#') == '#') {
                return;
            }
        } else {
            if (str.length() <= 5) {
                return;
            }
        }
        if (AFInAppEventParameterName(AFInAppEventParameterName2, AFKeystoreWrapper(context))) {
            AFKeystoreWrapper(this.onValidateInAppFailure.AFInAppEventParameterName(), new AFa1zSDK(this, AFInAppEventParameterName2, b), 5L, TimeUnit.MILLISECONDS);
            int i3 = AppsFlyerConversionListener + 15;
            onResponseError = i3 % 128;
            int i4 = i3 % 2;
        }
    }

    public static String valueOf(File file, String str) {
        FileReader fileReader;
        int i2;
        Properties properties;
        try {
            try {
                try {
                    properties = new Properties();
                    fileReader = new FileReader(file);
                } catch (Throwable th) {
                    if (fileReader != null) {
                        try {
                            fileReader.close();
                        } catch (Throwable th2) {
                            AFLogger.afErrorLog(th2.getMessage(), th2);
                        }
                    }
                    throw th;
                }
            } catch (FileNotFoundException unused) {
                fileReader = null;
            } catch (Throwable th3) {
                th = th3;
                fileReader = null;
            }
        } catch (Throwable th4) {
            AFLogger.afErrorLog(th4.getMessage(), th4);
        }
        try {
            properties.load(fileReader);
            AFLogger.afInfoLog("Found PreInstall property!");
            String property = properties.getProperty(str);
            try {
                fileReader.close();
                int i3 = onResponseError + 125;
                AppsFlyerConversionListener = i3 % 128;
                int i4 = i3 % 2;
            } 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 (fileReader != null) {
                fileReader.close();
            }
            i2 = onResponseError + 43;
            AppsFlyerConversionListener = i2 % 128;
            int i5 = i2 % 2;
            return null;
        } catch (Throwable th6) {
            th = th6;
            AFLogger.afErrorLog(th.getMessage(), th);
            if (fileReader != null) {
                fileReader.close();
                i2 = onResponseError + 27;
                AppsFlyerConversionListener = i2 % 128;
                int i52 = i2 % 2;
            }
            return null;
        }
    }

    private String values(Context context, String str) {
        if (context == null) {
            int i2 = onResponseError + 29;
            AppsFlyerConversionListener = i2 % 128;
            Object[] objArr = null;
            if (i2 % 2 != 0) {
                return null;
            }
            int length = objArr.length;
            return null;
        }
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            AFc1xSDK aFc1xSDK = aFc1zSDK.AFInAppEventType;
            if ((context != null ? ';' : 'X') == ';') {
                int i3 = onResponseError + 93;
                AppsFlyerConversionListener = i3 % 128;
                int i4 = i3 % 2;
                aFc1xSDK.valueOf = context.getApplicationContext();
                int i5 = onResponseError + 29;
                AppsFlyerConversionListener = i5 % 128;
                int i6 = i5 % 2;
            }
        }
        return valueOf().values().AFInAppEventType(str);
    }

    public static boolean AFInAppEventType(Context context) {
        try {
            if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) == 0) {
                int i2 = onResponseError + 33;
                AppsFlyerConversionListener = i2 % 128;
                return (i2 % 2 == 0 ? 'a' : 'I') != 'a';
            }
        } catch (Throwable th) {
            AFLogger.afErrorLog("WARNING:  Google play services is unavailable. ", th);
        }
        try {
            context.getPackageManager().getPackageInfo("com.google.android.gms", 0);
            int i3 = AppsFlyerConversionListener + 73;
            onResponseError = i3 % 128;
            int i4 = i3 % 2;
            return true;
        } catch (PackageManager.NameNotFoundException e2) {
            AFLogger.afErrorLog("WARNING:  Google Play Services is unavailable. ", e2);
            return false;
        }
    }

    private void AFKeystoreWrapper(AFa1qSDK aFa1qSDK) {
        String format;
        AFe1dSDK[] afDebugLog2;
        int length;
        int i2 = onResponseError + 109;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        Application application = aFa1qSDK.valueOf;
        if (application == null) {
            int i4 = AppsFlyerConversionListener + 107;
            onResponseError = i4 % 128;
            int i5 = i4 % 2;
            AFLogger.afDebugLog("sendWithEvent - got null context. skipping event/launch.");
            return;
        }
        SharedPreferences AFKeystoreWrapper2 = AFKeystoreWrapper(application);
        AppsFlyerProperties.getInstance().saveProperties(AFKeystoreWrapper2);
        if (!this.onValidateInAppFailure.AFLogger$LogLevel().values()) {
            StringBuilder sb = new StringBuilder("sendWithEvent from activity: ");
            sb.append(application.getClass().getName());
            AFLogger.afInfoLog(sb.toString());
        }
        boolean values2 = aFa1qSDK.values();
        boolean z = aFa1qSDK instanceof AFe1uSDK;
        boolean z2 = aFa1qSDK instanceof AFe1qSDK;
        boolean z3 = aFa1qSDK instanceof AFe1pSDK;
        Map<String, ?> AFInAppEventParameterName2 = AFInAppEventParameterName(aFa1qSDK);
        String str = (String) AFInAppEventParameterName2.get("appsflyerKey");
        if (str != null) {
            int i6 = onResponseError + 47;
            AppsFlyerConversionListener = i6 % 128;
            int i7 = i6 % 2;
            if (str.length() != 0) {
                if (!isStopped()) {
                    AFLogger.afInfoLog("AppsFlyerLib.sendWithEvent");
                }
                int AFInAppEventParameterName3 = AFInAppEventParameterName(AFKeystoreWrapper2, false);
                if (z3 || z2) {
                    format = String.format(afWarnLog, AppsFlyerLib.getInstance().getHostPrefix(), AFInAppEventType().getHostName());
                } else if (z) {
                    format = String.format(AFLogger, AppsFlyerLib.getInstance().getHostPrefix(), AFInAppEventType().getHostName());
                } else if (!values2) {
                    format = String.format(getLevel, AppsFlyerLib.getInstance().getHostPrefix(), AFInAppEventType().getHostName());
                } else if (AFInAppEventParameterName3 < 2) {
                    format = String.format(AFLogger$LogLevel, AppsFlyerLib.getInstance().getHostPrefix(), AFInAppEventType().getHostName());
                } else {
                    format = String.format(AFVersionDeclaration, AppsFlyerLib.getInstance().getHostPrefix(), AFInAppEventType().getHostName());
                }
                StringBuilder sb2 = new StringBuilder();
                sb2.append(format);
                sb2.append(application.getPackageName());
                String obj = sb2.toString();
                String values3 = values(application);
                if (!z) {
                    StringBuilder sb3 = new StringBuilder();
                    sb3.append(obj);
                    sb3.append("&buildnumber=6.9.4");
                    obj = sb3.toString();
                }
                if (values3 != null) {
                    StringBuilder sb4 = new StringBuilder();
                    sb4.append(obj);
                    sb4.append("&channel=");
                    sb4.append(values3);
                    obj = sb4.toString();
                }
                AFInAppEventParameterName(AFInAppEventParameterName2);
                AFa1wSDK aFa1wSDK = new AFa1wSDK(this, aFa1qSDK.AFInAppEventType(obj).values(AFInAppEventParameterName2).AFInAppEventParameterName(AFInAppEventParameterName3), r9);
                Object[] objArr = null;
                Object[] objArr2 = 0;
                if (values2) {
                    int i8 = AppsFlyerConversionListener + 97;
                    onResponseError = i8 % 128;
                    if (i8 % 2 != 0) {
                        afDebugLog2 = afDebugLog();
                        length = afDebugLog2.length;
                    } else {
                        afDebugLog2 = afDebugLog();
                        length = afDebugLog2.length;
                    }
                    byte b = 0;
                    for (int i9 = 0; i9 < length; i9++) {
                        AFe1dSDK aFe1dSDK = afDebugLog2[i9];
                        if (aFe1dSDK.afErrorLog == AFe1dSDK.AFa1zSDK.STARTED) {
                            StringBuilder sb5 = new StringBuilder("Failed to get ");
                            sb5.append(aFe1dSDK.valueOf);
                            sb5.append(" referrer, wait ...");
                            AFLogger.afDebugLog(sb5.toString());
                            b = 1;
                        }
                    }
                    if ((this.onDeepLinking ? '^' : '\n') == '^') {
                        int i10 = AppsFlyerConversionListener + 7;
                        onResponseError = i10 % 128;
                        if ((i10 % 2 == 0 ? (byte) 1 : (byte) 0) != 1) {
                            boolean afRDLog = afRDLog();
                            super.hashCode();
                        }
                        if (this.onValidateInAppFailure.AFLogger$LogLevel().AFInAppEventType()) {
                            r9 = 1;
                        }
                    }
                    r9 = b;
                    if (this.onValidateInAppFailure.AFLogger$LogLevel().AFInAppEventType()) {
                    }
                }
                ScheduledExecutorService AFInAppEventParameterName4 = this.onValidateInAppFailure.AFInAppEventParameterName();
                long j2 = 500;
                if (r9 != 0) {
                    int i11 = AppsFlyerConversionListener + 41;
                    onResponseError = i11 % 128;
                    if (i11 % 2 != 0) {
                        int length2 = objArr.length;
                    }
                } else {
                    j2 = 0;
                }
                AFKeystoreWrapper(AFInAppEventParameterName4, aFa1wSDK, j2, TimeUnit.MILLISECONDS);
                return;
            }
        }
        AFLogger.afDebugLog("Not sending data yet, waiting for dev key");
        AppsFlyerRequestListener appsFlyerRequestListener = aFa1qSDK.values;
        if (appsFlyerRequestListener != null) {
            appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1eSDK.AFInAppEventParameterName);
        }
    }

    public static String AFInAppEventType(String str) {
        String str2;
        Object[] objArr = null;
        try {
            str2 = (String) Class.forName("android.os.SystemProperties").getMethod("get", String.class).invoke(null, str);
            int i2 = AppsFlyerConversionListener + 49;
            onResponseError = i2 % 128;
            int i3 = i2 % 2;
        } catch (Throwable th) {
            AFLogger.afErrorLog(th.getMessage(), th);
            str2 = null;
        }
        int i4 = onResponseError + 71;
        AppsFlyerConversionListener = i4 % 128;
        if (!(i4 % 2 == 0)) {
            return str2;
        }
        int length = objArr.length;
        return str2;
    }

    @Deprecated
    public final String values(Context context) {
        AFc1xSDK aFc1xSDK;
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            int i2 = AppsFlyerConversionListener + 71;
            onResponseError = i2 % 128;
            if (i2 % 2 != 0) {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
                Object obj = null;
                super.hashCode();
            } else {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
            }
        }
        return this.onValidateInAppFailure.values().AFInAppEventParameterName();
    }

    public static int AFInAppEventType(SharedPreferences sharedPreferences, boolean z) {
        int i2 = AppsFlyerConversionListener + 85;
        onResponseError = i2 % 128;
        boolean z2 = i2 % 2 != 0;
        int AFInAppEventParameterName2 = AFInAppEventParameterName(sharedPreferences, "appsFlyerInAppEventCount", z);
        if (z2) {
            Object[] objArr = null;
            int length = objArr.length;
        }
        return AFInAppEventParameterName2;
    }

    public static String valueOf(AFd1mSDK aFd1mSDK, String str) {
        int i2 = onResponseError + 13;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        String AFKeystoreWrapper2 = aFd1mSDK.AFKeystoreWrapper("CACHED_CHANNEL", (String) null);
        if (!(AFKeystoreWrapper2 != null)) {
            aFd1mSDK.values("CACHED_CHANNEL", str);
            return str;
        }
        int i4 = AppsFlyerConversionListener + 1;
        onResponseError = i4 % 128;
        if (i4 % 2 != 0) {
            int i5 = 69 / 0;
        }
        return AFKeystoreWrapper2;
    }

    private String values(SimpleDateFormat simpleDateFormat, Context context) {
        String string;
        int i2 = onResponseError + 121;
        AppsFlyerConversionListener = i2 % 128;
        Object[] objArr = null;
        if ((i2 % 2 == 0 ? (char) 20 : '1') != 20) {
            string = AFKeystoreWrapper(context).getString("appsFlyerFirstInstall", null);
        } else {
            string = AFKeystoreWrapper(context).getString("appsFlyerFirstInstall", null);
            int length = objArr.length;
        }
    }

    public final void valueOf(Context context) {
        int i2 = onResponseError + 93;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if ((context != null ? (char) 16 : ')') != ')') {
            int i4 = onResponseError + 29;
            AppsFlyerConversionListener = i4 % 128;
            int i5 = i4 % 2;
            AFc1xSDK aFc1xSDK = aFc1zSDK.AFInAppEventType;
            if ((context != null ? (char) 3 : (char) 15) != 15) {
                aFc1xSDK.valueOf = context.getApplicationContext();
            }
        }
    }

    public final AFd1mSDK AFInAppEventParameterName(Context context) {
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            AFc1xSDK aFc1xSDK = aFc1zSDK.AFInAppEventType;
            if (context != null) {
                aFc1xSDK.valueOf = context.getApplicationContext();
            }
        }
        Context context2 = this.onValidateInAppFailure.AFInAppEventType.valueOf;
        if (context2 != null) {
            return new AFb1bSDK(AFKeystoreWrapper(context2));
        }
        throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
    }

    private void valueOf(AFa1qSDK aFa1qSDK) {
        byte b = 0;
        boolean z = aFa1qSDK.afDebugLog == null;
        if (AFInAppEventParameterName()) {
            int i2 = AppsFlyerConversionListener + 87;
            onResponseError = i2 % 128;
            if (i2 % 2 != 0) {
                AFLogger.afInfoLog("CustomerUserId not set, reporting is disabled", true);
                return;
            } else {
                AFLogger.afInfoLog("CustomerUserId not set, reporting is disabled", true);
                return;
            }
        }
        if (z) {
            int i3 = AppsFlyerConversionListener + 17;
            onResponseError = i3 % 128;
            int i4 = i3 % 2;
            if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.LAUNCH_PROTECT_ENABLED, true)) {
                int i5 = onResponseError + 7;
                AppsFlyerConversionListener = i5 % 128;
                if ((i5 % 2 == 0 ? 'S' : (char) 29) == 'S') {
                    int i6 = 48 / 0;
                }
            } else {
                AFLogger.afInfoLog("Allowing multiple launches within a 5 second time window.");
            }
            this.AppsFlyer2dXConversionCallback = System.currentTimeMillis();
        }
        AFKeystoreWrapper(this.onValidateInAppFailure.AFInAppEventParameterName(), new AFa1zSDK(this, aFa1qSDK, b), 0L, TimeUnit.MILLISECONDS);
    }

    private void values(Context context, AFe1ySDK aFe1ySDK) {
        AFc1zSDK aFc1zSDK;
        int i2 = AppsFlyerConversionListener + 117;
        onResponseError = i2 % 128;
        if (i2 % 2 == 0) {
            aFc1zSDK = this.onValidateInAppFailure;
        } else {
            aFc1zSDK = this.onValidateInAppFailure;
            int i3 = 82 / 0;
        }
        AFe1vSDK AFLogger2 = valueOf().AFLogger();
        AFe1xSDK AFInAppEventParameterName2 = AFa1mSDK.AFInAppEventParameterName(context);
        if (AFLogger2.valueOf()) {
            int i4 = onResponseError + 51;
            AppsFlyerConversionListener = i4 % 128;
            int i5 = i4 % 2;
            AFLogger2.valueOf.put("api_name", aFe1ySDK.toString());
            AFLogger2.AFInAppEventParameterName(AFInAppEventParameterName2);
        }
        AFLogger2.AFInAppEventType();
    }

    public static int AFInAppEventParameterName(SharedPreferences sharedPreferences, boolean z) {
        int i2 = onResponseError + 45;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        int AFInAppEventParameterName2 = AFInAppEventParameterName(sharedPreferences, "appsFlyerCount", z);
        int i4 = onResponseError + 89;
        AppsFlyerConversionListener = i4 % 128;
        if (i4 % 2 != 0) {
            return AFInAppEventParameterName2;
        }
        int i5 = 82 / 0;
        return AFInAppEventParameterName2;
    }

    public static int AFInAppEventParameterName(SharedPreferences sharedPreferences, String str, boolean z) {
        int i2 = AppsFlyerConversionListener + 19;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        int i4 = sharedPreferences.getInt(str, 0);
        if ((z ? '?' : (char) 5) == '?') {
            int i5 = AppsFlyerConversionListener + 67;
            onResponseError = i5 % 128;
            i4 = i5 % 2 != 0 ? i4 + 111 : i4 + 1;
            sharedPreferences.edit().putInt(str, i4).apply();
        }
        if (AFb1nSDK.AFInAppEventType().afDebugLog()) {
            int i6 = AppsFlyerConversionListener + 49;
            onResponseError = i6 % 128;
            int i7 = i6 % 2;
            AFb1nSDK.AFInAppEventType().values(String.valueOf(i4));
        }
        int i8 = onResponseError + 95;
        AppsFlyerConversionListener = i8 % 128;
        if (i8 % 2 != 0) {
            return i4;
        }
        Object[] objArr = null;
        int length = objArr.length;
        return i4;
    }

    public static void valueOf(Map<String, Object> map, AFe1vSDK aFe1vSDK) {
        HashMap hashMap = new HashMap(aFe1vSDK.values);
        aFe1vSDK.values.clear();
        aFe1vSDK.AFKeystoreWrapper.AFInAppEventParameterName("gcd");
        if (!hashMap.isEmpty()) {
            int i2 = AppsFlyerConversionListener + 69;
            onResponseError = i2 % 128;
            if (!(i2 % 2 == 0)) {
                AFInAppEventType(map).put("gcd", hashMap);
                Object[] objArr = null;
                int length = objArr.length;
            } else {
                AFInAppEventType(map).put("gcd", hashMap);
            }
        }
        int i3 = onResponseError + 67;
        AppsFlyerConversionListener = i3 % 128;
        int i4 = i3 % 2;
    }

    public final Map<String, Object> AFInAppEventParameterName(AFa1qSDK aFa1qSDK) {
        String str;
        String str2;
        Object obj;
        String str3;
        PackageManager.NameNotFoundException nameNotFoundException;
        String str4;
        boolean z;
        AppsFlyerProperties appsFlyerProperties;
        AFb1fSDK aFb1fSDK;
        Throwable th;
        AFa1rSDK values2;
        long availableBlocks;
        long blockCount;
        Object obj2;
        PackageInfo packageInfo;
        Object AFInAppEventType2;
        UiModeManager uiModeManager;
        Context context = aFa1qSDK.valueOf;
        String str5 = this.onValidateInAppFailure.AFLogger$LogLevel().AFInAppEventType;
        String str6 = aFa1qSDK.afDebugLog;
        Map map = aFa1qSDK.AFKeystoreWrapper;
        if (map == null) {
            map = new HashMap();
        }
        Object jSONObject = new JSONObject(map).toString();
        String str7 = aFa1qSDK.afRDLog;
        SharedPreferences AFKeystoreWrapper2 = AFKeystoreWrapper(context);
        boolean values3 = aFa1qSDK.values();
        Object obj3 = aFa1qSDK.AFInAppEventParameterName;
        Map<String, Object> map2 = aFa1qSDK.AFInAppEventType;
        AFb1ySDK.values(context, map2);
        Boolean bool = AFb1ySDK.AFKeystoreWrapper;
        if (bool == null || bool.booleanValue()) {
            str = "Exception while collecting facebook's attribution ID. ";
            str2 = AppsFlyerProperties.APP_ID;
            obj = obj3;
        } else {
            obj = obj3;
            Map<String, Object> AFInAppEventType3 = AFInAppEventType(map2);
            str = "Exception while collecting facebook's attribution ID. ";
            Boolean bool2 = Boolean.TRUE;
            str2 = AppsFlyerProperties.APP_ID;
            AFInAppEventType3.put("ad_ids_disabled", bool2);
        }
        long time = new Date().getTime();
        Object[] objArr = new Object[1];
        AFKeystoreWrapper((byte) ((Process.myTid() >> 22) + 120), "\r\u0001\u000e\r\u0000\u0003\u0015\u0005\r\f\u0000\u0007", (Process.myPid() >> 22) + 12, objArr);
        map2.put(((String) objArr[0]).intern(), Long.toString(time));
        Object values4 = AFa1xSDK.values(context, time);
        if (values4 != null) {
            map2.put("cksm_v1", values4);
        }
        try {
            if (!isStopped()) {
                StringBuilder sb = new StringBuilder("******* sendTrackingWithEvent: ");
                sb.append(values3 ? "Launch" : str6);
                AFLogger.afInfoLog(sb.toString());
            } else {
                AFLogger.afInfoLog("Reporting has been stopped");
            }
            AFa1mSDK afErrorLogForExcManagerOnly2 = valueOf().afErrorLogForExcManagerOnly();
            try {
                if (!new File(afErrorLogForExcManagerOnly2.AFKeystoreWrapper.valueOf.getFilesDir(), "AFRequestCache").exists()) {
                    new File(afErrorLogForExcManagerOnly2.AFKeystoreWrapper.valueOf.getFilesDir(), "AFRequestCache").mkdir();
                }
            } catch (Exception e2) {
                AFLogger.afErrorLog("CACHE: Could not create cache directory", e2);
            }
            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 e3) {
                AFLogger.afErrorLog("Exception while validation permissions. ", e3);
            }
            Object[] objArr2 = new Object[1];
            AFKeystoreWrapper((byte) (View.MeasureSpec.getMode(0) + 77), "㗸", (ViewConfiguration.getMinimumFlingVelocity() >> 16) + 1, objArr2);
            map2.put("af_events_api", ((String) objArr2[0]).intern());
            Object[] objArr3 = new Object[1];
            AFKeystoreWrapper((byte) (9 - (SystemClock.currentThreadTimeMillis() > (-1L) ? 1 : (SystemClock.currentThreadTimeMillis() == (-1L) ? 0 : -1))), "\u0014\u0002\f\n㘆", (ViewConfiguration.getTouchSlop() >> 8) + 5, 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 appsFlyerProperties2 = AppsFlyerProperties.getInstance();
            AFb1fSDK aFb1fSDK2 = new AFb1fSDK(context);
            AFe1vSDK AFLogger2 = valueOf().AFLogger();
            if (values3) {
                if (afInfoLog(context)) {
                    if (!appsFlyerProperties2.isOtherSdkStringDisabled()) {
                        map2.put("batteryLevel", String.valueOf(AppsFlyer2dXConversionCallback(context)));
                    }
                    AFLogger(context);
                    if (Build.VERSION.SDK_INT >= 23) {
                        uiModeManager = (UiModeManager) context.getSystemService(UiModeManager.class);
                    } else {
                        uiModeManager = (UiModeManager) context.getSystemService("uimode");
                    }
                    if (uiModeManager != null && uiModeManager.getCurrentModeType() == 4) {
                        map2.put("tv", Boolean.TRUE);
                    }
                    if (AFe1wSDK.AFKeystoreWrapper(context)) {
                        map2.put("inst_app", Boolean.TRUE);
                    }
                }
                map2.put("timepassedsincelastlaunch", Long.toString(getLevel(context)));
                AFKeystoreWrapper(map2);
                valueOf(map2, AFLogger2);
                if (this.onAttributionFailure != null) {
                    map2.put("phone", this.onAttributionFailure);
                }
                if (!TextUtils.isEmpty(str7)) {
                    map2.put("referrer", str7);
                }
                Object string = AFKeystoreWrapper2.getString("extraReferrers", null);
                if (string != null) {
                    map2.put("extraReferrers", string);
                }
                String referrer = appsFlyerProperties2.getReferrer(context);
                if (!TextUtils.isEmpty(referrer) && map2.get("referrer") == null) {
                    map2.put("referrer", referrer);
                }
                long j2 = AFLogger2.afWarnLog;
                if (j2 != 0) {
                    map2.put("prev_session_dur", Long.valueOf(j2));
                }
                map2.put("exception_number", Long.valueOf(AFb1gSDK.AFKeystoreWrapper == null ? -1L : AFKeystoreWrapper(AFb1gSDK.AFKeystoreWrapper).getLong("exception_number", 0L)));
                if (this.onResponse != null) {
                    AFb1dSDK aFb1dSDK = this.onResponse;
                    if (!aFb1dSDK.values.isEmpty()) {
                        map2.put("partner_data", aFb1dSDK.values);
                    }
                    if (!aFb1dSDK.AFInAppEventType.isEmpty()) {
                        AFInAppEventType(map2).put("partner_data", aFb1dSDK.AFInAppEventType);
                        aFb1dSDK.AFInAppEventType = new HashMap();
                    }
                }
            } else {
                values(context, map2, str6);
            }
            Object AFInAppEventParameterName2 = AFInAppEventParameterName("KSAppsFlyerId");
            String AFInAppEventParameterName3 = AFInAppEventParameterName("KSAppsFlyerRICounter");
            if (AFInAppEventParameterName2 != null && AFInAppEventParameterName3 != null && Integer.valueOf(AFInAppEventParameterName3).intValue() > 0) {
                map2.put("reinstallCounter", AFInAppEventParameterName3);
                map2.put("originalAppsflyerId", AFInAppEventParameterName2);
            }
            Object AFInAppEventParameterName4 = AFInAppEventParameterName(AppsFlyerProperties.ADDITIONAL_CUSTOM_DATA);
            if (AFInAppEventParameterName4 != null) {
                map2.put("customData", AFInAppEventParameterName4);
            }
            try {
                String installerPackageName = context.getPackageManager().getInstallerPackageName(context.getPackageName());
                if (installerPackageName != null) {
                    map2.put("installer_package", installerPackageName);
                }
            } catch (Exception e4) {
                AFLogger.afErrorLog("Exception while getting the app's installer package. ", e4);
            }
            String string2 = appsFlyerProperties2.getString(AppsFlyerProperties.EXTENSION);
            if (string2 != null && string2.length() > 0) {
                map2.put(AppsFlyerProperties.EXTENSION, string2);
            }
            String values5 = values(context);
            String valueOf2 = valueOf(AFInAppEventParameterName(context), values5);
            if ((valueOf2 != null && !valueOf2.equals(values5)) || (valueOf2 == null && values5 != null)) {
                map2.put("af_latestchannel", values5);
            }
            String afErrorLogForExcManagerOnly3 = afErrorLogForExcManagerOnly(context);
            if (afErrorLogForExcManagerOnly3 != null) {
                map2.put("af_installstore", afErrorLogForExcManagerOnly3.toLowerCase());
            }
            String AFVersionDeclaration2 = AFVersionDeclaration(context);
            if (AFVersionDeclaration2 != null) {
                map2.put("af_preinstall_name", AFVersionDeclaration2.toLowerCase());
            }
            String afWarnLog2 = afWarnLog(context);
            if (afWarnLog2 != null) {
                map2.put("af_currentstore", afWarnLog2.toLowerCase());
            }
            if (str5 != null && str5.length() > 0) {
                map2.put("appsflyerKey", str5);
            } else {
                String str8 = this.onValidateInAppFailure.AFLogger$LogLevel().AFInAppEventType;
                if (str8 != null && str8.length() > 0) {
                    map2.put("appsflyerKey", str8);
                } else {
                    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;
                }
            }
            Object AFKeystoreWrapper3 = AFKeystoreWrapper();
            if (AFKeystoreWrapper3 != null) {
                map2.put("appUserId", AFKeystoreWrapper3);
            }
            Object string3 = appsFlyerProperties2.getString(AppsFlyerProperties.USER_EMAILS);
            if (string3 != null) {
                map2.put("user_emails", string3);
            } else {
                String AFInAppEventParameterName5 = AFInAppEventParameterName(AppsFlyerProperties.USER_EMAIL);
                if (AFInAppEventParameterName5 != null) {
                    map2.put("sha1_el", AFb1vSDK.AFInAppEventType(AFInAppEventParameterName5));
                }
            }
            if (str6 != null) {
                map2.put("eventName", str6);
                map2.put("eventValue", jSONObject);
            }
            if (AFLogger() != null) {
                map2.put(str2, AFInAppEventParameterName(str2));
            }
            String AFInAppEventParameterName6 = AFInAppEventParameterName(AppsFlyerProperties.CURRENCY_CODE);
            if (AFInAppEventParameterName6 != null) {
                if (AFInAppEventParameterName6.length() != 3) {
                    StringBuilder sb2 = new StringBuilder("WARNING: currency code should be 3 characters!!! '");
                    sb2.append(AFInAppEventParameterName6);
                    sb2.append("' is not a legal value.");
                    AFLogger.afWarnLog(sb2.toString());
                }
                map2.put("currency", AFInAppEventParameterName6);
            }
            Object AFInAppEventParameterName7 = AFInAppEventParameterName(AppsFlyerProperties.IS_UPDATE);
            if (AFInAppEventParameterName7 != null) {
                map2.put("isUpdate", AFInAppEventParameterName7);
            }
            map2.put("af_preinstalled", Boolean.toString(isPreInstalledApp(context)));
            if (appsFlyerProperties2.getBoolean(AppsFlyerProperties.COLLECT_FACEBOOK_ATTR_ID, true)) {
                try {
                    try {
                    } catch (Throwable th2) {
                        AFLogger.afErrorLog(str, th2);
                        str4 = null;
                        if (str4 != null) {
                        }
                        AFInAppEventParameterName(context, map2);
                        AFInAppEventType2 = AFb1sSDK.AFInAppEventType((WeakReference<Context>) new WeakReference(context));
                        if (AFInAppEventType2 != null) {
                        }
                        map2.put("lang", Locale.getDefault().getDisplayLanguage());
                        map2.put("lang_code", Locale.getDefault().getLanguage());
                        map2.put("country", Locale.getDefault().getCountry());
                        map2.put("platformextension", this.onResponseErrorNative.values());
                        values(context, (Map<String, ? super String>) map2);
                        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
                        z = values3;
                        try {
                            map2.put("installDate", values(simpleDateFormat, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
                        } catch (Exception e5) {
                            e = e5;
                            AFLogger.afErrorLog("Exception while collecting install date. ", e);
                            packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                            if (packageInfo.versionCode > AFKeystoreWrapper2.getInt("versionCode", 0)) {
                            }
                            map2.put("app_version_code", Integer.toString(packageInfo.versionCode));
                            map2.put("app_version_name", packageInfo.versionName);
                            long j3 = packageInfo.firstInstallTime;
                            long j4 = packageInfo.lastUpdateTime;
                            aFb1fSDK = aFb1fSDK2;
                            appsFlyerProperties = appsFlyerProperties2;
                            try {
                                map2.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j3)));
                                map2.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j4)));
                                Object values6 = values(simpleDateFormat, context);
                                Object[] objArr4 = new Object[1];
                                AFKeystoreWrapper((byte) (TextUtils.lastIndexOf(BuildConfig.FLAVOR, '0', 0) + 127), "\u0004\u0000\u0001\u0005\u000b\u0011\r\u0010\u0013\u0018\r\u0003\f\r㙽", 14 - TextUtils.lastIndexOf(BuildConfig.FLAVOR, '0'), objArr4);
                                map2.put(((String) objArr4[0]).intern(), values6);
                            } catch (Throwable th3) {
                                th = th3;
                                th = th;
                                AFLogger.afErrorLog("Exception while collecting app version data ", th, true);
                                this.onAttributionFailureNative = AFd1dSDK.AFInAppEventType(context);
                                StringBuilder sb3 = new StringBuilder("didConfigureTokenRefreshService=");
                                sb3.append(this.onAttributionFailureNative);
                                AFLogger.afDebugLog(sb3.toString());
                                if (!this.onAttributionFailureNative) {
                                }
                                if (z) {
                                }
                                if (!z) {
                                }
                                if (AFInAppEventParameterName("advertiserId") == null) {
                                }
                                values2 = AFb1ySDK.values(context.getContentResolver());
                                if (values2 != null) {
                                }
                                map2.put("registeredUninstall", Boolean.valueOf(AFd1dSDK.valueOf(AFKeystoreWrapper2)));
                                int AFInAppEventParameterName8 = AFInAppEventParameterName(AFKeystoreWrapper2, z);
                                map2.put("counter", Integer.toString(AFInAppEventParameterName8));
                                map2.put("iaecounter", Integer.toString(AFInAppEventType(AFKeystoreWrapper2, str6 != null)));
                                if (z) {
                                }
                                map2.put("isFirstCall", Boolean.toString(!AFInAppEventType(AFKeystoreWrapper2)));
                                values(context, z, map2, AFInAppEventParameterName8);
                                new AFb1vSDK();
                                map2.put("af_v", AFb1vSDK.AFInAppEventType(map2));
                                new AFb1vSDK();
                                map2.put("af_v2", AFb1vSDK.values(map2));
                                map2.put("ivc", Boolean.valueOf(onInstallConversionFailureNative(context)));
                                if (AFKeystoreWrapper2.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);
                                AFb1fSDK aFb1fSDK3 = aFb1fSDK;
                                map2.put("sig", AFb1wSDK.values(aFb1fSDK3.AFKeystoreWrapper.getPackageManager(), aFb1fSDK3.AFKeystoreWrapper.getPackageName()));
                                map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                                StatFs statFs = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                                if (Build.VERSION.SDK_INT >= 18) {
                                }
                                double pow = Math.pow(2.0d, 20.0d);
                                StringBuilder sb4 = new StringBuilder();
                                sb4.append((long) (availableBlocks / pow));
                                sb4.append("/");
                                sb4.append((long) (blockCount / pow));
                                map2.put("disk", sb4.toString());
                                if (this.afErrorLog != null) {
                                }
                                return map2;
                            }
                            this.onAttributionFailureNative = AFd1dSDK.AFInAppEventType(context);
                            StringBuilder sb32 = new StringBuilder("didConfigureTokenRefreshService=");
                            sb32.append(this.onAttributionFailureNative);
                            AFLogger.afDebugLog(sb32.toString());
                            if (!this.onAttributionFailureNative) {
                            }
                            if (z) {
                            }
                            if (!z) {
                            }
                            if (AFInAppEventParameterName("advertiserId") == null) {
                            }
                            values2 = AFb1ySDK.values(context.getContentResolver());
                            if (values2 != null) {
                            }
                            map2.put("registeredUninstall", Boolean.valueOf(AFd1dSDK.valueOf(AFKeystoreWrapper2)));
                            int AFInAppEventParameterName82 = AFInAppEventParameterName(AFKeystoreWrapper2, z);
                            map2.put("counter", Integer.toString(AFInAppEventParameterName82));
                            map2.put("iaecounter", Integer.toString(AFInAppEventType(AFKeystoreWrapper2, str6 != null)));
                            if (z) {
                            }
                            map2.put("isFirstCall", Boolean.toString(!AFInAppEventType(AFKeystoreWrapper2)));
                            values(context, z, map2, AFInAppEventParameterName82);
                            new AFb1vSDK();
                            map2.put("af_v", AFb1vSDK.AFInAppEventType(map2));
                            new AFb1vSDK();
                            map2.put("af_v2", AFb1vSDK.values(map2));
                            map2.put("ivc", Boolean.valueOf(onInstallConversionFailureNative(context)));
                            if (AFKeystoreWrapper2.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);
                            AFb1fSDK aFb1fSDK32 = aFb1fSDK;
                            map2.put("sig", AFb1wSDK.values(aFb1fSDK32.AFKeystoreWrapper.getPackageManager(), aFb1fSDK32.AFKeystoreWrapper.getPackageName()));
                            map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                            StatFs statFs2 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                            if (Build.VERSION.SDK_INT >= 18) {
                            }
                            double pow2 = Math.pow(2.0d, 20.0d);
                            StringBuilder sb42 = new StringBuilder();
                            sb42.append((long) (availableBlocks / pow2));
                            sb42.append("/");
                            sb42.append((long) (blockCount / pow2));
                            map2.put("disk", sb42.toString());
                            if (this.afErrorLog != null) {
                            }
                            return map2;
                        }
                        packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                        if (packageInfo.versionCode > AFKeystoreWrapper2.getInt("versionCode", 0)) {
                        }
                        map2.put("app_version_code", Integer.toString(packageInfo.versionCode));
                        map2.put("app_version_name", packageInfo.versionName);
                        long j32 = packageInfo.firstInstallTime;
                        long j42 = packageInfo.lastUpdateTime;
                        aFb1fSDK = aFb1fSDK2;
                        try {
                            appsFlyerProperties = appsFlyerProperties2;
                            map2.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j32)));
                            map2.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j42)));
                            Object values62 = values(simpleDateFormat, context);
                            Object[] objArr42 = new Object[1];
                            AFKeystoreWrapper((byte) (TextUtils.lastIndexOf(BuildConfig.FLAVOR, '0', 0) + 127), "\u0004\u0000\u0001\u0005\u000b\u0011\r\u0010\u0013\u0018\r\u0003\f\r㙽", 14 - TextUtils.lastIndexOf(BuildConfig.FLAVOR, '0'), objArr42);
                            map2.put(((String) objArr42[0]).intern(), values62);
                        } catch (Throwable th4) {
                            th = th4;
                            appsFlyerProperties = appsFlyerProperties2;
                            th = th;
                            AFLogger.afErrorLog("Exception while collecting app version data ", th, true);
                            this.onAttributionFailureNative = AFd1dSDK.AFInAppEventType(context);
                            StringBuilder sb322 = new StringBuilder("didConfigureTokenRefreshService=");
                            sb322.append(this.onAttributionFailureNative);
                            AFLogger.afDebugLog(sb322.toString());
                            if (!this.onAttributionFailureNative) {
                            }
                            if (z) {
                            }
                            if (!z) {
                            }
                            if (AFInAppEventParameterName("advertiserId") == null) {
                            }
                            values2 = AFb1ySDK.values(context.getContentResolver());
                            if (values2 != null) {
                            }
                            map2.put("registeredUninstall", Boolean.valueOf(AFd1dSDK.valueOf(AFKeystoreWrapper2)));
                            int AFInAppEventParameterName822 = AFInAppEventParameterName(AFKeystoreWrapper2, z);
                            map2.put("counter", Integer.toString(AFInAppEventParameterName822));
                            map2.put("iaecounter", Integer.toString(AFInAppEventType(AFKeystoreWrapper2, str6 != null)));
                            if (z) {
                            }
                            map2.put("isFirstCall", Boolean.toString(!AFInAppEventType(AFKeystoreWrapper2)));
                            values(context, z, map2, AFInAppEventParameterName822);
                            new AFb1vSDK();
                            map2.put("af_v", AFb1vSDK.AFInAppEventType(map2));
                            new AFb1vSDK();
                            map2.put("af_v2", AFb1vSDK.values(map2));
                            map2.put("ivc", Boolean.valueOf(onInstallConversionFailureNative(context)));
                            if (AFKeystoreWrapper2.contains("is_stop_tracking_used")) {
                            }
                            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);
                            AFb1fSDK aFb1fSDK322 = aFb1fSDK;
                            map2.put("sig", AFb1wSDK.values(aFb1fSDK322.AFKeystoreWrapper.getPackageManager(), aFb1fSDK322.AFKeystoreWrapper.getPackageName()));
                            map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                            StatFs statFs22 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                            if (Build.VERSION.SDK_INT >= 18) {
                            }
                            double pow22 = Math.pow(2.0d, 20.0d);
                            StringBuilder sb422 = new StringBuilder();
                            sb422.append((long) (availableBlocks / pow22));
                            sb422.append("/");
                            sb422.append((long) (blockCount / pow22));
                            map2.put("disk", sb422.toString());
                            if (this.afErrorLog != null) {
                            }
                            return map2;
                        }
                        this.onAttributionFailureNative = AFd1dSDK.AFInAppEventType(context);
                        StringBuilder sb3222 = new StringBuilder("didConfigureTokenRefreshService=");
                        sb3222.append(this.onAttributionFailureNative);
                        AFLogger.afDebugLog(sb3222.toString());
                        if (!this.onAttributionFailureNative) {
                        }
                        if (z) {
                        }
                        if (!z) {
                        }
                        if (AFInAppEventParameterName("advertiserId") == null) {
                        }
                        values2 = AFb1ySDK.values(context.getContentResolver());
                        if (values2 != null) {
                        }
                        map2.put("registeredUninstall", Boolean.valueOf(AFd1dSDK.valueOf(AFKeystoreWrapper2)));
                        int AFInAppEventParameterName8222 = AFInAppEventParameterName(AFKeystoreWrapper2, z);
                        map2.put("counter", Integer.toString(AFInAppEventParameterName8222));
                        map2.put("iaecounter", Integer.toString(AFInAppEventType(AFKeystoreWrapper2, str6 != null)));
                        if (z) {
                            appsFlyerProperties.AFKeystoreWrapper = true;
                        }
                        map2.put("isFirstCall", Boolean.toString(!AFInAppEventType(AFKeystoreWrapper2)));
                        values(context, z, map2, AFInAppEventParameterName8222);
                        new AFb1vSDK();
                        map2.put("af_v", AFb1vSDK.AFInAppEventType(map2));
                        new AFb1vSDK();
                        map2.put("af_v2", AFb1vSDK.values(map2));
                        map2.put("ivc", Boolean.valueOf(onInstallConversionFailureNative(context)));
                        if (AFKeystoreWrapper2.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);
                        AFb1fSDK aFb1fSDK3222 = aFb1fSDK;
                        map2.put("sig", AFb1wSDK.values(aFb1fSDK3222.AFKeystoreWrapper.getPackageManager(), aFb1fSDK3222.AFKeystoreWrapper.getPackageName()));
                        map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                        StatFs statFs222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                        if (Build.VERSION.SDK_INT >= 18) {
                        }
                        double pow222 = Math.pow(2.0d, 20.0d);
                        StringBuilder sb4222 = new StringBuilder();
                        sb4222.append((long) (availableBlocks / pow222));
                        sb4222.append("/");
                        sb4222.append((long) (blockCount / pow222));
                        map2.put("disk", sb4222.toString());
                        if (this.afErrorLog != null) {
                            map2.put("sharing_filter", obj2);
                        }
                        return map2;
                    }
                } catch (PackageManager.NameNotFoundException e6) {
                    str3 = str;
                    nameNotFoundException = e6;
                }
                try {
                    context.getPackageManager().getApplicationInfo("com.facebook.katana", 0);
                    str4 = getAttributionId(context);
                } catch (PackageManager.NameNotFoundException e7) {
                    nameNotFoundException = e7;
                    str3 = str;
                    AFLogger.afErrorLogForExcManagerOnly("com.facebook.katana not found", nameNotFoundException, true);
                    AFLogger.afWarnLog(str3);
                    str4 = null;
                    if (str4 != null) {
                    }
                    AFInAppEventParameterName(context, map2);
                    AFInAppEventType2 = AFb1sSDK.AFInAppEventType((WeakReference<Context>) new WeakReference(context));
                    if (AFInAppEventType2 != null) {
                    }
                    map2.put("lang", Locale.getDefault().getDisplayLanguage());
                    map2.put("lang_code", Locale.getDefault().getLanguage());
                    map2.put("country", Locale.getDefault().getCountry());
                    map2.put("platformextension", this.onResponseErrorNative.values());
                    values(context, (Map<String, ? super String>) map2);
                    SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
                    z = values3;
                    map2.put("installDate", values(simpleDateFormat2, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
                    packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                    if (packageInfo.versionCode > AFKeystoreWrapper2.getInt("versionCode", 0)) {
                    }
                    map2.put("app_version_code", Integer.toString(packageInfo.versionCode));
                    map2.put("app_version_name", packageInfo.versionName);
                    long j322 = packageInfo.firstInstallTime;
                    long j422 = packageInfo.lastUpdateTime;
                    aFb1fSDK = aFb1fSDK2;
                    appsFlyerProperties = appsFlyerProperties2;
                    map2.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j322)));
                    map2.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j422)));
                    Object values622 = values(simpleDateFormat2, context);
                    Object[] objArr422 = new Object[1];
                    AFKeystoreWrapper((byte) (TextUtils.lastIndexOf(BuildConfig.FLAVOR, '0', 0) + 127), "\u0004\u0000\u0001\u0005\u000b\u0011\r\u0010\u0013\u0018\r\u0003\f\r㙽", 14 - TextUtils.lastIndexOf(BuildConfig.FLAVOR, '0'), objArr422);
                    map2.put(((String) objArr422[0]).intern(), values622);
                    this.onAttributionFailureNative = AFd1dSDK.AFInAppEventType(context);
                    StringBuilder sb32222 = new StringBuilder("didConfigureTokenRefreshService=");
                    sb32222.append(this.onAttributionFailureNative);
                    AFLogger.afDebugLog(sb32222.toString());
                    if (!this.onAttributionFailureNative) {
                    }
                    if (z) {
                    }
                    if (!z) {
                    }
                    if (AFInAppEventParameterName("advertiserId") == null) {
                    }
                    values2 = AFb1ySDK.values(context.getContentResolver());
                    if (values2 != null) {
                    }
                    map2.put("registeredUninstall", Boolean.valueOf(AFd1dSDK.valueOf(AFKeystoreWrapper2)));
                    int AFInAppEventParameterName82222 = AFInAppEventParameterName(AFKeystoreWrapper2, z);
                    map2.put("counter", Integer.toString(AFInAppEventParameterName82222));
                    map2.put("iaecounter", Integer.toString(AFInAppEventType(AFKeystoreWrapper2, str6 != null)));
                    if (z) {
                    }
                    map2.put("isFirstCall", Boolean.toString(!AFInAppEventType(AFKeystoreWrapper2)));
                    values(context, z, map2, AFInAppEventParameterName82222);
                    new AFb1vSDK();
                    map2.put("af_v", AFb1vSDK.AFInAppEventType(map2));
                    new AFb1vSDK();
                    map2.put("af_v2", AFb1vSDK.values(map2));
                    map2.put("ivc", Boolean.valueOf(onInstallConversionFailureNative(context)));
                    if (AFKeystoreWrapper2.contains("is_stop_tracking_used")) {
                    }
                    HashMap hashMap2222 = new HashMap();
                    hashMap2222.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
                    hashMap2222.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
                    map2.put("cell", hashMap2222);
                    AFb1fSDK aFb1fSDK32222 = aFb1fSDK;
                    map2.put("sig", AFb1wSDK.values(aFb1fSDK32222.AFKeystoreWrapper.getPackageManager(), aFb1fSDK32222.AFKeystoreWrapper.getPackageName()));
                    map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                    StatFs statFs2222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                    if (Build.VERSION.SDK_INT >= 18) {
                    }
                    double pow2222 = Math.pow(2.0d, 20.0d);
                    StringBuilder sb42222 = new StringBuilder();
                    sb42222.append((long) (availableBlocks / pow2222));
                    sb42222.append("/");
                    sb42222.append((long) (blockCount / pow2222));
                    map2.put("disk", sb42222.toString());
                    if (this.afErrorLog != null) {
                    }
                    return map2;
                }
                if (str4 != null) {
                    map2.put("fb", str4);
                }
            }
            AFInAppEventParameterName(context, map2);
            try {
                AFInAppEventType2 = AFb1sSDK.AFInAppEventType((WeakReference<Context>) new WeakReference(context));
                if (AFInAppEventType2 != null) {
                    map2.put("uid", AFInAppEventType2);
                }
            } catch (Exception e8) {
                StringBuilder sb5 = new StringBuilder("ERROR: could not get uid ");
                sb5.append(e8.getMessage());
                AFLogger.afErrorLog(sb5.toString(), e8);
            }
            try {
                map2.put("lang", Locale.getDefault().getDisplayLanguage());
            } catch (Exception e9) {
                AFLogger.afErrorLog("Exception while collecting display language name. ", e9);
            }
            try {
                map2.put("lang_code", Locale.getDefault().getLanguage());
            } catch (Exception e10) {
                AFLogger.afErrorLog("Exception while collecting display language code. ", e10);
            }
            try {
                map2.put("country", Locale.getDefault().getCountry());
            } catch (Exception e11) {
                AFLogger.afErrorLog("Exception while collecting country name. ", e11);
            }
            map2.put("platformextension", this.onResponseErrorNative.values());
            values(context, (Map<String, ? super String>) map2);
            SimpleDateFormat simpleDateFormat22 = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
            try {
                z = values3;
                map2.put("installDate", values(simpleDateFormat22, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
            } catch (Exception e12) {
                e = e12;
                z = values3;
            }
            try {
                packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                if (packageInfo.versionCode > AFKeystoreWrapper2.getInt("versionCode", 0)) {
                    try {
                        AFInAppEventParameterName(context).AFKeystoreWrapper("versionCode", packageInfo.versionCode);
                    } catch (Throwable th5) {
                        th = th5;
                        appsFlyerProperties = appsFlyerProperties2;
                        aFb1fSDK = aFb1fSDK2;
                        AFLogger.afErrorLog("Exception while collecting app version data ", th, true);
                        this.onAttributionFailureNative = AFd1dSDK.AFInAppEventType(context);
                        StringBuilder sb322222 = new StringBuilder("didConfigureTokenRefreshService=");
                        sb322222.append(this.onAttributionFailureNative);
                        AFLogger.afDebugLog(sb322222.toString());
                        if (!this.onAttributionFailureNative) {
                        }
                        if (z) {
                        }
                        if (!z) {
                        }
                        if (AFInAppEventParameterName("advertiserId") == null) {
                        }
                        values2 = AFb1ySDK.values(context.getContentResolver());
                        if (values2 != null) {
                        }
                        map2.put("registeredUninstall", Boolean.valueOf(AFd1dSDK.valueOf(AFKeystoreWrapper2)));
                        int AFInAppEventParameterName822222 = AFInAppEventParameterName(AFKeystoreWrapper2, z);
                        map2.put("counter", Integer.toString(AFInAppEventParameterName822222));
                        map2.put("iaecounter", Integer.toString(AFInAppEventType(AFKeystoreWrapper2, str6 != null)));
                        if (z) {
                        }
                        map2.put("isFirstCall", Boolean.toString(!AFInAppEventType(AFKeystoreWrapper2)));
                        values(context, z, map2, AFInAppEventParameterName822222);
                        new AFb1vSDK();
                        map2.put("af_v", AFb1vSDK.AFInAppEventType(map2));
                        new AFb1vSDK();
                        map2.put("af_v2", AFb1vSDK.values(map2));
                        map2.put("ivc", Boolean.valueOf(onInstallConversionFailureNative(context)));
                        if (AFKeystoreWrapper2.contains("is_stop_tracking_used")) {
                        }
                        HashMap hashMap22222 = new HashMap();
                        hashMap22222.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
                        hashMap22222.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
                        map2.put("cell", hashMap22222);
                        AFb1fSDK aFb1fSDK322222 = aFb1fSDK;
                        map2.put("sig", AFb1wSDK.values(aFb1fSDK322222.AFKeystoreWrapper.getPackageManager(), aFb1fSDK322222.AFKeystoreWrapper.getPackageName()));
                        map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                        StatFs statFs22222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                        if (Build.VERSION.SDK_INT >= 18) {
                        }
                        double pow22222 = Math.pow(2.0d, 20.0d);
                        StringBuilder sb422222 = new StringBuilder();
                        sb422222.append((long) (availableBlocks / pow22222));
                        sb422222.append("/");
                        sb422222.append((long) (blockCount / pow22222));
                        map2.put("disk", sb422222.toString());
                        if (this.afErrorLog != null) {
                        }
                        return map2;
                    }
                }
                map2.put("app_version_code", Integer.toString(packageInfo.versionCode));
                map2.put("app_version_name", packageInfo.versionName);
                try {
                    long j3222 = packageInfo.firstInstallTime;
                    long j4222 = packageInfo.lastUpdateTime;
                    aFb1fSDK = aFb1fSDK2;
                    appsFlyerProperties = appsFlyerProperties2;
                    map2.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j3222)));
                    map2.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j4222)));
                    Object values6222 = values(simpleDateFormat22, context);
                    Object[] objArr4222 = new Object[1];
                    AFKeystoreWrapper((byte) (TextUtils.lastIndexOf(BuildConfig.FLAVOR, '0', 0) + 127), "\u0004\u0000\u0001\u0005\u000b\u0011\r\u0010\u0013\u0018\r\u0003\f\r㙽", 14 - TextUtils.lastIndexOf(BuildConfig.FLAVOR, '0'), objArr4222);
                    map2.put(((String) objArr4222[0]).intern(), values6222);
                } catch (Throwable th6) {
                    th = th6;
                    aFb1fSDK = aFb1fSDK2;
                }
            } catch (Throwable th7) {
                th = th7;
                appsFlyerProperties = appsFlyerProperties2;
                aFb1fSDK = aFb1fSDK2;
            }
            this.onAttributionFailureNative = AFd1dSDK.AFInAppEventType(context);
            StringBuilder sb3222222 = new StringBuilder("didConfigureTokenRefreshService=");
            sb3222222.append(this.onAttributionFailureNative);
            AFLogger.afDebugLog(sb3222222.toString());
            if (!this.onAttributionFailureNative) {
                map2.put("tokenRefreshConfigured", Boolean.FALSE);
            }
            if (z) {
                if (this.init != null) {
                    if (map2.get("af_deeplink") != null) {
                        AFLogger.afDebugLog("Skip 'af' payload as deeplink was found by path");
                    } else {
                        JSONObject jSONObject2 = new JSONObject(this.init);
                        jSONObject2.put("isPush", "true");
                        map2.put("af_deeplink", jSONObject2.toString());
                    }
                }
                this.init = null;
                map2.put("open_referrer", obj);
            }
            if (!z) {
                try {
                    AFa1cSDK AFInAppEventType4 = AFa1cSDK.AFInAppEventType(context);
                    Map<? extends String, ? extends Object> concurrentHashMap = new ConcurrentHashMap<>();
                    List<Map<String, Object>> valueOf3 = AFInAppEventType4.valueOf();
                    if (!valueOf3.isEmpty()) {
                        concurrentHashMap.put("sensors", new AFa1tSDK().valueOf(valueOf3));
                    } else {
                        concurrentHashMap.put("sensors", "na");
                    }
                    map2.putAll(concurrentHashMap);
                } catch (Exception e13) {
                    AFLogger.afErrorLogForExcManagerOnly("error while getting sensors data", e13);
                    StringBuilder sb6 = new StringBuilder("Unexpected exception from AFSensorManager: ");
                    sb6.append(e13.getMessage());
                    AFLogger.afRDLog(sb6.toString());
                }
            }
            if (AFInAppEventParameterName("advertiserId") == null) {
                AFb1ySDK.values(context, map2);
                map2.put("GAID_retry", String.valueOf(AFInAppEventParameterName("advertiserId") != null));
            }
            values2 = AFb1ySDK.values(context.getContentResolver());
            if (values2 != null) {
                map2.put("amazon_aid", values2.AFKeystoreWrapper);
                map2.put("amazon_aid_limit", String.valueOf(values2.values));
            }
            map2.put("registeredUninstall", Boolean.valueOf(AFd1dSDK.valueOf(AFKeystoreWrapper2)));
            int AFInAppEventParameterName8222222 = AFInAppEventParameterName(AFKeystoreWrapper2, z);
            map2.put("counter", Integer.toString(AFInAppEventParameterName8222222));
            map2.put("iaecounter", Integer.toString(AFInAppEventType(AFKeystoreWrapper2, str6 != null)));
            if (z && AFInAppEventParameterName8222222 == 1) {
                appsFlyerProperties.AFKeystoreWrapper = true;
            }
            map2.put("isFirstCall", Boolean.toString(!AFInAppEventType(AFKeystoreWrapper2)));
            values(context, z, map2, AFInAppEventParameterName8222222);
            new AFb1vSDK();
            map2.put("af_v", AFb1vSDK.AFInAppEventType(map2));
            new AFb1vSDK();
            map2.put("af_v2", AFb1vSDK.values(map2));
            map2.put("ivc", Boolean.valueOf(onInstallConversionFailureNative(context)));
            if (AFKeystoreWrapper2.contains("is_stop_tracking_used")) {
                map2.put("istu", String.valueOf(AFKeystoreWrapper2.getBoolean("is_stop_tracking_used", false)));
            }
            HashMap hashMap222222 = new HashMap();
            hashMap222222.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
            hashMap222222.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
            map2.put("cell", hashMap222222);
            AFb1fSDK aFb1fSDK3222222 = aFb1fSDK;
            map2.put("sig", AFb1wSDK.values(aFb1fSDK3222222.AFKeystoreWrapper.getPackageManager(), aFb1fSDK3222222.AFKeystoreWrapper.getPackageName()));
            map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
            StatFs statFs222222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
            if (Build.VERSION.SDK_INT >= 18) {
                long blockSizeLong = statFs222222.getBlockSizeLong();
                availableBlocks = statFs222222.getAvailableBlocksLong() * blockSizeLong;
                blockCount = statFs222222.getBlockCountLong() * blockSizeLong;
            } else {
                int blockSize = statFs222222.getBlockSize();
                availableBlocks = statFs222222.getAvailableBlocks() * blockSize;
                blockCount = statFs222222.getBlockCount() * blockSize;
            }
            double pow222222 = Math.pow(2.0d, 20.0d);
            StringBuilder sb4222222 = new StringBuilder();
            sb4222222.append((long) (availableBlocks / pow222222));
            sb4222222.append("/");
            sb4222222.append((long) (blockCount / pow222222));
            map2.put("disk", sb4222222.toString());
            if (this.afErrorLog != null && (obj2 = this.afErrorLog.AFInAppEventType) != null) {
                map2.put("sharing_filter", obj2);
            }
        } catch (Throwable th8) {
            AFLogger.afErrorLog(th8.getLocalizedMessage(), th8, true);
        }
        return map2;
    }

    public static void AFKeystoreWrapper(Context context, Map<String, Object> map) {
        String str;
        WindowManager windowManager = (WindowManager) context.getSystemService("window");
        if ((windowManager != null ? '\b' : (char) 31) != 31) {
            int rotation = windowManager.getDefaultDisplay().getRotation();
            if (rotation == 0) {
                str = "p";
            } else if (rotation == 1) {
                str = "l";
            } else if (rotation == 2) {
                str = "pr";
            } else if (rotation != 3) {
                str = BuildConfig.FLAVOR;
            } else {
                int i2 = onResponseError + 125;
                AppsFlyerConversionListener = i2 % 128;
                int i3 = i2 % 2;
                str = "lr";
            }
            map.put("sc_o", str);
            int i4 = AppsFlyerConversionListener + 9;
            onResponseError = i4 % 128;
            int i5 = i4 % 2;
        }
    }

    public static void AFKeystoreWrapper(Map<String, Object> map) {
        String string;
        String string2;
        int i2 = onResponseError + 25;
        AppsFlyerConversionListener = i2 % 128;
        Object[] objArr = null;
        Object[] objArr2 = 0;
        if ((i2 % 2 == 0 ? '\f' : (char) 4) != 4) {
            string = AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.ONELINK_ID);
            string2 = AppsFlyerProperties.getInstance().getString("onelinkVersion");
            int length = (objArr2 == true ? 1 : 0).length;
        } else {
            string = AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.ONELINK_ID);
            string2 = AppsFlyerProperties.getInstance().getString("onelinkVersion");
        }
        if (!(string2 != null)) {
            return;
        }
        map.put("onelink_ver", string2);
    }

    public static String AFKeystoreWrapper(String str) {
        if (str == null) {
            return null;
        }
        if (str.matches("fb\\d*?://authorize.*")) {
            int i2 = onResponseError + 89;
            AppsFlyerConversionListener = i2 % 128;
            if (!(i2 % 2 != 0)) {
                int i3 = 31 / 0;
            }
        }
        return str;
    }

    public static boolean AFKeystoreWrapper(File file) {
        if ((file != null ? 'E' : '$') == 'E') {
            int i2 = onResponseError + 93;
            AppsFlyerConversionListener = i2 % 128;
            int i3 = i2 % 2;
            if ((!file.exists() ? '\\' : ',') == ',') {
                return false;
            }
        }
        int i4 = onResponseError + 59;
        AppsFlyerConversionListener = i4 % 128;
        int i5 = i4 % 2;
        return true;
    }

    public static synchronized SharedPreferences AFKeystoreWrapper(Context context) {
        SharedPreferences sharedPreferences;
        synchronized (AFb1zSDK.class) {
            int i2 = onResponseError + 17;
            AppsFlyerConversionListener = i2 % 128;
            if (i2 % 2 == 0) {
                int i3 = 68 / 0;
            } else {
                if (!(AFInAppEventType().onAppOpenAttribution == null)) {
                }
                AFInAppEventType().onAppOpenAttribution = context.getApplicationContext().getSharedPreferences("appsflyer-data", 0);
                int i4 = AppsFlyerConversionListener + 51;
                onResponseError = i4 % 128;
                int i5 = i4 % 2;
            }
            sharedPreferences = AFInAppEventType().onAppOpenAttribution;
        }
        return sharedPreferences;
    }

    public static void AFKeystoreWrapper(ScheduledExecutorService scheduledExecutorService, Runnable runnable, long j2, TimeUnit timeUnit) {
        int i2 = AppsFlyerConversionListener + 93;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        try {
            scheduledExecutorService.schedule(runnable, j2, timeUnit);
            int i4 = onResponseError + 105;
            AppsFlyerConversionListener = i4 % 128;
            if (i4 % 2 != 0) {
                return;
            }
            Object[] objArr = null;
            int length = objArr.length;
        } catch (RejectedExecutionException e2) {
            AFLogger.afErrorLog("scheduleJob failed with RejectedExecutionException Exception", e2);
        } catch (Throwable th) {
            AFLogger.afErrorLog("scheduleJob failed with Exception", th);
        }
    }

    @Deprecated
    public static String AFKeystoreWrapper(HttpURLConnection httpURLConnection) {
        String obj;
        InputStreamReader inputStreamReader;
        Object obj2;
        StringBuilder sb = new StringBuilder();
        ?? r2 = 0;
        r2 = 0;
        try {
            try {
                InputStream errorStream = httpURLConnection.getErrorStream();
                if (errorStream == null) {
                    int i2 = onResponseError + 51;
                    AppsFlyerConversionListener = i2 % 128;
                    if ((i2 % 2 == 0 ? '^' : (char) 21) != 21) {
                        errorStream = httpURLConnection.getInputStream();
                        int length = r2.length;
                    } else {
                        errorStream = httpURLConnection.getInputStream();
                    }
                }
                inputStreamReader = new InputStreamReader(errorStream);
                try {
                    BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
                    int i3 = onResponseError + 103;
                    AppsFlyerConversionListener = i3 % 128;
                    int i4 = i3 % 2;
                    boolean z = false;
                    while (true) {
                        try {
                            String readLine = bufferedReader.readLine();
                            if (readLine == null) {
                                break;
                            }
                            int i5 = AppsFlyerConversionListener + 15;
                            onResponseError = i5 % 128;
                            int i6 = i5 % 2;
                            if (z) {
                                int i7 = onResponseError + 87;
                                AppsFlyerConversionListener = i7 % 128;
                                int i8 = i7 % 2;
                                obj2 = '\n';
                            } else {
                                obj2 = BuildConfig.FLAVOR;
                            }
                            sb.append(obj2);
                            sb.append(readLine);
                            z = true;
                        } catch (Throwable th) {
                            th = th;
                            r2 = bufferedReader;
                            try {
                                StringBuilder sb2 = new StringBuilder("Could not read connection response from: ");
                                sb2.append(httpURLConnection.getURL().toString());
                                AFLogger.afErrorLog(sb2.toString(), th);
                                if (r2 != 0) {
                                    r2.close();
                                }
                                if ((inputStreamReader != null ? '_' : 'I') == '_') {
                                    int i9 = onResponseError + 107;
                                    AppsFlyerConversionListener = i9 % 128;
                                    int i10 = i9 % 2;
                                    inputStreamReader.close();
                                }
                                obj = sb.toString();
                                new JSONObject(obj);
                                return obj;
                            } catch (Throwable th2) {
                                if (r2 != 0) {
                                    try {
                                        r2.close();
                                    } catch (Throwable th3) {
                                        AFLogger.afErrorLogForExcManagerOnly("readServerResponse error", th3);
                                        throw th2;
                                    }
                                }
                                if ((inputStreamReader != null ? 'U' : '\'') != '\'') {
                                    int i11 = AppsFlyerConversionListener + 39;
                                    onResponseError = i11 % 128;
                                    int i12 = i11 % 2;
                                    inputStreamReader.close();
                                }
                                throw th2;
                            }
                        }
                    }
                    bufferedReader.close();
                    inputStreamReader.close();
                } catch (Throwable th4) {
                    th = th4;
                }
            } catch (Throwable th5) {
                th = th5;
                inputStreamReader = null;
            }
        } catch (Throwable th6) {
            AFLogger.afErrorLogForExcManagerOnly("readServerResponse error", th6);
        }
        obj = sb.toString();
        try {
            new JSONObject(obj);
            return obj;
        } catch (JSONException e2) {
            AFLogger.afErrorLogForExcManagerOnly("error while parsing readServerResponse", e2);
            JSONObject jSONObject = new JSONObject();
            try {
                jSONObject.put("string_response", obj);
                return jSONObject.toString();
            } catch (JSONException e3) {
                AFLogger.afErrorLogForExcManagerOnly("RESPONSE_NOT_JSON error", e3);
                return new JSONObject().toString();
            }
        }
    }

    public static void AFKeystoreWrapper(byte b, String str, int i2, Object[] objArr) {
        int i3;
        String str2;
        char[] cArr = str;
        if (str != null) {
            cArr = str.toCharArray();
        }
        char[] cArr2 = cArr;
        synchronized (AFf1iSDK.afErrorLog) {
            char[] cArr3 = onValidateInApp;
            char c2 = AppsFlyerInAppPurchaseValidatorListener;
            char[] cArr4 = new char[i2];
            if (i2 % 2 != 0) {
                i3 = i2 - 1;
                cArr4[i3] = (char) (cArr2[i3] - b);
            } else {
                i3 = i2;
            }
            if (i3 > 1) {
                AFf1iSDK.valueOf = 0;
                while (AFf1iSDK.valueOf < i3) {
                    AFf1iSDK.AFInAppEventParameterName = cArr2[AFf1iSDK.valueOf];
                    AFf1iSDK.values = cArr2[AFf1iSDK.valueOf + 1];
                    if (AFf1iSDK.AFInAppEventParameterName == AFf1iSDK.values) {
                        cArr4[AFf1iSDK.valueOf] = (char) (AFf1iSDK.AFInAppEventParameterName - b);
                        cArr4[AFf1iSDK.valueOf + 1] = (char) (AFf1iSDK.values - b);
                    } else {
                        AFf1iSDK.AFKeystoreWrapper = AFf1iSDK.AFInAppEventParameterName / c2;
                        AFf1iSDK.afDebugLog = AFf1iSDK.AFInAppEventParameterName % c2;
                        AFf1iSDK.AFInAppEventType = AFf1iSDK.values / c2;
                        AFf1iSDK.afInfoLog = AFf1iSDK.values % c2;
                        if (AFf1iSDK.afDebugLog == AFf1iSDK.afInfoLog) {
                            AFf1iSDK.AFKeystoreWrapper = ((AFf1iSDK.AFKeystoreWrapper + c2) - 1) % c2;
                            AFf1iSDK.AFInAppEventType = ((AFf1iSDK.AFInAppEventType + c2) - 1) % c2;
                            int i4 = (AFf1iSDK.AFKeystoreWrapper * c2) + AFf1iSDK.afDebugLog;
                            int i5 = (AFf1iSDK.AFInAppEventType * c2) + AFf1iSDK.afInfoLog;
                            cArr4[AFf1iSDK.valueOf] = cArr3[i4];
                            cArr4[AFf1iSDK.valueOf + 1] = cArr3[i5];
                        } else if (AFf1iSDK.AFKeystoreWrapper == AFf1iSDK.AFInAppEventType) {
                            AFf1iSDK.afDebugLog = ((AFf1iSDK.afDebugLog + c2) - 1) % c2;
                            AFf1iSDK.afInfoLog = ((AFf1iSDK.afInfoLog + c2) - 1) % c2;
                            int i6 = (AFf1iSDK.AFKeystoreWrapper * c2) + AFf1iSDK.afDebugLog;
                            int i7 = (AFf1iSDK.AFInAppEventType * c2) + AFf1iSDK.afInfoLog;
                            cArr4[AFf1iSDK.valueOf] = cArr3[i6];
                            cArr4[AFf1iSDK.valueOf + 1] = cArr3[i7];
                        } else {
                            int i8 = (AFf1iSDK.AFKeystoreWrapper * c2) + AFf1iSDK.afInfoLog;
                            int i9 = (AFf1iSDK.AFInAppEventType * c2) + AFf1iSDK.afDebugLog;
                            cArr4[AFf1iSDK.valueOf] = cArr3[i8];
                            cArr4[AFf1iSDK.valueOf + 1] = cArr3[i9];
                        }
                    }
                    AFf1iSDK.valueOf += 2;
                }
            }
            for (int i10 = 0; i10 < i2; i10++) {
                cArr4[i10] = (char) (cArr4[i10] ^ 13722);
            }
            str2 = new String(cArr4);
        }
        objArr[0] = str2;
    }
}