PicWish v1.6.8版本的 MD5 值为:7e8bab240f03cf6dad8952f8374c4ed1

以下内容为反编译后的 AFa1aSDK.java 源代码,内容仅作参考


package com.appsflyer.internal;

import android.app.Activity;
import android.app.Application;
import android.app.UiModeManager;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ProviderInfo;
import android.content.pm.ResolveInfo;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.StatFs;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.MotionEvent;
import android.view.WindowManager;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import androidx.constraintlayout.core.motion.utils.TypedValues;
import androidx.core.app.NotificationCompat;
import b3.s;
import com.android.billingclient.api.BillingClient;
import com.apowersoft.common.storage.FileUtil;
import com.apowersoft.plugin.asm.privacy.AsmPrivacyHookHelper;
import com.appsflyer.AFInAppEventParameterName;
import com.appsflyer.AFInAppEventType;
import com.appsflyer.AFKeystoreWrapper;
import com.appsflyer.AFLogger;
import com.appsflyer.AFVersionDeclaration;
import com.appsflyer.AppsFlyerConversionListener;
import com.appsflyer.AppsFlyerInAppPurchaseValidatorListener;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerProperties;
import com.appsflyer.PurchaseHandler;
import com.appsflyer.attribution.AppsFlyerRequestListener;
import com.appsflyer.attribution.RequestError;
import com.appsflyer.deeplink.DeepLinkListener;
import com.appsflyer.deeplink.DeepLinkResult;
import com.appsflyer.internal.AFa1aSDK;
import com.appsflyer.internal.AFa1iSDK;
import com.appsflyer.internal.AFa1mSDK;
import com.appsflyer.internal.AFa1zSDK;
import com.appsflyer.internal.AFb1zSDK;
import com.appsflyer.internal.AFc1mSDK;
import com.appsflyer.internal.AFd1ySDK;
import com.appsflyer.internal.AFe1iSDK;
import com.appsflyer.internal.components.network.http.ResponseNetwork;
import com.facebook.AccessToken;
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.NetworkInterface;
import java.net.URI;
import java.security.KeyStoreException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.TimeZone;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import tv.danmaku.ijk.media.player.IjkMediaPlayer;
public final class AFa1aSDK extends AppsFlyerLib {
    public static AppsFlyerInAppPurchaseValidatorListener AFInAppEventParameterName = null;
    public static volatile AppsFlyerConversionListener AFInAppEventType = null;
    public static final String AFKeystoreWrapper;
    private static String AFLogger = null;
    private static String AFLogger$LogLevel = null;
    @VisibleForTesting
    private static String AFVersionDeclaration = null;
    private static int AppsFlyerLib = 1;
    private static final String afInfoLog;
    private static String afRDLog;
    private static String afWarnLog;
    @VisibleForTesting
    private static AFa1aSDK getLevel;
    private static String init;
    private static int onValidateInApp;
    private static char[] onValidateInAppFailure;
    public static final String valueOf;
    public static final String values;
    private String AppsFlyer2dXConversionCallback;
    @NonNull
    private final AFb1bSDK AppsFlyerConversionListener;
    public AFa1cSDK afDebugLog;
    public String afErrorLog;
    private SharedPreferences onAppOpenAttribution;
    private AFb1gSDK onAttributionFailure;
    private Application onConversionDataFail;
    private boolean onConversionDataSuccess;
    private String onDeepLinking;
    private Map<Long, String> onInstallConversionDataLoadedNative;
    private Map<String, Object> onResponse;
    private boolean onResponseErrorNative;
    private long onInstallConversionFailureNative = -1;
    private long onAttributionFailureNative = -1;
    private long onAppOpenAttributionNative = TimeUnit.SECONDS.toMillis(5);
    private final AFb1vSDK onResponseNative = new AFb1vSDK();
    private boolean onDeepLinkingNative = false;
    private boolean onResponseError = false;

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

        public void AFKeystoreWrapper() {
            try {
                AFd1cSDK aFd1cSDK = new AFd1cSDK();
                Application valueOf = AFa1aSDK.valueOf(AFa1aSDK.this);
                if (valueOf != null) {
                    aFd1cSDK.AFInAppEventParameterName = (Application) valueOf.getApplicationContext();
                }
                AFa1aSDK aFa1aSDK = AFa1aSDK.this;
                if (AFa1aSDK.AFInAppEventType(aFa1aSDK, aFd1cSDK, AFa1aSDK.AFKeystoreWrapper(AFa1aSDK.valueOf(aFa1aSDK)))) {
                    AFa1aSDK.AFInAppEventParameterName(AFa1aSDK.this, aFd1cSDK);
                }
            } catch (Throwable th2) {
                AFLogger.afErrorLog(th2.getMessage(), th2);
            }
        }

