导航菜单

页面标题

页面副标题

OVO v3.139.0 - AFb1zSDK.java 源代码

正在查看: OVO v3.139.0 应用的 AFb1zSDK.java JAVA 源代码文件

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


package com.appsflyer.internal;

import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
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.provider.Settings;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.VisibleForTesting;
import android.text.TextUtils;
import android.view.MotionEvent;
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.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.AFb1xSDK;
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 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.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import o.i.a3a;
import o.i.cd6;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public final class AFb1zSDK extends AppsFlyerLib {
    public static volatile AppsFlyerConversionListener AFInAppEventParameterName = null;
    static final String AFInAppEventType;
    public static final String AFKeystoreWrapper;
    private static String AFLogger = null;
    private static String AFLogger$LogLevel = null;
    private static String AFVersionDeclaration = null;
    private static int AppsFlyerConversionListener = 1;
    private static char AppsFlyerInAppPurchaseValidatorListener;
    private static String afDebugLog;

    @VisibleForTesting
    private static AFb1zSDK afErrorLogForExcManagerOnly;
    private static final String afInfoLog;

    @VisibleForTesting
    private static String afWarnLog;
    private static String getLevel;
    private static int onResponseError;
    private static char[] onValidateInApp;
    static AppsFlyerInAppPurchaseValidatorListener valueOf;
    public static final String values;
    public AFa1dSDK afErrorLog;
    String afRDLog;
    private String init;
    private SharedPreferences onAppOpenAttribution;
    private Map<Long, String> onAppOpenAttributionNative;
    private String onAttributionFailure;
    private boolean onAttributionFailureNative;
    private Map<String, Object> onConversionDataFail;
    private boolean onConversionDataSuccess;
    private Application onDeepLinkingNative;
    private AFb1dSDK onResponse;

    @NonNull
    private final AFc1zSDK onValidateInAppFailure;
    private long AppsFlyer2dXConversionCallback = -1;
    private long onInstallConversionFailureNative = -1;
    private long onInstallConversionDataLoadedNative = TimeUnit.SECONDS.toMillis(5);
    private final AFb1uSDK onResponseErrorNative = new AFb1uSDK();
    private boolean onResponseNative = false;
    private 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();
                }
                AFb1zSDK aFb1zSDK = AFb1zSDK.this;
                if (AFb1zSDK.valueOf(aFb1zSDK, aFe1pSDK, AFb1zSDK.AFKeystoreWrapper(AFb1zSDK.AFKeystoreWrapper(aFb1zSDK)))) {
                    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 {
        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 {
        private final AFa1qSDK valueOf;

        public AFa1wSDK(AFb1zSDK aFb1zSDK, AFa1qSDK aFa1qSDK, byte b3) {
            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));
        }

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

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

        private 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 b3) {
            this();
        }
    }

    public class AFa1zSDK implements Runnable {
        private final AFa1qSDK AFInAppEventType;

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

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

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

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

    @VisibleForTesting
    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 j) {
        int i = onResponseError;
        int i2 = i + 27;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        aFb1zSDK.onInstallConversionFailureNative = j;
        int i4 = i + 57;
        AppsFlyerConversionListener = i4 % 128;
        if ((i4 % 2 == 0 ? '3' : (char) 7) != '3') {
            return j;
        }
        int i5 = 24 / 0;
        return j;
    }

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

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

    private static void AFLogger(Context context) {
        int i;
        if (AFb1wSDK.valueOf()) {
            AFLogger.afRDLog("OPPO device found");
            i = 23;
        } else {
            i = 18;
        }
        int i2 = Build.VERSION.SDK_INT;
        if (i2 < i || AFInAppEventType(AppsFlyerProperties.DISABLE_KEYSTORE, true)) {
            StringBuilder sb = new StringBuilder("OS SDK is=");
            sb.append(i2);
            sb.append("; no KeyStore usage");
            AFLogger.afRDLog(sb.toString());
            return;
        }
        StringBuilder sb2 = new StringBuilder("OS SDK is=");
        sb2.append(i2);
        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 e) {
                    StringBuilder sb3 = new StringBuilder("Exception ");
                    sb3.append(e.getMessage());
                    sb3.append(" occurred");
                    AFLogger.afErrorLog(sb3.toString(), e);
                }
            }
            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 i = AppsFlyerConversionListener + 89;
        onResponseError = i % 128;
        int i2 = i % 2;
        File afDebugLog2 = afDebugLog(AFInAppEventType("ro.appsflyer.preinstall.path"));
        if (AFKeystoreWrapper(afDebugLog2)) {
            int i3 = AppsFlyerConversionListener + 53;
            onResponseError = i3 % 128;
            int i4 = i3 % 2;
            afDebugLog2 = afDebugLog(values(context, "AF_PRE_INSTALL_PATH"));
        }
        if (!(!AFKeystoreWrapper(afDebugLog2))) {
            int i5 = onResponseError + 107;
            AppsFlyerConversionListener = i5 % 128;
            boolean z = i5 % 2 == 0;
            afDebugLog2 = afDebugLog("/data/local/tmp/pre_install.appsflyer");
            if (z) {
                int i6 = 58 / 0;
            }
        }
        if ((AFKeystoreWrapper(afDebugLog2) ? (char) 17 : '<') == 17) {
            int i7 = onResponseError + 51;
            AppsFlyerConversionListener = i7 % 128;
            int i8 = i7 % 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 i = onResponseError + 63;
            AppsFlyerConversionListener = i % 128;
            int i2 = i % 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 i3 = onResponseError + 33;
                AppsFlyerConversionListener = i3 % 128;
                int i4 = i3 % 2;
            }
            str = AFInAppEventParameterName2;
        }
        if (str != null) {
            values("preInstallName", str);
        }
        return str;
    }

    private static float AppsFlyer2dXConversionCallback(Context context) {
        float f;
        int intExtra;
        int intExtra2;
        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);
            f = 1.0f;
        }
        if (intExtra == -1) {
            return 50.0f;
        }
        int i = onResponseError + 111;
        AppsFlyerConversionListener = i % 128;
        int i2 = i % 2;
        if (intExtra2 == -1) {
            return 50.0f;
        }
        f = (intExtra / intExtra2) * 100.0f;
        int i3 = onResponseError + 51;
        AppsFlyerConversionListener = i3 % 128;
        int i4 = i3 % 2;
        return f;
    }

    private static void afDebugLog(Context context) {
        int i = onResponseError + 89;
        AppsFlyerConversionListener = i % 128;
        int i2 = i % 2;
        try {
            if (((context.getPackageManager().getPackageInfo(context.getPackageName(), 0).applicationInfo.flags & 32768) != 0 ? 'K' : (char) 27) != 'K') {
                return;
            }
            int i3 = onResponseError + 23;
            AppsFlyerConversionListener = i3 % 128;
            if (i3 % 2 == 0) {
                context.getResources().getIdentifier("appsflyer_backup_rules", "xml", context.getPackageName());
                throw null;
            }
            if ((context.getResources().getIdentifier("appsflyer_backup_rules", "xml", context.getPackageName()) != 0 ? 'W' : 'K') != 'K') {
                int i4 = onResponseError + 21;
                AppsFlyerConversionListener = i4 % 128;
                int i5 = i4 % 2;
                AFLogger.afInfoLog("appsflyer_backup_rules.xml detected, using AppsFlyer defined backup rules for AppsFlyer SDK data", true);
                return;
            }
            AFLogger.AFKeystoreWrapper("'allowBackup' is set to true; appsflyer_backup_rules.xml not detected.\nAppsFlyer shared preferences should be excluded from auto backup by adding: <exclude domain=\"sharedpref\" path=\"appsflyer-data\"/> to the Application's <full-backup-content> rules");
            int i6 = onResponseError + 23;
            AppsFlyerConversionListener = i6 % 128;
            int i7 = i6 % 2;
        } catch (Exception e) {
            AFLogger.afErrorLogForExcManagerOnly("checkBackupRules Exception", e);
            AFLogger.afRDLog("checkBackupRules Exception: ".concat(String.valueOf(e)));
        }
    }

    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(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", "");
                }
                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) throws Throwable {
                    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;
                    }
                    Object obj2 = objArr[0];
                    if (obj2 != null) {
                        Bundle bundle2 = (Bundle) Bundle.class.cast(cls.getMethod("getArgumentBundle", new Class[0]).invoke(cls.cast(obj2), 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 i = AppsFlyerConversionListener + 123;
            onResponseError = i % 128;
            if ((i % 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 i2 = 68 / 0;
            }
        } catch (ClassNotFoundException e) {
            AFLogger.afErrorLogForExcManagerOnly("FB class missing error", e);
            aFa1wSDK.AFInAppEventType(e.toString());
        } catch (IllegalAccessException e2) {
            AFLogger.afErrorLogForExcManagerOnly("FB illegal access", e2);
            aFa1wSDK.AFInAppEventType(e2.toString());
        } catch (NoSuchMethodException e3) {
            AFLogger.afErrorLogForExcManagerOnly("FB method missing error", e3);
            aFa1wSDK.AFInAppEventType(e3.toString());
        } catch (InvocationTargetException e4) {
            AFLogger.afErrorLogForExcManagerOnly("FB invocation error", e4);
            aFa1wSDK.AFInAppEventType(e4.toString());
        }
    }

    private java.lang.String afErrorLogForExcManagerOnly(android.content.Context r7) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.afErrorLogForExcManagerOnly(android.content.Context):java.lang.String");
    }

    private static boolean afInfoLog(Context context) {
        int i = AppsFlyerConversionListener + 57;
        onResponseError = i % 128;
        if (i % 2 != 0) {
            AFKeystoreWrapper(context).contains("appsFlyerCount");
            throw null;
        }
        if ((!AFKeystoreWrapper(context).contains("appsFlyerCount") ? (char) 1 : '\"') != '\"') {
            int i2 = onResponseError + 125;
            AppsFlyerConversionListener = i2 % 128;
            int i3 = i2 % 2;
            return true;
        }
        int i4 = onResponseError + 99;
        AppsFlyerConversionListener = i4 % 128;
        if (i4 % 2 != 0) {
            return false;
        }
        throw null;
    }

    private boolean afRDLog() {
        int i = AppsFlyerConversionListener;
        int i2 = i + 95;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        Map<String, Object> map = this.onConversionDataFail;
        if ((map != null ? (char) 27 : '\t') != 27) {
            return false;
        }
        int i4 = i + 39;
        onResponseError = i4 % 128;
        if (i4 % 2 == 0) {
            return (!map.isEmpty() ? '\'' : '$') == '\'';
        }
        map.isEmpty();
        throw null;
    }

    private String afWarnLog(Context context) {
        int i = AppsFlyerConversionListener + 15;
        onResponseError = i % 128;
        if (!(i % 2 == 0)) {
            AppsFlyerProperties.getInstance().getString("api_store_value");
            throw null;
        }
        String string = AppsFlyerProperties.getInstance().getString("api_store_value");
        if (string == null) {
            return values(context, "AF_STORE");
        }
        int i2 = AppsFlyerConversionListener + 19;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        return string;
    }

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

    private static boolean onInstallConversionFailureNative(android.content.Context r9) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.onInstallConversionFailureNative(android.content.Context):boolean");
    }

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

    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) {
        int i = AppsFlyerConversionListener + 99;
        onResponseError = i % 128;
        if ((i % 2 != 0 ? 'V' : '5') != '5') {
            AFa1sSDK.AFInAppEventType().afInfoLog.contains(Arrays.asList(strArr));
            throw null;
        }
        List<String> asList = Arrays.asList(strArr);
        List<List<String>> list = AFa1sSDK.AFInAppEventType().afInfoLog;
        if (!list.contains(asList)) {
            list.add(asList);
        }
        int i2 = AppsFlyerConversionListener + 75;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
    }

    @Override
    public final void anonymizeUser(boolean z) {
        int i = onResponseError + 111;
        AppsFlyerConversionListener = i % 128;
        if ((i % 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 i2 = onResponseError + 65;
        AppsFlyerConversionListener = i2 % 128;
        if (!(i2 % 2 != 0)) {
            throw null;
        }
    }

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

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

    @Override
    @Nullable
    public final String getAppsFlyerUID(@NonNull Context context) {
        AFc1xSDK aFc1xSDK;
        int i = onResponseError + 23;
        AppsFlyerConversionListener = i % 128;
        int i2 = i % 2;
        AFb1nSDK.AFInAppEventType().values("getAppsFlyerUID", new String[0]);
        if (context == null) {
            int i3 = onResponseError + 7;
            AppsFlyerConversionListener = i3 % 128;
            if (i3 % 2 != 0) {
                return null;
            }
            throw null;
        }
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            int i4 = onResponseError + 27;
            AppsFlyerConversionListener = i4 % 128;
            if ((i4 % 2 == 0 ? (char) 0 : 'O') != 0) {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
            } else {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
                int i5 = 11 / 0;
            }
            aFc1xSDK.valueOf = context.getApplicationContext();
        }
        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 i = onResponseError + 65;
            AppsFlyerConversionListener = i % 128;
            int i2 = i % 2;
            return valueOf2;
        } catch (Throwable th) {
            AFLogger.afErrorLog("Could not collect facebook attribution id. ", th);
            return null;
        }
    }

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

    @Override
    public final String getHostPrefix() {
        int i = onResponseError + 41;
        AppsFlyerConversionListener = i % 128;
        int i2 = i % 2;
        String AFInAppEventParameterName2 = AFInAppEventParameterName("custom_host_prefix");
        if (AFInAppEventParameterName2 == null) {
            return "";
        }
        int i3 = AppsFlyerConversionListener + 77;
        onResponseError = i3 % 128;
        if ((i3 % 2 != 0 ? 'U' : 'b') == 'b') {
            return AFInAppEventParameterName2;
        }
        throw null;
    }

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

    @Override
    public final String getSdkVersion() {
        AFb1aSDK valueOf2;
        int i = onResponseError + 89;
        AppsFlyerConversionListener = i % 128;
        if ((i % 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 i2 = onResponseError + 81;
        AppsFlyerConversionListener = i2 % 128;
        if ((i2 % 2 == 0 ? (char) 19 : 'b') != 19) {
            return AFKeystoreWrapper2;
        }
        throw null;
    }

    @Override
    public final AppsFlyerLib init(@NonNull String str, AppsFlyerConversionListener appsFlyerConversionListener, @NonNull 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();
                AFc1xSDK aFc1xSDK = this.onValidateInAppFailure.AFInAppEventType;
                int i = onResponseError + 59;
                AppsFlyerConversionListener = i % 128;
                if (i % 2 == 0) {
                    aFc1xSDK.valueOf = context.getApplicationContext();
                    int i2 = 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();
                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 i3 = onResponseError + 39;
                        AppsFlyerConversionListener = i3 % 128;
                        int i4 = i3 % 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 i5 = AppsFlyerConversionListener + 117;
                onResponseError = i5 % 128;
                int i6 = i5 % 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 i = onResponseError + 115;
        AppsFlyerConversionListener = i % 128;
        int i2 = i % 2;
        try {
            if (((context.getPackageManager().getApplicationInfo(context.getPackageName(), 0).flags & 1) != 0 ? 'a' : (char) 6) != 6) {
                int i3 = onResponseError + 75;
                AppsFlyerConversionListener = i3 % 128;
                return (i3 % 2 == 0 ? '0' : 'S') != '0';
            }
        } catch (PackageManager.NameNotFoundException e) {
            AFLogger.afErrorLog("Could not check if app is pre installed", e);
        }
        return false;
    }

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

    @Override
    public final void logEvent(Context context, String str, Map<String, Object> map) {
        int i = onResponseError + 111;
        AppsFlyerConversionListener = i % 128;
        char c = i % 2 == 0 ? ')' : '=';
        logEvent(context, str, map, null);
        if (c == ')') {
            throw null;
        }
    }

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

    @Override
    public final void logSession(Context context) {
        int i = AppsFlyerConversionListener + 123;
        onResponseError = i % 128;
        if (!(i % 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 i = AppsFlyerConversionListener + 57;
        onResponseError = i % 128;
        int i2 = i % 2;
        AFb1xSDK.AFa1vSDK aFa1vSDK = AFb1xSDK.AFKeystoreWrapper;
        if (aFa1vSDK != null) {
            aFa1vSDK.values(context);
        }
        int i3 = onResponseError + 21;
        AppsFlyerConversionListener = i3 % 128;
        if ((i3 % 2 == 0 ? 'P' : '`') == 'P') {
            throw null;
        }
    }

    @Override
    @Deprecated
    public final void performOnAppAttribution(@NonNull Context context, @NonNull URI uri) {
        int i = onResponseError + 111;
        AppsFlyerConversionListener = i % 128;
        if (i % 2 == 0) {
            throw null;
        }
        if ((uri != null ? 'U' : '\n') != 'U' || uri.toString().isEmpty()) {
            StringBuilder sb = new StringBuilder("Link is \"");
            sb.append(uri);
            sb.append("\"");
            AFb1kSDK.AFKeystoreWrapper(sb.toString(), DeepLinkResult.Error.NETWORK);
            return;
        }
        if (context != null) {
            AFa1sSDK.AFInAppEventType();
            AFa1sSDK.valueOf(context, new HashMap(), Uri.parse(uri.toString()));
            return;
        }
        StringBuilder sb2 = new StringBuilder("Context is \"");
        sb2.append(context);
        sb2.append("\"");
        AFb1kSDK.AFKeystoreWrapper(sb2.toString(), DeepLinkResult.Error.NETWORK);
        int i2 = AppsFlyerConversionListener + 11;
        onResponseError = i2 % 128;
        if (!(i2 % 2 == 0)) {
            throw null;
        }
    }

    @Override
    public final void performOnDeepLinking(@NonNull final Intent intent, @NonNull 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 i = AppsFlyerConversionListener + 15;
            onResponseError = i % 128;
            int i2 = i % 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 i3 = AppsFlyerConversionListener + 27;
                onResponseError = i3 % 128;
                int i4 = i3 % 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 i = onResponseError + 81;
        AppsFlyerConversionListener = i % 128;
        int i2 = i % 2;
        AFb1nSDK.AFInAppEventType().values("registerConversionListener", new String[0]);
        valueOf(appsFlyerConversionListener);
        int i3 = onResponseError + 119;
        AppsFlyerConversionListener = i3 % 128;
        int i4 = i3 % 2;
    }

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

    @Override
    public final void sendAdRevenue(Context context, Map<String, Object> map) {
        int i = AppsFlyerConversionListener;
        int i2 = i + 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 = i + 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 i = onResponseError + 13;
        AppsFlyerConversionListener = i % 128;
        int i2 = i % 2;
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        Context applicationContext = context.getApplicationContext();
        if (applicationContext != null) {
            int i3 = AppsFlyerConversionListener + 53;
            onResponseError = i3 % 128;
            if ((i3 % 2 != 0 ? (char) 29 : (char) 6) != 6) {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
                int i4 = 97 / 0;
            } else {
                aFc1xSDK = aFc1zSDK.AFInAppEventType;
            }
            aFc1xSDK.valueOf = applicationContext.getApplicationContext();
        }
        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 i5 = onResponseError + 31;
        AppsFlyerConversionListener = i5 % 128;
        if (i5 % 2 == 0) {
            throw null;
        }
    }

    @Override
    public final void sendPurchaseData(Context context, Map<String, Object> map, PurchaseHandler.PurchaseValidationCallback purchaseValidationCallback) {
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        Context applicationContext = context.getApplicationContext();
        if (applicationContext != null) {
            int i = AppsFlyerConversionListener + 45;
            onResponseError = i % 128;
            if (i % 2 != 0) {
                AFc1xSDK aFc1xSDK = aFc1zSDK.AFInAppEventType;
                throw null;
            }
            aFc1zSDK.AFInAppEventType.valueOf = applicationContext.getApplicationContext();
            int i2 = AppsFlyerConversionListener + 111;
            onResponseError = i2 % 128;
            int i3 = i2 % 2;
        }
        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(@android.support.annotation.NonNull android.app.Activity r19) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.sendPushNotificationData(android.app.Activity):void");
    }

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

    @Override
    public final void setAndroidIdData(String str) {
        int i = onResponseError + 9;
        AppsFlyerConversionListener = i % 128;
        if ((i % 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 i = onResponseError + 109;
        AppsFlyerConversionListener = i % 128;
        if ((i % 2 == 0 ? 'L' : '*') != '*') {
            AFb1nSDK.AFInAppEventType().values("setAppId", str);
        } else {
            AFb1nSDK.AFInAppEventType().values("setAppId", str);
        }
        values(AppsFlyerProperties.APP_ID, str);
        int i2 = AppsFlyerConversionListener + 29;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
    }

    @Override
    public final void setAppInviteOneLink(java.lang.String r7) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.setAppInviteOneLink(java.lang.String):void");
    }

    @Override
    public final void setCollectAndroidID(boolean z) {
        int i = AppsFlyerConversionListener + 19;
        onResponseError = i % 128;
        if (i % 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 i = AppsFlyerConversionListener + 97;
        onResponseError = i % 128;
        if (!(i % 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 i2 = onResponseError + 25;
        AppsFlyerConversionListener = i2 % 128;
        if ((i2 % 2 == 0 ? '=' : 'J') == '=') {
            throw null;
        }
    }

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

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

    @Override
    public final void setCustomerIdAndLogSession(String str, @NonNull Context context) {
        if (!(context == null)) {
            if (!AFInAppEventParameterName()) {
                setCustomerUserId(str);
                AFLogger.afInfoLog("waitForCustomerUserId is false; setting CustomerUserID: ".concat(String.valueOf(str)), true);
                int i = AppsFlyerConversionListener + 67;
                onResponseError = i % 128;
                int i2 = i % 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 i3 = AppsFlyerConversionListener + 27;
                onResponseError = i3 % 128;
                int i4 = i3 % 2;
                referrer = "";
            }
            String str3 = referrer;
            if (context instanceof Activity) {
                int i5 = onResponseError + 85;
                AppsFlyerConversionListener = i5 % 128;
                int i6 = i5 % 2;
                ((Activity) context).getIntent();
            }
            AFKeystoreWrapper(context, null, null, str3, null);
        }
    }

    @Override
    public final void setCustomerUserId(String str) {
        int i = AppsFlyerConversionListener + 59;
        onResponseError = i % 128;
        int i2 = i % 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 i3 = onResponseError + 27;
        AppsFlyerConversionListener = i3 % 128;
        int i4 = i3 % 2;
    }

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

    @Override
    public final void setDisableAdvertisingIdentifiers(boolean z) {
        int i = AppsFlyerConversionListener + 59;
        onResponseError = i % 128;
        if ((i % 2 != 0 ? '\n' : 'H') != 'H') {
            AFLogger.afDebugLog("setDisableAdvertisingIdentifiers: ".concat(String.valueOf(z)));
            throw null;
        }
        AFLogger.afDebugLog("setDisableAdvertisingIdentifiers: ".concat(String.valueOf(z)));
        AFb1ySDK.AFKeystoreWrapper = Boolean.valueOf((!z ? '<' : (char) 3) != 3);
        AppsFlyerProperties.getInstance().remove("advertiserIdEnabled");
        AppsFlyerProperties.getInstance().remove("advertiserId");
        int i2 = onResponseError + 43;
        AppsFlyerConversionListener = i2 % 128;
        if (i2 % 2 == 0) {
            throw null;
        }
    }

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

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

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

    @Override
    public final void setIsUpdate(boolean z) {
        int i = onResponseError + 67;
        AppsFlyerConversionListener = i % 128;
        if (i % 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 i2 = AppsFlyerConversionListener + 49;
        onResponseError = i2 % 128;
        if ((i2 % 2 != 0 ? (char) 29 : 'H') == 29) {
            throw null;
        }
    }

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

    @Override
    public final void setMinTimeBetweenSessions(int i) {
        int i2 = onResponseError + 123;
        AppsFlyerConversionListener = i2 % 128;
        if ((i2 % 2 == 0 ? '=' : 'X') != '=') {
            this.onInstallConversionDataLoadedNative = TimeUnit.SECONDS.toMillis(i);
        } else {
            this.onInstallConversionDataLoadedNative = TimeUnit.SECONDS.toMillis(i);
            throw null;
        }
    }

    @Override
    public final void setOaidData(String str) {
        int i = AppsFlyerConversionListener + 13;
        onResponseError = i % 128;
        if ((i % 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 i = AppsFlyerConversionListener + 33;
        onResponseError = i % 128;
        int i2 = i % 2;
        AFLogger.afDebugLog(String.format("setOneLinkCustomDomain %s", Arrays.toString(strArr)));
        AFa1sSDK.valueOf = strArr;
        int i3 = onResponseError + 31;
        AppsFlyerConversionListener = i3 % 128;
        if (i3 % 2 == 0) {
            throw null;
        }
    }

    @Override
    public final void setOutOfStore(String str) {
        if ((str != null ? '\f' : 'B') == 'B') {
            AFLogger.AFKeystoreWrapper("Cannot set setOutOfStore with null");
            int i = AppsFlyerConversionListener + 81;
            onResponseError = i % 128;
            int i2 = i % 2;
            return;
        }
        int i3 = onResponseError + 61;
        AppsFlyerConversionListener = i3 % 128;
        int i4 = i3 % 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(@NonNull String str, Map<String, Object> map) {
        String str2;
        if (this.onResponse == null) {
            this.onResponse = new AFb1dSDK();
        }
        AFb1dSDK aFb1dSDK = this.onResponse;
        if (str != null) {
            int i = onResponseError + 59;
            AppsFlyerConversionListener = i % 128;
            int i2 = i % 2;
            if (!str.isEmpty()) {
                if (map != null) {
                    int i3 = onResponseError + 57;
                    AppsFlyerConversionListener = i3 % 128;
                    if (i3 % 2 == 0) {
                        map.isEmpty();
                        throw null;
                    }
                    if (!map.isEmpty()) {
                        StringBuilder sb = new StringBuilder("Setting partner data for ");
                        sb.append(str);
                        sb.append(": ");
                        sb.append(map);
                        AFLogger.afDebugLog(sb.toString());
                        int length = new JSONObject(map).toString().length();
                        if (length <= 1000) {
                            aFb1dSDK.values.put(str, map);
                            aFb1dSDK.AFInAppEventType.remove(str);
                            return;
                        } else {
                            AFLogger.afWarnLog("Partner data 1000 characters limit exceeded");
                            HashMap hashMap = new HashMap();
                            hashMap.put("error", "limit exceeded: ".concat(String.valueOf(length)));
                            aFb1dSDK.AFInAppEventType.put(str, hashMap);
                            return;
                        }
                    }
                }
                if (!(aFb1dSDK.values.remove(str) == null)) {
                    str2 = "Cleared partner data for ".concat(str);
                    int i4 = onResponseError + 53;
                    AppsFlyerConversionListener = i4 % 128;
                    int i5 = i4 % 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 i = onResponseError + 35;
        AppsFlyerConversionListener = i % 128;
        int i2 = i % 2;
        this.onAttributionFailure = AFb1vSDK.AFInAppEventParameterName(str);
        int i3 = onResponseError + 113;
        AppsFlyerConversionListener = i3 % 128;
        int i4 = i3 % 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 i = onResponseError + 123;
            AppsFlyerConversionListener = i % 128;
            int i2 = i % 2;
            try {
                jSONObject.put("pid", str);
            } catch (JSONException e) {
                AFLogger.afErrorLog(e.getMessage(), e);
            }
        }
        if (str2 != null) {
            jSONObject.put("c", str2);
        }
        if ((str3 != null ? (char) 30 : (char) 22) != 22) {
            jSONObject.put("af_siteid", str3);
        }
        int i3 = onResponseError + 75;
        AppsFlyerConversionListener = i3 % 128;
        int i4 = i3 % 2;
        if (!jSONObject.has("pid")) {
            AFLogger.afWarnLog("Cannot set preinstall attribution data without a media source");
            int i5 = AppsFlyerConversionListener + 61;
            onResponseError = i5 % 128;
            int i6 = i5 % 2;
            return;
        }
        int i7 = onResponseError + 47;
        AppsFlyerConversionListener = i7 % 128;
        if (i7 % 2 != 0) {
            values("preInstallName", jSONObject.toString());
        } else {
            values("preInstallName", jSONObject.toString());
            throw null;
        }
    }

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

    @Override
    @Deprecated
    public final void setSharingFilter(@NonNull String... strArr) {
        int i = AppsFlyerConversionListener + 31;
        onResponseError = i % 128;
        int i2 = i % 2;
        setSharingFilterForPartners(strArr);
        int i3 = AppsFlyerConversionListener + 39;
        onResponseError = i3 % 128;
        if (i3 % 2 != 0) {
            throw null;
        }
    }

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

    @Override
    public final void setSharingFilterForPartners(String... strArr) {
        this.afErrorLog = new AFa1dSDK(strArr);
        int i = AppsFlyerConversionListener + 47;
        onResponseError = i % 128;
        if (i % 2 != 0) {
            throw null;
        }
    }

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

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

    @Override
    public final void stop(boolean z, Context context) {
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if ((context != null ? (char) 27 : (char) 29) != 29) {
            int i = AppsFlyerConversionListener + 3;
            onResponseError = i % 128;
            if (i % 2 != 0) {
                AFc1xSDK aFc1xSDK = aFc1zSDK.AFInAppEventType;
                throw null;
            }
            AFc1xSDK aFc1xSDK2 = aFc1zSDK.AFInAppEventType;
            if (context != null) {
                aFc1xSDK2.valueOf = context.getApplicationContext();
            }
        }
        this.onValidateInAppFailure.AFLogger$LogLevel().valueOf = z;
        try {
            File file = new File(this.onValidateInAppFailure.afErrorLogForExcManagerOnly().AFKeystoreWrapper.valueOf.getFilesDir(), "AFRequestCache");
            int i2 = 0;
            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 i3 = onResponseError + 15;
                        AppsFlyerConversionListener = i3 % 128;
                        int i4 = i3 % 2;
                    }
                }
            } else {
                int i5 = onResponseError + 39;
                AppsFlyerConversionListener = i5 % 128;
                int i6 = i5 % 2;
                file.mkdir();
            }
        } catch (Exception e) {
            AFLogger.afErrorLog("CACHE: Could not cache request", e);
        }
        if ((z ? ')' : (char) 5) == ')') {
            AFInAppEventParameterName(context).AFInAppEventParameterName("is_stop_tracking_used", true);
        }
        int i7 = onResponseError + 3;
        AppsFlyerConversionListener = i7 % 128;
        int i8 = i7 % 2;
    }

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

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

    @Override
    public final void updateServerUninstallToken(Context context, String str) {
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            aFc1zSDK.AFInAppEventType.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(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 ? "" : map.toString();
        AFInAppEventType2.values("validateAndTrackInAppPurchase", strArr);
        if (!isStopped()) {
            StringBuilder b3 = a3a.b("Validate in app called with parameters: ", str3, " ", str4, " ");
            b3.append(str5);
            AFLogger.afInfoLog(b3.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 i = AppsFlyerConversionListener + 95;
        onResponseError = i % 128;
        if ((i % 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 i2 = onResponseError + 73;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
    }

    public static void AFInAppEventParameterName(AFb1zSDK aFb1zSDK) {
        int i = onResponseError + 91;
        AppsFlyerConversionListener = i % 128;
        int i2 = i % 2;
        aFb1zSDK.afInfoLog();
        int i3 = onResponseError + 81;
        AppsFlyerConversionListener = i3 % 128;
        if (i3 % 2 == 0) {
            throw null;
        }
    }

    public static AFb1zSDK AFInAppEventType() {
        int i = onResponseError + 63;
        AppsFlyerConversionListener = i % 128;
        if ((i % 2 == 0 ? '.' : 'D') == 'D') {
            return afErrorLogForExcManagerOnly;
        }
        throw null;
    }

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

    private static boolean afRDLog(android.content.Context r4) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.afRDLog(android.content.Context):boolean");
    }

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

    @Override
    public final void logEvent(@NonNull 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) {
            aFc1zSDK.AFInAppEventType.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(@NonNull Context context, String str) {
        int i = onResponseError + 119;
        AppsFlyerConversionListener = i % 128;
        int i2 = i % 2;
        start(context, str, null);
        int i3 = AppsFlyerConversionListener + 49;
        onResponseError = i3 % 128;
        if (!(i3 % 2 == 0)) {
            throw null;
        }
    }

    @Override
    public final void subscribeForDeepLink(@NonNull DeepLinkListener deepLinkListener, long j) {
        int i = onResponseError + 105;
        AppsFlyerConversionListener = i % 128;
        int i2 = i % 2;
        AFa1sSDK.AFInAppEventType().AFInAppEventType = deepLinkListener;
        AFb1mSDK.getLevel = j;
        int i3 = onResponseError + 123;
        AppsFlyerConversionListener = i3 % 128;
        if (!(i3 % 2 != 0)) {
            throw null;
        }
    }

    public final AFb1aSDK valueOf() {
        int i = onResponseError + 41;
        AppsFlyerConversionListener = i % 128;
        if (i % 2 != 0) {
            return this.onValidateInAppFailure;
        }
        throw null;
    }

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

    public void AFInAppEventType(Context context, Intent intent) {
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            aFc1zSDK.AFInAppEventType.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 i = AppsFlyerConversionListener + 17;
        int i2 = i % 128;
        onResponseError = i2;
        boolean z2 = i % 2 == 0;
        aFb1zSDK.onResponseNative = z;
        if (!z2) {
            throw null;
        }
        int i3 = i2 + 7;
        AppsFlyerConversionListener = i3 % 128;
        if (i3 % 2 == 0) {
            throw null;
        }
        return z;
    }

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

    @Override
    public final void start(@android.support.annotation.NonNull android.content.Context r9, java.lang.String r10, final com.appsflyer.attribution.AppsFlyerRequestListener r11) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.start(android.content.Context, java.lang.String, com.appsflyer.attribution.AppsFlyerRequestListener):void");
    }

    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 i = AppsFlyerConversionListener + 23;
            onResponseError = i % 128;
            if (i % 2 == 0) {
                AFInAppEventParameterName(context).values("referrer", stringExtra);
                AppsFlyerProperties appsFlyerProperties = AppsFlyerProperties.getInstance();
                appsFlyerProperties.set("AF_REFERRER", stringExtra);
                appsFlyerProperties.AFInAppEventParameterName = stringExtra;
                if (AppsFlyerProperties.getInstance().AFInAppEventParameterName()) {
                    AFLogger.afInfoLog("onReceive: isLaunchCalled");
                    values(context, AFe1ySDK.onReceive);
                    AFKeystoreWrapper(context, stringExtra);
                }
            } else {
                AFInAppEventParameterName(context).values("referrer", stringExtra);
                AppsFlyerProperties appsFlyerProperties2 = AppsFlyerProperties.getInstance();
                appsFlyerProperties2.set("AF_REFERRER", stringExtra);
                appsFlyerProperties2.AFInAppEventParameterName = stringExtra;
                AppsFlyerProperties.getInstance().AFInAppEventParameterName();
                throw null;
            }
        }
        int i2 = AppsFlyerConversionListener + 55;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
    }

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

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

    public final boolean AFInAppEventParameterName() {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.AFInAppEventParameterName():boolean");
    }

    public final void AFKeystoreWrapper(WeakReference<Context> weakReference) {
        int i = AppsFlyerConversionListener + 27;
        onResponseError = i % 128;
        int i2 = i % 2;
        if (weakReference.get() == null) {
            return;
        }
        AFLogger.afInfoLog("app went to background");
        SharedPreferences AFKeystoreWrapper2 = AFKeystoreWrapper(weakReference.get());
        AppsFlyerProperties.getInstance().saveProperties(AFKeystoreWrapper2);
        long j = 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 i3 = onResponseError + 27;
            AppsFlyerConversionListener = i3 % 128;
            if (i3 % 2 == 0) {
                hashMap.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
                throw null;
            }
            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 i4 = onResponseError + 73;
            AppsFlyerConversionListener = i4 % 128;
            int i5 = i4 % 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(j));
        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 i6 = onResponseError + 23;
            AppsFlyerConversionListener = i6 % 128;
            int i7 = i6 % 2;
            AFInAppEventParameterName2 = "";
        }
        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 i8 = AppsFlyerConversionListener + 107;
        onResponseError = i8 % 128;
        int i9 = i8 % 2;
    }

    private void afInfoLog() {
        int i = AppsFlyerConversionListener + 103;
        onResponseError = i % 128;
        if (i % 2 == 0) {
            if (!AFd1wSDK.AFLogger()) {
                AFb1aSDK valueOf2 = valueOf();
                AFc1gSDK afDebugLog2 = valueOf2.afDebugLog();
                afDebugLog2.valueOf.execute(afDebugLog2.new AnonymousClass1(new AFd1wSDK(valueOf2)));
                return;
            } else {
                int i2 = onResponseError + 3;
                AppsFlyerConversionListener = i2 % 128;
                if (!(i2 % 2 != 0)) {
                    int i3 = 23 / 0;
                    return;
                }
                return;
            }
        }
        AFd1wSDK.AFLogger();
        throw null;
    }

    @android.support.annotation.VisibleForTesting
    public final void AFInAppEventParameterName(@android.support.annotation.NonNull com.appsflyer.internal.AFa1qSDK r5, @android.support.annotation.Nullable android.app.Activity r6) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.AFInAppEventParameterName(com.appsflyer.internal.AFa1qSDK, android.app.Activity):void");
    }

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

    private static java.io.File afDebugLog(java.lang.String r4) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.afDebugLog(java.lang.String):java.io.File");
    }

    private static boolean AFInAppEventType(String str, boolean z) {
        int i = onResponseError + 27;
        AppsFlyerConversionListener = i % 128;
        if (!(i % 2 == 0)) {
            return AppsFlyerProperties.getInstance().getBoolean(str, z);
        }
        AppsFlyerProperties.getInstance().getBoolean(str, z);
        throw null;
    }

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

    @NonNull
    private AFe1dSDK[] afDebugLog() {
        int i = AppsFlyerConversionListener + 29;
        onResponseError = i % 128;
        if ((i % 2 != 0 ? '^' : (char) 1) == 1) {
            return valueOf().AFVersionDeclaration().valueOf();
        }
        valueOf().AFVersionDeclaration().valueOf();
        throw null;
    }

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

    private boolean AFInAppEventParameterName(com.appsflyer.internal.AFa1qSDK r6, android.content.SharedPreferences r7) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.AFInAppEventParameterName(com.appsflyer.internal.AFa1qSDK, android.content.SharedPreferences):boolean");
    }

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

    public static java.util.Map<java.lang.String, java.lang.Object> AFInAppEventType(java.util.Map<java.lang.String, java.lang.Object> r3) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.AFInAppEventType(java.util.Map):java.util.Map");
    }

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

    private boolean afErrorLog() {
        int i = onResponseError + 31;
        AppsFlyerConversionListener = i % 128;
        if (i % 2 != 0 ? this.AppsFlyer2dXConversionCallback > 0 : this.AppsFlyer2dXConversionCallback > 0) {
            long currentTimeMillis = System.currentTimeMillis() - this.AppsFlyer2dXConversionCallback;
            Locale locale = Locale.US;
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS Z", locale);
            String values2 = values(simpleDateFormat, this.AppsFlyer2dXConversionCallback);
            String values3 = values(simpleDateFormat, this.onInstallConversionFailureNative);
            if (currentTimeMillis < this.onInstallConversionDataLoadedNative) {
                if (!isStopped()) {
                    int i2 = onResponseError + 23;
                    AppsFlyerConversionListener = i2 % 128;
                    int i3 = i2 % 2;
                    AFLogger.afInfoLog(String.format(locale, "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 i4 = AppsFlyerConversionListener + 93;
                    onResponseError = i4 % 128;
                    int i5 = i4 % 2;
                    return true;
                }
            }
            if ((!isStopped() ? (char) 16 : '&') != '&') {
                int i6 = onResponseError + 49;
                AppsFlyerConversionListener = i6 % 128;
                int i7 = i6 % 2;
                AFLogger.afInfoLog(String.format(locale, "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 i8 = AppsFlyerConversionListener + 29;
            onResponseError = i8 % 128;
            int i9 = i8 % 2;
        }
        return false;
    }

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

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

    private void AFInAppEventParameterName(java.util.Map<java.lang.String, java.lang.Object> r5) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.AFInAppEventParameterName(java.util.Map):void");
    }

    private static void values(android.content.Context r3, boolean r4, java.util.Map<java.lang.String, java.lang.Object> r5, int r6) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.values(android.content.Context, boolean, java.util.Map, int):void");
    }

    private static boolean AFInAppEventType(@NonNull SharedPreferences sharedPreferences) {
        int i = onResponseError + 75;
        AppsFlyerConversionListener = i % 128;
        int i2 = i % 2;
        boolean parseBoolean = Boolean.parseBoolean(sharedPreferences.getString("sentSuccessfully", null));
        int i3 = onResponseError + 111;
        AppsFlyerConversionListener = i3 % 128;
        if (i3 % 2 != 0) {
            return parseBoolean;
        }
        throw null;
    }

    public final void AFInAppEventType(android.content.Context r9, java.util.Map<java.lang.String, java.lang.Object> r10, android.net.Uri r11) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.AFInAppEventType(android.content.Context, java.util.Map, android.net.Uri):void");
    }

    private static void valueOf(AppsFlyerConversionListener appsFlyerConversionListener) {
        int i = AppsFlyerConversionListener;
        int i2 = i + 109;
        onResponseError = i2 % 128;
        int i3 = i2 % 2;
        if (appsFlyerConversionListener != null) {
            AFInAppEventParameterName = appsFlyerConversionListener;
            return;
        }
        int i4 = i + 39;
        onResponseError = i4 % 128;
        if ((i4 % 2 != 0 ? 'W' : 'F') != 'F') {
            throw null;
        }
    }

    public static void values(Context context, Map<String, ? super String> map) {
        String str;
        String str2;
        int i = onResponseError + 113;
        AppsFlyerConversionListener = i % 128;
        int i2 = i % 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) && (str2 = AFInAppEventParameterName2.values) != null) {
            map.put("operator", str2);
            int i3 = AppsFlyerConversionListener + 45;
            onResponseError = i3 % 128;
            int i4 = i3 % 2;
        }
        if (AFInAppEventType2 || (str = AFInAppEventParameterName2.AFInAppEventType) == null) {
            return;
        }
        int i5 = AppsFlyerConversionListener + 105;
        onResponseError = i5 % 128;
        char c = i5 % 2 != 0 ? '\b' : (char) 21;
        map.put("carrier", str);
        if (c == '\b') {
            throw null;
        }
    }

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

    private static java.lang.String AFInAppEventParameterName(android.app.Activity r6) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.AFInAppEventParameterName(android.app.Activity):java.lang.String");
    }

    @VisibleForTesting
    private void AFKeystoreWrapper(Context context, String str, Map<String, Object> map, String str2, String str3) {
        AFa1qSDK aFe1lSDK;
        int i = AppsFlyerConversionListener + 113;
        onResponseError = i % 128;
        int i2 = i % 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 i3 = AppsFlyerConversionListener + 23;
        onResponseError = i3 % 128;
        int i4 = i3 % 2;
    }

    private static java.lang.String values(java.lang.String r4) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.values(java.lang.String):java.lang.String");
    }

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

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

    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 i = onResponseError + 45;
        AppsFlyerConversionListener = i % 128;
        if (!(i % 2 == 0)) {
            return aFa1zSDK;
        }
        throw null;
    }

    private static void values(Context context, Map<String, Object> map, String str) {
        int i = AppsFlyerConversionListener + 17;
        onResponseError = i % 128;
        int i2 = i % 2;
        SharedPreferences AFKeystoreWrapper2 = AFKeystoreWrapper(context);
        SharedPreferences.Editor edit = AFKeystoreWrapper2.edit();
        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 i3 = onResponseError + 91;
            AppsFlyerConversionListener = i3 % 128;
            if ((i3 % 2 == 0 ? 'Y' : ' ') == 'Y') {
                throw null;
            }
        } catch (Exception e) {
            AFLogger.afErrorLog("Error while processing previous event.", e);
        }
    }

    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(AFKeystoreWrapper2));
                            str = AFKeystoreWrapper2;
                        }
                    } catch (Exception e) {
                        if (AFKeystoreWrapper2 != null) {
                            AFLogger.afDebugLog("use cached AndroidId: ".concat(AFKeystoreWrapper2));
                            str = AFKeystoreWrapper2;
                        }
                        AFLogger.afErrorLog(e.getMessage(), e);
                    }
                }
            } 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 i = AppsFlyerConversionListener + 111;
        onResponseError = i % 128;
        byte b3 = 0;
        if (i % 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, b3), 5L, TimeUnit.MILLISECONDS);
            int i2 = AppsFlyerConversionListener + 15;
            onResponseError = i2 % 128;
            int i3 = i2 % 2;
        }
    }

    private static String valueOf(File file, String str) {
        FileReader fileReader;
        int i;
        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 i2 = onResponseError + 125;
                AppsFlyerConversionListener = i2 % 128;
                int i3 = i2 % 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();
            }
            i = onResponseError + 43;
            AppsFlyerConversionListener = i % 128;
            int i4 = i % 2;
            return null;
        } catch (Throwable th6) {
            th = th6;
            AFLogger.afErrorLog(th.getMessage(), th);
            if (fileReader != null) {
                fileReader.close();
                i = onResponseError + 27;
                AppsFlyerConversionListener = i % 128;
                int i42 = i % 2;
            }
            return null;
        }
    }

    public static boolean AFInAppEventType(Context context) {
        try {
            if (cd6.e.d(context) == 0) {
                int i = onResponseError + 33;
                AppsFlyerConversionListener = i % 128;
                return (i % 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 i2 = AppsFlyerConversionListener + 73;
            onResponseError = i2 % 128;
            int i3 = i2 % 2;
            return true;
        } catch (PackageManager.NameNotFoundException e) {
            AFLogger.afErrorLog("WARNING:  Google Play Services is unavailable. ", e);
            return false;
        }
    }

    @VisibleForTesting
    @Nullable
    private String values(Context context, String str) {
        if (context == null) {
            int i = onResponseError + 29;
            AppsFlyerConversionListener = i % 128;
            if (i % 2 != 0) {
                return null;
            }
            throw null;
        }
        AFc1xSDK aFc1xSDK = this.onValidateInAppFailure.AFInAppEventType;
        int i2 = onResponseError + 93;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
        aFc1xSDK.valueOf = context.getApplicationContext();
        int i4 = onResponseError + 29;
        AppsFlyerConversionListener = i4 % 128;
        int i5 = i4 % 2;
        return valueOf().values().AFInAppEventType(str);
    }

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

    private void AFKeystoreWrapper(com.appsflyer.internal.AFa1qSDK r12) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.AFKeystoreWrapper(com.appsflyer.internal.AFa1qSDK):void");
    }

    @Nullable
    @Deprecated
    public final String values(Context context) {
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            int i = AppsFlyerConversionListener + 71;
            int i2 = i % 128;
            onResponseError = i2;
            if (i % 2 == 0) {
                AFc1xSDK aFc1xSDK = aFc1zSDK.AFInAppEventType;
                int i3 = i2 + 63;
                AppsFlyerConversionListener = i3 % 128;
                int i4 = i3 % 2;
                aFc1xSDK.valueOf = context.getApplicationContext();
            } else {
                AFc1xSDK aFc1xSDK2 = aFc1zSDK.AFInAppEventType;
                throw null;
            }
        }
        return this.onValidateInAppFailure.values().AFInAppEventParameterName();
    }

    private static int AFInAppEventType(SharedPreferences sharedPreferences, boolean z) {
        int i = AppsFlyerConversionListener + 85;
        onResponseError = i % 128;
        if (!(i % 2 != 0)) {
            return AFInAppEventParameterName(sharedPreferences, "appsFlyerInAppEventCount", z);
        }
        AFInAppEventParameterName(sharedPreferences, "appsFlyerInAppEventCount", z);
        throw null;
    }

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

    private String values(SimpleDateFormat simpleDateFormat, Context context) {
        String str;
        int i = onResponseError + 121;
        AppsFlyerConversionListener = i % 128;
        if ((i % 2 == 0 ? (char) 20 : '1') != 20) {
            String string = AFKeystoreWrapper(context).getString("appsFlyerFirstInstall", null);
            if ((string == null ? '1' : '%') == '1') {
                if (afInfoLog(context)) {
                    AFLogger.afDebugLog("AppsFlyer: first launch detected");
                    str = simpleDateFormat.format(new Date());
                } else {
                    str = "";
                }
                string = str;
                AFInAppEventParameterName(context).values("appsFlyerFirstInstall", string);
            }
            AFLogger.afInfoLog("AppsFlyer: first launch date: ".concat(String.valueOf(string)));
            int i2 = AppsFlyerConversionListener + 117;
            onResponseError = i2 % 128;
            if (i2 % 2 != 0) {
                int i3 = 29 / 0;
            }
            return string;
        }
        AFKeystoreWrapper(context).getString("appsFlyerFirstInstall", null);
        throw null;
    }

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

    private void valueOf(com.appsflyer.internal.AFa1qSDK r6) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.valueOf(com.appsflyer.internal.AFa1qSDK):void");
    }

    public final AFd1mSDK AFInAppEventParameterName(Context context) {
        AFc1zSDK aFc1zSDK = this.onValidateInAppFailure;
        if (context != null) {
            aFc1zSDK.AFInAppEventType.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 values(android.content.Context r6, com.appsflyer.internal.AFe1ySDK r7) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.values(android.content.Context, com.appsflyer.internal.AFe1ySDK):void");
    }

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

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

    private 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 i = AppsFlyerConversionListener + 69;
            onResponseError = i % 128;
            if (i % 2 == 0) {
                AFInAppEventType(map).put("gcd", hashMap);
            } else {
                AFInAppEventType(map).put("gcd", hashMap);
                throw null;
            }
        }
        int i2 = onResponseError + 67;
        AppsFlyerConversionListener = i2 % 128;
        int i3 = i2 % 2;
    }

    @android.support.annotation.WorkerThread
    public final java.util.Map<java.lang.String, java.lang.Object> AFInAppEventParameterName(com.appsflyer.internal.AFa1qSDK r31) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.AFInAppEventParameterName(com.appsflyer.internal.AFa1qSDK):java.util.Map");
    }

    private 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 = "";
            } else {
                int i = onResponseError + 125;
                AppsFlyerConversionListener = i % 128;
                int i2 = i % 2;
                str = "lr";
            }
            map.put("sc_o", str);
            int i3 = AppsFlyerConversionListener + 9;
            onResponseError = i3 % 128;
            int i4 = i3 % 2;
        }
    }

    private static void AFKeystoreWrapper(Map<String, Object> map) {
        int i = onResponseError + 25;
        AppsFlyerConversionListener = i % 128;
        if ((i % 2 == 0 ? '\f' : (char) 4) == 4) {
            String string = AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.ONELINK_ID);
            String string2 = AppsFlyerProperties.getInstance().getString("onelinkVersion");
            if (!(string == null)) {
                int i2 = onResponseError + 19;
                AppsFlyerConversionListener = i2 % 128;
                if (i2 % 2 != 0) {
                    map.put("onelink_id", string);
                } else {
                    map.put("onelink_id", string);
                    throw null;
                }
            }
            if (!(string2 != null)) {
                return;
            }
            map.put("onelink_ver", string2);
            return;
        }
        AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.ONELINK_ID);
        AppsFlyerProperties.getInstance().getString("onelinkVersion");
        throw null;
    }

    private static java.lang.String AFKeystoreWrapper(@android.support.annotation.Nullable java.lang.String r9) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.AFKeystoreWrapper(java.lang.String):java.lang.String");
    }

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

    public static synchronized android.content.SharedPreferences AFKeystoreWrapper(android.content.Context r4) {
        throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.AFb1zSDK.AFKeystoreWrapper(android.content.Context):android.content.SharedPreferences");
    }

    private static void AFKeystoreWrapper(@NonNull ScheduledExecutorService scheduledExecutorService, Runnable runnable, long j, TimeUnit timeUnit) {
        int i = AppsFlyerConversionListener + 93;
        onResponseError = i % 128;
        int i2 = i % 2;
        try {
            scheduledExecutorService.schedule(runnable, j, timeUnit);
            int i3 = onResponseError + 105;
            AppsFlyerConversionListener = i3 % 128;
            if (!(i3 % 2 != 0)) {
                throw null;
            }
        } catch (RejectedExecutionException e) {
            AFLogger.afErrorLog("scheduleJob failed with RejectedExecutionException Exception", e);
        } catch (Throwable th) {
            AFLogger.afErrorLog("scheduleJob failed with Exception", th);
        }
    }

    @NonNull
    @Deprecated
    public static String AFKeystoreWrapper(HttpURLConnection httpURLConnection) {
        String obj;
        InputStreamReader inputStreamReader;
        Object obj2;
        StringBuilder sb = new StringBuilder();
        BufferedReader bufferedReader = null;
        try {
            try {
                InputStream errorStream = httpURLConnection.getErrorStream();
                if (errorStream == null) {
                    int i = onResponseError + 51;
                    AppsFlyerConversionListener = i % 128;
                    if ((i % 2 == 0 ? '^' : (char) 21) != 21) {
                        httpURLConnection.getInputStream();
                        throw null;
                    }
                    errorStream = httpURLConnection.getInputStream();
                }
                inputStreamReader = new InputStreamReader(errorStream);
                try {
                    BufferedReader bufferedReader2 = new BufferedReader(inputStreamReader);
                    int i2 = onResponseError + 103;
                    AppsFlyerConversionListener = i2 % 128;
                    int i3 = i2 % 2;
                    boolean z = false;
                    while (true) {
                        try {
                            String readLine = bufferedReader2.readLine();
                            if (readLine == null) {
                                break;
                            }
                            int i4 = AppsFlyerConversionListener + 15;
                            int i5 = i4 % 128;
                            onResponseError = i5;
                            int i6 = i4 % 2;
                            if (z) {
                                int i7 = i5 + 87;
                                AppsFlyerConversionListener = i7 % 128;
                                int i8 = i7 % 2;
                                obj2 = '\n';
                            } else {
                                obj2 = "";
                            }
                            sb.append(obj2);
                            sb.append(readLine);
                            z = true;
                        } catch (Throwable th) {
                            th = th;
                            bufferedReader = bufferedReader2;
                            try {
                                StringBuilder sb2 = new StringBuilder("Could not read connection response from: ");
                                sb2.append(httpURLConnection.getURL().toString());
                                AFLogger.afErrorLog(sb2.toString(), th);
                                if (bufferedReader != null) {
                                    bufferedReader.close();
                                }
                                if ((inputStreamReader != null ? '_' : '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 (bufferedReader != null) {
                                    try {
                                        bufferedReader.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;
                            }
                        }
                    }
                    bufferedReader2.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 e) {
            AFLogger.afErrorLogForExcManagerOnly("error while parsing readServerResponse", e);
            JSONObject jSONObject = new JSONObject();
            try {
                jSONObject.put("string_response", obj);
                return jSONObject.toString();
            } catch (JSONException e2) {
                AFLogger.afErrorLogForExcManagerOnly("RESPONSE_NOT_JSON error", e2);
                return new JSONObject().toString();
            }
        }
    }

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