        @Override
        public final void run() {
            AFa1aSDK.AFInAppEventParameterName(AFa1aSDK.values(AFa1aSDK.this).AFInAppEventParameterName(), new Runnable() {
                @Override
                public final void run() {
                    AFa1aSDK.AnonymousClass2.this.AFKeystoreWrapper();
                }
            }, TimeUnit.MILLISECONDS);
        }
    }

    public static class AnonymousClass7 {
        public static final int[] AFInAppEventType;

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

    public class AFa1vSDK implements Runnable {
        private final AFa1tSDK valueOf;

        private AFa1vSDK(AFa1tSDK aFa1tSDK) {
            this.valueOf = aFa1tSDK;
        }

        public AFa1vSDK(AFa1aSDK aFa1aSDK, AFa1tSDK aFa1tSDK, byte b10) {
            this(aFa1tSDK);
        }

        @Override
        public final void run() {
            AFd1wSDK aFd1wSDK;
            if (this.valueOf.AFInAppEventType()) {
                AFd1wSDK aFd1wSDK2 = new AFd1wSDK(this.valueOf, AFa1aSDK.this.AFInAppEventType());
                aFd1wSDK2.AFVersionDeclaration = AFa1aSDK.AFInAppEventType(AFa1aSDK.this);
                aFd1wSDK = aFd1wSDK2;
            } else {
                aFd1wSDK = new AFd1tSDK(this.valueOf, AFa1aSDK.this.AFInAppEventType());
            }
            AFc1mSDK afErrorLog = AFa1aSDK.this.AFInAppEventType().afErrorLog();
            afErrorLog.valueOf.execute(new AFc1mSDK.AnonymousClass5(aFd1wSDK));
        }
    }

    public class AFa1wSDK implements AFc1oSDK {
        private AFa1wSDK() {
        }

        public AFa1wSDK(AFa1aSDK aFa1aSDK, byte b10) {
            this();
        }

        @Override
        public final void AFInAppEventParameterName(AFc1nSDK<?> aFc1nSDK) {
            if (aFc1nSDK instanceof AFd1wSDK) {
                AFa1aSDK.this.AFInAppEventType().afDebugLog().valueOf(((AFd1tSDK) aFc1nSDK).afRDLog.AFLogger);
            }
        }

        @Override
        public final void AFKeystoreWrapper(AFc1nSDK<?> aFc1nSDK) {
        }

        @Override
        public final void valueOf(AFc1nSDK<?> aFc1nSDK, AFc1qSDK aFc1qSDK) {
            JSONObject values;
            AFb1tSDK values2;
            if (!(aFc1nSDK instanceof AFd1tSDK)) {
                if (!(aFc1nSDK instanceof AFd1gSDK) || aFc1qSDK == AFc1qSDK.SUCCESS) {
                    return;
                }
                AFd1eSDK aFd1eSDK = new AFd1eSDK(AFa1aSDK.values(AFa1aSDK.this));
                AFc1mSDK afErrorLog = AFa1aSDK.values(AFa1aSDK.this).afErrorLog();
                afErrorLog.valueOf.execute(new AFc1mSDK.AnonymousClass5(aFd1eSDK));
                return;
            }
            AFd1tSDK aFd1tSDK = (AFd1tSDK) aFc1nSDK;
            boolean z10 = aFc1nSDK instanceof AFd1wSDK;
            if (z10) {
                AFd1wSDK aFd1wSDK = (AFd1wSDK) aFc1nSDK;
                boolean z11 = true;
                if (aFd1wSDK.values != AFc1qSDK.SUCCESS && aFd1wSDK.AFInAppEventType != 1) {
                    z11 = false;
                }
                if (z11) {
                    Context context = AFa1aSDK.values(AFa1aSDK.this).values.values;
                    if (context == null) {
                        throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
                    }
                    AFd1gSDK aFd1gSDK = new AFd1gSDK(aFd1wSDK, new AFb1eSDK(AFa1aSDK.AFKeystoreWrapper(context)));
                    AFc1mSDK afErrorLog2 = AFa1aSDK.values(AFa1aSDK.this).afErrorLog();
                    afErrorLog2.valueOf.execute(new AFc1mSDK.AnonymousClass5(aFd1gSDK));
                }
            }
            if (aFc1qSDK == AFc1qSDK.SUCCESS) {
                AFa1aSDK aFa1aSDK = AFa1aSDK.this;
                aFa1aSDK.valueOf(AFa1aSDK.valueOf(aFa1aSDK)).valueOf("sentSuccessfully", "true");
                if (!(aFc1nSDK instanceof AFd1xSDK) && (values2 = new AFd1kSDK(AFa1aSDK.valueOf(AFa1aSDK.this)).values()) != null && values2.valueOf()) {
                    String str = values2.valueOf;
                    AFLogger.afDebugLog("Resending Uninstall token to AF servers: ".concat(String.valueOf(str)));
                    AFd1kSDK.AFInAppEventType(str);
                }
                ResponseNetwork responseNetwork = aFd1tSDK.afDebugLog;
                if (responseNetwork != null && (values = AFb1mSDK.values((String) responseNetwork.getBody())) != null) {
                    AFa1aSDK.valueOf(AFa1aSDK.this, values.optBoolean("send_background", false));
                }
                if (z10) {
                    AFa1aSDK.AFInAppEventType(AFa1aSDK.this, System.currentTimeMillis());
                }
            }
        }
    }

    public class AFa1ySDK implements Runnable {
        private final AFa1tSDK valueOf;

        private AFa1ySDK(AFa1tSDK aFa1tSDK) {
            this.valueOf = aFa1tSDK;
        }

        public AFa1ySDK(AFa1aSDK aFa1aSDK, AFa1tSDK aFa1tSDK, byte b10) {
            this(aFa1tSDK);
        }

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

    static {
        AFKeystoreWrapper();
        values = "126";
        String substring = "6.9.0".substring(0, "6.9.0".lastIndexOf(AFKeystoreWrapper(new int[]{33, 1, 0, 1}, "\u0000", false).intern()));
        valueOf = substring;
        AFLogger = "https://%sstats.%s/stats";
        StringBuilder sb2 = new StringBuilder();
        sb2.append(substring);
        sb2.append("/androidevent?buildnumber=6.9.0&app_id=");
        AFKeystoreWrapper = sb2.toString();
        afRDLog = "https://%sadrevenue.%s/api/v2/generic/v6.9.0/android?app_id=";
        StringBuilder sb3 = new StringBuilder();
        sb3.append(substring);
        sb3.append("/androidevent?app_id=");
        String obj = sb3.toString();
        afInfoLog = obj;
        StringBuilder sb4 = new StringBuilder("https://%sconversions.%s/api/v");
        sb4.append(obj);
        afWarnLog = sb4.toString();
        StringBuilder sb5 = new StringBuilder("https://%slaunches.%s/api/v");
        sb5.append(obj);
        init = sb5.toString();
        StringBuilder sb6 = new StringBuilder("https://%sinapps.%s/api/v");
        sb6.append(obj);
        AFLogger$LogLevel = sb6.toString();
        StringBuilder sb7 = new StringBuilder("https://%sattr.%s/api/v");
        sb7.append(obj);
        AFVersionDeclaration = sb7.toString();
        AFInAppEventParameterName = null;
        AFInAppEventType = null;
        getLevel = new AFa1aSDK();
        int i10 = onValidateInApp + 99;
        AppsFlyerLib = i10 % 128;
        if ((i10 % 2 == 0 ? (char) 20 : (char) 23) == 23) {
            return;
        }
        throw null;
    }

    @VisibleForTesting
    public AFa1aSDK() {
        Executors.newSingleThreadExecutor();
        AFVersionDeclaration.init();
        AFb1bSDK aFb1bSDK = new AFb1bSDK();
        this.AppsFlyerConversionListener = aFb1bSDK;
        AFc1mSDK afErrorLog = aFb1bSDK.afErrorLog();
        afErrorLog.AFInAppEventParameterName.add(new AFa1wSDK(this, (byte) 0));
    }

    private static int AFInAppEventParameterName(SharedPreferences sharedPreferences, boolean z10) {
        int i10 = onValidateInApp + 21;
        AppsFlyerLib = i10 % 128;
        if (i10 % 2 == 0) {
            values(sharedPreferences, "appsFlyerInAppEventCount", z10);
            throw null;
        }
        int values2 = values(sharedPreferences, "appsFlyerInAppEventCount", z10);
        int i11 = onValidateInApp + 41;
        AppsFlyerLib = i11 % 128;
        int i12 = i11 % 2;
        return values2;
    }

    public static String AFInAppEventParameterName() {
        int i10 = onValidateInApp + 61;
        AppsFlyerLib = i10 % 128;
        if ((i10 % 2 == 0 ? (char) 23 : ' ') == 23) {
            AFKeystoreWrapper(AppsFlyerProperties.APP_USER_ID);
            throw null;
        }
        String AFKeystoreWrapper2 = AFKeystoreWrapper(AppsFlyerProperties.APP_USER_ID);
        int i11 = AppsFlyerLib + 79;
        onValidateInApp = i11 % 128;
        if (i11 % 2 != 0) {
            int i12 = 73 / 0;
            return AFKeystoreWrapper2;
        }
        return AFKeystoreWrapper2;
    }

    private static String AFInAppEventParameterName(@Nullable String str) {
        int i10 = AppsFlyerLib + 27;
        int i11 = i10 % 128;
        onValidateInApp = i11;
        int i12 = i10 % 2;
        if (str == null) {
            int i13 = i11 + 57;
            AppsFlyerLib = i13 % 128;
            if (i13 % 2 != 0) {
                return null;
            }
            throw null;
        } else if (str.matches("fb\\d*?://authorize.*") && str.contains(AccessToken.ACCESS_TOKEN_KEY)) {
            int i14 = onValidateInApp + 25;
            AppsFlyerLib = i14 % 128;
            if ((i14 % 2 == 0 ? '\b' : (char) 3) != 3) {
                valueOf(str).length();
                throw null;
            }
            String valueOf2 = valueOf(str);
            if ((valueOf2.length() == 0 ? '\n' : ')') != ')') {
                return str;
            }
            ArrayList arrayList = new ArrayList();
            if (valueOf2.contains("&")) {
                arrayList = new ArrayList(Arrays.asList(valueOf2.split("&")));
            } else {
                arrayList.add(valueOf2);
            }
            StringBuilder sb2 = new StringBuilder();
            Iterator it = arrayList.iterator();
            int i15 = AppsFlyerLib + 41;
            onValidateInApp = i15 % 128;
            int i16 = i15 % 2;
            while (it.hasNext()) {
                int i17 = onValidateInApp + 23;
                AppsFlyerLib = i17 % 128;
                int i18 = i17 % 2;
                String str2 = (String) it.next();
                if (str2.contains(AccessToken.ACCESS_TOKEN_KEY)) {
                    int i19 = onValidateInApp + 85;
                    AppsFlyerLib = i19 % 128;
                    int i20 = i19 % 2;
                    it.remove();
                    int i21 = onValidateInApp + 87;
                    AppsFlyerLib = i21 % 128;
                    int i22 = i21 % 2;
                } else {
                    if (sb2.length() != 0) {
                        sb2.append("&");
                    } else if (!str2.startsWith("?")) {
                        sb2.append("?");
                    }
                    sb2.append(str2);
                }
            }
            return str.replace(valueOf2, sb2.toString());
        } else {
            return str;
        }
    }

    public static Map<String, Object> AFInAppEventParameterName(Map<String, Object> map) {
        if ((map.containsKey("meta") ? ',' : '4') == '4') {
            HashMap hashMap = new HashMap();
            map.put("meta", hashMap);
            return hashMap;
        }
        int i10 = AppsFlyerLib + 75;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        Map<String, Object> map2 = (Map) map.get("meta");
        int i12 = onValidateInApp + 57;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
        return map2;
    }

    private void AFInAppEventParameterName(Context context, AFd1bSDK aFd1bSDK) {
        int i10 = onValidateInApp + 5;
        int i11 = i10 % 128;
        AppsFlyerLib = i11;
        if (i10 % 2 == 0) {
            throw null;
        }
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        if ((context != null ? ']' : (char) 24) == ']') {
            AFb1dSDK aFb1dSDK = aFb1bSDK.values;
            if (context != null) {
                int i12 = i11 + 39;
                onValidateInApp = i12 % 128;
                int i13 = i12 % 2;
                aFb1dSDK.values = context.getApplicationContext();
            }
        }
        AFd1dSDK afDebugLog = AFInAppEventType().afDebugLog();
        AFd1iSDK AFKeystoreWrapper2 = AFa1lSDK.AFKeystoreWrapper(context);
        if (afDebugLog.valueOf()) {
            afDebugLog.AFKeystoreWrapper.put("api_name", aFd1bSDK.toString());
            afDebugLog.values(AFKeystoreWrapper2);
            int i14 = onValidateInApp + 45;
            AppsFlyerLib = i14 % 128;
            int i15 = i14 % 2;
        }
        afDebugLog.values();
    }

    public static void AFInAppEventParameterName(Context context, Map<String, ? super String> map) {
        boolean AFInAppEventParameterName2 = AFInAppEventParameterName(AppsFlyerProperties.DISABLE_NETWORK_DATA, false);
        AFa1iSDK aFa1iSDK = AFa1iSDK.AFa1xSDK.valueOf;
        AFa1iSDK.AFa1vSDK AFKeystoreWrapper2 = AFa1iSDK.AFKeystoreWrapper(context);
        map.put("network", AFKeystoreWrapper2.values);
        if (!AFInAppEventParameterName2) {
            String str = AFKeystoreWrapper2.AFKeystoreWrapper;
            if ((str != null ? '!' : '\'') != '\'') {
                int i10 = AppsFlyerLib + 59;
                onValidateInApp = i10 % 128;
                int i11 = i10 % 2;
                map.put("operator", str);
            }
        }
        if (AFInAppEventParameterName2) {
            return;
        }
        String str2 = AFKeystoreWrapper2.AFInAppEventType;
        if ((str2 != null ? 'c' : (char) 27) != 27) {
            int i12 = onValidateInApp + 11;
            AppsFlyerLib = i12 % 128;
            int i13 = i12 % 2;
            map.put("carrier", str2);
            if (i13 != 0) {
                return;
            }
            throw null;
        }
    }

    public static void AFInAppEventParameterName(AFa1aSDK aFa1aSDK, AFa1tSDK aFa1tSDK) {
        int i10 = AppsFlyerLib + 17;
        onValidateInApp = i10 % 128;
        boolean z10 = i10 % 2 == 0;
        aFa1aSDK.valueOf(aFa1tSDK);
        if (z10) {
            return;
        }
        throw null;
    }

    private void AFInAppEventParameterName(AFa1tSDK aFa1tSDK) {
        boolean z10 = aFa1tSDK.afErrorLog == null;
        if ((valueOf() ? '*' : 'Y') != 'Y') {
            AFLogger.afInfoLog("CustomerUserId not set, reporting is disabled", true);
            return;
        }
        if ((z10 ? 'c' : 'L') != 'L') {
            int i10 = onValidateInApp + 125;
            AppsFlyerLib = i10 % 128;
            if (i10 % 2 != 0 ? !AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.LAUNCH_PROTECT_ENABLED, true) : !AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.LAUNCH_PROTECT_ENABLED, false)) {
                AFLogger.afInfoLog("Allowing multiple launches within a 5 second time window.");
            } else if (afRDLog()) {
                int i11 = AppsFlyerLib + 101;
                onValidateInApp = i11 % 128;
                int i12 = i11 % 2;
                AppsFlyerRequestListener appsFlyerRequestListener = aFa1tSDK.valueOf;
                if ((appsFlyerRequestListener != null ? 'C' : 'M') != 'M') {
                    appsFlyerRequestListener.onError(RequestError.EVENT_TIMEOUT, AFb1fSDK.AFKeystoreWrapper);
                    return;
                }
                return;
            }
            this.onInstallConversionFailureNative = System.currentTimeMillis();
        }
        AFInAppEventParameterName(this.AppsFlyerConversionListener.AFInAppEventParameterName(), new AFa1ySDK(this, aFa1tSDK, (byte) 0), 0L, TimeUnit.MILLISECONDS);
    }

    private static void AFInAppEventParameterName(@NonNull ScheduledExecutorService scheduledExecutorService, Runnable runnable, long j10, TimeUnit timeUnit) {
        int i10 = AppsFlyerLib + 47;
        onValidateInApp = i10 % 128;
        try {
            if ((i10 % 2 != 0 ? (char) 25 : (char) 29) != 29) {
                scheduledExecutorService.schedule(runnable, j10, timeUnit);
                int i11 = 75 / 0;
            } else {
                scheduledExecutorService.schedule(runnable, j10, timeUnit);
            }
            int i12 = AppsFlyerLib + 99;
            onValidateInApp = i12 % 128;
            int i13 = i12 % 2;
        } catch (RejectedExecutionException e10) {
            AFLogger.afErrorLog("scheduleJob failed with RejectedExecutionException Exception", e10);
        } catch (Throwable th2) {
            AFLogger.afErrorLog("scheduleJob failed with Exception", th2);
        }
    }

    public static void AFInAppEventParameterName(ScheduledExecutorService scheduledExecutorService, Runnable runnable, TimeUnit timeUnit) {
        int i10 = AppsFlyerLib + 105;
        onValidateInApp = i10 % 128;
        AFInAppEventParameterName(scheduledExecutorService, runnable, i10 % 2 == 0 ? 0L : 1L, timeUnit);
    }

    private boolean AFInAppEventParameterName(AFa1tSDK aFa1tSDK, SharedPreferences sharedPreferences) {
        int valueOf2;
        boolean z10;
        boolean z11;
        int i10 = onValidateInApp + 37;
        AppsFlyerLib = i10 % 128;
        if (i10 % 2 != 0 ? (valueOf2 = valueOf(sharedPreferences, false)) == 1 : (valueOf2 = valueOf(sharedPreferences, true)) == 1) {
            if ((!(aFa1tSDK instanceof AFd1cSDK) ? 'a' : '^') == 'a') {
                z10 = true;
                if (!sharedPreferences.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false)) {
                    int i11 = onValidateInApp + 77;
                    int i12 = i11 % 128;
                    AppsFlyerLib = i12;
                    int i13 = i11 % 2;
                    if (valueOf2 == 1) {
                        int i14 = i12 + 27;
                        onValidateInApp = i14 % 128;
                        if (i14 % 2 == 0) {
                            z11 = true;
                            return (!z11 ? 'b' : '4') != 'b' || z10;
                        }
                    }
                }
                z11 = false;
                if ((!z11 ? 'b' : '4') != 'b') {
                }
            }
        }
        int i15 = AppsFlyerLib + 107;
        onValidateInApp = i15 % 128;
        int i16 = i15 % 2;
        z10 = false;
        if (!sharedPreferences.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false)) {
        }
        z11 = false;
        if ((!z11 ? 'b' : '4') != 'b') {
        }
    }

    private static boolean AFInAppEventParameterName(String str, boolean z10) {
        int i10 = AppsFlyerLib + 35;
        onValidateInApp = i10 % 128;
        if ((i10 % 2 != 0 ? '8' : (char) 0) == 0) {
            return AppsFlyerProperties.getInstance().getBoolean(str, z10);
        }
        AppsFlyerProperties.getInstance().getBoolean(str, z10);
        throw null;
    }

    public static long AFInAppEventType(AFa1aSDK aFa1aSDK, long j10) {
        int i10 = onValidateInApp;
        int i11 = i10 + 87;
        AppsFlyerLib = i11 % 128;
        int i12 = i11 % 2;
        aFa1aSDK.onAttributionFailureNative = j10;
        int i13 = i10 + 35;
        AppsFlyerLib = i13 % 128;
        int i14 = i13 % 2;
        return j10;
    }

    private static String AFInAppEventType(Activity activity) {
        Intent intent;
        String str = null;
        if ((activity != null ? '`' : (char) 19) == '`' && (intent = activity.getIntent()) != null) {
            int i10 = AppsFlyerLib + 45;
            onValidateInApp = i10 % 128;
            int i11 = i10 % 2;
            try {
                Bundle extras = intent.getExtras();
                if ((extras != null ? '+' : '7') == '+') {
                    String string = extras.getString("af");
                    if (string != null) {
                        int i12 = AppsFlyerLib + 13;
                        onValidateInApp = i12 % 128;
                        try {
                            if (i12 % 2 != 0) {
                                AFLogger.afInfoLog("Push Notification received af payload = ".concat(string));
                                extras.remove("af");
                                activity.setIntent(intent.putExtras(extras));
                                throw null;
                            }
                            AFLogger.afInfoLog("Push Notification received af payload = ".concat(string));
                            extras.remove("af");
                            activity.setIntent(intent.putExtras(extras));
                        } catch (Throwable th2) {
                            th = th2;
                            str = string;
                            AFLogger.afErrorLog(th.getMessage(), th);
                            return str;
                        }
                    }
                    str = string;
                }
                int i13 = AppsFlyerLib + 107;
                onValidateInApp = i13 % 128;
                int i14 = i13 % 2;
            } catch (Throwable th3) {
                th = th3;
            }
        }
        return str;
    }

    public static String AFInAppEventType(SimpleDateFormat simpleDateFormat, long j10) {
        simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
        String format = simpleDateFormat.format(new Date(j10));
        int i10 = AppsFlyerLib + 85;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        return format;
    }

    public static Map AFInAppEventType(AFa1aSDK aFa1aSDK) {
        int i10 = onValidateInApp;
        int i11 = i10 + 1;
        AppsFlyerLib = i11 % 128;
        int i12 = i11 % 2;
        Map<String, Object> map = aFa1aSDK.onResponse;
        int i13 = i10 + 41;
        AppsFlyerLib = i13 % 128;
        int i14 = i13 % 2;
        return map;
    }

    private void AFInAppEventType(Context context, String str, Map<String, Object> map) {
        AFe1xSDK aFe1xSDK = new AFe1xSDK();
        if ((context != null ? (char) 26 : '\"') == 26) {
            aFe1xSDK.AFInAppEventParameterName = (Application) context.getApplicationContext();
            int i10 = onValidateInApp + 107;
            AppsFlyerLib = i10 % 128;
            int i11 = i10 % 2;
        }
        aFe1xSDK.afErrorLog = str;
        aFe1xSDK.AFKeystoreWrapper = map;
        valueOf(aFe1xSDK, (context instanceof Activity ? (char) 18 : '0') != 18 ? null : (Activity) context);
        int i12 = AppsFlyerLib + 59;
        onValidateInApp = i12 % 128;
        int i13 = i12 % 2;
    }

    private static void AFInAppEventType(String str) {
        try {
            if (!new JSONObject(str).has("pid")) {
                AFLogger.afWarnLog("Cannot set preinstall attribution data without a media source");
                int i10 = onValidateInApp + 57;
                AppsFlyerLib = i10 % 128;
                int i11 = i10 % 2;
                return;
            }
            int i12 = AppsFlyerLib + 27;
            onValidateInApp = i12 % 128;
            int i13 = i12 % 2;
            values("preInstallName", str);
            int i14 = onValidateInApp + 107;
            AppsFlyerLib = i14 % 128;
            if (i14 % 2 == 0) {
                throw null;
            }
        } catch (JSONException e10) {
            AFLogger.afErrorLog("Error parsing JSON for preinstall", e10);
        }
    }

    private void AFInAppEventType(Map<String, Object> map) {
        boolean z10;
        if (!AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false)) {
            int i10 = onValidateInApp + 51;
            AppsFlyerLib = i10 % 128;
            if ((i10 % 2 == 0 ? 'c' : '5') != '5') {
            }
            if (z10) {
                int i11 = AppsFlyerLib + 17;
                onValidateInApp = i11 % 128;
                if (!(i11 % 2 != 0)) {
                    if (!(map.get("advertiserId") != null)) {
                        return;
                    }
                } else {
                    int i12 = 20 / 0;
                    if (map.get("advertiserId") == null) {
                        return;
                    }
                }
                try {
                    if (AFb1nSDK.values(this.afErrorLog) && map.remove("android_id") != null) {
                        AFLogger.afInfoLog("validateGaidAndIMEI :: removing: android_id");
                    }
                    if (AFb1nSDK.values(this.AppsFlyerConversionListener.AFLogger$LogLevel().AFKeystoreWrapper)) {
                        if ((map.remove("imei") != null ? '7' : (char) 7) != '7') {
                            return;
                        }
                        AFLogger.afInfoLog("validateGaidAndIMEI :: removing: imei");
                        return;
                    }
                    return;
                } catch (Exception e10) {
                    AFLogger.afErrorLog("failed to remove IMEI or AndroidID key from params; ", e10);
                    return;
                }
            }
            return;
        }
        z10 = true;
        if (z10) {
        }
    }

    private static boolean AFInAppEventType(@NonNull SharedPreferences sharedPreferences) {
        int i10 = onValidateInApp + 33;
        AppsFlyerLib = i10 % 128;
        boolean z10 = i10 % 2 == 0;
        boolean parseBoolean = Boolean.parseBoolean(sharedPreferences.getString("sentSuccessfully", null));
        if (z10) {
            int i11 = 25 / 0;
        }
        int i12 = AppsFlyerLib + 75;
        onValidateInApp = i12 % 128;
        int i13 = i12 % 2;
        return parseBoolean;
    }

    public static boolean AFInAppEventType(AFa1aSDK aFa1aSDK, AFa1tSDK aFa1tSDK, SharedPreferences sharedPreferences) {
        int i10 = onValidateInApp + 61;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        boolean AFInAppEventParameterName2 = aFa1aSDK.AFInAppEventParameterName(aFa1tSDK, sharedPreferences);
        int i12 = onValidateInApp + 61;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
        return AFInAppEventParameterName2;
    }

    public static synchronized SharedPreferences AFKeystoreWrapper(Context context) {
        AFa1aSDK values2;
        SharedPreferences sharedPreferences;
        SharedPreferences sharedPreferences2;
        synchronized (AFa1aSDK.class) {
            int i10 = AppsFlyerLib + 41;
            onValidateInApp = i10 % 128;
            int i11 = i10 % 2;
            if ((values().onAppOpenAttribution == null ? '?' : (char) 14) == '?') {
                int i12 = AppsFlyerLib + 69;
                onValidateInApp = i12 % 128;
                if ((i12 % 2 != 0 ? 'M' : (char) 5) != 'M') {
                    values2 = values();
                    sharedPreferences = context.getApplicationContext().getSharedPreferences("appsflyer-data", 0);
                } else {
                    values2 = values();
                    sharedPreferences = context.getApplicationContext().getSharedPreferences("appsflyer-data", 1);
                }
                values2.onAppOpenAttribution = sharedPreferences;
            }
            sharedPreferences2 = values().onAppOpenAttribution;
        }
        return sharedPreferences2;
    }

    private static String AFKeystoreWrapper(String str) {
        int i10 = onValidateInApp + 11;
        AppsFlyerLib = i10 % 128;
        if (!(i10 % 2 != 0)) {
            AppsFlyerProperties.getInstance().getString(str);
            throw null;
        }
        String string = AppsFlyerProperties.getInstance().getString(str);
        int i11 = AppsFlyerLib + 61;
        onValidateInApp = i11 % 128;
        if (i11 % 2 != 0) {
            int i12 = 74 / 0;
            return string;
        }
        return string;
    }

    @NonNull
    @Deprecated
    public static String AFKeystoreWrapper(HttpURLConnection httpURLConnection) {
        String obj;
        BufferedReader bufferedReader;
        InputStreamReader inputStreamReader;
        StringBuilder sb2 = new StringBuilder();
        try {
            try {
                InputStream errorStream = httpURLConnection.getErrorStream();
                if (errorStream == null) {
                    int i10 = AppsFlyerLib + 41;
                    onValidateInApp = i10 % 128;
                    if (i10 % 2 != 0) {
                        errorStream = httpURLConnection.getInputStream();
                        int i11 = 58 / 0;
                    } else {
                        errorStream = httpURLConnection.getInputStream();
                    }
                }
                InputStreamReader inputStreamReader2 = new InputStreamReader(errorStream);
                try {
                    BufferedReader bufferedReader2 = new BufferedReader(inputStreamReader2);
                    boolean z10 = false;
                    while (true) {
                        try {
                            String readLine = bufferedReader2.readLine();
                            if (readLine == null) {
                                break;
                            }
                            sb2.append(z10 ? '\n' : "");
                            sb2.append(readLine);
                            z10 = true;
                        } catch (Throwable th2) {
                            bufferedReader = bufferedReader2;
                            th = th2;
                            inputStreamReader = inputStreamReader2;
                            try {
                                StringBuilder sb3 = new StringBuilder("Could not read connection response from: ");
                                sb3.append(httpURLConnection.getURL().toString());
                                AFLogger.afErrorLog(sb3.toString(), th);
                                if (bufferedReader != null) {
                                    bufferedReader.close();
                                }
                                if (inputStreamReader != null) {
                                    int i12 = AppsFlyerLib + 71;
                                    onValidateInApp = i12 % 128;
                                    if (i12 % 2 != 0) {
                                        inputStreamReader.close();
                                        throw null;
                                    }
                                    inputStreamReader.close();
                                }
                                obj = sb2.toString();
                                new JSONObject(obj);
                                return obj;
                            } catch (Throwable th3) {
                                if (bufferedReader != null) {
                                    try {
                                        bufferedReader.close();
                                    } catch (Throwable th4) {
                                        AFLogger.afErrorLog(th4);
                                        throw th3;
                                    }
                                }
                                if (inputStreamReader != null) {
                                    inputStreamReader.close();
                                }
                                throw th3;
                            }
                        }
                    }
                    bufferedReader2.close();
                    inputStreamReader2.close();
                } catch (Throwable th5) {
                    th = th5;
                    inputStreamReader = inputStreamReader2;
                    bufferedReader = null;
                }
            } catch (Throwable th6) {
                th = th6;
                bufferedReader = null;
                inputStreamReader = null;
            }
        } catch (Throwable th7) {
            AFLogger.afErrorLog(th7);
        }
        obj = sb2.toString();
        try {
            new JSONObject(obj);
            return obj;
        } catch (JSONException unused) {
            JSONObject jSONObject = new JSONObject();
            try {
                jSONObject.put("string_response", obj);
                return jSONObject.toString();
            } catch (JSONException unused2) {
                return new JSONObject().toString();
            }
        }
    }

    private String AFKeystoreWrapper(SimpleDateFormat simpleDateFormat, Context context) {
        String str;
        int i10 = AppsFlyerLib + 85;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        String string = AFKeystoreWrapper(context).getString("appsFlyerFirstInstall", null);
        if (string == null) {
            int i12 = AppsFlyerLib + 55;
            onValidateInApp = i12 % 128;
            int i13 = i12 % 2;
            if (afInfoLog(context)) {
                AFLogger.afDebugLog("AppsFlyer: first launch detected");
                str = simpleDateFormat.format(new Date());
            } else {
                str = "";
            }
            string = str;
            valueOf(context).valueOf("appsFlyerFirstInstall", string);
        }
        AFLogger.afInfoLog("AppsFlyer: first launch date: ".concat(String.valueOf(string)));
        return string;
    }

    private static String AFKeystoreWrapper(int[] iArr, String str, boolean z10) {
        byte[] bArr;
        String str2;
        if (str != null) {
            bArr = str.getBytes("ISO-8859-1");
        }
        byte[] bArr2 = bArr;
        synchronized (AFf1vSDK.AFInAppEventParameterName) {
            int i10 = iArr[0];
            int i11 = iArr[1];
            int i12 = iArr[2];
            int i13 = iArr[3];
            char[] cArr = new char[i11];
            System.arraycopy(onValidateInAppFailure, i10, cArr, 0, i11);
            if (bArr2 != null) {
                char[] cArr2 = new char[i11];
                AFf1vSDK.values = 0;
                char c = 0;
                while (true) {
                    int i14 = AFf1vSDK.values;
                    if (i14 >= i11) {
                        break;
                    }
                    if (bArr2[i14] == 1) {
                        cArr2[i14] = (char) (((cArr[i14] << 1) + 1) - c);
                    } else {
                        cArr2[i14] = (char) ((cArr[i14] << 1) - c);
                    }
                    c = cArr2[i14];
                    AFf1vSDK.values = i14 + 1;
                }
                cArr = cArr2;
            }
            if (i13 > 0) {
                char[] cArr3 = new char[i11];
                System.arraycopy(cArr, 0, cArr3, 0, i11);
                int i15 = i11 - i13;
                System.arraycopy(cArr3, 0, cArr, i15, i13);
                System.arraycopy(cArr3, i13, cArr, 0, i15);
            }
            if (z10) {
                char[] cArr4 = new char[i11];
                AFf1vSDK.values = 0;
                while (true) {
                    int i16 = AFf1vSDK.values;
                    if (i16 >= i11) {
                        break;
                    }
                    cArr4[i16] = cArr[(i11 - i16) - 1];
                    AFf1vSDK.values = i16 + 1;
                }
                cArr = cArr4;
            }
            if (i12 > 0) {
                AFf1vSDK.values = 0;
                while (true) {
                    int i17 = AFf1vSDK.values;
                    if (i17 >= i11) {
                        break;
                    }
                    cArr[i17] = (char) (cArr[i17] - iArr[2]);
                    AFf1vSDK.values = i17 + 1;
                }
            }
            str2 = new String(cArr);
        }
        return str2;
    }

    public static void AFKeystoreWrapper() {
        onValidateInAppFailure = new char[]{'w', 229, 226, 233, 227, 222, 221, 228, 233, 230, 228, 231, '7', 151, 153, 163, 150, 167, '0', 'V', '`', 's', 'r', 'm', 'g', 'e', 'l', 'j', 'R', 'V', 'e', 'h', 'q', 23};
    }

    private void AFKeystoreWrapper(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.AppsFlyerConversionListener.values.values;
        if (context2 == null) {
            throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
        }
        AFb1eSDK aFb1eSDK = new AFb1eSDK(AFKeystoreWrapper(context2));
        String values2 = this.AppsFlyerConversionListener.AFLogger$LogLevel().values(aFb1eSDK);
        if (!AFb1nSDK.values(values2)) {
            map.put("imei", values2);
        }
        boolean z10 = appsFlyerProperties.getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID, false);
        String str = null;
        String AFInAppEventType2 = aFb1eSDK.AFInAppEventType("androidIdCached", null);
        if (!z10 || !AFb1nSDK.values(this.afErrorLog)) {
            String str2 = this.afErrorLog;
            if (str2 != null) {
                str = str2;
            }
        } else if (AFLogger(context)) {
            try {
                String secureString = AsmPrivacyHookHelper.getSecureString(context.getContentResolver(), "android_id");
                if (secureString != null) {
                    str = secureString;
                } else if (AFInAppEventType2 != null) {
                    AFLogger.afDebugLog("use cached AndroidId: ".concat(AFInAppEventType2));
                    str = AFInAppEventType2;
                }
            } catch (Exception e10) {
                if (AFInAppEventType2 != null) {
                    AFLogger.afDebugLog("use cached AndroidId: ".concat(AFInAppEventType2));
                    str = AFInAppEventType2;
                }
                AFLogger.afErrorLog(e10.getMessage(), e10);
            }
        }
        if (str != null) {
            aFb1eSDK.valueOf("androidIdCached", str);
            map.put("android_id", str);
        } else {
            AFLogger.afInfoLog("Android ID was not collected.");
        }
        AFa1qSDK AFInAppEventParameterName2 = AFb1xSDK.AFInAppEventParameterName(context);
        if (AFInAppEventParameterName2 != null) {
            HashMap hashMap = new HashMap();
            hashMap.put("isManual", AFInAppEventParameterName2.AFKeystoreWrapper);
            hashMap.put("val", AFInAppEventParameterName2.valueOf);
            Boolean bool = AFInAppEventParameterName2.values;
            if (bool != null) {
                hashMap.put("isLat", bool);
            }
            map.put("oaid", hashMap);
        }
    }

    public static void AFKeystoreWrapper(AFa1aSDK aFa1aSDK) {
        int i10 = AppsFlyerLib + 33;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        aFa1aSDK.AFLogger();
        int i12 = onValidateInApp + 71;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
    }

    private static void AFKeystoreWrapper(String str, boolean z10) {
        int i10 = onValidateInApp + 115;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        AppsFlyerProperties.getInstance().set(str, z10);
        int i12 = onValidateInApp + 41;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
    }

    private void AFLogger() {
        int i10 = onValidateInApp + 31;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        if (AFd1zSDK.afErrorLog()) {
            return;
        }
        AFc1ySDK AFInAppEventType2 = AFInAppEventType();
        AFc1mSDK afErrorLog = AFInAppEventType2.afErrorLog();
        afErrorLog.valueOf.execute(new AFc1mSDK.AnonymousClass5(new AFd1zSDK(AFInAppEventType2)));
        int i12 = AppsFlyerLib + 75;
        onValidateInApp = i12 % 128;
        if (i12 % 2 != 0) {
            throw null;
        }
    }

    private static boolean AFLogger(Context context) {
        boolean z10;
        int i10 = AppsFlyerLib + 85;
        onValidateInApp = i10 % 128;
        if ((i10 % 2 != 0 ? 'X' : (char) 30) != 'X') {
        }
        if (!z10) {
            int i11 = onValidateInApp + 7;
            AppsFlyerLib = i11 % 128;
            int i12 = i11 % 2;
            if (values(context)) {
                return false;
            }
        }
        return true;
    }

    private String AFLogger$LogLevel(Context context) {
        File afDebugLog = afDebugLog(values("ro.appsflyer.preinstall.path"));
        if (values(afDebugLog)) {
            afDebugLog = afDebugLog(values(context, "AF_PRE_INSTALL_PATH"));
            int i10 = onValidateInApp + 75;
            AppsFlyerLib = i10 % 128;
            int i11 = i10 % 2;
        }
        if (values(afDebugLog)) {
            int i12 = AppsFlyerLib + 65;
            onValidateInApp = i12 % 128;
            int i13 = i12 % 2;
            afDebugLog = afDebugLog("/data/local/tmp/pre_install.appsflyer");
        }
        if (values(afDebugLog)) {
            afDebugLog = afDebugLog("/etc/pre_install.appsflyer");
        }
        if (!(values(afDebugLog) ? false : true)) {
            int i14 = onValidateInApp + 123;
            AppsFlyerLib = i14 % 128;
            int i15 = i14 % 2;
            return null;
        }
        String valueOf2 = valueOf(afDebugLog, context.getPackageName());
        int i16 = onValidateInApp + 39;
        AppsFlyerLib = i16 % 128;
        int i17 = i16 % 2;
        return valueOf2;
    }

    private String AFVersionDeclaration(Context context) {
        String str;
        int i10 = AppsFlyerLib + 9;
        onValidateInApp = i10 % 128;
        if (i10 % 2 != 0) {
            AFKeystoreWrapper(context);
            AFKeystoreWrapper("preInstallName");
            throw null;
        }
        SharedPreferences AFKeystoreWrapper2 = AFKeystoreWrapper(context);
        String AFKeystoreWrapper3 = AFKeystoreWrapper("preInstallName");
        if (AFKeystoreWrapper3 != null) {
            return AFKeystoreWrapper3;
        }
        if (AFKeystoreWrapper2.contains("preInstallName")) {
            str = AFKeystoreWrapper2.getString("preInstallName", null);
        } else {
            if ((afInfoLog(context) ? (char) 3 : '\t') == 3) {
                AFKeystoreWrapper3 = AFLogger$LogLevel(context);
                if (AFKeystoreWrapper3 == null) {
                    AFKeystoreWrapper3 = values(context, "AF_PRE_INSTALL_NAME");
                } else {
                    int i11 = AppsFlyerLib + 77;
                    onValidateInApp = i11 % 128;
                    int i12 = i11 % 2;
                }
            }
            if (AFKeystoreWrapper3 != null) {
                int i13 = onValidateInApp + 91;
                AppsFlyerLib = i13 % 128;
                int i14 = i13 % 2;
                valueOf(context).valueOf("preInstallName", AFKeystoreWrapper3);
            }
            str = AFKeystoreWrapper3;
        }
        if (str != null) {
            values("preInstallName", str);
        }
        int i15 = AppsFlyerLib + 57;
        onValidateInApp = i15 % 128;
        int i16 = i15 % 2;
        return str;
    }

    private static File afDebugLog(String str) {
        int i10 = AppsFlyerLib;
        int i11 = i10 + 113;
        onValidateInApp = i11 % 128;
        try {
        } catch (Throwable th2) {
            AFLogger.afErrorLog(th2.getMessage(), th2);
        }
        if ((i11 % 2 != 0 ? '#' : ']') == ']') {
            if ((str != null ? '>' : 'a') != 'a') {
                int i12 = i10 + 63;
                onValidateInApp = i12 % 128;
                int i13 = i12 % 2;
                if (str.trim().length() > 0) {
                    return new File(str.trim());
                }
            }
            int i14 = onValidateInApp + 21;
            AppsFlyerLib = i14 % 128;
            int i15 = i14 % 2;
            return null;
        }
        throw null;
    }

    private static String afDebugLog() {
        int i10 = onValidateInApp + 125;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        String AFKeystoreWrapper2 = AFKeystoreWrapper(AppsFlyerProperties.APP_ID);
        int i12 = onValidateInApp + 35;
        AppsFlyerLib = i12 % 128;
        if (!(i12 % 2 == 0)) {
            return AFKeystoreWrapper2;
        }
        int i13 = 74 / 0;
        return AFKeystoreWrapper2;
    }

    private static void afDebugLog(Context context) {
        int i10 = AppsFlyerLib + 117;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        try {
            if (!((context.getPackageManager().getPackageInfo(context.getPackageName(), 0).applicationInfo.flags & 32768) == 0)) {
                int i12 = onValidateInApp + 71;
                AppsFlyerLib = i12 % 128;
                int i13 = i12 % 2;
                if ((context.getResources().getIdentifier("appsflyer_backup_rules", "xml", context.getPackageName()) != 0 ? '2' : ' ') == ' ') {
                    AFLogger.valueOf("'allowBackup' is set to true; appsflyer_backup_rules.xml not detected.\nAppsFlyer shared preferences should be excluded from auto backup by adding: <exclude domain=\"sharedpref\" path=\"appsflyer-data\"/> to the Application's <full-backup-content> rules");
                    return;
                }
                int i14 = onValidateInApp + 105;
                AppsFlyerLib = i14 % 128;
                int i15 = i14 % 2;
                AFLogger.afInfoLog("appsflyer_backup_rules.xml detected, using AppsFlyer defined backup rules for AppsFlyer SDK data", true);
            }
        } catch (Exception e10) {
            AFLogger.afRDLog("checkBackupRules Exception: ".concat(String.valueOf(e10)));
        }
    }

    private void afErrorLog(Context context) {
        this.onResponse = new HashMap();
        final long currentTimeMillis = System.currentTimeMillis();
        final AFa1mSDK.AFa1zSDK aFa1zSDK = new AFa1mSDK.AFa1zSDK() {
            @Override
            public final void AFInAppEventParameterName(String str) {
                AFa1aSDK.AFInAppEventType(AFa1aSDK.this).put(IjkMediaPlayer.OnNativeInvokeListener.ARG_ERROR, str);
            }

            @Override
            public final void AFInAppEventParameterName(String str, String str2, String str3) {
                if (str != null) {
                    AFLogger.afInfoLog("Facebook Deferred AppLink data received: ".concat(str));
                    AFa1aSDK.AFInAppEventType(AFa1aSDK.this).put("link", str);
                    if (str2 != null) {
                        AFa1aSDK.AFInAppEventType(AFa1aSDK.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);
                        AFa1aSDK.AFInAppEventType(AFa1aSDK.this).put(NotificationCompat.MessagingStyle.Message.KEY_EXTRAS_BUNDLE, hashMap);
                    }
                } else {
                    AFa1aSDK.AFInAppEventType(AFa1aSDK.this).put("link", "");
                }
                AFa1aSDK.AFInAppEventType(AFa1aSDK.this).put("ttr", String.valueOf(System.currentTimeMillis() - currentTimeMillis));
            }
        };
        try {
            s sVar = s.f870a;
            AsmPrivacyHookHelper.invoke(s.class.getMethod("sdkInitialize", Context.class), null, new Object[]{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")) {
                        AFa1zSDK aFa1zSDK2 = aFa1zSDK;
                        if (aFa1zSDK2 != null) {
                            aFa1zSDK2.AFInAppEventParameterName("onDeferredAppLinkDataFetched invocation failed");
                        }
                        return null;
                    }
                    if (objArr[0] != null) {
                        Bundle bundle2 = (Bundle) Bundle.class.cast(AsmPrivacyHookHelper.invoke(cls.getMethod("getArgumentBundle", new Class[0]), cls.cast(objArr[0]), new Object[0]));
                        if (bundle2 != null) {
                            str2 = bundle2.getString("com.facebook.platform.APPLINK_NATIVE_URL");
                            str3 = bundle2.getString("target_url");
                            Bundle bundle3 = bundle2.getBundle(NotificationCompat.MessagingStyle.Message.KEY_EXTRAS_BUNDLE);
                            str = (bundle3 == null || (bundle = bundle3.getBundle("deeplink_context")) == null) ? null : bundle.getString("promo_code");
                        } else {
                            str = null;
                            str2 = null;
                            str3 = null;
                        }
                        AFa1zSDK aFa1zSDK3 = aFa1zSDK;
                        if (aFa1zSDK3 != null) {
                            aFa1zSDK3.AFInAppEventParameterName(str2, str3, str);
                        }
                    } else {
                        AFa1zSDK aFa1zSDK4 = aFa1zSDK;
                        if (aFa1zSDK4 != null) {
                            aFa1zSDK4.AFInAppEventParameterName(null, null, null);
                        }
                    }
                    return null;
                }
            });
            String string = context.getString(context.getResources().getIdentifier("facebook_app_id", TypedValues.Custom.S_STRING, context.getPackageName()));
            if ((TextUtils.isEmpty(string) ? (char) 0 : 'X') != 0) {
                AsmPrivacyHookHelper.invoke(method, null, new Object[]{context, string, newProxyInstance});
                return;
            }
            int i10 = AppsFlyerLib + 35;
            onValidateInApp = i10 % 128;
            if (!(i10 % 2 != 0)) {
                aFa1zSDK.AFInAppEventParameterName("Facebook app id not defined in resources");
                return;
            }
            aFa1zSDK.AFInAppEventParameterName("Facebook app id not defined in resources");
            int i11 = 20 / 0;
        } catch (ClassNotFoundException e10) {
            aFa1zSDK.AFInAppEventParameterName(e10.toString());
        } catch (IllegalAccessException e11) {
            aFa1zSDK.AFInAppEventParameterName(e11.toString());
        } catch (NoSuchMethodException e12) {
            aFa1zSDK.AFInAppEventParameterName(e12.toString());
        } catch (InvocationTargetException e13) {
            aFa1zSDK.AFInAppEventParameterName(e13.toString());
        }
    }

    private boolean afErrorLog() {
        int i10 = AppsFlyerLib;
        int i11 = i10 + 83;
        onValidateInApp = i11 % 128;
        if ((i11 % 2 != 0 ? '%' : '\"') != '\"') {
            int i12 = 5 / 0;
        }
        return false;
    }

    private static boolean afInfoLog(Context context) {
        int i10 = onValidateInApp + 25;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        if ((!AFKeystoreWrapper(context).contains("appsFlyerCount") ? '5' : (char) 21) != '5') {
            return false;
        }
        int i12 = onValidateInApp + 59;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
        return true;
    }

    @NonNull
    private AFe1iSDK[] afInfoLog() {
        int i10 = AppsFlyerLib + 45;
        onValidateInApp = i10 % 128;
        if ((i10 % 2 != 0 ? '/' : (char) 24) != 24) {
            AFInAppEventType().getLevel().AFKeystoreWrapper();
            throw null;
        }
        AFe1iSDK[] AFKeystoreWrapper2 = AFInAppEventType().getLevel().AFKeystoreWrapper();
        int i11 = AppsFlyerLib + 91;
        onValidateInApp = i11 % 128;
        int i12 = i11 % 2;
        return AFKeystoreWrapper2;
    }

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

    private boolean afRDLog() {
        if (this.onInstallConversionFailureNative > 0) {
            long currentTimeMillis = System.currentTimeMillis() - this.onInstallConversionFailureNative;
            Locale locale = Locale.US;
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS Z", locale);
            String AFInAppEventType2 = AFInAppEventType(simpleDateFormat, this.onInstallConversionFailureNative);
            String AFInAppEventType3 = AFInAppEventType(simpleDateFormat, this.onAttributionFailureNative);
            if ((currentTimeMillis < this.onAppOpenAttributionNative) && !isStopped()) {
                AFLogger.afInfoLog(String.format(locale, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nThis launch is blocked: %s ms < %s ms", AFInAppEventType2, AFInAppEventType3, Long.valueOf(currentTimeMillis), Long.valueOf(this.onAppOpenAttributionNative)));
                return true;
            }
            if ((!isStopped() ? 'a' : 'X') == 'a') {
                AFLogger.afInfoLog(String.format(locale, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nSending launch (+%s ms)", AFInAppEventType2, AFInAppEventType3, Long.valueOf(currentTimeMillis)));
            }
        } else if (!isStopped()) {
            int i10 = onValidateInApp + 59;
            AppsFlyerLib = i10 % 128;
            int i11 = i10 % 2;
            AFLogger.afInfoLog("Sending first launch for this session!");
            int i12 = AppsFlyerLib + 57;
            onValidateInApp = i12 % 128;
            int i13 = i12 % 2;
        }
        return false;
    }

    private long afWarnLog(Context context) {
        long j10 = AFKeystoreWrapper(context).getLong("AppsFlyerTimePassedSincePrevLaunch", 0L);
        long currentTimeMillis = System.currentTimeMillis();
        valueOf(context).AFInAppEventParameterName("AppsFlyerTimePassedSincePrevLaunch", currentTimeMillis);
        if (j10 > 0) {
            int i10 = AppsFlyerLib;
            int i11 = i10 + 25;
            onValidateInApp = i11 % 128;
            long j11 = (i11 % 2 != 0 ? '=' : ')') != ')' ? currentTimeMillis ^ j10 : currentTimeMillis - j10;
            int i12 = i10 + 75;
            onValidateInApp = i12 % 128;
            if (i12 % 2 != 0) {
            }
            return j11 / 1000;
        }
        return -1L;
    }

    private String getLevel(Context context) {
        String string;
        int i10 = onValidateInApp + 99;
        AppsFlyerLib = i10 % 128;
        if ((i10 % 2 == 0 ? (char) 14 : 'M') != 14) {
            string = AppsFlyerProperties.getInstance().getString("api_store_value");
        } else {
            string = AppsFlyerProperties.getInstance().getString("api_store_value");
            int i11 = 83 / 0;
        }
    }

    private String init(Context context) {
        SharedPreferences AFKeystoreWrapper2 = AFKeystoreWrapper(context);
        String str = null;
        if (!(!AFKeystoreWrapper2.contains("INSTALL_STORE"))) {
            return AFKeystoreWrapper2.getString("INSTALL_STORE", null);
        }
        boolean z10 = afInfoLog(context) ? false : true;
        int i10 = onValidateInApp;
        if (!z10) {
            int i11 = i10 + 95;
            AppsFlyerLib = i11 % 128;
            int i12 = i11 % 2;
            str = getLevel(context);
        } else {
            int i13 = i10 + 109;
            AppsFlyerLib = i13 % 128;
            int i14 = i13 % 2;
        }
        valueOf(context).valueOf("INSTALL_STORE", str);
        int i15 = AppsFlyerLib + 3;
        onValidateInApp = i15 % 128;
        int i16 = i15 % 2;
        return str;
    }

    private static boolean onAttributionFailureNative(Context context) {
        ConnectivityManager connectivityManager;
        Network[] allNetworks;
        int length;
        int i10;
        int i11 = onValidateInApp + 93;
        AppsFlyerLib = i11 % 128;
        int i12 = i11 % 2;
        if (context != null) {
            if (Build.VERSION.SDK_INT >= 23) {
                int i13 = onValidateInApp + 109;
                AppsFlyerLib = i13 % 128;
                try {
                    if (i13 % 2 != 0) {
                        connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
                        allNetworks = connectivityManager.getAllNetworks();
                        length = allNetworks.length;
                        i10 = 0;
                    } else {
                        connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
                        allNetworks = connectivityManager.getAllNetworks();
                        length = allNetworks.length;
                        i10 = 1;
                    }
                    int i14 = onValidateInApp + 107;
                    AppsFlyerLib = i14 % 128;
                    int i15 = i14 % 2;
                    while (true) {
                        if ((i10 < length ? (char) 15 : 'D') == 'D') {
                            return false;
                        }
                        int i16 = onValidateInApp + 53;
                        AppsFlyerLib = i16 % 128;
                        int i17 = i16 % 2;
                        NetworkCapabilities networkCapabilities = connectivityManager.getNetworkCapabilities(allNetworks[i10]);
                        if (networkCapabilities.hasTransport(4) && !networkCapabilities.hasCapability(15)) {
                            return true;
                        }
                        i10++;
                    }
                } catch (Exception e10) {
                    AFLogger.afErrorLog("Failed collecting ivc data", e10);
                }
            } else {
                ArrayList arrayList = new ArrayList();
                try {
                    Iterator it = Collections.list(NetworkInterface.getNetworkInterfaces()).iterator();
                    while (it.hasNext()) {
                        NetworkInterface networkInterface = (NetworkInterface) it.next();
                        if (!(!networkInterface.isUp())) {
                            arrayList.add(networkInterface.getName());
                        }
                    }
                    boolean contains = arrayList.contains("tun0");
                    int i18 = AppsFlyerLib + 7;
                    onValidateInApp = i18 % 128;
                    if (i18 % 2 != 0) {
                        throw null;
                    }
                    return contains;
                } catch (Exception e11) {
                    AFLogger.afErrorLog("Failed collecting ivc data", e11);
                }
            }
        }
        return false;
    }

    private static float onInstallConversionDataLoadedNative(Context context) {
        try {
            Intent registerReceiver = context.getApplicationContext().registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
            int intExtra = registerReceiver.getIntExtra("level", -1);
            int intExtra2 = registerReceiver.getIntExtra("scale", -1);
            if (!(intExtra == -1)) {
                int i10 = onValidateInApp + 115;
                AppsFlyerLib = i10 % 128;
                int i11 = i10 % 2;
                if ((intExtra2 == -1 ? (char) 22 : ')') != 22) {
                    return (intExtra / intExtra2) * 100.0f;
                }
            }
            int i12 = onValidateInApp + 111;
            AppsFlyerLib = i12 % 128;
            int i13 = i12 % 2;
            return 50.0f;
        } catch (Throwable th2) {
            AFLogger.afErrorLog(th2.getMessage(), th2);
            return 1.0f;
        }
    }

    public static int valueOf(SharedPreferences sharedPreferences, boolean z10) {
        int i10 = onValidateInApp + 29;
        AppsFlyerLib = i10 % 128;
        if ((i10 % 2 == 0 ? (char) 18 : 'H') == 18) {
            values(sharedPreferences, "appsFlyerCount", z10);
            throw null;
        }
        int values2 = values(sharedPreferences, "appsFlyerCount", z10);
        int i11 = onValidateInApp + 113;
        AppsFlyerLib = i11 % 128;
        int i12 = i11 % 2;
        return values2;
    }

    public static Application valueOf(AFa1aSDK aFa1aSDK) {
        int i10 = onValidateInApp + 115;
        AppsFlyerLib = i10 % 128;
        boolean z10 = i10 % 2 != 0;
        Application application = aFa1aSDK.onConversionDataFail;
        if (!z10) {
            int i11 = 30 / 0;
        }
        return application;
    }

    public static String valueOf(AFd1oSDK aFd1oSDK, String str) {
        int i10 = onValidateInApp + 23;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        String AFInAppEventType2 = aFd1oSDK.AFInAppEventType("CACHED_CHANNEL", null);
        if (AFInAppEventType2 == null) {
            aFd1oSDK.valueOf("CACHED_CHANNEL", str);
            int i12 = onValidateInApp + 87;
            AppsFlyerLib = i12 % 128;
            int i13 = i12 % 2;
            return str;
        }
        int i14 = AppsFlyerLib + 65;
        onValidateInApp = i14 % 128;
        if (i14 % 2 == 0) {
            return AFInAppEventType2;
        }
        throw null;
    }

    private static String valueOf(File file, String str) {
        FileReader fileReader;
        Properties properties;
        try {
            try {
                try {
                    properties = new Properties();
                    fileReader = new FileReader(file);
                } catch (Throwable th2) {
                    AFLogger.afErrorLog(th2.getMessage(), th2);
                    return null;
                }
            } catch (FileNotFoundException unused) {
                fileReader = null;
            } catch (Throwable th3) {
                th = th3;
                fileReader = null;
            }
            try {
                properties.load(fileReader);
                AFLogger.afInfoLog("Found PreInstall property!");
                String property = properties.getProperty(str);
                try {
                    fileReader.close();
                    int i10 = AppsFlyerLib + 117;
                    onValidateInApp = i10 % 128;
                    int i11 = i10 % 2;
                } catch (Throwable th4) {
                    AFLogger.afErrorLog(th4.getMessage(), th4);
                }
                return property;
            } catch (FileNotFoundException unused2) {
                StringBuilder sb2 = new StringBuilder("PreInstall file wasn't found: ");
                sb2.append(file.getAbsolutePath());
                AFLogger.afDebugLog(sb2.toString());
                if (fileReader != null) {
                    fileReader.close();
                }
                return null;
            } catch (Throwable th5) {
                th = th5;
                AFLogger.afErrorLog(th.getMessage(), th);
                if (fileReader != null) {
                    fileReader.close();
                    int i12 = onValidateInApp + 123;
                    AppsFlyerLib = i12 % 128;
                    int i13 = i12 % 2;
                }
                return null;
            }
        } catch (Throwable th6) {
            if (fileReader != null) {
                try {
                    fileReader.close();
                } catch (Throwable th7) {
                    AFLogger.afErrorLog(th7.getMessage(), th7);
                }
            }
            throw th6;
        }
    }

    private static String valueOf(String str) {
        int indexOf = str.indexOf(63);
        if (indexOf != -1) {
            String substring = str.substring(indexOf);
            int i10 = onValidateInApp + 125;
            AppsFlyerLib = i10 % 128;
            int i11 = i10 % 2;
            return substring;
        }
        int i12 = onValidateInApp;
        int i13 = i12 + 67;
        AppsFlyerLib = i13 % 128;
        int i14 = i13 % 2;
        int i15 = i12 + 119;
        AppsFlyerLib = i15 % 128;
        if (!(i15 % 2 == 0)) {
            return "";
        }
        throw null;
    }

    private void valueOf(Context context, String str) {
        AFe1ySDK aFe1ySDK = new AFe1ySDK();
        if ((context != null ? '0' : '\n') != '\n') {
            int i10 = AppsFlyerLib + 51;
            onValidateInApp = i10 % 128;
            int i11 = i10 % 2;
            aFe1ySDK.AFInAppEventParameterName = (Application) context.getApplicationContext();
        }
        aFe1ySDK.afRDLog = str;
        if ((str != null ? 'F' : 'A') == 'F' && str.length() > 5 && AFInAppEventParameterName(aFe1ySDK, AFKeystoreWrapper(context))) {
            AFInAppEventParameterName(this.AppsFlyerConversionListener.AFInAppEventParameterName(), new AFa1ySDK(this, aFe1ySDK, (byte) 0), 5L, TimeUnit.MILLISECONDS);
        }
        int i12 = AppsFlyerLib + 93;
        onValidateInApp = i12 % 128;
        int i13 = i12 % 2;
    }

    @VisibleForTesting
    private void valueOf(Context context, String str, Map<String, Object> map, String str2, String str3) {
        AFa1tSDK aFe1uSDK;
        if (str != null) {
            int i10 = AppsFlyerLib + 47;
            onValidateInApp = i10 % 128;
            if (!(i10 % 2 == 0)) {
                str.trim().isEmpty();
                throw null;
            } else if (!str.trim().isEmpty()) {
                aFe1uSDK = new AFe1xSDK();
                if (context != null) {
                    int i11 = onValidateInApp + 57;
                    AppsFlyerLib = i11 % 128;
                    if (!(i11 % 2 != 0)) {
                        aFe1uSDK.AFInAppEventParameterName = (Application) context.getApplicationContext();
                        throw null;
                    }
                    aFe1uSDK.AFInAppEventParameterName = (Application) context.getApplicationContext();
                }
                aFe1uSDK.afErrorLog = str;
                aFe1uSDK.AFKeystoreWrapper = map;
                aFe1uSDK.afRDLog = str2;
                aFe1uSDK.AFInAppEventType = str3;
                AFInAppEventParameterName(aFe1uSDK);
            }
        }
        aFe1uSDK = new AFe1uSDK();
        if (context != null) {
        }
        aFe1uSDK.afErrorLog = str;
        aFe1uSDK.AFKeystoreWrapper = map;
        aFe1uSDK.afRDLog = str2;
        aFe1uSDK.AFInAppEventType = str3;
        AFInAppEventParameterName(aFe1uSDK);
    }

    private static void valueOf(Context context, Map<String, Object> map) {
        String str;
        WindowManager windowManager = (WindowManager) context.getSystemService("window");
        if ((windowManager != null ? 'K' : ')') != ')') {
            int rotation = windowManager.getDefaultDisplay().getRotation();
            if (rotation == 0) {
                str = "p";
            } else if (rotation == 1) {
                int i10 = onValidateInApp + 83;
                AppsFlyerLib = i10 % 128;
                int i11 = i10 % 2;
                str = "l";
            } else if (rotation != 2) {
                str = rotation != 3 ? "" : "lr";
            } else {
                int i12 = onValidateInApp + 15;
                AppsFlyerLib = i12 % 128;
                int i13 = i12 % 2;
                str = "pr";
            }
            map.put("sc_o", str);
        }
    }

    private static void valueOf(Context context, boolean z10, Map<String, Object> map, int i10) {
        HashMap hashMap = new HashMap();
        hashMap.put("cpu_abi", values("ro.product.cpu.abi"));
        hashMap.put("cpu_abi2", values("ro.product.cpu.abi2"));
        hashMap.put("arch", values("os.arch"));
        hashMap.put("build_display_id", values("ro.build.display.id"));
        if (z10) {
            int i11 = AppsFlyerLib + 105;
            onValidateInApp = i11 % 128;
            int i12 = i11 % 2;
            values(context, hashMap);
            if (!(i10 > 2)) {
                hashMap.putAll(AFa1bSDK.AFKeystoreWrapper(context).values());
            }
        }
        hashMap.put("dim", AFa1fSDK.values(context));
        map.put("deviceData", hashMap);
        int i13 = onValidateInApp + 111;
        AppsFlyerLib = i13 % 128;
        if (i13 % 2 != 0) {
            return;
        }
        throw null;
    }

    private void valueOf(AFa1tSDK aFa1tSDK) {
        String format;
        AFe1iSDK[] afInfoLog2;
        int i10 = onValidateInApp + 61;
        AppsFlyerLib = i10 % 128;
        if (i10 % 2 == 0) {
            Application application = aFa1tSDK.AFInAppEventParameterName;
            throw null;
        }
        Application application2 = aFa1tSDK.AFInAppEventParameterName;
        if (application2 == null) {
            AFLogger.afDebugLog("sendWithEvent - got null context. skipping event/launch.");
            return;
        }
        SharedPreferences AFKeystoreWrapper2 = AFKeystoreWrapper(application2);
        AppsFlyerProperties.getInstance().saveProperties(AFKeystoreWrapper2);
        if (!this.AppsFlyerConversionListener.AFLogger$LogLevel().values()) {
            StringBuilder sb2 = new StringBuilder("sendWithEvent from activity: ");
            sb2.append(application2.getClass().getName());
            AFLogger.afInfoLog(sb2.toString());
        }
        boolean AFInAppEventType2 = aFa1tSDK.AFInAppEventType();
        boolean z10 = aFa1tSDK instanceof AFe1ySDK;
        boolean z11 = aFa1tSDK instanceof AFd1cSDK;
        Map<String, ?> values2 = values(aFa1tSDK);
        String str = (String) values2.get("appsflyerKey");
        boolean z12 = false;
        if (str == null || str.length() == 0) {
            AFLogger.afDebugLog("Not sending data yet, waiting for dev key");
            AppsFlyerRequestListener appsFlyerRequestListener = aFa1tSDK.valueOf;
            if (appsFlyerRequestListener == null) {
                return;
            }
            appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1fSDK.AFInAppEventType);
            return;
        }
        if (!isStopped()) {
            int i11 = AppsFlyerLib + 119;
            onValidateInApp = i11 % 128;
            if (i11 % 2 != 0) {
                AFLogger.afInfoLog("AppsFlyerLib.sendWithEvent");
                int i12 = 83 / 0;
            } else {
                AFLogger.afInfoLog("AppsFlyerLib.sendWithEvent");
            }
        }
        int valueOf2 = valueOf(AFKeystoreWrapper2, false);
        if (z11 || !(!z10)) {
            format = String.format(AFVersionDeclaration, AppsFlyerLib.getInstance().getHostPrefix(), values().getHostName());
        } else if (!AFInAppEventType2) {
            format = String.format(AFLogger$LogLevel, AppsFlyerLib.getInstance().getHostPrefix(), values().getHostName());
        } else if (valueOf2 < 2) {
            format = String.format(afWarnLog, AppsFlyerLib.getInstance().getHostPrefix(), values().getHostName());
            int i13 = AppsFlyerLib + 101;
            onValidateInApp = i13 % 128;
            int i14 = i13 % 2;
        } else {
            format = String.format(init, AppsFlyerLib.getInstance().getHostPrefix(), values().getHostName());
        }
        StringBuilder b10 = androidx.core.graphics.a.b(format);
        b10.append(application2.getPackageName());
        String obj = b10.toString();
        StringBuilder sb3 = new StringBuilder();
        sb3.append(obj);
        sb3.append("&buildnumber=6.9.0");
        String obj2 = sb3.toString();
        String AFInAppEventType3 = AFInAppEventType(application2);
        if (AFInAppEventType3 != null) {
            StringBuilder sb4 = new StringBuilder();
            sb4.append(obj2);
            sb4.append("&channel=");
            sb4.append(AFInAppEventType3);
            obj2 = sb4.toString();
        }
        AFInAppEventType(values2);
        AFa1vSDK aFa1vSDK = new AFa1vSDK(this, aFa1tSDK.AFKeystoreWrapper(obj2).AFKeystoreWrapper(values2).AFKeystoreWrapper(valueOf2), (byte) 0);
        if (AFInAppEventType2) {
            boolean z13 = false;
            for (AFe1iSDK aFe1iSDK : afInfoLog()) {
                int i15 = onValidateInApp + 121;
                AppsFlyerLib = i15 % 128;
                int i16 = i15 % 2;
                if (aFe1iSDK.AFKeystoreWrapper == AFe1iSDK.AFa1xSDK.STARTED) {
                    StringBuilder sb5 = new StringBuilder("Failed to get ");
                    sb5.append(aFe1iSDK.valueOf);
                    sb5.append(" referrer, wait ...");
                    AFLogger.afDebugLog(sb5.toString());
                    z13 = true;
                }
            }
            if (!this.onResponseError || afErrorLog()) {
                z12 = z13;
            } else {
                int i17 = AppsFlyerLib + 11;
                onValidateInApp = i17 % 128;
                int i18 = i17 % 2;
                AFLogger.afDebugLog("fetching Facebook deferred AppLink data, wait ...");
                z12 = true;
            }
            if (this.AppsFlyerConversionListener.AFLogger$LogLevel().AFKeystoreWrapper()) {
                int i19 = AppsFlyerLib + 41;
                onValidateInApp = i19 % 128;
                z12 = i19 % 2 == 0;
            }
        }
        AFInAppEventParameterName(this.AppsFlyerConversionListener.AFInAppEventParameterName(), aFa1vSDK, z12 ? 500L : 0L, TimeUnit.MILLISECONDS);
    }

    private static void valueOf(Map<String, Object> map) {
        String string = AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.ONELINK_ID);
        String string2 = AppsFlyerProperties.getInstance().getString("onelinkVersion");
        if ((string != null ? (char) 1 : '.') != '.') {
            map.put("onelink_id", string);
        }
        if (string2 != null) {
            int i10 = onValidateInApp + 107;
            AppsFlyerLib = i10 % 128;
            int i11 = i10 % 2;
            map.put("onelink_ver", string2);
        }
        int i12 = AppsFlyerLib + 37;
        onValidateInApp = i12 % 128;
        if (i12 % 2 == 0) {
            return;
        }
        throw null;
    }

    public static boolean valueOf(AFa1aSDK aFa1aSDK, boolean z10) {
        int i10 = AppsFlyerLib + 115;
        int i11 = i10 % 128;
        onValidateInApp = i11;
        int i12 = i10 % 2;
        aFa1aSDK.onDeepLinkingNative = z10;
        int i13 = i11 + 15;
        AppsFlyerLib = i13 % 128;
        int i14 = i13 % 2;
        return z10;
    }

    private static int values(SharedPreferences sharedPreferences, String str, boolean z10) {
        int i10;
        int i11 = AppsFlyerLib + 45;
        onValidateInApp = i11 % 128;
        if ((i11 % 2 != 0 ? '9' : '_') != '9') {
            i10 = sharedPreferences.getInt(str, 0);
        } else {
            i10 = sharedPreferences.getInt(str, 0);
        }
        if (AFb1pSDK.AFKeystoreWrapper().afErrorLog()) {
            int i12 = AppsFlyerLib + 37;
            onValidateInApp = i12 % 128;
            if (i12 % 2 != 0) {
                AFb1pSDK.AFKeystoreWrapper().valueOf(String.valueOf(i10));
                throw null;
            }
            AFb1pSDK.AFKeystoreWrapper().valueOf(String.valueOf(i10));
        }
        int i13 = AppsFlyerLib + 91;
        onValidateInApp = i13 % 128;
        int i14 = i13 % 2;
        return i10;
    }

    public static AFa1aSDK values() {
        int i10 = onValidateInApp;
        int i11 = i10 + 93;
        AppsFlyerLib = i11 % 128;
        if ((i11 % 2 == 0 ? 'c' : '4') == 'c') {
            throw null;
        }
        AFa1aSDK aFa1aSDK = getLevel;
        int i12 = i10 + 19;
        AppsFlyerLib = i12 % 128;
        if ((i12 % 2 == 0 ? (char) 24 : '6') != 24) {
            return aFa1aSDK;
        }
        throw null;
    }

    public static AFb1bSDK values(AFa1aSDK aFa1aSDK) {
        int i10 = AppsFlyerLib;
        int i11 = i10 + 69;
        onValidateInApp = i11 % 128;
        char c = i11 % 2 != 0 ? '\r' : 'H';
        AFb1bSDK aFb1bSDK = aFa1aSDK.AppsFlyerConversionListener;
        if (c == '\r') {
            int i12 = 14 / 0;
        }
        int i13 = i10 + 101;
        onValidateInApp = i13 % 128;
        if (i13 % 2 == 0) {
            return aFb1bSDK;
        }
        throw null;
    }

    private AFd1ySDK.AFa1wSDK values(final Map<String, String> map) {
        AFd1ySDK.AFa1wSDK aFa1wSDK = new AFd1ySDK.AFa1wSDK() {
            @Override
            public final void AFInAppEventParameterName(String str) {
                AFb1kSDK.AFInAppEventType(str, DeepLinkResult.Error.NETWORK);
            }

            @Override
            public final void AFInAppEventType(Map<String, String> map2) {
                for (String str : map2.keySet()) {
                    map.put(str, map2.get(str));
                }
                AFb1kSDK.valueOf(map);
            }
        };
        int i10 = onValidateInApp + 53;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        return aFa1wSDK;
    }

    @Nullable
    @VisibleForTesting
    private String values(Context context, String str) {
        int i10 = AppsFlyerLib;
        int i11 = i10 + 93;
        onValidateInApp = i11 % 128;
        int i12 = i11 % 2;
        if ((context == null ? '3' : (char) 1) != 1) {
            int i13 = i10 + 47;
            onValidateInApp = i13 % 128;
            int i14 = i13 % 2;
            return null;
        }
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        if ((context == null ? (char) 30 : (char) 1) != 30) {
            AFb1dSDK aFb1dSDK = aFb1bSDK.values;
            if (context != null) {
                aFb1dSDK.values = context.getApplicationContext();
            }
        }
        return AFInAppEventType().valueOf().valueOf(str);
    }

    private static String values(String str) {
        Object invoke;
        int i10 = AppsFlyerLib + 37;
        onValidateInApp = i10 % 128;
        String str2 = null;
        try {
            if ((i10 % 2 != 0 ? '?' : (char) 25) != 25) {
                Class<?> cls = Class.forName("android.os.SystemProperties");
                Class<?>[] clsArr = new Class[0];
                clsArr[1] = String.class;
                invoke = AsmPrivacyHookHelper.invoke(cls.getMethod("get", clsArr), null, new Object[]{str});
            } else {
                invoke = AsmPrivacyHookHelper.invoke(Class.forName("android.os.SystemProperties").getMethod("get", String.class), null, new Object[]{str});
            }
            str2 = (String) invoke;
        } catch (Throwable th2) {
            AFLogger.afErrorLog(th2.getMessage(), th2);
        }
        int i11 = onValidateInApp + 65;
        AppsFlyerLib = i11 % 128;
        int i12 = i11 % 2;
        return str2;
    }

    public void values(Context context, Intent intent) {
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        if (context != null) {
            aFb1bSDK.values.values = context.getApplicationContext();
        }
        AFa1uSDK.values();
        Context context2 = this.AppsFlyerConversionListener.values.values;
        if (context2 == null) {
            throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
        }
        AFb1eSDK aFb1eSDK = new AFb1eSDK(AFKeystoreWrapper(context2));
        Uri AFInAppEventParameterName2 = AFa1uSDK.AFInAppEventParameterName(intent);
        boolean z10 = (AFInAppEventParameterName2 == null || AFInAppEventParameterName2.toString().isEmpty()) ? false : true;
        if (!aFb1eSDK.AFKeystoreWrapper("ddl_sent") || z10) {
            AFa1uSDK.values().values(new HashMap(), intent, context);
        } else {
            AFb1kSDK.AFInAppEventType("No direct deep link", null);
        }
    }

    private static void values(Context context, Map<String, Object> map) {
        int i10 = AppsFlyerLib + 125;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        AFa1zSDK.AFa1vSDK AFInAppEventParameterName2 = AFa1zSDK.AFa1xSDK.AFKeystoreWrapper.AFInAppEventParameterName(context);
        map.put("btl", Float.toString(AFInAppEventParameterName2.AFInAppEventType));
        String str = AFInAppEventParameterName2.AFInAppEventParameterName;
        if ((str != null ? 'U' : (char) 21) != 21) {
            int i12 = AppsFlyerLib + 53;
            onValidateInApp = i12 % 128;
            boolean z10 = i12 % 2 == 0;
            map.put("btch", str);
            if (!z10) {
                int i13 = 38 / 0;
            }
        }
    }

    private static void values(Context context, Map<String, Object> map, String str) {
        int i10 = onValidateInApp + 31;
        AppsFlyerLib = i10 % 128;
        try {
            if (i10 % 2 == 0) {
                SharedPreferences AFKeystoreWrapper2 = AFKeystoreWrapper(context);
                AFKeystoreWrapper2.edit();
                AFKeystoreWrapper2.getString("prev_event_name", null);
                throw null;
            }
            SharedPreferences AFKeystoreWrapper3 = AFKeystoreWrapper(context);
            SharedPreferences.Editor edit = AFKeystoreWrapper3.edit();
            String string = AFKeystoreWrapper3.getString("prev_event_name", null);
            if (string != null) {
                JSONObject jSONObject = new JSONObject();
                jSONObject.put("prev_event_timestamp", AFKeystoreWrapper3.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 i11 = AppsFlyerLib + 65;
            onValidateInApp = i11 % 128;
            if ((i11 % 2 == 0 ? '/' : (char) 31) == '/') {
                return;
            }
            throw null;
        } catch (Exception e10) {
            AFLogger.afErrorLog("Error while processing previous event.", e10);
        }
    }

    private static void values(AppsFlyerConversionListener appsFlyerConversionListener) {
        int i10 = onValidateInApp + 67;
        int i11 = i10 % 128;
        AppsFlyerLib = i11;
        int i12 = i10 % 2;
        if (appsFlyerConversionListener != null) {
            AFInAppEventType = appsFlyerConversionListener;
            return;
        }
        int i13 = i11 + 87;
        onValidateInApp = i13 % 128;
        if ((i13 % 2 != 0 ? 'A' : '\"') != '\"') {
            int i14 = 79 / 0;
        }
    }

    private static void values(String str, String str2) {
        int i10 = AppsFlyerLib + 65;
        onValidateInApp = i10 % 128;
        if ((i10 % 2 != 0 ? (char) 14 : 'b') != 'b') {
            AppsFlyerProperties.getInstance().set(str, str2);
            throw null;
        }
        AppsFlyerProperties.getInstance().set(str, str2);
        int i11 = AppsFlyerLib + 77;
        onValidateInApp = i11 % 128;
        if ((i11 % 2 != 0 ? 'E' : '[') != 'E') {
            return;
        }
        int i12 = 69 / 0;
    }

    private static void values(Map<String, Object> map, AFd1dSDK aFd1dSDK) {
        HashMap hashMap = new HashMap(aFd1dSDK.values);
        aFd1dSDK.values.clear();
        aFd1dSDK.valueOf.valueOf("gcd");
        if (!hashMap.isEmpty()) {
            int i10 = onValidateInApp + 65;
            AppsFlyerLib = i10 % 128;
            if (i10 % 2 == 0) {
                AFInAppEventParameterName(map).put("gcd", hashMap);
                throw null;
            }
            AFInAppEventParameterName(map).put("gcd", hashMap);
        }
        int i11 = onValidateInApp + 101;
        AppsFlyerLib = i11 % 128;
        int i12 = i11 % 2;
    }

    private static void values(JSONObject jSONObject) {
        String str;
        ArrayList arrayList = new ArrayList();
        Iterator<String> keys = jSONObject.keys();
        while (true) {
            if (!keys.hasNext()) {
                break;
            }
            try {
                JSONArray jSONArray = new JSONArray((String) jSONObject.get(keys.next()));
                for (int i10 = 0; i10 < jSONArray.length(); i10++) {
                    arrayList.add(Long.valueOf(jSONArray.getLong(i10)));
                }
            } catch (JSONException unused) {
            }
        }
        Collections.sort(arrayList);
        Iterator<String> keys2 = jSONObject.keys();
        loop2: while (true) {
            str = null;
            while (keys2.hasNext()) {
                int i11 = AppsFlyerLib + 125;
                onValidateInApp = i11 % 128;
                if (i11 % 2 != 0) {
                    break loop2;
                } else if (str != null) {
                    break loop2;
                } else {
                    String next = keys2.next();
                    try {
                        JSONArray jSONArray2 = new JSONArray((String) jSONObject.get(next));
                        int i12 = 0;
                        while (i12 < jSONArray2.length()) {
                            int i13 = AppsFlyerLib + 69;
                            onValidateInApp = i13 % 128;
                            int i14 = i13 % 2;
                            if (jSONArray2.getLong(i12) != ((Long) arrayList.get(0)).longValue()) {
                                int i15 = AppsFlyerLib + 41;
                                onValidateInApp = i15 % 128;
                                char c = '[';
                                if ((i15 % 2 != 0 ? 'O' : 'B') == 'B') {
                                    if ((jSONArray2.getLong(i12) != ((Long) arrayList.get(1)).longValue() ? '[' : (char) 17) != '[') {
                                        break;
                                    }
                                    if (jSONArray2.getLong(i12) != ((Long) arrayList.get(arrayList.size() - 1)).longValue()) {
                                    }
                                    if (c == '1') {
                                    }
                                } else if (jSONArray2.getLong(i12) != ((Long) arrayList.get(1)).longValue()) {
                                    if (jSONArray2.getLong(i12) != ((Long) arrayList.get(arrayList.size() - 1)).longValue()) {
                                        c = '1';
                                    }
                                    if (c == '1') {
                                        break;
                                    }
                                    i12++;
                                    str = next;
                                }
                            }
                        }
                        continue;
                    } catch (JSONException unused2) {
                    }
                }
            }
            break loop2;
        }
        if (str != null) {
            jSONObject.remove(str);
        }
    }

    public static boolean values(Context context) {
        try {
            Object obj = d5.c.c;
        } catch (Throwable th2) {
            AFLogger.afErrorLog("WARNING:  Google play services is unavailable. ", th2);
        }
        if ((d5.c.f6456d.c(context) == 0 ? '4' : (char) 31) != 31) {
            int i10 = onValidateInApp + 27;
            AppsFlyerLib = i10 % 128;
            int i11 = i10 % 2;
            return true;
        }
        int i12 = onValidateInApp + 121;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
        try {
            context.getPackageManager().getPackageInfo("com.google.android.gms", 0);
            return true;
        } catch (PackageManager.NameNotFoundException e10) {
            AFLogger.afErrorLog("WARNING:  Google Play Services is unavailable. ", e10);
            return false;
        }
    }

    private static boolean values(File file) {
        int i10 = AppsFlyerLib + 89;
        onValidateInApp = i10 % 128;
        if (i10 % 2 != 0) {
            throw null;
        }
        if ((file != null ? ':' : (char) 21) == ':' && file.exists()) {
            return false;
        }
        int i11 = AppsFlyerLib + 55;
        onValidateInApp = i11 % 128;
        int i12 = i11 % 2;
        return true;
    }

    public final void AFInAppEventParameterName(@NonNull Context context) {
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        if (!(context == null)) {
            AFb1dSDK aFb1dSDK = aFb1bSDK.values;
            if (!(context == null)) {
                aFb1dSDK.values = context.getApplicationContext();
                int i10 = AppsFlyerLib + 41;
                onValidateInApp = i10 % 128;
                int i11 = i10 % 2;
            }
        }
        int i12 = AppsFlyerLib + 97;
        onValidateInApp = i12 % 128;
        if (!(i12 % 2 == 0)) {
            int i13 = 98 / 0;
        }
    }

    public final AFc1ySDK AFInAppEventType() {
        int i10 = onValidateInApp;
        int i11 = i10 + 59;
        AppsFlyerLib = i11 % 128;
        int i12 = i11 % 2;
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        int i13 = i10 + 61;
        AppsFlyerLib = i13 % 128;
        int i14 = i13 % 2;
        return aFb1bSDK;
    }

    @Nullable
    @Deprecated
    public final String AFInAppEventType(Context context) {
        int i10 = onValidateInApp;
        int i11 = i10 + 109;
        AppsFlyerLib = i11 % 128;
        int i12 = i11 % 2;
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        if ((context != null ? '\'' : 'L') != 'L') {
            AFb1dSDK aFb1dSDK = aFb1bSDK.values;
            if (context != null) {
                int i13 = i10 + 91;
                AppsFlyerLib = i13 % 128;
                char c = i13 % 2 == 0 ? (char) 22 : '3';
                aFb1dSDK.values = context.getApplicationContext();
                if (c != '3') {
                    throw null;
                }
            }
        }
        String AFInAppEventParameterName2 = this.AppsFlyerConversionListener.valueOf().AFInAppEventParameterName();
        int i14 = AppsFlyerLib + 109;
        onValidateInApp = i14 % 128;
        int i15 = i14 % 2;
        return AFInAppEventParameterName2;
    }

    public final void AFInAppEventType(Context context, Map<String, Object> map, Uri uri) {
        AFb1dSDK aFb1dSDK;
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        if (context != null) {
            int i10 = onValidateInApp + 63;
            AppsFlyerLib = i10 % 128;
            if (i10 % 2 == 0) {
                aFb1dSDK = aFb1bSDK.values;
                int i11 = 30 / 0;
            } else {
                aFb1dSDK = aFb1bSDK.values;
            }
            aFb1dSDK.values = context.getApplicationContext();
        }
        if (!map.containsKey("af_deeplink")) {
            String AFInAppEventParameterName2 = AFInAppEventParameterName(uri.toString());
            AFa1uSDK values2 = AFa1uSDK.values();
            String str = values2.AFInAppEventParameterName;
            if (!(str == null)) {
                if ((values2.afDebugLog != null ? '\t' : '\r') != '\r') {
                    int i12 = onValidateInApp + 97;
                    AppsFlyerLib = i12 % 128;
                    if (i12 % 2 == 0) {
                        int i13 = 9 / 0;
                    }
                }
            }
            map.put("af_deeplink", AFInAppEventParameterName2);
        }
        HashMap hashMap = new HashMap();
        hashMap.put("link", uri.toString());
        AFd1ySDK aFd1ySDK = new AFd1ySDK(AFInAppEventType(), UUID.randomUUID(), uri);
        if (aFd1ySDK.afWarnLog()) {
            map.put("isBrandedDomain", Boolean.TRUE);
        }
        AFb1wSDK.values(context, hashMap, uri);
        if (!aFd1ySDK.init()) {
            AFb1kSDK.valueOf(hashMap);
            return;
        }
        aFd1ySDK.afRDLog = values(hashMap);
        AFc1mSDK afErrorLog = this.AppsFlyerConversionListener.afErrorLog();
        afErrorLog.valueOf.execute(new AFc1mSDK.AnonymousClass5(aFd1ySDK));
    }

    public final void AFInAppEventType(WeakReference<Context> weakReference) {
        int i10 = AppsFlyerLib + 31;
        onValidateInApp = i10 % 128;
        if (i10 % 2 != 0) {
            weakReference.get();
            throw null;
        } else if (weakReference.get() == null) {
        } else {
            AFLogger.afInfoLog("app went to background");
            SharedPreferences AFKeystoreWrapper2 = AFKeystoreWrapper(weakReference.get());
            AppsFlyerProperties.getInstance().saveProperties(AFKeystoreWrapper2);
            long j10 = AFInAppEventType().afDebugLog().AFVersionDeclaration;
            HashMap hashMap = new HashMap();
            String str = this.AppsFlyerConversionListener.AFLogger$LogLevel().AFInAppEventType;
            if (str == null) {
                AFLogger.afWarnLog("[callStats] AppsFlyer's SDK cannot send any event without providing DevKey.");
                return;
            }
            String AFKeystoreWrapper3 = AFKeystoreWrapper("KSAppsFlyerId");
            if ((AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, false) ? '1' : ',') != ',') {
                hashMap.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
                int i11 = onValidateInApp + 85;
                AppsFlyerLib = i11 % 128;
                int i12 = i11 % 2;
            }
            AFa1qSDK AFKeystoreWrapper4 = AFb1xSDK.AFKeystoreWrapper(weakReference.get().getContentResolver());
            if (!(AFKeystoreWrapper4 == null)) {
                int i13 = onValidateInApp + 11;
                AppsFlyerLib = i13 % 128;
                int i14 = i13 % 2;
                hashMap.put("amazon_aid", AFKeystoreWrapper4.valueOf);
                hashMap.put("amazon_aid_limit", String.valueOf(AFKeystoreWrapper4.values));
            }
            String string = AppsFlyerProperties.getInstance().getString("advertiserId");
            if (string != null) {
                int i15 = onValidateInApp + 21;
                AppsFlyerLib = i15 % 128;
                if (i15 % 2 == 0) {
                    hashMap.put("advertiserId", string);
                    int i16 = 98 / 0;
                } else {
                    hashMap.put("advertiserId", string);
                }
                int i17 = AppsFlyerLib + 45;
                onValidateInApp = i17 % 128;
                int i18 = i17 % 2;
            }
            hashMap.put("app_id", weakReference.get().getPackageName());
            hashMap.put("devkey", str);
            hashMap.put("uid", AFb1uSDK.AFInAppEventParameterName(weakReference));
            hashMap.put("time_in_app", String.valueOf(j10));
            hashMap.put("statType", "user_closed_app");
            hashMap.put("platform", "Android");
            hashMap.put("launch_counter", Integer.toString(valueOf(AFKeystoreWrapper2, false)));
            hashMap.put(AppsFlyerProperties.CHANNEL, AFInAppEventType(weakReference.get()));
            if (AFKeystoreWrapper3 != null) {
                int i19 = AppsFlyerLib + 115;
                onValidateInApp = i19 % 128;
                if (i19 % 2 != 0) {
                    int i20 = 81 / 0;
                }
            } else {
                AFKeystoreWrapper3 = "";
            }
            hashMap.put("originalAppsflyerId", AFKeystoreWrapper3);
            if (this.onDeepLinkingNative) {
                AFe1qSDK aFe1qSDK = new AFe1qSDK();
                aFe1qSDK.getLevel = isStopped();
                AFd1tSDK aFd1tSDK = new AFd1tSDK((AFe1qSDK) aFe1qSDK.AFKeystoreWrapper(hashMap).AFKeystoreWrapper(String.format(AFLogger, AppsFlyerLib.getInstance().getHostPrefix(), values().getHostName())), this.AppsFlyerConversionListener);
                AFc1mSDK afErrorLog = this.AppsFlyerConversionListener.afErrorLog();
                afErrorLog.valueOf.execute(new AFc1mSDK.AnonymousClass5(aFd1tSDK));
                return;
            }
            AFLogger.afDebugLog("Stats call is disabled, ignore ...");
            int i21 = AppsFlyerLib + 83;
            onValidateInApp = i21 % 128;
            if (!(i21 % 2 != 0)) {
                return;
            }
            int i22 = 53 / 0;
        }
    }

    public final void AFKeystoreWrapper(Context context, Intent intent) {
        if (!(intent.getStringExtra("appsflyer_preinstall") == null)) {
            int i10 = AppsFlyerLib + 49;
            onValidateInApp = i10 % 128;
            if (i10 % 2 != 0) {
                AFInAppEventType(intent.getStringExtra("appsflyer_preinstall"));
                int i11 = 54 / 0;
            } else {
                AFInAppEventType(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 ? '?' : '*') != '?') {
            return;
        }
        valueOf(context).valueOf("referrer", stringExtra);
        AppsFlyerProperties appsFlyerProperties = AppsFlyerProperties.getInstance();
        appsFlyerProperties.set("AF_REFERRER", stringExtra);
        appsFlyerProperties.values = stringExtra;
        if (AppsFlyerProperties.getInstance().AFKeystoreWrapper()) {
            int i12 = AppsFlyerLib + 3;
            onValidateInApp = i12 % 128;
            int i13 = i12 % 2;
            AFLogger.afInfoLog("onReceive: isLaunchCalled");
            AFInAppEventParameterName(context, AFd1bSDK.onReceive);
            valueOf(context, stringExtra);
        }
    }

    public final void AFKeystoreWrapper(Context context, String str) {
        JSONArray jSONArray;
        JSONObject jSONObject;
        AFLogger.afDebugLog("received a new (extra) referrer: ".concat(String.valueOf(str)));
        try {
            try {
                long currentTimeMillis = System.currentTimeMillis();
                String string = AFKeystoreWrapper(context).getString("extraReferrers", null);
                if (string == null) {
                    jSONObject = new JSONObject();
                    jSONArray = new JSONArray();
                } else {
                    JSONObject jSONObject2 = new JSONObject(string);
                    jSONArray = jSONObject2.has(str) ? new JSONArray((String) jSONObject2.get(str)) : new JSONArray();
                    jSONObject = jSONObject2;
                }
                if ((((long) jSONArray.length()) < 5 ? '\t' : '<') == '\t') {
                    int i10 = AppsFlyerLib + 3;
                    onValidateInApp = i10 % 128;
                    if (i10 % 2 != 0) {
                        jSONArray.put(currentTimeMillis);
                        throw null;
                    }
                    jSONArray.put(currentTimeMillis);
                }
                if (!(((long) jSONObject.length()) < 4)) {
                    int i11 = AppsFlyerLib + 45;
                    onValidateInApp = i11 % 128;
                    int i12 = i11 % 2;
                    values(jSONObject);
                    int i13 = onValidateInApp + 59;
                    AppsFlyerLib = i13 % 128;
                    int i14 = i13 % 2;
                }
                jSONObject.put(str, jSONArray.toString());
                valueOf(context).valueOf("extraReferrers", jSONObject.toString());
                int i15 = AppsFlyerLib + 101;
                onValidateInApp = i15 % 128;
                int i16 = i15 % 2;
            } catch (Throwable th2) {
                StringBuilder sb2 = new StringBuilder("Couldn't save referrer - ");
                sb2.append(str);
                sb2.append(": ");
                AFLogger.afErrorLog(sb2.toString(), th2);
            }
        } catch (JSONException unused) {
        }
    }

    @Override
    public final void addPushNotificationDeepLinkPath(String... strArr) {
        List<String> asList;
        List<List<String>> list;
        int i10 = AppsFlyerLib + 107;
        onValidateInApp = i10 % 128;
        if ((i10 % 2 != 0 ? 'D' : 'S') != 'S') {
            asList = Arrays.asList(strArr);
            list = AFa1uSDK.values().afRDLog;
            int i11 = 6 / 0;
            if ((!list.contains(asList) ? '#' : (char) 3) == 3) {
                return;
            }
        } else {
            asList = Arrays.asList(strArr);
            list = AFa1uSDK.values().afRDLog;
            if (list.contains(asList)) {
                return;
            }
        }
        int i12 = onValidateInApp + 39;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
        list.add(asList);
        if (i13 == 0) {
            int i14 = 56 / 0;
        }
        int i15 = onValidateInApp + 11;
        AppsFlyerLib = i15 % 128;
        int i16 = i15 % 2;
    }

    @Override
    public final void anonymizeUser(boolean z10) {
        int i10 = onValidateInApp + 1;
        AppsFlyerLib = i10 % 128;
        if (!(i10 % 2 == 0)) {
            AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("anonymizeUser", String.valueOf(z10));
        } else {
            AFb1pSDK AFKeystoreWrapper2 = AFb1pSDK.AFKeystoreWrapper();
            String[] strArr = new String[0];
            strArr[0] = String.valueOf(z10);
            AFKeystoreWrapper2.AFKeystoreWrapper("anonymizeUser", strArr);
        }
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, z10);
    }

    @Override
    public final void appendParametersToDeepLinkingURL(String str, Map<String, String> map) {
        int i10 = AppsFlyerLib + 67;
        onValidateInApp = i10 % 128;
        if ((i10 % 2 != 0 ? '8' : (char) 27) == '8') {
            AFa1uSDK values2 = AFa1uSDK.values();
            values2.AFInAppEventParameterName = str;
            values2.afDebugLog = map;
            throw null;
        }
        AFa1uSDK values3 = AFa1uSDK.values();
        values3.AFInAppEventParameterName = str;
        values3.afDebugLog = map;
        int i11 = onValidateInApp + 53;
        AppsFlyerLib = i11 % 128;
        int i12 = i11 % 2;
    }

    @Override
    public final void enableFacebookDeferredApplinks(boolean z10) {
        int i10 = AppsFlyerLib + 97;
        int i11 = i10 % 128;
        onValidateInApp = i11;
        int i12 = i10 % 2;
        this.onResponseError = z10;
        int i13 = i11 + 1;
        AppsFlyerLib = i13 % 128;
        if (i13 % 2 == 0) {
            throw null;
        }
    }

    @Override
    @Nullable
    public final String getAppsFlyerUID(@NonNull Context context) {
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("getAppsFlyerUID", new String[0]);
        if (context == null) {
            int i10 = onValidateInApp + 109;
            AppsFlyerLib = i10 % 128;
            if (i10 % 2 == 0) {
                int i11 = 68 / 0;
            }
            return null;
        }
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        int i12 = onValidateInApp + 9;
        int i13 = i12 % 128;
        AppsFlyerLib = i13;
        int i14 = i12 % 2;
        AFb1dSDK aFb1dSDK = aFb1bSDK.values;
        int i15 = i13 + 95;
        onValidateInApp = i15 % 128;
        if (i15 % 2 == 0) {
            aFb1dSDK.values = context.getApplicationContext();
            return AFb1uSDK.AFInAppEventParameterName(new WeakReference(this.AppsFlyerConversionListener.valueOf().AFKeystoreWrapper.values));
        }
        aFb1dSDK.values = context.getApplicationContext();
        throw null;
    }

    @Override
    public final String getAttributionId(Context context) {
        try {
            String valueOf2 = new AFb1ySDK(context, AFInAppEventType()).valueOf();
            int i10 = AppsFlyerLib + 79;
            onValidateInApp = i10 % 128;
            if (i10 % 2 == 0) {
                return valueOf2;
            }
            throw null;
        } catch (Throwable th2) {
            AFLogger.afErrorLog("Could not collect facebook attribution id. ", th2);
            return null;
        }
    }

    @Override
    public final String getHostName() {
        int i10 = AppsFlyerLib + 25;
        onValidateInApp = i10 % 128;
        if (!(i10 % 2 == 0)) {
            AFKeystoreWrapper("custom_host");
            throw null;
        }
        String AFKeystoreWrapper2 = AFKeystoreWrapper("custom_host");
        if (AFKeystoreWrapper2 != null) {
            int i11 = AppsFlyerLib + 73;
            onValidateInApp = i11 % 128;
            if (i11 % 2 == 0) {
                return AFKeystoreWrapper2;
            }
            throw null;
        }
        return "appsflyer.com";
    }

    @Override
    public final String getHostPrefix() {
        int i10 = AppsFlyerLib + 97;
        onValidateInApp = i10 % 128;
        if (!(i10 % 2 == 0)) {
            AFKeystoreWrapper("custom_host_prefix");
            throw null;
        }
        String AFKeystoreWrapper2 = AFKeystoreWrapper("custom_host_prefix");
        if (!(AFKeystoreWrapper2 != null)) {
            AFKeystoreWrapper2 = "";
            int i11 = onValidateInApp + 29;
            AppsFlyerLib = i11 % 128;
            if (i11 % 2 == 0) {
                int i12 = 49 / 0;
                return "";
            }
        }
        return AFKeystoreWrapper2;
    }

    @Override
    public final String getOutOfStore(Context context) {
        String string;
        int i10 = onValidateInApp + 33;
        AppsFlyerLib = i10 % 128;
        if (i10 % 2 != 0) {
            string = AppsFlyerProperties.getInstance().getString("api_store_value");
        } else {
            string = AppsFlyerProperties.getInstance().getString("api_store_value");
            int i11 = 23 / 0;
        }
    }

    @Override
    public final String getSdkVersion() {
        int i10 = AppsFlyerLib + 97;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        AFc1ySDK AFInAppEventType2 = AFInAppEventType();
        AFInAppEventType2.afWarnLog().AFKeystoreWrapper("getSdkVersion", new String[0]);
        AFInAppEventType2.valueOf();
        String values2 = AFb1cSDK.values();
        int i12 = onValidateInApp + 17;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
        return values2;
    }

    @Override
    public final AppsFlyerLib init(@NonNull String str, AppsFlyerConversionListener appsFlyerConversionListener, @NonNull Context context) {
        if (this.onConversionDataSuccess) {
            return this;
        }
        this.onConversionDataSuccess = true;
        this.AppsFlyerConversionListener.AFLogger$LogLevel().AFInAppEventType = str;
        AFb1tSDK.valueOf(str);
        if ((context != null ? '\n' : '\b') != '\b') {
            this.onConversionDataFail = (Application) context.getApplicationContext();
            AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
            int i10 = AppsFlyerLib + 49;
            int i11 = i10 % 128;
            onValidateInApp = i11;
            int i12 = i10 % 2;
            AFb1dSDK aFb1dSDK = aFb1bSDK.values;
            int i13 = i11 + 53;
            AppsFlyerLib = i13 % 128;
            int i14 = i13 % 2;
            aFb1dSDK.values = context.getApplicationContext();
            AFInAppEventType().afDebugLog().AFInAppEventType = System.currentTimeMillis();
            AFInAppEventType().afInfoLog().values(null);
            AFe1fSDK level = AFInAppEventType().getLevel();
            final AFe1lSDK aFe1lSDK = new AFe1lSDK(new AnonymousClass2());
            Runnable runnable = new Runnable() {
                @Override
                public final void run() {
                    SharedPreferences AFKeystoreWrapper2 = AFa1aSDK.AFKeystoreWrapper(AFa1aSDK.valueOf(AFa1aSDK.this));
                    int valueOf2 = AFa1aSDK.valueOf(AFKeystoreWrapper2, false);
                    boolean z10 = AFKeystoreWrapper2.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false);
                    boolean z11 = aFe1lSDK.AFKeystoreWrapper == AFe1iSDK.AFa1xSDK.NOT_STARTED;
                    if (valueOf2 == 1) {
                        if (z11 || z10) {
                            AFa1aSDK aFa1aSDK = AFa1aSDK.this;
                            AFd1cSDK aFd1cSDK = new AFd1cSDK();
                            Application valueOf3 = AFa1aSDK.valueOf(AFa1aSDK.this);
                            if (valueOf3 != null) {
                                aFd1cSDK.AFInAppEventParameterName = (Application) valueOf3.getApplicationContext();
                            }
                            AFa1aSDK.AFInAppEventParameterName(aFa1aSDK, aFd1cSDK);
                        }
                    }
                }
            };
            level.values(aFe1lSDK);
            level.values(new AFe1hSDK(runnable));
            level.values(new AFe1mSDK(runnable, AFInAppEventType()));
            level.values(new AFe1jSDK(runnable, AFInAppEventType()));
            Application application = this.onConversionDataFail;
            AFc1ySDK AFInAppEventType2 = AFInAppEventType();
            List<ResolveInfo> queryIntentContentProviders = application.getPackageManager().queryIntentContentProviders(new Intent("com.appsflyer.referrer.INSTALL_PROVIDER"), 0);
            if (queryIntentContentProviders != null && !queryIntentContentProviders.isEmpty()) {
                ArrayList arrayList = new ArrayList();
                for (ResolveInfo resolveInfo : queryIntentContentProviders) {
                    ProviderInfo providerInfo = resolveInfo.providerInfo;
                    if (providerInfo != null) {
                        arrayList.add(new AFe1kSDK(providerInfo, runnable, AFInAppEventType2));
                    } else {
                        AFLogger.afWarnLog("[Preinstall]: com.appsflyer.referrer.INSTALL_PROVIDER Action is set for non ContentProvider component");
                    }
                }
                if (!arrayList.isEmpty()) {
                    level.valueOf.addAll(arrayList);
                    StringBuilder sb2 = new StringBuilder("[Preinstall]: Detected ");
                    sb2.append(arrayList.size());
                    sb2.append(" valid preinstall provider(s)");
                    AFLogger.afDebugLog(sb2.toString());
                }
            }
            for (AFe1iSDK aFe1iSDK : level.AFKeystoreWrapper()) {
                aFe1iSDK.AFKeystoreWrapper(this.onConversionDataFail);
            }
            this.AppsFlyerConversionListener.AFLogger$LogLevel().AFInAppEventParameterName();
            AFb1iSDK.values = this.onConversionDataFail;
        } else {
            AFLogger.afWarnLog("context is null, Google Install Referrer will be not initialized");
        }
        AFb1pSDK AFKeystoreWrapper2 = AFb1pSDK.AFKeystoreWrapper();
        String[] strArr = new String[2];
        strArr[0] = str;
        strArr[1] = (appsFlyerConversionListener == null ? 'T' : '(') != '(' ? "null" : "conversionDataListener";
        AFKeystoreWrapper2.AFKeystoreWrapper("init", strArr);
        AFLogger.AFInAppEventParameterName(String.format("Initializing AppsFlyer SDK: (v%s.%s)", "6.9.0", values));
        AFInAppEventType = appsFlyerConversionListener;
        return this;
    }

    @Override
    public final boolean isPreInstalledApp(Context context) {
        try {
        } catch (PackageManager.NameNotFoundException e10) {
            AFLogger.afErrorLog("Could not check if app is pre installed", e10);
        }
        if (!((context.getPackageManager().getApplicationInfo(context.getPackageName(), 0).flags & 1) == 0)) {
            int i10 = onValidateInApp + 91;
            AppsFlyerLib = i10 % 128;
            return (i10 % 2 == 0 ? 'H' : ',') != 'H';
        }
        int i11 = AppsFlyerLib + 51;
        onValidateInApp = i11 % 128;
        int i12 = i11 % 2;
        return false;
    }

    @Override
    @Deprecated
    public final boolean isStopped() {
        int i10 = onValidateInApp + 93;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        boolean values2 = this.AppsFlyerConversionListener.AFLogger$LogLevel().values();
        int i12 = AppsFlyerLib + 25;
        onValidateInApp = i12 % 128;
        if ((i12 % 2 != 0 ? 'F' : 'W') != 'F') {
            return values2;
        }
        throw null;
    }

    @Override
    public final void logEvent(Context context, String str, Map<String, Object> map) {
        int i10 = AppsFlyerLib + 47;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        logEvent(context, str, map, null);
        int i12 = AppsFlyerLib + 13;
        onValidateInApp = i12 % 128;
        if (i12 % 2 == 0) {
            return;
        }
        throw null;
    }

    @Override
    public final void logEvent(@NonNull Context context, String str, Map<String, Object> map, AppsFlyerRequestListener appsFlyerRequestListener) {
        HashMap hashMap = map == null ? null : new HashMap(map);
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        if (context != null) {
            aFb1bSDK.values.values = context.getApplicationContext();
        }
        AFe1xSDK aFe1xSDK = new AFe1xSDK();
        if (context != null) {
            aFe1xSDK.AFInAppEventParameterName = (Application) context.getApplicationContext();
        }
        aFe1xSDK.afErrorLog = str;
        aFe1xSDK.valueOf = 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(IjkMediaPlayer.OnNativeInvokeListener.ARG_ERROR, "Parsing failed due to invalid input in 'af_touch_obj'.");
                AFLogger.valueOf("Parsing failed due to invalid input in 'af_touch_obj'.");
            }
            Map<String, ?> singletonMap = Collections.singletonMap("tch_data", hashMap2);
            hashMap.remove(AFInAppEventParameterName.TOUCH_OBJ);
            aFe1xSDK.AFKeystoreWrapper(singletonMap);
        }
        aFe1xSDK.AFKeystoreWrapper = hashMap;
        AFb1pSDK afWarnLog2 = AFInAppEventType().afWarnLog();
        String[] strArr = new String[2];
        strArr[0] = str;
        Map map2 = aFe1xSDK.AFKeystoreWrapper;
        if (map2 == null) {
            map2 = new HashMap();
        }
        strArr[1] = new JSONObject(map2).toString();
        afWarnLog2.AFKeystoreWrapper("logEvent", strArr);
        if (str == null) {
            AFInAppEventParameterName(context, AFd1bSDK.logEvent);
        }
        valueOf(aFe1xSDK, context instanceof Activity ? (Activity) context : null);
    }

    @Override
    public final void logLocation(Context context, double d9, double d10) {
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("logLocation", String.valueOf(d9), String.valueOf(d10));
        HashMap hashMap = new HashMap();
        hashMap.put(AFInAppEventParameterName.LONGTITUDE, Double.toString(d10));
        hashMap.put(AFInAppEventParameterName.LATITUDE, Double.toString(d9));
        AFInAppEventType(context, AFInAppEventType.LOCATION_COORDINATES, hashMap);
        int i10 = AppsFlyerLib + 63;
        onValidateInApp = i10 % 128;
        if ((i10 % 2 != 0 ? '\r' : (char) 4) == 4) {
            return;
        }
        throw null;
    }

    @Override
    public final void logSession(Context context) {
        int i10 = AppsFlyerLib + 85;
        onValidateInApp = i10 % 128;
        if ((i10 % 2 != 0 ? '\b' : (char) 18) != 18) {
            AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("logSession", new String[1]);
        } else {
            AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("logSession", new String[0]);
        }
        AFb1pSDK.AFKeystoreWrapper().afDebugLog();
        AFInAppEventParameterName(context, AFd1bSDK.logSession);
        AFInAppEventType(context, (String) null, (Map<String, Object>) null);
    }

    @Override
    public final void onPause(Context context) {
        int i10 = onValidateInApp + 23;
        AppsFlyerLib = i10 % 128;
        if (!(i10 % 2 != 0)) {
            throw null;
        }
        AFb1zSDK.AFa1zSDK aFa1zSDK = AFb1zSDK.AFKeystoreWrapper;
        if (aFa1zSDK != null) {
            aFa1zSDK.values(context);
            int i11 = onValidateInApp + 109;
            AppsFlyerLib = i11 % 128;
            int i12 = i11 % 2;
        }
    }

    @Override
    @Deprecated
    public final void performOnAppAttribution(@NonNull Context context, @NonNull URI uri) {
        int i10 = onValidateInApp + 27;
        int i11 = i10 % 128;
        AppsFlyerLib = i11;
        int i12 = i10 % 2;
        if ((uri != null ? '<' : '/') != '/') {
            int i13 = i11 + 13;
            onValidateInApp = i13 % 128;
            int i14 = i13 % 2;
            if (!uri.toString().isEmpty()) {
                if (context != null) {
                    AFa1uSDK.values();
                    AFa1uSDK.AFInAppEventType(context, new HashMap(), Uri.parse(uri.toString()));
                    return;
                }
                StringBuilder sb2 = new StringBuilder("Context is \"");
                sb2.append(context);
                sb2.append("\"");
                AFb1kSDK.AFInAppEventType(sb2.toString(), DeepLinkResult.Error.NETWORK);
                return;
            }
        }
        StringBuilder sb3 = new StringBuilder("Link is \"");
        sb3.append(uri);
        sb3.append("\"");
        AFb1kSDK.AFInAppEventType(sb3.toString(), DeepLinkResult.Error.NETWORK);
    }

    @Override
    public final void performOnDeepLinking(@NonNull Intent intent, @NonNull Context context) {
        int i10 = AppsFlyerLib;
        int i11 = i10 + 87;
        onValidateInApp = i11 % 128;
        int i12 = i11 % 2;
        if (intent == null) {
            int i13 = i10 + 37;
            onValidateInApp = i13 % 128;
            int i14 = i13 % 2;
            AFb1kSDK.AFInAppEventType("performOnDeepLinking was called with null intent", DeepLinkResult.Error.DEVELOPER_ERROR);
            return;
        }
        if (!(context != null)) {
            int i15 = i10 + 61;
            onValidateInApp = i15 % 128;
            int i16 = i15 % 2;
            AFb1kSDK.AFInAppEventType("performOnDeepLinking was called with null context", DeepLinkResult.Error.DEVELOPER_ERROR);
            return;
        }
        Context applicationContext = context.getApplicationContext();
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        if ((applicationContext != null ? '9' : '@') == '9') {
            int i17 = AppsFlyerLib + 17;
            onValidateInApp = i17 % 128;
            int i18 = i17 % 2;
            AFb1dSDK aFb1dSDK = aFb1bSDK.values;
            if (applicationContext != null) {
                aFb1dSDK.values = applicationContext.getApplicationContext();
            }
        }
        this.AppsFlyerConversionListener.AFInAppEventType().execute(new a(this, applicationContext, intent, 0));
    }

    @Override
    public final void registerConversionListener(Context context, AppsFlyerConversionListener appsFlyerConversionListener) {
        int i10 = AppsFlyerLib + 95;
        onValidateInApp = i10 % 128;
        if ((i10 % 2 != 0 ? 'G' : '&') != '&') {
            AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("registerConversionListener", new String[0]);
        } else {
            AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("registerConversionListener", new String[0]);
        }
        values(appsFlyerConversionListener);
        int i11 = onValidateInApp + 55;
        AppsFlyerLib = i11 % 128;
        if (!(i11 % 2 == 0)) {
            return;
        }
        throw null;
    }

    @Override
    public final void registerValidatorListener(Context context, AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener) {
        int i10 = onValidateInApp + 29;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("registerValidatorListener", new String[0]);
        AFLogger.afDebugLog("registerValidatorListener called");
        if ((appsFlyerInAppPurchaseValidatorListener == null ? '\"' : '!') != '!') {
            AFLogger.afDebugLog("registerValidatorListener null listener");
            return;
        }
        AFInAppEventParameterName = appsFlyerInAppPurchaseValidatorListener;
        int i12 = AppsFlyerLib + 15;
        onValidateInApp = i12 % 128;
        int i13 = i12 % 2;
    }

    @Override
    public final void sendAdRevenue(Context context, Map<String, Object> map) {
        AFb1cSDK valueOf2 = this.AppsFlyerConversionListener.valueOf();
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        if ((context != null ? 'B' : (char) 20) == 'B') {
            int i10 = onValidateInApp + 101;
            AppsFlyerLib = i10 % 128;
            if (i10 % 2 == 0) {
                AFb1dSDK aFb1dSDK = aFb1bSDK.values;
                throw null;
            }
            AFb1dSDK aFb1dSDK2 = aFb1bSDK.values;
            if (context != null) {
                aFb1dSDK2.values = context.getApplicationContext();
                int i11 = AppsFlyerLib + 91;
                onValidateInApp = i11 % 128;
                int i12 = i11 % 2;
            }
        }
        AFd1aSDK aFd1aSDK = new AFd1aSDK();
        if (!(context == null)) {
            int i13 = onValidateInApp + 53;
            AppsFlyerLib = i13 % 128;
            if ((i13 % 2 == 0 ? 'R' : '?') != '?') {
                aFd1aSDK.AFInAppEventParameterName = (Application) context.getApplicationContext();
                int i14 = 35 / 0;
            } else {
                aFd1aSDK.AFInAppEventParameterName = (Application) context.getApplicationContext();
            }
        }
        StringBuilder b10 = androidx.core.graphics.a.b(String.format(afRDLog, AppsFlyerLib.getInstance().getHostPrefix(), values().getHostName()));
        b10.append(valueOf2.AFKeystoreWrapper.values.getPackageName());
        String obj = b10.toString();
        int AFInAppEventType2 = valueOf2.AFInAppEventType.AFInAppEventType("appsFlyerAdRevenueCount");
        Map<String, Object> values2 = values(aFd1aSDK);
        values2.put("ad_network", map);
        values2.put("adrevenue_counter", Integer.valueOf(AFInAppEventType2));
        new AFa1vSDK(this, aFd1aSDK.AFKeystoreWrapper(obj).AFKeystoreWrapper(values2).AFKeystoreWrapper(valueOf2.AFInAppEventType.AFInAppEventType("appsFlyerCount")), (byte) 0).run();
    }

    @Override
    public final void sendInAppPurchaseData(Context context, Map<String, Object> map, PurchaseHandler.PurchaseValidationCallback purchaseValidationCallback) {
        int i10 = onValidateInApp + 23;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        Context applicationContext = context.getApplicationContext();
        if (applicationContext != null) {
            int i12 = AppsFlyerLib + 85;
            onValidateInApp = i12 % 128;
            int i13 = i12 % 2;
            AFb1dSDK aFb1dSDK = aFb1bSDK.values;
            if (!(applicationContext == null)) {
                aFb1dSDK.values = applicationContext.getApplicationContext();
            }
        }
        PurchaseHandler AFLogger2 = AFInAppEventType().AFLogger();
        if (AFLogger2.AFKeystoreWrapper(map, purchaseValidationCallback, "purchases")) {
            AFc1bSDK aFc1bSDK = new AFc1bSDK(map, purchaseValidationCallback, AFLogger2.AFInAppEventParameterName);
            AFc1mSDK aFc1mSDK = AFLogger2.values;
            aFc1mSDK.valueOf.execute(new AFc1mSDK.AnonymousClass5(aFc1bSDK));
        }
        int i14 = onValidateInApp + 23;
        AppsFlyerLib = i14 % 128;
        int i15 = i14 % 2;
    }

    @Override
    public final void sendPurchaseData(Context context, Map<String, Object> map, PurchaseHandler.PurchaseValidationCallback purchaseValidationCallback) {
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        Context applicationContext = context.getApplicationContext();
        if (applicationContext != null) {
            AFb1dSDK aFb1dSDK = aFb1bSDK.values;
            if ((applicationContext != null ? '\n' : (char) 31) == '\n') {
                int i10 = onValidateInApp + 57;
                AppsFlyerLib = i10 % 128;
                if (i10 % 2 == 0) {
                    aFb1dSDK.values = applicationContext.getApplicationContext();
                    int i11 = 60 / 0;
                } else {
                    aFb1dSDK.values = applicationContext.getApplicationContext();
                }
                int i12 = onValidateInApp + 41;
                AppsFlyerLib = i12 % 128;
                int i13 = i12 % 2;
            }
        }
        PurchaseHandler AFLogger2 = AFInAppEventType().AFLogger();
        if (AFLogger2.AFKeystoreWrapper(map, purchaseValidationCallback, BillingClient.FeatureType.SUBSCRIPTIONS)) {
            AFc1dSDK aFc1dSDK = new AFc1dSDK(map, purchaseValidationCallback, AFLogger2.AFInAppEventParameterName);
            AFc1mSDK aFc1mSDK = AFLogger2.values;
            aFc1mSDK.valueOf.execute(new AFc1mSDK.AnonymousClass5(aFc1dSDK));
        }
    }

    @Override
    public final void sendPushNotificationData(@NonNull Activity activity) {
        long j10;
        long j11;
        JSONObject jSONObject;
        JSONObject jSONObject2;
        int i10;
        int i11 = AppsFlyerLib + 25;
        onValidateInApp = i11 % 128;
        int i12 = i11 % 2;
        if (activity != null && activity.getIntent() != null) {
            AFb1pSDK AFKeystoreWrapper2 = AFb1pSDK.AFKeystoreWrapper();
            StringBuilder sb2 = new StringBuilder("activity_intent_");
            sb2.append(activity.getIntent().toString());
            AFKeystoreWrapper2.AFKeystoreWrapper("sendPushNotificationData", activity.getLocalClassName(), sb2.toString());
        } else if (activity != null) {
            AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("sendPushNotificationData", activity.getLocalClassName(), "activity_intent_null");
        } else {
            AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("sendPushNotificationData", "activity_null");
        }
        String AFInAppEventType2 = AFInAppEventType(activity);
        this.AppsFlyer2dXConversionCallback = AFInAppEventType2;
        if ((AFInAppEventType2 != null ? '7' : '\f') != '\f') {
            long currentTimeMillis = System.currentTimeMillis();
            if (this.onInstallConversionDataLoadedNative == null) {
                AFLogger.afInfoLog("pushes: initializing pushes history..");
                this.onInstallConversionDataLoadedNative = new ConcurrentHashMap();
                j10 = currentTimeMillis;
            } else {
                try {
                    j11 = AppsFlyerProperties.getInstance().getLong("pushPayloadMaxAging", 1800000L);
                    j10 = currentTimeMillis;
                } catch (Throwable th2) {
                    th = th2;
                    j10 = currentTimeMillis;
                }
                for (Long l10 : this.onInstallConversionDataLoadedNative.keySet()) {
                    try {
                        jSONObject = new JSONObject(this.AppsFlyer2dXConversionCallback);
                        jSONObject2 = new JSONObject(this.onInstallConversionDataLoadedNative.get(l10));
                    } catch (Throwable th3) {
                        th = th3;
                    }
                    if ((jSONObject.opt("pid").equals(jSONObject2.opt("pid")) ? (char) 1 : '(') != '(') {
                        int i13 = onValidateInApp + 85;
                        AppsFlyerLib = i13 % 128;
                        if (i13 % 2 == 0) {
                            int i14 = 83 / 0;
                            if (jSONObject.opt("c").equals(jSONObject2.opt("c"))) {
                                StringBuilder sb3 = new StringBuilder("PushNotificationMeasurement: A previous payload with same PID and campaign was already acknowledged! (old: ");
                                sb3.append(jSONObject2);
                                sb3.append(", new: ");
                                sb3.append(jSONObject);
                                sb3.append(")");
                                AFLogger.afInfoLog(sb3.toString());
                                this.AppsFlyer2dXConversionCallback = null;
                                i10 = AppsFlyerLib + 115;
                                onValidateInApp = i10 % 128;
                                if (i10 % 2 == 0) {
                                    int i15 = 87 / 0;
                                    return;
                                }
                                return;
                            }
                        } else if (jSONObject.opt("c").equals(jSONObject2.opt("c"))) {
                            StringBuilder sb32 = new StringBuilder("PushNotificationMeasurement: A previous payload with same PID and campaign was already acknowledged! (old: ");
                            sb32.append(jSONObject2);
                            sb32.append(", new: ");
                            sb32.append(jSONObject);
                            sb32.append(")");
                            AFLogger.afInfoLog(sb32.toString());
                            this.AppsFlyer2dXConversionCallback = null;
                            i10 = AppsFlyerLib + 115;
                            onValidateInApp = i10 % 128;
                            if (i10 % 2 == 0) {
                            }
                        }
                        th = th3;
                        StringBuilder sb4 = new StringBuilder("Error while handling push notification measurement: ");
                        sb4.append(th.getClass().getSimpleName());
                        AFLogger.afErrorLog(sb4.toString(), th);
                    }
                    if ((currentTimeMillis - l10.longValue() > j11 ? (char) 17 : 'c') == 17) {
                        this.onInstallConversionDataLoadedNative.remove(l10);
                    }
                    if (l10.longValue() <= j10) {
                        j10 = l10.longValue();
                    }
                }
            }
            if (this.onInstallConversionDataLoadedNative.size() == AppsFlyerProperties.getInstance().getInt("pushPayloadHistorySize", 2)) {
                StringBuilder sb5 = new StringBuilder("pushes: removing oldest overflowing push (oldest push:");
                sb5.append(j10);
                sb5.append(")");
                AFLogger.afInfoLog(sb5.toString());
                this.onInstallConversionDataLoadedNative.remove(Long.valueOf(j10));
            }
            this.onInstallConversionDataLoadedNative.put(Long.valueOf(currentTimeMillis), this.AppsFlyer2dXConversionCallback);
            start(activity);
        }
    }

    @Override
    public final void setAdditionalData(Map<String, Object> map) {
        if (map != null) {
            AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setAdditionalData", map.toString());
            AppsFlyerProperties.getInstance().setCustomData(new JSONObject(map).toString());
            int i10 = AppsFlyerLib + 7;
            onValidateInApp = i10 % 128;
            int i11 = i10 % 2;
        }
        int i12 = onValidateInApp + 99;
        AppsFlyerLib = i12 % 128;
        if (i12 % 2 != 0) {
            return;
        }
        throw null;
    }

    @Override
    public final void setAndroidIdData(String str) {
        int i10 = AppsFlyerLib + 9;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setAndroidIdData", str);
        this.afErrorLog = str;
        int i12 = onValidateInApp + 27;
        AppsFlyerLib = i12 % 128;
        if ((i12 % 2 == 0 ? 'X' : '5') == '5') {
            return;
        }
        throw null;
    }

    @Override
    public final void setAppId(String str) {
        int i10 = AppsFlyerLib + 31;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setAppId", str);
        values(AppsFlyerProperties.APP_ID, str);
        int i12 = AppsFlyerLib + 83;
        onValidateInApp = i12 % 128;
        int i13 = i12 % 2;
    }

    @Override
    public final void setAppInviteOneLink(String str) {
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setAppInviteOneLink", str);
        AFLogger.afInfoLog("setAppInviteOneLink = ".concat(String.valueOf(str)));
        if ((str != null ? ' ' : '=') == ' ') {
            int i10 = onValidateInApp + 33;
            AppsFlyerLib = i10 % 128;
            if (i10 % 2 == 0) {
                str.equals(AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.ONELINK_ID));
                throw null;
            }
        }
        AppsFlyerProperties.getInstance().remove(AppsFlyerProperties.ONELINK_DOMAIN);
        AppsFlyerProperties.getInstance().remove("onelinkVersion");
        AppsFlyerProperties.getInstance().remove(AppsFlyerProperties.ONELINK_SCHEME);
        int i11 = AppsFlyerLib + 85;
        onValidateInApp = i11 % 128;
        int i12 = i11 % 2;
        values(AppsFlyerProperties.ONELINK_ID, str);
        int i13 = onValidateInApp + 75;
        AppsFlyerLib = i13 % 128;
        if (i13 % 2 != 0) {
            return;
        }
        throw null;
    }

    @Override
    public final void setCollectAndroidID(boolean z10) {
        int i10 = onValidateInApp + 35;
        AppsFlyerLib = i10 % 128;
        if ((i10 % 2 == 0 ? (char) 3 : '\\') != 3) {
            AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setCollectAndroidID", String.valueOf(z10));
        } else {
            AFb1pSDK AFKeystoreWrapper2 = AFb1pSDK.AFKeystoreWrapper();
            String[] strArr = new String[1];
            strArr[1] = String.valueOf(z10);
            AFKeystoreWrapper2.AFKeystoreWrapper("setCollectAndroidID", strArr);
        }
        values(AppsFlyerProperties.COLLECT_ANDROID_ID, Boolean.toString(z10));
        values(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, Boolean.toString(z10));
        int i11 = onValidateInApp + 47;
        AppsFlyerLib = i11 % 128;
        int i12 = i11 % 2;
    }

    @Override
    public final void setCollectIMEI(boolean z10) {
        int i10 = onValidateInApp + 53;
        AppsFlyerLib = i10 % 128;
        if (i10 % 2 == 0) {
            AFb1pSDK AFKeystoreWrapper2 = AFb1pSDK.AFKeystoreWrapper();
            String[] strArr = new String[0];
            strArr[1] = String.valueOf(z10);
            AFKeystoreWrapper2.AFKeystoreWrapper("setCollectIMEI", strArr);
        } else {
            AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setCollectIMEI", String.valueOf(z10));
        }
        values(AppsFlyerProperties.COLLECT_IMEI, Boolean.toString(z10));
        values(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, Boolean.toString(z10));
    }

    @Override
    @Deprecated
    public final void setCollectOaid(boolean z10) {
        int i10 = onValidateInApp + 1;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setCollectOaid", String.valueOf(z10));
        values(AppsFlyerProperties.COLLECT_OAID, Boolean.toString(z10));
        int i12 = onValidateInApp + 115;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
    }

    @Override
    public final void setCurrencyCode(String str) {
        int i10 = onValidateInApp + 45;
        AppsFlyerLib = i10 % 128;
        if ((i10 % 2 == 0 ? 'W' : ' ') != 'W') {
            AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setCurrencyCode", str);
        } else {
            AFb1pSDK AFKeystoreWrapper2 = AFb1pSDK.AFKeystoreWrapper();
            String[] strArr = new String[0];
            strArr[1] = str;
            AFKeystoreWrapper2.AFKeystoreWrapper("setCurrencyCode", strArr);
        }
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.CURRENCY_CODE, str);
    }

    @Override
    public final void setCustomerIdAndLogSession(String str, @NonNull Context context) {
        if (context != null) {
            int i10 = AppsFlyerLib + 95;
            onValidateInApp = i10 % 128;
            if (i10 % 2 != 0) {
                valueOf();
                throw null;
            } else if (!valueOf()) {
                setCustomerUserId(str);
                AFLogger.afInfoLog("waitForCustomerUserId is false; setting CustomerUserID: ".concat(String.valueOf(str)), true);
            } else {
                setCustomerUserId(str);
                StringBuilder sb2 = new StringBuilder("CustomerUserId set: ");
                sb2.append(str);
                sb2.append(" - Initializing AppsFlyer Tacking");
                AFLogger.afInfoLog(sb2.toString(), true);
                String referrer = AppsFlyerProperties.getInstance().getReferrer(context);
                AFInAppEventParameterName(context, AFd1bSDK.setCustomerIdAndLogSession);
                String str2 = this.AppsFlyerConversionListener.AFLogger$LogLevel().AFInAppEventType;
                if (referrer != null) {
                    int i11 = onValidateInApp + 45;
                    AppsFlyerLib = i11 % 128;
                    int i12 = i11 % 2;
                } else {
                    int i13 = AppsFlyerLib + 119;
                    onValidateInApp = i13 % 128;
                    int i14 = i13 % 2;
                    referrer = "";
                }
                String str3 = referrer;
                if (context instanceof Activity) {
                    ((Activity) context).getIntent();
                    int i15 = AppsFlyerLib + 65;
                    onValidateInApp = i15 % 128;
                    int i16 = i15 % 2;
                }
                valueOf(context, null, null, str3, null);
            }
        }
    }

    @Override
    public final void setCustomerUserId(String str) {
        int i10 = AppsFlyerLib + 87;
        onValidateInApp = i10 % 128;
        if (!(i10 % 2 == 0)) {
            AFb1pSDK AFKeystoreWrapper2 = AFb1pSDK.AFKeystoreWrapper();
            String[] strArr = new String[0];
            strArr[0] = str;
            AFKeystoreWrapper2.AFKeystoreWrapper("setCustomerUserId", strArr);
            AFLogger.afInfoLog("setCustomerUserId = ".concat(String.valueOf(str)));
            values(AppsFlyerProperties.APP_USER_ID, str);
            AFKeystoreWrapper(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, true);
        } else {
            AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setCustomerUserId", str);
            AFLogger.afInfoLog("setCustomerUserId = ".concat(String.valueOf(str)));
            values(AppsFlyerProperties.APP_USER_ID, str);
            AFKeystoreWrapper(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false);
        }
        int i11 = AppsFlyerLib + 103;
        onValidateInApp = i11 % 128;
        int i12 = i11 % 2;
    }

    @Override
    public final void setDebugLog(boolean z10) {
        AFLogger.LogLevel logLevel;
        int i10 = onValidateInApp + 79;
        AppsFlyerLib = i10 % 128;
        if (i10 % 2 == 0) {
            throw null;
        }
        if (!(z10)) {
            logLevel = AFLogger.LogLevel.NONE;
            int i11 = AppsFlyerLib + 97;
            onValidateInApp = i11 % 128;
            int i12 = i11 % 2;
        } else {
            logLevel = AFLogger.LogLevel.DEBUG;
        }
        setLogLevel(logLevel);
    }

    @Override
    public final void setDisableAdvertisingIdentifiers(boolean z10) {
        boolean z11;
        int i10 = AppsFlyerLib + 67;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        AFLogger.afDebugLog("setDisableAdvertisingIdentifiers: ".concat(String.valueOf(z10)));
        if ((!z10 ? '\f' : '!') != '!') {
            int i12 = AppsFlyerLib + 57;
            onValidateInApp = i12 % 128;
            int i13 = i12 % 2;
            z11 = true;
        } else {
            z11 = false;
        }
        AFb1xSDK.AFKeystoreWrapper = Boolean.valueOf(z11);
        AppsFlyerProperties.getInstance().remove("advertiserIdEnabled");
        AppsFlyerProperties.getInstance().remove("advertiserId");
        int i14 = onValidateInApp + 79;
        AppsFlyerLib = i14 % 128;
        if ((i14 % 2 == 0 ? '8' : ':') != '8') {
            return;
        }
        throw null;
    }

    @Override
    public final void setDisableNetworkData(boolean z10) {
        int i10 = AppsFlyerLib + 17;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        AFLogger.afDebugLog("setDisableNetworkData: ".concat(String.valueOf(z10)));
        AFKeystoreWrapper(AppsFlyerProperties.DISABLE_NETWORK_DATA, z10);
        int i12 = onValidateInApp + 113;
        AppsFlyerLib = i12 % 128;
        if ((i12 % 2 == 0 ? 'D' : '<') != '<') {
            int i13 = 85 / 0;
        }
    }

    @Override
    public final void setExtension(String str) {
        int i10 = AppsFlyerLib + 49;
        onValidateInApp = i10 % 128;
        if (!(i10 % 2 == 0)) {
            AFb1pSDK AFKeystoreWrapper2 = AFb1pSDK.AFKeystoreWrapper();
            String[] strArr = new String[0];
            strArr[1] = str;
            AFKeystoreWrapper2.AFKeystoreWrapper("setExtension", strArr);
        } else {
            AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setExtension", str);
        }
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EXTENSION, str);
    }

    @Override
    public final void setHost(String str, String str2) {
        int i10 = onValidateInApp + 7;
        int i11 = i10 % 128;
        AppsFlyerLib = i11;
        if (i10 % 2 == 0) {
            throw null;
        }
        if (str != null) {
            int i12 = i11 + 105;
            onValidateInApp = i12 % 128;
            if (i12 % 2 != 0) {
                values("custom_host_prefix", str);
                int i13 = 3 / 0;
            } else {
                values("custom_host_prefix", str);
            }
        }
        if (str2 != null) {
            if ((!str2.isEmpty() ? '\n' : '4') != '4') {
                int i14 = AppsFlyerLib + 25;
                onValidateInApp = i14 % 128;
                if (i14 % 2 == 0) {
                    values("custom_host", str2);
                    return;
                } else {
                    values("custom_host", str2);
                    throw null;
                }
            }
        }
        AFLogger.afWarnLog("hostName cannot be null or empty");
    }

    @Override
    public final void setImeiData(String str) {
        int i10 = AppsFlyerLib + 123;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setImeiData", str);
        this.AppsFlyerConversionListener.AFLogger$LogLevel().AFKeystoreWrapper = str;
        int i12 = onValidateInApp + 21;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
    }

    @Override
    public final void setIsUpdate(boolean z10) {
        int i10 = AppsFlyerLib + 115;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setIsUpdate", String.valueOf(z10));
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.IS_UPDATE, z10);
        int i12 = onValidateInApp + 115;
        AppsFlyerLib = i12 % 128;
        if (i12 % 2 != 0) {
            return;
        }
        throw null;
    }

    @Override
    public final void setLogLevel(@NonNull AFLogger.LogLevel logLevel) {
        boolean z10;
        if (logLevel.getLevel() <= AFLogger.LogLevel.NONE.getLevel()) {
            z10 = false;
        } else {
            int i10 = onValidateInApp + 77;
            int i11 = i10 % 128;
            AppsFlyerLib = i11;
            int i12 = i10 % 2;
            int i13 = i11 + 121;
            onValidateInApp = i13 % 128;
            int i14 = i13 % 2;
            z10 = true;
        }
        this.AppsFlyerConversionListener.afWarnLog().AFKeystoreWrapper("log", String.valueOf(z10));
        AppsFlyerProperties.getInstance().set("logLevel", logLevel.getLevel());
    }

    @Override
    public final void setMinTimeBetweenSessions(int i10) {
        int i11 = onValidateInApp + 9;
        AppsFlyerLib = i11 % 128;
        if (i11 % 2 != 0) {
            this.onAppOpenAttributionNative = TimeUnit.SECONDS.toMillis(i10);
        } else {
            this.onAppOpenAttributionNative = TimeUnit.SECONDS.toMillis(i10);
            throw null;
        }
    }

    @Override
    public final void setOaidData(String str) {
        int i10 = onValidateInApp + 105;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setOaidData", str);
        AFb1xSDK.valueOf = str;
        int i12 = onValidateInApp + 21;
        AppsFlyerLib = i12 % 128;
        if (i12 % 2 != 0) {
            return;
        }
        throw null;
    }

    @Override
    public final void setOneLinkCustomDomain(String... strArr) {
        int i10 = AppsFlyerLib + 53;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        AFLogger.afDebugLog(String.format("setOneLinkCustomDomain %s", Arrays.toString(strArr)));
        AFa1uSDK.values = strArr;
        int i12 = onValidateInApp + 81;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
    }

    @Override
    public final void setOutOfStore(String str) {
        int i10 = AppsFlyerLib;
        int i11 = i10 + 51;
        onValidateInApp = i11 % 128;
        int i12 = i11 % 2;
        if (str == null) {
            AFLogger.valueOf("Cannot set setOutOfStore with null");
            return;
        }
        int i13 = i10 + 1;
        onValidateInApp = i13 % 128;
        if (!(i13 % 2 != 0)) {
            String lowerCase = str.toLowerCase();
            AppsFlyerProperties.getInstance().set("api_store_value", lowerCase);
            AFLogger.afInfoLog("Store API set with value: ".concat(String.valueOf(lowerCase)), true);
        } else {
            String lowerCase2 = str.toLowerCase();
            AppsFlyerProperties.getInstance().set("api_store_value", lowerCase2);
            AFLogger.afInfoLog("Store API set with value: ".concat(String.valueOf(lowerCase2)), false);
        }
        int i14 = AppsFlyerLib + 83;
        onValidateInApp = i14 % 128;
        if (i14 % 2 == 0) {
            return;
        }
        throw null;
    }

    @Override
    public final void setPartnerData(@NonNull String str, Map<String, Object> map) {
        int i10 = AppsFlyerLib + 107;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        if (this.onAttributionFailure == null) {
            this.onAttributionFailure = new AFb1gSDK();
        }
        AFb1gSDK aFb1gSDK = this.onAttributionFailure;
        if (str != null) {
            int i12 = AppsFlyerLib + 25;
            onValidateInApp = i12 % 128;
            if (i12 % 2 != 0) {
                int i13 = 44 / 0;
            }
        }
        AFLogger.afWarnLog("Partner ID is missing or `null`");
    }

    @Override
    public final void setPhoneNumber(String str) {
        int i10 = AppsFlyerLib + 55;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        this.onDeepLinking = AFb1rSDK.valueOf(str);
        int i12 = AppsFlyerLib + 115;
        onValidateInApp = i12 % 128;
        int i13 = i12 % 2;
    }

    @Override
    public final void setPreinstallAttribution(String str, String str2, String str3) {
        AFLogger.afDebugLog("setPreinstallAttribution API called");
        JSONObject jSONObject = new JSONObject();
        if (str != null) {
            int i10 = AppsFlyerLib + 3;
            onValidateInApp = i10 % 128;
            int i11 = i10 % 2;
            try {
                jSONObject.put("pid", str);
            } catch (JSONException e10) {
                AFLogger.afErrorLog(e10.getMessage(), e10);
            }
        }
        if ((str2 != null ? '3' : '\n') != '\n') {
            int i12 = AppsFlyerLib + 45;
            onValidateInApp = i12 % 128;
            int i13 = i12 % 2;
            jSONObject.put("c", str2);
        }
        if ((str3 != null ? 'N' : 'H') != 'H') {
            jSONObject.put("af_siteid", str3);
            int i14 = AppsFlyerLib + 67;
            onValidateInApp = i14 % 128;
            int i15 = i14 % 2;
        }
        if (jSONObject.has("pid")) {
            values("preInstallName", jSONObject.toString());
        } else {
            AFLogger.afWarnLog("Cannot set preinstall attribution data without a media source");
        }
    }

    @Override
    public final void setResolveDeepLinkURLs(String... strArr) {
        String format;
        int i10 = onValidateInApp + 13;
        AppsFlyerLib = i10 % 128;
        if (!(i10 % 2 != 0)) {
            Object[] objArr = new Object[0];
            objArr[0] = Arrays.toString(strArr);
            format = String.format("setResolveDeepLinkURLs %s", objArr);
        } else {
            format = String.format("setResolveDeepLinkURLs %s", Arrays.toString(strArr));
        }
        AFLogger.afDebugLog(format);
        List<String> list = AFa1uSDK.valueOf;
        list.clear();
        list.addAll(Arrays.asList(strArr));
        int i11 = onValidateInApp + 75;
        AppsFlyerLib = i11 % 128;
        int i12 = i11 % 2;
    }

    @Override
    @Deprecated
    public final void setSharingFilter(@NonNull String... strArr) {
        int i10 = onValidateInApp + 113;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        setSharingFilterForPartners(strArr);
        int i12 = onValidateInApp + 47;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
    }

    @Override
    @Deprecated
    public final void setSharingFilterForAllPartners() {
        int i10 = AppsFlyerLib + 31;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        setSharingFilterForPartners("all");
        int i12 = AppsFlyerLib + 89;
        onValidateInApp = i12 % 128;
        if ((i12 % 2 != 0 ? (char) 4 : ']') != ']') {
            int i13 = 22 / 0;
        }
    }

    @Override
    public final void setSharingFilterForPartners(String... strArr) {
        this.afDebugLog = new AFa1cSDK(strArr);
        int i10 = onValidateInApp + 63;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
    }

    @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));
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setUserEmails", (String[]) arrayList.toArray(new String[strArr.length + 1]));
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EMAIL_CRYPT_TYPE, emailsCryptType.getValue());
        HashMap hashMap = new HashMap();
        ArrayList arrayList2 = new ArrayList();
        int length = strArr.length;
        String str = null;
        int i10 = 0;
        while (true) {
            if ((i10 < length ? 'Y' : '5') == '5') {
                hashMap.put(str, arrayList2);
                AppsFlyerProperties.getInstance().setUserEmails(new JSONObject(hashMap).toString());
                int i11 = AppsFlyerLib + 103;
                onValidateInApp = i11 % 128;
                if (!(i11 % 2 != 0)) {
                    return;
                }
                int i12 = 16 / 0;
                return;
            }
            int i13 = onValidateInApp + 71;
            AppsFlyerLib = i13 % 128;
            if ((i13 % 2 == 0 ? '&' : 'T') == '&') {
                String str2 = strArr[i10];
                int i14 = AnonymousClass7.AFInAppEventType[emailsCryptType.ordinal()];
                throw null;
            }
            String str3 = strArr[i10];
            if (AnonymousClass7.AFInAppEventType[emailsCryptType.ordinal()] != 2) {
                arrayList2.add(AFb1rSDK.valueOf(str3));
                str = "sha256_el_arr";
            } else {
                arrayList2.add(str3);
                str = "plain_el_arr";
            }
            i10++;
            int i15 = AppsFlyerLib + 97;
            onValidateInApp = i15 % 128;
            int i16 = i15 % 2;
        }
    }

    @Override
    public final void setUserEmails(String... strArr) {
        int i10 = AppsFlyerLib + 9;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("setUserEmails", strArr);
        setUserEmails(AppsFlyerProperties.EmailsCryptType.NONE, strArr);
        int i12 = onValidateInApp + 75;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
    }

    @Override
    public final void start(@NonNull Context context) {
        int i10 = AppsFlyerLib + 23;
        onValidateInApp = i10 % 128;
        boolean z10 = i10 % 2 == 0;
        start(context, null);
        if (!z10) {
            throw null;
        }
        int i11 = AppsFlyerLib + 11;
        onValidateInApp = i11 % 128;
        if (!(i11 % 2 != 0)) {
            return;
        }
        int i12 = 27 / 0;
    }

    @Override
    public final void start(@NonNull Context context, String str) {
        int i10 = onValidateInApp + 115;
        AppsFlyerLib = i10 % 128;
        int i11 = i10 % 2;
        start(context, str, null);
        int i12 = AppsFlyerLib + 23;
        onValidateInApp = i12 % 128;
        if ((i12 % 2 != 0 ? (char) 3 : 'A') == 'A') {
            return;
        }
        throw null;
    }

    @Override
    public final void start(@NonNull Context context, String str, final AppsFlyerRequestListener appsFlyerRequestListener) {
        if (AFb1zSDK.AFKeystoreWrapper != null) {
            return;
        }
        if (!this.onConversionDataSuccess) {
            AFLogger.afWarnLog("ERROR: AppsFlyer SDK is not initialized! The API call 'start()' must be called after the 'init(String, AppsFlyerConversionListener)' API method, which should be called on the Application's onCreate.");
            if (str == null) {
                if (appsFlyerRequestListener != null) {
                    appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1fSDK.AFInAppEventType);
                    int i10 = AppsFlyerLib + 15;
                    onValidateInApp = i10 % 128;
                    int i11 = i10 % 2;
                    return;
                }
                return;
            }
        }
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        if (context != null) {
            int i12 = AppsFlyerLib + 41;
            onValidateInApp = i12 % 128;
            if ((i12 % 2 != 0 ? (char) 16 : '\"') == 16) {
                AFb1dSDK aFb1dSDK = aFb1bSDK.values;
                throw null;
            }
            aFb1bSDK.values.values = context.getApplicationContext();
        }
        final AFd1dSDK afDebugLog = AFInAppEventType().afDebugLog();
        afDebugLog.values(AFa1lSDK.AFKeystoreWrapper(context));
        this.onConversionDataFail = (Application) context.getApplicationContext();
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("start", str);
        String str2 = values;
        AFLogger.afInfoLog(String.format("Starting AppsFlyer: (v%s.%s)", "6.9.0", str2));
        StringBuilder sb2 = new StringBuilder("Build Number: ");
        sb2.append(str2);
        AFLogger.afInfoLog(sb2.toString());
        AppsFlyerProperties.getInstance().loadProperties(this.onConversionDataFail.getApplicationContext());
        if ((!TextUtils.isEmpty(str) ? 'B' : '/') != '/') {
            this.AppsFlyerConversionListener.AFLogger$LogLevel().AFInAppEventType = str;
            AFb1tSDK.valueOf(str);
        } else if (TextUtils.isEmpty(this.AppsFlyerConversionListener.AFLogger$LogLevel().AFInAppEventType)) {
            int i13 = AppsFlyerLib + 43;
            onValidateInApp = i13 % 128;
            if ((i13 % 2 != 0 ? (char) 29 : (char) 1) != 1) {
                AFLogger.afWarnLog("ERROR: AppsFlyer SDK is not initialized! You must provide AppsFlyer Dev-Key either in the 'init' API method (should be called on Application's onCreate),or in the start() API (should be called on Activity's onCreate).");
                int i14 = 12 / 0;
                if (appsFlyerRequestListener == null) {
                    return;
                }
            } else {
                AFLogger.afWarnLog("ERROR: AppsFlyer SDK is not initialized! You must provide AppsFlyer Dev-Key either in the 'init' API method (should be called on Application's onCreate),or in the start() API (should be called on Activity's onCreate).");
                if (appsFlyerRequestListener == null) {
                    return;
                }
            }
            int i15 = onValidateInApp + 49;
            AppsFlyerLib = i15 % 128;
            if (i15 % 2 != 0) {
                appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1fSDK.AFInAppEventType);
                return;
            }
            appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1fSDK.AFInAppEventType);
            int i16 = 0 / 0;
            return;
        }
        AFInAppEventType().afInfoLog().values(null);
        AFLogger();
        afDebugLog(this.onConversionDataFail.getBaseContext());
        if (this.onResponseError) {
            int i17 = onValidateInApp + 3;
            AppsFlyerLib = i17 % 128;
            boolean z10 = i17 % 2 != 0;
            afErrorLog(this.onConversionDataFail.getApplicationContext());
            if (!z10) {
                int i18 = 73 / 0;
            }
        }
        AFb1zSDK.valueOf(context, new AFb1zSDK.AFa1zSDK() {
            @Override
            public final void values(Activity activity) {
                afDebugLog.values();
                AFa1aSDK.this.AFInAppEventType().afInfoLog().values(null);
                AFa1aSDK.AFKeystoreWrapper(AFa1aSDK.this);
                int valueOf2 = AFa1aSDK.valueOf(AFa1aSDK.AFKeystoreWrapper(activity), false);
                AFLogger.afInfoLog("onBecameForeground");
                if (valueOf2 < 2) {
                    AFa1bSDK AFKeystoreWrapper2 = AFa1bSDK.AFKeystoreWrapper(activity);
                    AFKeystoreWrapper2.AFInAppEventType.post(AFKeystoreWrapper2.afDebugLog);
                    AFKeystoreWrapper2.AFInAppEventType.post(AFKeystoreWrapper2.AFKeystoreWrapper);
                }
                AFe1uSDK aFe1uSDK = new AFe1uSDK();
                AFa1uSDK.values().values(aFe1uSDK.AFKeystoreWrapper(), activity.getIntent(), activity.getApplication());
                AFa1aSDK aFa1aSDK = AFa1aSDK.this;
                aFe1uSDK.AFInAppEventParameterName = (Application) activity.getApplicationContext();
                aFe1uSDK.valueOf = appsFlyerRequestListener;
                aFa1aSDK.valueOf(aFe1uSDK, activity);
            }

            @Override
            public final void values(Context context2) {
                AFLogger.afInfoLog("onBecameBackground");
                AFd1dSDK aFd1dSDK = afDebugLog;
                long currentTimeMillis = System.currentTimeMillis();
                long j10 = aFd1dSDK.afErrorLog;
                if (j10 != 0) {
                    long j11 = currentTimeMillis - j10;
                    if (j11 > 0 && j11 < 1000) {
                        j11 = 1000;
                    }
                    long seconds = TimeUnit.MILLISECONDS.toSeconds(j11);
                    aFd1dSDK.AFVersionDeclaration = seconds;
                    aFd1dSDK.valueOf.AFInAppEventParameterName("prev_session_dur", seconds);
                } else {
                    AFLogger.afInfoLog("Metrics: fg ts is missing");
                }
                AFLogger.afInfoLog("callStatsBackground background call");
                AFa1aSDK.this.AFInAppEventType(new WeakReference<>(context2));
                AFb1pSDK AFKeystoreWrapper2 = AFb1pSDK.AFKeystoreWrapper();
                if (AFKeystoreWrapper2.afErrorLog()) {
                    AFKeystoreWrapper2.valueOf();
                    if (context2 != null && !AppsFlyerLib.getInstance().isStopped()) {
                        AFKeystoreWrapper2.AFInAppEventType(context2.getPackageName(), context2.getPackageManager(), AFa1aSDK.values(AFa1aSDK.this));
                    }
                    AFKeystoreWrapper2.values();
                } else {
                    AFLogger.afDebugLog("RD status is OFF");
                }
                AFa1bSDK.AFKeystoreWrapper(context2).AFKeystoreWrapper();
            }
        }, this.AppsFlyerConversionListener.values());
    }

    @Override
    public final void stop(boolean z10, Context context) {
        AFb1dSDK aFb1dSDK;
        int i10 = onValidateInApp + 65;
        int i11 = i10 % 128;
        AppsFlyerLib = i11;
        int i12 = i10 % 2;
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        if (context != null) {
            int i13 = i11 + 119;
            onValidateInApp = i13 % 128;
            if ((i13 % 2 != 0 ? 'S' : 'R') != 'S') {
                aFb1dSDK = aFb1bSDK.values;
            } else {
                aFb1dSDK = aFb1bSDK.values;
                int i14 = 33 / 0;
            }
            aFb1dSDK.values = context.getApplicationContext();
        }
        this.AppsFlyerConversionListener.AFLogger$LogLevel().AFInAppEventParameterName = z10;
        try {
            File file = new File(this.AppsFlyerConversionListener.init().valueOf.values.getFilesDir(), "AFRequestCache");
            if (file.exists()) {
                File[] listFiles = file.listFiles();
                if (listFiles == null) {
                    int i15 = AppsFlyerLib + 89;
                    onValidateInApp = i15 % 128;
                    int i16 = i15 % 2;
                } else {
                    for (File file2 : listFiles) {
                        StringBuilder sb2 = new StringBuilder("CACHE: Found cached request");
                        sb2.append(file2.getName());
                        AFLogger.afInfoLog(sb2.toString());
                        StringBuilder sb3 = new StringBuilder("CACHE: Deleting ");
                        sb3.append(file2.getName());
                        sb3.append(" from cache");
                        AFLogger.afInfoLog(sb3.toString());
                        file2.delete();
                    }
                }
            } else {
                file.mkdir();
            }
        } catch (Exception e10) {
            AFLogger.afErrorLog("CACHE: Could not cache request", e10);
        }
        if ((z10 ? 'O' : (char) 11) != 'O') {
            return;
        }
        int i17 = onValidateInApp + 37;
        AppsFlyerLib = i17 % 128;
        int i18 = i17 % 2;
        valueOf(context).values("is_stop_tracking_used", true);
    }

    @Override
    public final void subscribeForDeepLink(@NonNull DeepLinkListener deepLinkListener) {
        int i10 = AppsFlyerLib + 123;
        onValidateInApp = i10 % 128;
        if ((i10 % 2 != 0 ? ':' : '>') == '>') {
            subscribeForDeepLink(deepLinkListener, TimeUnit.SECONDS.toMillis(3L));
        } else {
            subscribeForDeepLink(deepLinkListener, TimeUnit.SECONDS.toMillis(3L));
            throw null;
        }
    }

    @Override
    public final void subscribeForDeepLink(@NonNull DeepLinkListener deepLinkListener, long j10) {
        int i10 = AppsFlyerLib + 87;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        AFa1uSDK.values().AFInAppEventType = deepLinkListener;
        AFb1oSDK.afWarnLog = j10;
        int i12 = onValidateInApp + 3;
        AppsFlyerLib = i12 % 128;
        int i13 = i12 % 2;
    }

    @Override
    public final void unregisterConversionListener() {
        int i10 = AppsFlyerLib + 77;
        onValidateInApp = i10 % 128;
        int i11 = i10 % 2;
        AFb1pSDK.AFKeystoreWrapper().AFKeystoreWrapper("unregisterConversionListener", new String[0]);
        AFInAppEventType = null;
        int i12 = AppsFlyerLib + 45;
        onValidateInApp = i12 % 128;
        int i13 = i12 % 2;
    }

    @Override
    public final void updateServerUninstallToken(Context context, String str) {
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        if (context != null) {
            aFb1bSDK.values.values = context.getApplicationContext();
        }
        AFd1kSDK aFd1kSDK = new AFd1kSDK(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));
        AFb1tSDK values2 = aFd1kSDK.values();
        if (values2 == null || !str.equals(values2.valueOf)) {
            long currentTimeMillis = System.currentTimeMillis();
            boolean z10 = values2 == null || currentTimeMillis - values2.AFInAppEventType > TimeUnit.SECONDS.toMillis(2L);
            AFb1tSDK aFb1tSDK = new AFb1tSDK(str, currentTimeMillis, !z10);
            aFd1kSDK.valueOf.valueOf("afUninstallToken", aFb1tSDK.valueOf);
            aFd1kSDK.valueOf.AFInAppEventParameterName("afUninstallToken_received_time", aFb1tSDK.AFInAppEventType);
            aFd1kSDK.valueOf.values("afUninstallToken_queued", aFb1tSDK.valueOf());
            if (z10) {
                AFd1kSDK.AFInAppEventType(str);
            }
        }
    }

    @Override
    public final void validateAndLogInAppPurchase(Context context, String str, String str2, String str3, String str4, String str5, Map<String, String> map) {
        AFb1pSDK AFKeystoreWrapper2 = AFb1pSDK.AFKeystoreWrapper();
        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();
        AFKeystoreWrapper2.AFKeystoreWrapper("validateAndTrackInAppPurchase", strArr);
        if (!isStopped()) {
            StringBuilder sb2 = new StringBuilder("Validate in app called with parameters: ");
            sb2.append(str3);
            sb2.append(" ");
            sb2.append(str4);
            sb2.append(" ");
            sb2.append(str5);
            AFLogger.afInfoLog(sb2.toString());
        }
        if (str == null || str4 == null || str2 == null || str5 == null || str3 == null) {
            AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener = AFInAppEventParameterName;
            if (appsFlyerInAppPurchaseValidatorListener != null) {
                appsFlyerInAppPurchaseValidatorListener.onValidateInAppFailure("Please provide purchase parameters");
                return;
            }
            return;
        }
        Context applicationContext = context.getApplicationContext();
        String str6 = this.AppsFlyerConversionListener.AFLogger$LogLevel().AFInAppEventType;
        if (context instanceof Activity) {
            ((Activity) context).getIntent();
        }
        new Thread(new AFa1dSDK(applicationContext, str6, str, str2, str3, str4, str5, map)).start();
    }

    public final AFd1oSDK valueOf(Context context) {
        AFb1bSDK aFb1bSDK = this.AppsFlyerConversionListener;
        if (context != null) {
            aFb1bSDK.values.values = context.getApplicationContext();
        }
        Context context2 = this.AppsFlyerConversionListener.values.values;
        if (context2 != null) {
            return new AFb1eSDK(AFKeystoreWrapper(context2));
        }
        throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
    }

    @VisibleForTesting
    public final void valueOf(@NonNull AFa1tSDK aFa1tSDK, @Nullable Activity activity) {
        String str;
        Uri AFInAppEventParameterName2;
        Application application = aFa1tSDK.AFInAppEventParameterName;
        if (activity != null) {
            int i10 = onValidateInApp + 55;
            AppsFlyerLib = i10 % 128;
            if (!(i10 % 2 != 0)) {
                activity.getIntent();
                throw null;
            }
            if ((activity.getIntent() != null) && (AFInAppEventParameterName2 = AFb1jSDK.AFInAppEventParameterName(activity)) != null) {
                str = AFInAppEventParameterName2.toString();
                if ((this.AppsFlyerConversionListener.AFLogger$LogLevel().AFInAppEventType != null ? 'D' : 'F') != 'F') {
                    String referrer = AppsFlyerProperties.getInstance().getReferrer(application);
                    aFa1tSDK.afRDLog = referrer != null ? referrer : "";
                    aFa1tSDK.AFInAppEventType = str;
                    AFInAppEventParameterName(aFa1tSDK);
                    return;
                }
                AFLogger.afWarnLog("[LogEvent/Launch] AppsFlyer's SDK cannot send any event without providing DevKey.");
                AppsFlyerRequestListener appsFlyerRequestListener = aFa1tSDK.valueOf;
                if (appsFlyerRequestListener != null) {
                    int i11 = onValidateInApp + 87;
                    AppsFlyerLib = i11 % 128;
                    boolean z10 = i11 % 2 != 0;
                    appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1fSDK.AFInAppEventType);
                    if (z10) {
                        return;
                    }
                    throw null;
                }
                return;
            }
        }
        str = "";
        if ((this.AppsFlyerConversionListener.AFLogger$LogLevel().AFInAppEventType != null ? 'D' : 'F') != 'F') {
        }
    }

    public final boolean valueOf() {
        if ((AFInAppEventParameterName(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false) ? '@' : ',') == '@' && AFInAppEventParameterName() == null) {
            int i10 = AppsFlyerLib + 65;
            onValidateInApp = i10 % 128;
            int i11 = i10 % 2;
            return true;
        }
        int i12 = onValidateInApp + 107;
        AppsFlyerLib = i12 % 128;
        if ((i12 % 2 == 0 ? ')' : '\f') != ')') {
            return false;
        }
        throw null;
    }

    public final Map<String, Object> values(AFa1tSDK aFa1tSDK) {
        String str;
        String str2;
        Object obj;
        boolean z10;
        String str3;
        SimpleDateFormat simpleDateFormat;
        AppsFlyerProperties appsFlyerProperties;
        AFb1lSDK aFb1lSDK;
        String str4;
        Throwable th2;
        AFa1qSDK AFKeystoreWrapper2;
        AFa1cSDK aFa1cSDK;
        Object obj2;
        long j10;
        long j11;
        Locale locale;
        Context context = aFa1tSDK.AFInAppEventParameterName;
        String str5 = this.AppsFlyerConversionListener.AFLogger$LogLevel().AFInAppEventType;
        String str6 = aFa1tSDK.afErrorLog;
        Map map = aFa1tSDK.AFKeystoreWrapper;
        if (map == null) {
            map = new HashMap();
        }
        Object jSONObject = new JSONObject(map).toString();
        String str7 = aFa1tSDK.afRDLog;
        SharedPreferences AFKeystoreWrapper3 = AFKeystoreWrapper(context);
        boolean AFInAppEventType2 = aFa1tSDK.AFInAppEventType();
        Object obj3 = aFa1tSDK.AFInAppEventType;
        Map<String, Object> map2 = aFa1tSDK.values;
        AFb1xSDK.AFKeystoreWrapper(context, map2);
        Boolean bool = AFb1xSDK.AFKeystoreWrapper;
        if (bool == null || bool.booleanValue()) {
            str = "Exception while collecting facebook's attribution ID. ";
            str2 = AppsFlyerProperties.APP_ID;
            obj = obj3;
        } else {
            obj = obj3;
            Map<String, Object> AFInAppEventParameterName2 = AFInAppEventParameterName(map2);
            str = "Exception while collecting facebook's attribution ID. ";
            Boolean bool2 = Boolean.TRUE;
            str2 = AppsFlyerProperties.APP_ID;
            AFInAppEventParameterName2.put("ad_ids_disabled", bool2);
        }
        long time = new Date().getTime();
        map2.put(AFKeystoreWrapper(new int[]{0, 12, 123, 4}, "\u0001\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0000\u0000\u0000", false).intern(), Long.toString(time));
        Object AFInAppEventParameterName3 = com.appsflyer.internal.AFa1vSDK.AFInAppEventParameterName(context, time);
        if (AFInAppEventParameterName3 != null) {
            map2.put("cksm_v1", AFInAppEventParameterName3);
        }
        try {
            if (isStopped()) {
                AFLogger.afInfoLog("Reporting has been stopped");
            } else {
                StringBuilder sb2 = new StringBuilder("******* sendTrackingWithEvent: ");
                sb2.append(AFInAppEventType2 ? "Launch" : str6);
                AFLogger.afInfoLog(sb2.toString());
            }
            AFa1lSDK init2 = AFInAppEventType().init();
            try {
                if (!new File(init2.valueOf.values.getFilesDir(), "AFRequestCache").exists()) {
                    new File(init2.valueOf.values.getFilesDir(), "AFRequestCache").mkdir();
                }
            } catch (Exception e10) {
                AFLogger.afErrorLog("CACHE: Could not create cache directory", e10);
            }
            try {
                List asList = Arrays.asList(context.getPackageManager().getPackageInfo(context.getPackageName(), 4096).requestedPermissions);
                if (!asList.contains("android.permission.INTERNET")) {
                    AFLogger.afWarnLog("Permission android.permission.INTERNET is missing in the AndroidManifest.xml");
                }
                if (!asList.contains("android.permission.ACCESS_NETWORK_STATE")) {
                    AFLogger.afWarnLog("Permission android.permission.ACCESS_NETWORK_STATE is missing in the AndroidManifest.xml");
                }
                if (Build.VERSION.SDK_INT > 32 && !asList.contains("com.google.android.gms.permission.AD_ID")) {
                    AFLogger.afWarnLog("Permission com.google.android.gms.permission.AD_ID is missing in the AndroidManifest.xml");
                }
            } catch (Exception e11) {
                AFLogger.afErrorLog("Exception while validation permissions. ", e11);
            }
            map2.put("af_events_api", AFKeystoreWrapper(new int[]{12, 1, 61, 0}, "\u0000", true).intern());
            map2.put(AFKeystoreWrapper(new int[]{13, 5, 53, 1}, null, true).intern(), Build.BRAND);
            map2.put("device", Build.DEVICE);
            map2.put("product", Build.PRODUCT);
            int i10 = Build.VERSION.SDK_INT;
            map2.put("sdk", Integer.toString(i10));
            map2.put("model", Build.MODEL);
            map2.put("deviceType", Build.TYPE);
            valueOf(context, map2);
            AppsFlyerProperties appsFlyerProperties2 = AppsFlyerProperties.getInstance();
            AFb1lSDK aFb1lSDK2 = new AFb1lSDK(context);
            AFd1dSDK afDebugLog = AFInAppEventType().afDebugLog();
            if (AFInAppEventType2) {
                if (afInfoLog(context)) {
                    if (!appsFlyerProperties2.isOtherSdkStringDisabled()) {
                        map2.put("batteryLevel", String.valueOf(onInstallConversionDataLoadedNative(context)));
                    }
                    afRDLog(context);
                    UiModeManager uiModeManager = i10 >= 23 ? (UiModeManager) context.getSystemService(UiModeManager.class) : (UiModeManager) context.getSystemService("uimode");
                    if (uiModeManager != null && uiModeManager.getCurrentModeType() == 4) {
                        map2.put("tv", Boolean.TRUE);
                    }
                    if (AFd1fSDK.AFInAppEventType(context)) {
                        map2.put("inst_app", Boolean.TRUE);
                    }
                }
                map2.put("timepassedsincelastlaunch", Long.toString(afWarnLog(context)));
                valueOf(map2);
                values(map2, afDebugLog);
                Object obj4 = this.onDeepLinking;
                if (obj4 != null) {
                    map2.put("phone", obj4);
                }
                if (!TextUtils.isEmpty(str7)) {
                    map2.put("referrer", str7);
                }
                Object string = AFKeystoreWrapper3.getString("extraReferrers", null);
                if (string != null) {
                    map2.put("extraReferrers", string);
                }
                String referrer = appsFlyerProperties2.getReferrer(context);
                if (!TextUtils.isEmpty(referrer) && map2.get("referrer") == null) {
                    map2.put("referrer", referrer);
                }
                long j12 = afDebugLog.AFVersionDeclaration;
                z10 = AFInAppEventType2;
                if (j12 != 0) {
                    map2.put("prev_session_dur", Long.valueOf(j12));
                }
                Application application = AFb1iSDK.values;
                map2.put("exception_number", Long.valueOf(application == null ? -1L : AFKeystoreWrapper(application).getLong("exception_number", 0L)));
                AFb1gSDK aFb1gSDK = this.onAttributionFailure;
                if (aFb1gSDK != null) {
                    if (!aFb1gSDK.AFInAppEventParameterName.isEmpty()) {
                        map2.put("partner_data", aFb1gSDK.AFInAppEventParameterName);
                    }
                    if (!aFb1gSDK.AFInAppEventType.isEmpty()) {
                        AFInAppEventParameterName(map2).put("partner_data", aFb1gSDK.AFInAppEventType);
                        aFb1gSDK.AFInAppEventType = new HashMap();
                    }
                }
            } else {
                z10 = AFInAppEventType2;
                values(context, map2, str6);
            }
            Object AFKeystoreWrapper4 = AFKeystoreWrapper("KSAppsFlyerId");
            String AFKeystoreWrapper5 = AFKeystoreWrapper("KSAppsFlyerRICounter");
            if (AFKeystoreWrapper4 != null && AFKeystoreWrapper5 != null && Integer.valueOf(AFKeystoreWrapper5).intValue() > 0) {
                map2.put("reinstallCounter", AFKeystoreWrapper5);
                map2.put("originalAppsflyerId", AFKeystoreWrapper4);
            }
            Object AFKeystoreWrapper6 = AFKeystoreWrapper(AppsFlyerProperties.ADDITIONAL_CUSTOM_DATA);
            if (AFKeystoreWrapper6 != null) {
                map2.put("customData", AFKeystoreWrapper6);
            }
            try {
                Object installerPackageName = AsmPrivacyHookHelper.getInstallerPackageName(context.getPackageManager(), context.getPackageName());
                if (installerPackageName != null) {
                    map2.put("installer_package", installerPackageName);
                }
            } catch (Exception e12) {
                AFLogger.afErrorLog("Exception while getting the app's installer package. ", e12);
            }
            String string2 = appsFlyerProperties2.getString(AppsFlyerProperties.EXTENSION);
            if (string2 != null && string2.length() > 0) {
                map2.put(AppsFlyerProperties.EXTENSION, string2);
            }
            String AFInAppEventType3 = AFInAppEventType(context);
            String valueOf2 = valueOf(valueOf(context), AFInAppEventType3);
            if ((valueOf2 != null && !valueOf2.equals(AFInAppEventType3)) || (valueOf2 == null && AFInAppEventType3 != null)) {
                map2.put("af_latestchannel", AFInAppEventType3);
            }
            String init3 = init(context);
            if (init3 != null) {
                map2.put("af_installstore", init3.toLowerCase());
            }
            String AFVersionDeclaration2 = AFVersionDeclaration(context);
            if (AFVersionDeclaration2 != null) {
                map2.put("af_preinstall_name", AFVersionDeclaration2.toLowerCase());
            }
            String level = getLevel(context);
            if (level != null) {
                map2.put("af_currentstore", level.toLowerCase());
            }
            if (str5 == null || str5.length() <= 0) {
                String str8 = this.AppsFlyerConversionListener.AFLogger$LogLevel().AFInAppEventType;
                if (str8 == null || str8.length() <= 0) {
                    AFLogger.afInfoLog("AppsFlyer dev key is missing!!! Please use  AppsFlyerLib.getInstance().setAppsFlyerKey(...) to set it. ");
                    AFLogger.afInfoLog("AppsFlyer will not track this event.");
                    return null;
                }
                map2.put("appsflyerKey", str8);
            } else {
                map2.put("appsflyerKey", str5);
            }
            Object AFInAppEventParameterName4 = AFInAppEventParameterName();
            if (AFInAppEventParameterName4 != null) {
                map2.put("appUserId", AFInAppEventParameterName4);
            }
            Object string3 = appsFlyerProperties2.getString(AppsFlyerProperties.USER_EMAILS);
            if (string3 != null) {
                map2.put("user_emails", string3);
            } else {
                String AFKeystoreWrapper7 = AFKeystoreWrapper(AppsFlyerProperties.USER_EMAIL);
                if (AFKeystoreWrapper7 != null) {
                    map2.put("sha1_el", AFb1rSDK.AFInAppEventParameterName(AFKeystoreWrapper7));
                }
            }
            if (str6 != null) {
                map2.put("eventName", str6);
                map2.put("eventValue", jSONObject);
            }
            if (afDebugLog() != null) {
                map2.put(str2, AFKeystoreWrapper(str2));
            }
            String AFKeystoreWrapper8 = AFKeystoreWrapper(AppsFlyerProperties.CURRENCY_CODE);
            if (AFKeystoreWrapper8 != null) {
                if (AFKeystoreWrapper8.length() != 3) {
                    StringBuilder sb3 = new StringBuilder("WARNING: currency code should be 3 characters!!! '");
                    sb3.append(AFKeystoreWrapper8);
                    sb3.append("' is not a legal value.");
                    AFLogger.afWarnLog(sb3.toString());
                }
                map2.put("currency", AFKeystoreWrapper8);
            }
            Object AFKeystoreWrapper9 = AFKeystoreWrapper(AppsFlyerProperties.IS_UPDATE);
            if (AFKeystoreWrapper9 != null) {
                map2.put("isUpdate", AFKeystoreWrapper9);
            }
            map2.put("af_preinstalled", Boolean.toString(isPreInstalledApp(context)));
            if (appsFlyerProperties2.getBoolean(AppsFlyerProperties.COLLECT_FACEBOOK_ATTR_ID, true)) {
                try {
                    context.getPackageManager().getApplicationInfo("com.facebook.katana", 0);
                    str3 = getAttributionId(context);
                } catch (PackageManager.NameNotFoundException unused) {
                    AFLogger.afWarnLog(str);
                    str3 = null;
                }
                if (str3 != null) {
                    map2.put("fb", str3);
                }
            }
            AFKeystoreWrapper(context, map2);
            try {
                Object AFInAppEventParameterName5 = AFb1uSDK.AFInAppEventParameterName(new WeakReference(context));
                if (AFInAppEventParameterName5 != null) {
                    map2.put("uid", AFInAppEventParameterName5);
                }
            } catch (Exception e13) {
                StringBuilder sb4 = new StringBuilder("ERROR: could not get uid ");
                sb4.append(e13.getMessage());
                AFLogger.afErrorLog(sb4.toString(), e13);
            }
            try {
                map2.put("lang", Locale.getDefault().getDisplayLanguage());
            } catch (Exception e14) {
                AFLogger.afErrorLog("Exception while collecting display language name. ", e14);
            }
            try {
                map2.put("lang_code", Locale.getDefault().getLanguage());
            } catch (Exception e15) {
                AFLogger.afErrorLog("Exception while collecting display language code. ", e15);
            }
            try {
                map2.put("country", Locale.getDefault().getCountry());
            } catch (Exception e16) {
                AFLogger.afErrorLog("Exception while collecting country name. ", e16);
            }
            map2.put("platformextension", this.onResponseNative.values());
            AFInAppEventParameterName(context, map2);
            simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
            try {
                map2.put("installDate", AFInAppEventType(simpleDateFormat, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
            } catch (Exception e17) {
                AFLogger.afErrorLog("Exception while collecting install date. ", e17);
            }
            try {
                PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                if (packageInfo.versionCode > AFKeystoreWrapper3.getInt("versionCode", 0)) {
                    try {
                        valueOf(context).AFKeystoreWrapper("versionCode", packageInfo.versionCode);
                    } catch (Throwable th3) {
                        th2 = th3;
                        appsFlyerProperties = appsFlyerProperties2;
                        aFb1lSDK = aFb1lSDK2;
                        str4 = str6;
                        AFLogger.afErrorLog("Exception while collecting app version data ", th2, true);
                        this.onResponseErrorNative = AFd1kSDK.AFInAppEventParameterName(context);
                        StringBuilder sb5 = new StringBuilder("didConfigureTokenRefreshService=");
                        sb5.append(this.onResponseErrorNative);
                        AFLogger.afDebugLog(sb5.toString());
                        if (!this.onResponseErrorNative) {
                        }
                        if (z10) {
                        }
                        if (!z10) {
                        }
                        if (AFKeystoreWrapper("advertiserId") == null) {
                        }
                        AFKeystoreWrapper2 = AFb1xSDK.AFKeystoreWrapper(context.getContentResolver());
                        if (AFKeystoreWrapper2 != null) {
                        }
                        map2.put("registeredUninstall", Boolean.valueOf(AFd1kSDK.valueOf(AFKeystoreWrapper3)));
                        int valueOf3 = valueOf(AFKeystoreWrapper3, z10);
                        map2.put("counter", Integer.toString(valueOf3));
                        map2.put("iaecounter", Integer.toString(AFInAppEventParameterName(AFKeystoreWrapper3, str4 == null)));
                        if (z10) {
                        }
                        map2.put("isFirstCall", Boolean.toString(AFInAppEventType(AFKeystoreWrapper3)));
                        valueOf(context, z10, map2, valueOf3);
                        new AFb1rSDK();
                        map2.put("af_v", AFb1rSDK.valueOf(map2));
                        new AFb1rSDK();
                        map2.put("af_v2", AFb1rSDK.AFInAppEventType(map2));
                        map2.put("ivc", Boolean.valueOf(onAttributionFailureNative(context)));
                        if (AFKeystoreWrapper3.contains("is_stop_tracking_used")) {
                        }
                        HashMap hashMap = new HashMap();
                        hashMap.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
                        hashMap.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
                        map2.put("cell", hashMap);
                        AFb1lSDK aFb1lSDK3 = aFb1lSDK;
                        map2.put("sig", AFb1wSDK.valueOf(aFb1lSDK3.values.getPackageManager(), aFb1lSDK3.values.getPackageName()));
                        map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                        StatFs statFs = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                        long blockSizeLong = statFs.getBlockSizeLong();
                        double pow = Math.pow(2.0d, 20.0d);
                        long blockCountLong = (long) ((statFs.getBlockCountLong() * blockSizeLong) / pow);
                        StringBuilder sb6 = new StringBuilder();
                        sb6.append((long) ((statFs.getAvailableBlocksLong() * blockSizeLong) / pow));
                        sb6.append(FileUtil.ROOT_PATH);
                        sb6.append(blockCountLong);
                        map2.put("disk", sb6.toString());
                        aFa1cSDK = this.afDebugLog;
                        if (aFa1cSDK != null) {
                        }
                        return map2;
                    }
                }
                map2.put("app_version_code", Integer.toString(packageInfo.versionCode));
                map2.put("app_version_name", packageInfo.versionName);
                j10 = packageInfo.firstInstallTime;
                try {
                    j11 = packageInfo.lastUpdateTime;
                    aFb1lSDK = aFb1lSDK2;
                    try {
                        appsFlyerProperties = appsFlyerProperties2;
                        try {
                            locale = Locale.US;
                            str4 = str6;
                        } catch (Throwable th4) {
                            th = th4;
                            str4 = str6;
                            th2 = th;
                            AFLogger.afErrorLog("Exception while collecting app version data ", th2, true);
                            this.onResponseErrorNative = AFd1kSDK.AFInAppEventParameterName(context);
                            StringBuilder sb52 = new StringBuilder("didConfigureTokenRefreshService=");
                            sb52.append(this.onResponseErrorNative);
                            AFLogger.afDebugLog(sb52.toString());
                            if (!this.onResponseErrorNative) {
                            }
                            if (z10) {
                            }
                            if (!z10) {
                            }
                            if (AFKeystoreWrapper("advertiserId") == null) {
                            }
                            AFKeystoreWrapper2 = AFb1xSDK.AFKeystoreWrapper(context.getContentResolver());
                            if (AFKeystoreWrapper2 != null) {
                            }
                            map2.put("registeredUninstall", Boolean.valueOf(AFd1kSDK.valueOf(AFKeystoreWrapper3)));
                            int valueOf32 = valueOf(AFKeystoreWrapper3, z10);
                            map2.put("counter", Integer.toString(valueOf32));
                            map2.put("iaecounter", Integer.toString(AFInAppEventParameterName(AFKeystoreWrapper3, str4 == null)));
                            if (z10) {
                                appsFlyerProperties.AFInAppEventParameterName = true;
                            }
                            map2.put("isFirstCall", Boolean.toString(AFInAppEventType(AFKeystoreWrapper3)));
                            valueOf(context, z10, map2, valueOf32);
                            new AFb1rSDK();
                            map2.put("af_v", AFb1rSDK.valueOf(map2));
                            new AFb1rSDK();
                            map2.put("af_v2", AFb1rSDK.AFInAppEventType(map2));
                            map2.put("ivc", Boolean.valueOf(onAttributionFailureNative(context)));
                            if (AFKeystoreWrapper3.contains("is_stop_tracking_used")) {
                            }
                            HashMap hashMap2 = new HashMap();
                            hashMap2.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
                            hashMap2.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
                            map2.put("cell", hashMap2);
                            AFb1lSDK aFb1lSDK32 = aFb1lSDK;
                            map2.put("sig", AFb1wSDK.valueOf(aFb1lSDK32.values.getPackageManager(), aFb1lSDK32.values.getPackageName()));
                            map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                            StatFs statFs2 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                            long blockSizeLong2 = statFs2.getBlockSizeLong();
                            double pow2 = Math.pow(2.0d, 20.0d);
                            long blockCountLong2 = (long) ((statFs2.getBlockCountLong() * blockSizeLong2) / pow2);
                            StringBuilder sb62 = new StringBuilder();
                            sb62.append((long) ((statFs2.getAvailableBlocksLong() * blockSizeLong2) / pow2));
                            sb62.append(FileUtil.ROOT_PATH);
                            sb62.append(blockCountLong2);
                            map2.put("disk", sb62.toString());
                            aFa1cSDK = this.afDebugLog;
                            if (aFa1cSDK != null) {
                                map2.put("sharing_filter", obj2);
                            }
                            return map2;
                        }
                    } catch (Throwable th5) {
                        th = th5;
                        appsFlyerProperties = appsFlyerProperties2;
                    }
                } catch (Throwable th6) {
                    th = th6;
                    appsFlyerProperties = appsFlyerProperties2;
                    aFb1lSDK = aFb1lSDK2;
                }
            } catch (Throwable th7) {
                th = th7;
                appsFlyerProperties = appsFlyerProperties2;
                aFb1lSDK = aFb1lSDK2;
            }
        } catch (Throwable th8) {
            AFLogger.afErrorLog(th8.getLocalizedMessage(), th8, true);
        }
        try {
            map2.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", locale).format(new Date(j10)));
            map2.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", locale).format(new Date(j11)));
            map2.put(AFKeystoreWrapper(new int[]{18, 15, 0, 7}, "\u0001\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0000\u0001\u0001\u0001", true).intern(), AFKeystoreWrapper(simpleDateFormat, context));
        } catch (Throwable th9) {
            th = th9;
            th2 = th;
            AFLogger.afErrorLog("Exception while collecting app version data ", th2, true);
            this.onResponseErrorNative = AFd1kSDK.AFInAppEventParameterName(context);
            StringBuilder sb522 = new StringBuilder("didConfigureTokenRefreshService=");
            sb522.append(this.onResponseErrorNative);
            AFLogger.afDebugLog(sb522.toString());
            if (!this.onResponseErrorNative) {
            }
            if (z10) {
            }
            if (!z10) {
            }
            if (AFKeystoreWrapper("advertiserId") == null) {
            }
            AFKeystoreWrapper2 = AFb1xSDK.AFKeystoreWrapper(context.getContentResolver());
            if (AFKeystoreWrapper2 != null) {
            }
            map2.put("registeredUninstall", Boolean.valueOf(AFd1kSDK.valueOf(AFKeystoreWrapper3)));
            int valueOf322 = valueOf(AFKeystoreWrapper3, z10);
            map2.put("counter", Integer.toString(valueOf322));
            map2.put("iaecounter", Integer.toString(AFInAppEventParameterName(AFKeystoreWrapper3, str4 == null)));
            if (z10) {
            }
            map2.put("isFirstCall", Boolean.toString(AFInAppEventType(AFKeystoreWrapper3)));
            valueOf(context, z10, map2, valueOf322);
            new AFb1rSDK();
            map2.put("af_v", AFb1rSDK.valueOf(map2));
            new AFb1rSDK();
            map2.put("af_v2", AFb1rSDK.AFInAppEventType(map2));
            map2.put("ivc", Boolean.valueOf(onAttributionFailureNative(context)));
            if (AFKeystoreWrapper3.contains("is_stop_tracking_used")) {
            }
            HashMap hashMap22 = new HashMap();
            hashMap22.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
            hashMap22.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
            map2.put("cell", hashMap22);
            AFb1lSDK aFb1lSDK322 = aFb1lSDK;
            map2.put("sig", AFb1wSDK.valueOf(aFb1lSDK322.values.getPackageManager(), aFb1lSDK322.values.getPackageName()));
            map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
            StatFs statFs22 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
            long blockSizeLong22 = statFs22.getBlockSizeLong();
            double pow22 = Math.pow(2.0d, 20.0d);
            long blockCountLong22 = (long) ((statFs22.getBlockCountLong() * blockSizeLong22) / pow22);
            StringBuilder sb622 = new StringBuilder();
            sb622.append((long) ((statFs22.getAvailableBlocksLong() * blockSizeLong22) / pow22));
            sb622.append(FileUtil.ROOT_PATH);
            sb622.append(blockCountLong22);
            map2.put("disk", sb622.toString());
            aFa1cSDK = this.afDebugLog;
            if (aFa1cSDK != null) {
            }
            return map2;
        }
        this.onResponseErrorNative = AFd1kSDK.AFInAppEventParameterName(context);
        StringBuilder sb5222 = new StringBuilder("didConfigureTokenRefreshService=");
        sb5222.append(this.onResponseErrorNative);
        AFLogger.afDebugLog(sb5222.toString());
        if (!this.onResponseErrorNative) {
            map2.put("tokenRefreshConfigured", Boolean.FALSE);
        }
        if (z10) {
            if (this.AppsFlyer2dXConversionCallback != null) {
                if (map2.get("af_deeplink") != null) {
                    AFLogger.afDebugLog("Skip 'af' payload as deeplink was found by path");
                } else {
                    JSONObject jSONObject2 = new JSONObject(this.AppsFlyer2dXConversionCallback);
                    jSONObject2.put("isPush", "true");
                    map2.put("af_deeplink", jSONObject2.toString());
                }
            }
            this.AppsFlyer2dXConversionCallback = null;
            map2.put("open_referrer", obj);
        }
        if (!z10) {
            try {
                AFa1bSDK AFKeystoreWrapper10 = AFa1bSDK.AFKeystoreWrapper(context);
                ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();
                List<Map<String, Object>> valueOf4 = AFKeystoreWrapper10.valueOf();
                if (valueOf4.isEmpty()) {
                    concurrentHashMap.put("sensors", "na");
                } else {
                    concurrentHashMap.put("sensors", new AFa1rSDK().valueOf(valueOf4));
                }
                map2.putAll(concurrentHashMap);
            } catch (Exception e18) {
                StringBuilder sb7 = new StringBuilder("Unexpected exception from AFSensorManager: ");
                sb7.append(e18.getMessage());
                AFLogger.afRDLog(sb7.toString());
            }
        }
        if (AFKeystoreWrapper("advertiserId") == null) {
            AFb1xSDK.AFKeystoreWrapper(context, map2);
            map2.put("GAID_retry", String.valueOf(AFKeystoreWrapper("advertiserId") != null));
        }
        AFKeystoreWrapper2 = AFb1xSDK.AFKeystoreWrapper(context.getContentResolver());
        if (AFKeystoreWrapper2 != null) {
            map2.put("amazon_aid", AFKeystoreWrapper2.valueOf);
            map2.put("amazon_aid_limit", String.valueOf(AFKeystoreWrapper2.values));
        }
        map2.put("registeredUninstall", Boolean.valueOf(AFd1kSDK.valueOf(AFKeystoreWrapper3)));
        int valueOf3222 = valueOf(AFKeystoreWrapper3, z10);
        map2.put("counter", Integer.toString(valueOf3222));
        map2.put("iaecounter", Integer.toString(AFInAppEventParameterName(AFKeystoreWrapper3, str4 == null)));
        if (z10 && valueOf3222 == 1) {
            appsFlyerProperties.AFInAppEventParameterName = true;
        }
        map2.put("isFirstCall", Boolean.toString(AFInAppEventType(AFKeystoreWrapper3)));
        valueOf(context, z10, map2, valueOf3222);
        new AFb1rSDK();
        map2.put("af_v", AFb1rSDK.valueOf(map2));
        new AFb1rSDK();
        map2.put("af_v2", AFb1rSDK.AFInAppEventType(map2));
        map2.put("ivc", Boolean.valueOf(onAttributionFailureNative(context)));
        if (AFKeystoreWrapper3.contains("is_stop_tracking_used")) {
            map2.put("istu", String.valueOf(AFKeystoreWrapper3.getBoolean("is_stop_tracking_used", false)));
        }
        HashMap hashMap222 = new HashMap();
        hashMap222.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
        hashMap222.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
        map2.put("cell", hashMap222);
        AFb1lSDK aFb1lSDK3222 = aFb1lSDK;
        map2.put("sig", AFb1wSDK.valueOf(aFb1lSDK3222.values.getPackageManager(), aFb1lSDK3222.values.getPackageName()));
        map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
        StatFs statFs222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
        long blockSizeLong222 = statFs222.getBlockSizeLong();
        double pow222 = Math.pow(2.0d, 20.0d);
        long blockCountLong222 = (long) ((statFs222.getBlockCountLong() * blockSizeLong222) / pow222);
        StringBuilder sb6222 = new StringBuilder();
        sb6222.append((long) ((statFs222.getAvailableBlocksLong() * blockSizeLong222) / pow222));
        sb6222.append(FileUtil.ROOT_PATH);
        sb6222.append(blockCountLong222);
        map2.put("disk", sb6222.toString());
        aFa1cSDK = this.afDebugLog;
        if (aFa1cSDK != null && (obj2 = aFa1cSDK.AFKeystoreWrapper) != null) {
            map2.put("sharing_filter", obj2);
        }
        return map2;
    }

    @Override
    public final void waitForCustomerUserId(boolean z10) {
        int i10 = AppsFlyerLib + 93;
        onValidateInApp = i10 % 128;
        if (i10 % 2 != 0) {
        }
        AFLogger.afInfoLog("initAfterCustomerUserID: ".concat(String.valueOf(z10)), true);
        AFKeystoreWrapper(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, z10);
        int i11 = AppsFlyerLib + 49;
        onValidateInApp = i11 % 128;
        int i12 = i11 % 2;
    }
}