Driving Zone: Germany v1.22.4版本的 MD5 值为:2b6e2d8e8733a3104dcc306c5770286c

以下内容为反编译后的 AFb1xSDK.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.graphics.Color;
import android.media.AudioTrack;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Process;
import android.os.StatFs;
import android.os.SystemClock;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.ViewConfiguration;
import android.view.WindowManager;
import com.adjust.sdk.Constants;
import com.amazon.aps.shared.APSAnalytics;
import com.android.billingclient.api.BillingClient;
import com.applovin.sdk.AppLovinEventTypes;
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.AFa1oSDK;
import com.appsflyer.internal.AFa1xSDK;
import com.appsflyer.internal.AFb1xSDK;
import com.appsflyer.internal.AFc1mSDK;
import com.appsflyer.internal.AFd1wSDK;
import com.appsflyer.internal.AFe1hSDK;
import com.appsflyer.internal.components.network.http.ResponseNetwork;
import com.facebook.appevents.ondeviceprocessing.RemoteServiceWrapper;
import com.facebook.bolts.AppLinks;
import com.facebook.internal.ServerProtocol;
import com.google.android.exoplayer2.text.ttml.TtmlNode;
import com.google.android.gms.common.GoogleApiAvailability;
import com.vungle.warren.VungleApiClient;
import io.sentry.protocol.DebugImage;
import io.sentry.protocol.Device;
import io.sentry.protocol.Mechanism;
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 kotlin.text.Typography;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

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

    static void valueOf() {
        AppsFlyerConversionListener = new char[]{17933, 19499, 21105, 22651, 28289, 29860, 31439, 248, 5904, 7460, 9035, 10615, '1', 6827, 4250, 3818, 1220, 12841, 'f', 2632, 5168, 7696, 10480, 13033, 15527, 18066, 20838, 23370, 25890, 28463, 31213, 33753, 36267, '.'};
        AppsFlyerInAppPurchaseValidatorListener = -5412040934617052639L;
    }

    static long AFInAppEventParameterName(AFb1xSDK aFb1xSDK, long j) {
        int i = onValidateInAppFailure + 27;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        aFb1xSDK.AppsFlyer2dXConversionCallback = j;
        int i3 = onValidateInAppFailure + 21;
        onValidateInApp = i3 % 128;
        if (!(i3 % 2 == 0)) {
            return j;
        }
        Object obj = null;
        super.hashCode();
        return j;
    }

    static void AFInAppEventParameterName(AFb1xSDK aFb1xSDK) {
        int i = onValidateInAppFailure + 115;
        onValidateInApp = i % 128;
        boolean z = i % 2 == 0;
        aFb1xSDK.afDebugLog();
        if (z) {
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    static boolean AFInAppEventParameterName(AFb1xSDK aFb1xSDK, AFa1tSDK aFa1tSDK, SharedPreferences sharedPreferences) {
        int i = onValidateInAppFailure + 119;
        onValidateInApp = i % 128;
        char c = i % 2 == 0 ? '`' : (char) 27;
        boolean AFInAppEventType2 = aFb1xSDK.AFInAppEventType(aFa1tSDK, sharedPreferences);
        if (c != 27) {
            Object obj = null;
            super.hashCode();
        }
        int i2 = onValidateInAppFailure + 17;
        onValidateInApp = i2 % 128;
        int i3 = i2 % 2;
        return AFInAppEventType2;
    }

    static Map AFInAppEventType(AFb1xSDK aFb1xSDK) {
        int i = onValidateInAppFailure + 35;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        Map<String, Object> map = aFb1xSDK.onDeepLinking;
        int i3 = onValidateInApp + 37;
        onValidateInAppFailure = i3 % 128;
        int i4 = i3 % 2;
        return map;
    }

    static Application AFKeystoreWrapper(AFb1xSDK aFb1xSDK) {
        int i = onValidateInAppFailure + 1;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        Application application = aFb1xSDK.onResponseErrorNative;
        int i3 = onValidateInApp + 49;
        onValidateInAppFailure = i3 % 128;
        int i4 = i3 % 2;
        return application;
    }

    static void AFKeystoreWrapper(AFb1xSDK aFb1xSDK, AFa1tSDK aFa1tSDK) {
        int i = onValidateInApp + 97;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        aFb1xSDK.AFKeystoreWrapper(aFa1tSDK);
        int i3 = onValidateInApp + 5;
        onValidateInAppFailure = i3 % 128;
        int i4 = i3 % 2;
    }

    static AFc1xSDK valueOf(AFb1xSDK aFb1xSDK) {
        int i = onValidateInApp + 93;
        onValidateInAppFailure = i % 128;
        char c = i % 2 != 0 ? '*' : (char) 4;
        AFc1xSDK aFc1xSDK = aFb1xSDK.AppsFlyerLib;
        if (c == '*') {
            Object obj = null;
            super.hashCode();
        }
        int i2 = onValidateInAppFailure + 13;
        onValidateInApp = i2 % 128;
        int i3 = i2 % 2;
        return aFc1xSDK;
    }

    static void valueOf(ScheduledExecutorService scheduledExecutorService, Runnable runnable, TimeUnit timeUnit) {
        int i = onValidateInAppFailure + 37;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        AFKeystoreWrapper(scheduledExecutorService, runnable, 0L, timeUnit);
        int i3 = onValidateInAppFailure + 89;
        onValidateInApp = i3 % 128;
        if ((i3 % 2 == 0 ? 'X' : (char) 15) != 'X') {
            return;
        }
        int i4 = 26 / 0;
    }

    static boolean values(AFb1xSDK aFb1xSDK, boolean z) {
        int i = onValidateInApp + 115;
        onValidateInAppFailure = i % 128;
        boolean z2 = i % 2 != 0;
        aFb1xSDK.onConversionDataSuccess = z;
        if (z2) {
            int i2 = 74 / 0;
        }
        return z;
    }

    static {
        valueOf();
        AFKeystoreWrapper = "221";
        values = "6.9.2".substring(0, "6.9.2".lastIndexOf(AFInAppEventParameterName((ViewConfiguration.getScrollBarFadeDuration() >> 16) + 33, (char) ((Process.getThreadPriority(0) + 20) >> 6), (AudioTrack.getMinVolume() > 0.0f ? 1 : (AudioTrack.getMinVolume() == 0.0f ? 0 : -1)) + 1).intern()));
        afDebugLog = "https://%sstats.%s/stats";
        StringBuilder sb = new StringBuilder();
        sb.append(values);
        sb.append("/androidevent?buildnumber=6.9.2&app_id=");
        AFInAppEventParameterName = sb.toString();
        afErrorLog = "https://%sadrevenue.%s/api/v2/generic/v6.9.2/android?app_id=";
        StringBuilder sb2 = new StringBuilder();
        sb2.append(values);
        sb2.append("/androidevent?app_id=");
        afInfoLog = sb2.toString();
        StringBuilder sb3 = new StringBuilder("https://%sconversions.%s/api/v");
        sb3.append(afInfoLog);
        init = sb3.toString();
        StringBuilder sb4 = new StringBuilder("https://%slaunches.%s/api/v");
        sb4.append(afInfoLog);
        getLevel = sb4.toString();
        StringBuilder sb5 = new StringBuilder("https://%sinapps.%s/api/v");
        sb5.append(afInfoLog);
        afWarnLog = sb5.toString();
        StringBuilder sb6 = new StringBuilder("https://%sattr.%s/api/v");
        sb6.append(afInfoLog);
        AFVersionDeclaration = sb6.toString();
        valueOf = null;
        AFInAppEventType = null;
        AFLogger$LogLevel = new AFb1xSDK();
        int i = onValidateInApp + 121;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
    }

    public final AFc1zSDK values() {
        int i = onValidateInAppFailure + 93;
        onValidateInApp = i % 128;
        if ((i % 2 == 0 ? (char) 24 : (char) 16) != 24) {
            return this.AppsFlyerLib;
        }
        AFc1xSDK aFc1xSDK = this.AppsFlyerLib;
        Object[] objArr = null;
        int length = objArr.length;
        return aFc1xSDK;
    }

    public AFb1xSDK() {
        Executors.newSingleThreadExecutor();
        AFVersionDeclaration.init();
        AFc1xSDK aFc1xSDK = new AFc1xSDK();
        this.AppsFlyerLib = aFc1xSDK;
        AFc1mSDK afErrorLog2 = aFc1xSDK.afErrorLog();
        afErrorLog2.AFInAppEventType.add(new AFa1vSDK(this, (byte) 0));
    }

    public static AFb1xSDK AFKeystoreWrapper() {
        int i = onValidateInApp + 121;
        onValidateInAppFailure = i % 128;
        if ((i % 2 != 0 ? ';' : (char) 2) == 2) {
            return AFLogger$LogLevel;
        }
        int i2 = 81 / 0;
        return AFLogger$LogLevel;
    }

    @Override
    @Deprecated
    public final void performOnAppAttribution(Context context, URI uri) {
        int i = onValidateInAppFailure + 77;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        if ((uri != null ? ';' : 'R') == 'R' || uri.toString().isEmpty()) {
            StringBuilder sb = new StringBuilder("Link is \"");
            sb.append(uri);
            sb.append("\"");
            AFb1hSDK.AFInAppEventParameterName(sb.toString(), DeepLinkResult.Error.NETWORK);
            return;
        }
        if (context == null) {
            StringBuilder sb2 = new StringBuilder("Context is \"");
            sb2.append(context);
            sb2.append("\"");
            AFb1hSDK.AFInAppEventParameterName(sb2.toString(), DeepLinkResult.Error.NETWORK);
            return;
        }
        AFa1sSDK.AFInAppEventParameterName();
        AFa1sSDK.values(context, new HashMap(), Uri.parse(uri.toString()));
        int i3 = onValidateInApp + 115;
        onValidateInAppFailure = i3 % 128;
        if (!(i3 % 2 == 0)) {
            int i4 = 23 / 0;
        }
    }

    @Override
    @Deprecated
    public final void setSharingFilter(String... strArr) {
        int i = onValidateInApp + 99;
        onValidateInAppFailure = i % 128;
        boolean z = i % 2 == 0;
        setSharingFilterForPartners(strArr);
        if (z) {
            return;
        }
        int i2 = 20 / 0;
    }

    @Override
    @Deprecated
    public final void setSharingFilterForAllPartners() {
        int i = onValidateInApp + 79;
        onValidateInAppFailure = i % 128;
        if (!(i % 2 != 0)) {
            setSharingFilterForPartners(TtmlNode.COMBINE_ALL);
            return;
        }
        String[] strArr = new String[1];
        strArr[1] = TtmlNode.COMBINE_ALL;
        setSharingFilterForPartners(strArr);
    }

    @Override
    public final void setSharingFilterForPartners(String... strArr) {
        this.AFLogger = new AFa1fSDK(strArr);
        int i = onValidateInAppFailure + 121;
        onValidateInApp = i % 128;
        int i2 = i % 2;
    }

    @Override
    public final void sendInAppPurchaseData(Context context, Map<String, Object> map, PurchaseHandler.PurchaseValidationCallback purchaseValidationCallback) {
        AFc1xSDK aFc1xSDK = this.AppsFlyerLib;
        Context applicationContext = context.getApplicationContext();
        if (!(applicationContext == null)) {
            int i = onValidateInApp + 93;
            onValidateInAppFailure = i % 128;
            int i2 = i % 2;
            AFb1bSDK aFb1bSDK = aFc1xSDK.values;
            if (applicationContext != null) {
                aFb1bSDK.values = applicationContext.getApplicationContext();
            }
        }
        PurchaseHandler AFLogger = values().AFLogger();
        if (AFLogger.AFInAppEventType(map, purchaseValidationCallback, "purchases")) {
            AFc1cSDK aFc1cSDK = new AFc1cSDK(map, purchaseValidationCallback, AFLogger.AFInAppEventType);
            AFc1mSDK aFc1mSDK = AFLogger.AFKeystoreWrapper;
            aFc1mSDK.AFInAppEventParameterName.execute(new AFc1mSDK.AnonymousClass3(aFc1cSDK));
        }
        int i3 = onValidateInApp + 51;
        onValidateInAppFailure = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void appendParametersToDeepLinkingURL(String str, Map<String, String> map) {
        int i = onValidateInAppFailure + 13;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        AFa1sSDK AFInAppEventParameterName2 = AFa1sSDK.AFInAppEventParameterName();
        AFInAppEventParameterName2.values = str;
        AFInAppEventParameterName2.afRDLog = map;
        int i3 = onValidateInAppFailure + 99;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void subscribeForDeepLink(DeepLinkListener deepLinkListener) {
        int i = onValidateInApp + 11;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        subscribeForDeepLink(deepLinkListener, TimeUnit.SECONDS.toMillis(3L));
        int i3 = onValidateInApp + 105;
        onValidateInAppFailure = i3 % 128;
        if (!(i3 % 2 == 0)) {
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    @Override
    public final void subscribeForDeepLink(DeepLinkListener deepLinkListener, long j) {
        int i = onValidateInAppFailure + 117;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        AFa1sSDK.AFInAppEventParameterName().AFInAppEventParameterName = deepLinkListener;
        AFb1pSDK.init = j;
        int i3 = onValidateInAppFailure + 39;
        onValidateInApp = i3 % 128;
        if ((i3 % 2 == 0 ? (char) 26 : ']') != 26) {
            return;
        }
        Object obj = null;
        super.hashCode();
    }

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

    @Override
    public final void addPushNotificationDeepLinkPath(String... strArr) {
        List<String> asList;
        List<List<String>> list;
        int i = onValidateInApp + 83;
        onValidateInAppFailure = i % 128;
        if (!(i % 2 == 0)) {
            asList = Arrays.asList(strArr);
            list = AFa1sSDK.AFInAppEventParameterName().afErrorLog;
            boolean contains = list.contains(asList);
            Object[] objArr = null;
            int length = objArr.length;
        } else {
            asList = Arrays.asList(strArr);
            list = AFa1sSDK.AFInAppEventParameterName().afErrorLog;
        }
        int i2 = onValidateInApp + 109;
        onValidateInAppFailure = i2 % 128;
        int i3 = i2 % 2;
    }

    @Override
    public final void setDisableAdvertisingIdentifiers(boolean z) {
        boolean z2;
        int i = onValidateInApp + 63;
        onValidateInAppFailure = i % 128;
        Object obj = null;
        if ((i % 2 != 0 ? '!' : '-') != '-') {
            AFLogger.afDebugLog("setDisableAdvertisingIdentifiers: ".concat(String.valueOf(z)));
            super.hashCode();
        } else {
            AFLogger.afDebugLog("setDisableAdvertisingIdentifiers: ".concat(String.valueOf(z)));
        }
        AFb1zSDK.AFKeystoreWrapper = Boolean.valueOf(z2);
        AppsFlyerProperties.getInstance().remove("advertiserIdEnabled");
        AppsFlyerProperties.getInstance().remove("advertiserId");
        int i2 = onValidateInAppFailure + 85;
        onValidateInApp = i2 % 128;
        if (i2 % 2 == 0) {
            super.hashCode();
        }
    }

    @Override
    public final void setDisableNetworkData(boolean z) {
        int i = onValidateInApp + 121;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        AFLogger.afDebugLog("setDisableNetworkData: ".concat(String.valueOf(z)));
        values(AppsFlyerProperties.DISABLE_NETWORK_DATA, z);
        int i3 = onValidateInApp + 83;
        onValidateInAppFailure = i3 % 128;
        if (!(i3 % 2 == 0)) {
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    public final void AFInAppEventParameterName(Context context, Intent intent) {
        int i = onValidateInApp + 21;
        onValidateInAppFailure = i % 128;
        Object obj = null;
        if ((i % 2 != 0 ? (char) 14 : '3') == 14) {
            String stringExtra = intent.getStringExtra("appsflyer_preinstall");
            super.hashCode();
        }
        AFLogger.afInfoLog("****** onReceive called *******");
        AppsFlyerProperties.getInstance();
        String stringExtra2 = intent.getStringExtra(Constants.REFERRER);
        AFLogger.afInfoLog("Play store referrer: ".concat(String.valueOf(stringExtra2)));
        if ((stringExtra2 != null ? (char) 11 : '\b') != 11) {
            return;
        }
        int i2 = onValidateInApp + 119;
        onValidateInAppFailure = i2 % 128;
        if (i2 % 2 != 0) {
            AFInAppEventParameterName(context).valueOf(Constants.REFERRER, stringExtra2);
            AppsFlyerProperties appsFlyerProperties = AppsFlyerProperties.getInstance();
            appsFlyerProperties.set("AF_REFERRER", stringExtra2);
            appsFlyerProperties.valueOf = stringExtra2;
            boolean values2 = AppsFlyerProperties.getInstance().values();
            super.hashCode();
            if (!values2) {
                return;
            }
        } else {
            AFInAppEventParameterName(context).valueOf(Constants.REFERRER, stringExtra2);
            AppsFlyerProperties appsFlyerProperties2 = AppsFlyerProperties.getInstance();
            appsFlyerProperties2.set("AF_REFERRER", stringExtra2);
            appsFlyerProperties2.valueOf = stringExtra2;
            if (!AppsFlyerProperties.getInstance().values()) {
                return;
            }
        }
        AFLogger.afInfoLog("onReceive: isLaunchCalled");
        AFInAppEventParameterName(context, AFd1dSDK.onReceive);
        AFKeystoreWrapper(context, stringExtra2);
        int i3 = onValidateInApp + 55;
        onValidateInAppFailure = i3 % 128;
        int i4 = i3 % 2;
    }

    private static void values(JSONObject jSONObject) {
        String str;
        String next;
        JSONArray jSONArray;
        int i;
        ArrayList arrayList = new ArrayList();
        Iterator<String> keys = jSONObject.keys();
        while (keys.hasNext()) {
            try {
                JSONArray jSONArray2 = new JSONArray((String) jSONObject.get(keys.next()));
                int i2 = 0;
                while (true) {
                    if (i2 >= jSONArray2.length()) {
                        break;
                    }
                    arrayList.add(Long.valueOf(jSONArray2.getLong(i2)));
                    i2++;
                }
                int i3 = onValidateInApp + 105;
                onValidateInAppFailure = i3 % 128;
                int i4 = i3 % 2;
            } catch (JSONException unused) {
            }
        }
        Collections.sort(arrayList);
        Iterator<String> keys2 = jSONObject.keys();
        loop2: while (true) {
            str = null;
            while (keys2.hasNext()) {
                int i5 = onValidateInAppFailure + 65;
                onValidateInApp = i5 % 128;
                if (i5 % 2 == 0) {
                    int i6 = 33 / 0;
                    if (str != null) {
                        break loop2;
                    }
                    next = keys2.next();
                    try {
                        jSONArray = new JSONArray((String) jSONObject.get(next));
                        i = 0;
                        while (true) {
                            if ((i >= jSONArray.length() ? (char) 2 : 'V') == 'V') {
                                int i7 = onValidateInApp + 85;
                                onValidateInAppFailure = i7 % 128;
                                int i8 = i7 % 2;
                                if (jSONArray.getLong(i) != ((Long) arrayList.get(0)).longValue()) {
                                    int i9 = onValidateInApp + 13;
                                    onValidateInAppFailure = i9 % 128;
                                    int i10 = i9 % 2;
                                    if (!(jSONArray.getLong(i) != ((Long) arrayList.get(1)).longValue())) {
                                        break;
                                    }
                                    if ((jSONArray.getLong(i) == ((Long) arrayList.get(arrayList.size() - 1)).longValue() ? (char) 30 : '?') != 30) {
                                        i++;
                                        int i11 = onValidateInApp + 103;
                                        onValidateInAppFailure = i11 % 128;
                                        int i12 = i11 % 2;
                                        str = next;
                                    }
                                }
                            }
                        }
                    } catch (JSONException unused2) {
                    }
                } else {
                    if (str != null) {
                        break loop2;
                    }
                    next = keys2.next();
                    jSONArray = new JSONArray((String) jSONObject.get(next));
                    i = 0;
                    while (true) {
                        if ((i >= jSONArray.length() ? (char) 2 : 'V') == 'V') {
                            break;
                        }
                        i++;
                        int i112 = onValidateInApp + 103;
                        onValidateInAppFailure = i112 % 128;
                        int i122 = i112 % 2;
                        str = next;
                    }
                }
            }
        }
        if ((str != null ? '1' : (char) 6) != 6) {
            int i13 = onValidateInAppFailure + 121;
            onValidateInApp = i13 % 128;
            int i14 = i13 % 2;
            jSONObject.remove(str);
        }
    }

    public final void AFInAppEventParameterName(Context context, String str) {
        long currentTimeMillis;
        String string;
        JSONObject jSONObject;
        JSONArray jSONArray;
        int i = onValidateInAppFailure + 111;
        onValidateInApp = i % 128;
        Object obj = null;
        try {
            if ((i % 2 == 0 ? (char) 30 : (char) 31) != 31) {
                AFLogger.afDebugLog("received a new (extra) referrer: ".concat(String.valueOf(str)));
                currentTimeMillis = System.currentTimeMillis();
                string = valueOf(context).getString("extraReferrers", null);
                super.hashCode();
            } else {
                AFLogger.afDebugLog("received a new (extra) referrer: ".concat(String.valueOf(str)));
                currentTimeMillis = System.currentTimeMillis();
                string = valueOf(context).getString("extraReferrers", null);
            }
            if ((((long) jSONArray.length()) < 5 ? (char) 22 : 'M') == 22) {
                jSONArray.put(currentTimeMillis);
            }
            if (jSONObject.length() >= 4) {
                int i2 = onValidateInApp + 89;
                onValidateInAppFailure = i2 % 128;
                int i3 = i2 % 2;
                values(jSONObject);
            }
            jSONObject.put(str, jSONArray.toString());
            AFInAppEventParameterName(context).valueOf("extraReferrers", jSONObject.toString());
        } catch (JSONException unused) {
        } catch (Throwable th) {
            StringBuilder sb = new StringBuilder("Couldn't save referrer - ");
            sb.append(str);
            sb.append(": ");
            AFLogger.afErrorLog(sb.toString(), th);
        }
    }

    @Override
    public final void stop(boolean z, Context context) {
        AFb1bSDK aFb1bSDK;
        AFc1xSDK aFc1xSDK = this.AppsFlyerLib;
        if (context != null) {
            int i = onValidateInApp + 39;
            onValidateInAppFailure = i % 128;
            if (i % 2 != 0) {
                aFb1bSDK = aFc1xSDK.values;
                int i2 = 20 / 0;
            } else {
                aFb1bSDK = aFc1xSDK.values;
            }
        }
        this.AppsFlyerLib.AFVersionDeclaration().AFInAppEventParameterName = z;
        try {
            File file = new File(this.AppsFlyerLib.getLevel().values.values.getFilesDir(), "AFRequestCache");
            if (file.exists()) {
                File[] listFiles = file.listFiles();
                if (listFiles != null) {
                    int i3 = onValidateInApp + 3;
                    onValidateInAppFailure = i3 % 128;
                    int i4 = i3 % 2;
                    for (File file2 : listFiles) {
                        StringBuilder sb = new StringBuilder("CACHE: Found cached request");
                        sb.append(file2.getName());
                        AFLogger.afInfoLog(sb.toString());
                        StringBuilder sb2 = new StringBuilder("CACHE: Deleting ");
                        sb2.append(file2.getName());
                        sb2.append(" from cache");
                        AFLogger.afInfoLog(sb2.toString());
                        file2.delete();
                    }
                }
            } else {
                int i5 = onValidateInApp + 65;
                onValidateInAppFailure = i5 % 128;
                if (i5 % 2 != 0) {
                    file.mkdir();
                    Object obj = null;
                    super.hashCode();
                } else {
                    file.mkdir();
                }
            }
        } catch (Exception e) {
            AFLogger.afErrorLog("CACHE: Could not cache request", e);
        }
        if (z ? false : true) {
            return;
        }
        AFInAppEventParameterName(context).AFKeystoreWrapper("is_stop_tracking_used", true);
    }

    @Override
    public final String getSdkVersion() {
        int i = onValidateInApp + 37;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        AFc1zSDK values2 = values();
        values2.afWarnLog().AFInAppEventType("getSdkVersion", new String[0]);
        values2.AFInAppEventParameterName();
        String AFKeystoreWrapper2 = AFb1aSDK.AFKeystoreWrapper();
        int i3 = onValidateInAppFailure + 23;
        onValidateInApp = i3 % 128;
        if ((i3 % 2 == 0 ? (char) 16 : '\b') == '\b') {
            return AFKeystoreWrapper2;
        }
        Object[] objArr = null;
        int length = objArr.length;
        return AFKeystoreWrapper2;
    }

    @Override
    public final void onPause(Context context) {
        if ((AFa1aSDK.AFKeystoreWrapper != null ? (char) 17 : '%') != 17) {
            return;
        }
        int i = onValidateInAppFailure + 97;
        onValidateInApp = i % 128;
        if ((i % 2 == 0 ? (char) 29 : '\b') != '\b') {
            AFa1aSDK.AFKeystoreWrapper.AFKeystoreWrapper(context);
            Object[] objArr = null;
            int length = objArr.length;
        } else {
            AFa1aSDK.AFKeystoreWrapper.AFKeystoreWrapper(context);
        }
        int i2 = onValidateInApp + 113;
        onValidateInAppFailure = i2 % 128;
        int i3 = i2 % 2;
    }

    @Override
    public final void updateServerUninstallToken(Context context, String str) {
        AFc1xSDK aFc1xSDK = this.AppsFlyerLib;
        if (context != null) {
            AFb1bSDK aFb1bSDK = aFc1xSDK.values;
            if (context != null) {
                aFb1bSDK.values = context.getApplicationContext();
            }
        }
        AFd1iSDK aFd1iSDK = new AFd1iSDK(context);
        if (str == null || str.trim().isEmpty()) {
            AFLogger.afWarnLog("[register] Firebase Token is either empty or null and was not registered.");
            return;
        }
        AFLogger.afInfoLog("[register] Firebase Refreshed Token = ".concat(String.valueOf(str)));
        AFb1rSDK AFInAppEventParameterName2 = aFd1iSDK.AFInAppEventParameterName();
        if (AFInAppEventParameterName2 == null || !str.equals(AFInAppEventParameterName2.values)) {
            long currentTimeMillis = System.currentTimeMillis();
            boolean z = AFInAppEventParameterName2 == null || currentTimeMillis - AFInAppEventParameterName2.AFInAppEventParameterName > TimeUnit.SECONDS.toMillis(2L);
            AFb1rSDK aFb1rSDK = new AFb1rSDK(str, currentTimeMillis, !z);
            aFd1iSDK.values.valueOf("afUninstallToken", aFb1rSDK.values);
            aFd1iSDK.values.AFInAppEventParameterName("afUninstallToken_received_time", aFb1rSDK.AFInAppEventParameterName);
            aFd1iSDK.values.AFKeystoreWrapper("afUninstallToken_queued", aFb1rSDK.valueOf());
            if (z) {
                AFd1iSDK.valueOf(str);
            }
        }
    }

    @Override
    public final void setDebugLog(boolean z) {
        AFLogger.LogLevel logLevel;
        int i = onValidateInApp + 89;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        Object obj = null;
        if ((z ? Typography.less : Typography.quote) != '\"') {
            int i3 = onValidateInApp + 27;
            onValidateInAppFailure = i3 % 128;
            if ((i3 % 2 != 0 ? '2' : '+') != '+') {
                logLevel = AFLogger.LogLevel.DEBUG;
                super.hashCode();
            } else {
                logLevel = AFLogger.LogLevel.DEBUG;
            }
        } else {
            logLevel = AFLogger.LogLevel.NONE;
        }
        setLogLevel(logLevel);
        int i4 = onValidateInApp + 81;
        onValidateInAppFailure = i4 % 128;
        if (i4 % 2 != 0) {
            super.hashCode();
        }
    }

    @Override
    public final void setOaidData(String str) {
        int i = onValidateInAppFailure + 97;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setOaidData", str);
        AFb1zSDK.valueOf = str;
        int i3 = onValidateInAppFailure + 83;
        onValidateInApp = i3 % 128;
        if (!(i3 % 2 != 0)) {
            int i4 = 31 / 0;
        }
    }

    @Override
    public final void setAndroidIdData(String str) {
        int i = onValidateInApp + 95;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setAndroidIdData", str);
        this.afRDLog = str;
        int i3 = onValidateInApp + 31;
        onValidateInAppFailure = i3 % 128;
        int i4 = i3 % 2;
    }

    private static void AFInAppEventParameterName(String str, String str2) {
        int i = onValidateInAppFailure + 25;
        onValidateInApp = i % 128;
        if ((i % 2 == 0 ? (char) 30 : 'P') != 30) {
            AppsFlyerProperties.getInstance().set(str, str2);
            return;
        }
        AppsFlyerProperties.getInstance().set(str, str2);
        Object[] objArr = null;
        int length = objArr.length;
    }

    private static void values(String str, boolean z) {
        int i = onValidateInApp + 49;
        onValidateInAppFailure = i % 128;
        if ((i % 2 != 0 ? 'X' : (char) 19) == 19) {
            AppsFlyerProperties.getInstance().set(str, z);
            return;
        }
        AppsFlyerProperties.getInstance().set(str, z);
        Object[] objArr = null;
        int length = objArr.length;
    }

    private static String valueOf(String str) {
        int i = onValidateInApp + 93;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        String string = AppsFlyerProperties.getInstance().getString(str);
        int i3 = onValidateInAppFailure + 71;
        onValidateInApp = i3 % 128;
        if ((i3 % 2 == 0 ? '+' : Typography.less) != '+') {
            return string;
        }
        Object obj = null;
        super.hashCode();
        return string;
    }

    private static boolean AFInAppEventType(String str, boolean z) {
        boolean z2;
        int i = onValidateInAppFailure + 39;
        onValidateInApp = i % 128;
        if (!(i % 2 == 0)) {
            z2 = AppsFlyerProperties.getInstance().getBoolean(str, z);
        } else {
            z2 = AppsFlyerProperties.getInstance().getBoolean(str, z);
            Object obj = null;
            super.hashCode();
        }
        int i2 = onValidateInApp + 107;
        onValidateInAppFailure = i2 % 128;
        int i3 = i2 % 2;
        return z2;
    }

    public final boolean AFInAppEventParameterName() {
        int i = onValidateInApp + 37;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        if ((AFInAppEventType(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false) ? '\t' : '9') != '9') {
            if ((AFInAppEventType() == null ? 'L' : (char) 7) == 'L') {
                int i3 = onValidateInApp + 103;
                onValidateInAppFailure = i3 % 128;
                int i4 = i3 % 2;
                return true;
            }
        }
        return false;
    }

    @Override
    public final void waitForCustomerUserId(boolean z) {
        int i = onValidateInApp + 53;
        onValidateInAppFailure = i % 128;
        if (i % 2 != 0) {
        }
        AFLogger.afInfoLog("initAfterCustomerUserID: ".concat(String.valueOf(z)), true);
        values(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, z);
        int i2 = onValidateInAppFailure + 87;
        onValidateInApp = i2 % 128;
        if (i2 % 2 != 0) {
            return;
        }
        Object obj = null;
        super.hashCode();
    }

    @Override
    public final void setCustomerIdAndLogSession(String str, Context context) {
        String str2;
        int i = onValidateInAppFailure + 33;
        onValidateInApp = i % 128;
        if (i % 2 == 0) {
            int i2 = 61 / 0;
            if (context == null) {
                return;
            }
        } else {
            if (context == null) {
                return;
            }
        }
        int i3 = onValidateInApp + 47;
        onValidateInAppFailure = i3 % 128;
        int i4 = i3 % 2;
        if (!AFInAppEventParameterName()) {
            setCustomerUserId(str);
            AFLogger.afInfoLog("waitForCustomerUserId is false; setting CustomerUserID: ".concat(String.valueOf(str)), true);
            return;
        }
        setCustomerUserId(str);
        StringBuilder sb = new StringBuilder("CustomerUserId set: ");
        sb.append(str);
        sb.append(" - Initializing AppsFlyer Tacking");
        AFLogger.afInfoLog(sb.toString(), true);
        String referrer = AppsFlyerProperties.getInstance().getReferrer(context);
        AFInAppEventParameterName(context, AFd1dSDK.setCustomerIdAndLogSession);
        String str3 = this.AppsFlyerLib.AFVersionDeclaration().values;
        if (referrer != null) {
            int i5 = onValidateInApp + 21;
            onValidateInAppFailure = i5 % 128;
            int i6 = i5 % 2;
            str2 = referrer;
        } else {
            int i7 = onValidateInAppFailure + 119;
            onValidateInApp = i7 % 128;
            if (i7 % 2 == 0) {
                Object obj = null;
                super.hashCode();
            }
            str2 = "";
        }
        if (!(context instanceof Activity ? false : true)) {
            ((Activity) context).getIntent();
        }
        values(context, null, null, str2, null);
        int i8 = onValidateInAppFailure + 73;
        onValidateInApp = i8 % 128;
        int i9 = i8 % 2;
    }

    @Override
    public final String getOutOfStore(Context context) {
        String string = AppsFlyerProperties.getInstance().getString("api_store_value");
        if ((string != null ? Typography.less : '9') == '<') {
            int i = onValidateInApp + 101;
            onValidateInAppFailure = i % 128;
            int i2 = i % 2;
            return string;
        }
        String valueOf2 = valueOf(context, "AF_STORE");
        if (valueOf2 != null) {
            return valueOf2;
        }
        AFLogger.afInfoLog("No out-of-store value set");
        int i3 = onValidateInApp + 83;
        onValidateInAppFailure = i3 % 128;
        int i4 = i3 % 2;
        return null;
    }

    @Override
    public final void setOutOfStore(String str) {
        int i = onValidateInApp + 101;
        onValidateInAppFailure = i % 128;
        if (!(i % 2 == 0)) {
            int i2 = 73 / 0;
        }
    }

    @Override
    public final void setAppInviteOneLink(String str) {
        int i;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setAppInviteOneLink", str);
        AFLogger.afInfoLog("setAppInviteOneLink = ".concat(String.valueOf(str)));
        if (str != null) {
            int i2 = onValidateInAppFailure + 3;
            onValidateInApp = i2 % 128;
            if (i2 % 2 == 0) {
                int i3 = 44 / 0;
            }
            AFInAppEventParameterName(AppsFlyerProperties.ONELINK_ID, str);
            i = onValidateInApp + 83;
            onValidateInAppFailure = i % 128;
            if (i % 2 == 0) {
                Object[] objArr = null;
                int length = objArr.length;
                return;
            }
            return;
        }
        AppsFlyerProperties.getInstance().remove(AppsFlyerProperties.ONELINK_DOMAIN);
        AppsFlyerProperties.getInstance().remove("onelinkVersion");
        AppsFlyerProperties.getInstance().remove(AppsFlyerProperties.ONELINK_SCHEME);
        int i4 = onValidateInAppFailure + 97;
        onValidateInApp = i4 % 128;
        int i5 = i4 % 2;
        AFInAppEventParameterName(AppsFlyerProperties.ONELINK_ID, str);
        i = onValidateInApp + 83;
        onValidateInAppFailure = i % 128;
        if (i % 2 == 0) {
        }
    }

    @Override
    public final void setAdditionalData(Map<String, Object> map) {
        int i = onValidateInAppFailure + 113;
        onValidateInApp = i % 128;
        if ((i % 2 == 0 ? (char) 22 : 'X') != 'X') {
            Object obj = null;
            super.hashCode();
        }
        int i2 = onValidateInAppFailure + 103;
        onValidateInApp = i2 % 128;
        if (i2 % 2 == 0) {
            int i3 = 87 / 0;
        }
    }

    @Override
    public final void sendPushNotificationData(Activity activity) {
        long currentTimeMillis;
        long j;
        int i = onValidateInApp + 101;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        if (activity == null || activity.getIntent() == null) {
            if ((activity != null ? '\\' : (char) 18) != 18) {
                int i3 = onValidateInApp + 25;
                onValidateInAppFailure = i3 % 128;
                if (i3 % 2 != 0) {
                    AFb1qSDK AFInAppEventParameterName2 = AFb1qSDK.AFInAppEventParameterName();
                    String[] strArr = new String[5];
                    strArr[0] = activity.getLocalClassName();
                    strArr[1] = "activity_intent_null";
                    AFInAppEventParameterName2.AFInAppEventType("sendPushNotificationData", strArr);
                } else {
                    AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("sendPushNotificationData", activity.getLocalClassName(), "activity_intent_null");
                }
            } else {
                AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("sendPushNotificationData", "activity_null");
                int i4 = onValidateInAppFailure + 7;
                onValidateInApp = i4 % 128;
                int i5 = i4 % 2;
            }
        } else {
            AFb1qSDK AFInAppEventParameterName3 = AFb1qSDK.AFInAppEventParameterName();
            StringBuilder sb = new StringBuilder("activity_intent_");
            sb.append(activity.getIntent().toString());
            AFInAppEventParameterName3.AFInAppEventType("sendPushNotificationData", activity.getLocalClassName(), sb.toString());
        }
        String valueOf2 = valueOf(activity);
        this.onInstallConversionDataLoadedNative = valueOf2;
        if (valueOf2 != null) {
            int i6 = onValidateInAppFailure + 81;
            onValidateInApp = i6 % 128;
            Object obj = null;
            if (i6 % 2 == 0) {
                currentTimeMillis = System.currentTimeMillis();
                Map<Long, String> map = this.onAppOpenAttributionNative;
                super.hashCode();
            } else {
                currentTimeMillis = System.currentTimeMillis();
            }
            if (this.onAppOpenAttributionNative.size() == AppsFlyerProperties.getInstance().getInt("pushPayloadHistorySize", 2)) {
                StringBuilder sb2 = new StringBuilder("pushes: removing oldest overflowing push (oldest push:");
                sb2.append(currentTimeMillis);
                sb2.append(")");
                AFLogger.afInfoLog(sb2.toString());
                this.onAppOpenAttributionNative.remove(Long.valueOf(currentTimeMillis));
            }
            this.onAppOpenAttributionNative.put(Long.valueOf(j), this.onInstallConversionDataLoadedNative);
            start(activity);
        }
    }

    @Override
    public final void setUserEmails(String... strArr) {
        int i = onValidateInApp + 57;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setUserEmails", strArr);
        setUserEmails(AppsFlyerProperties.EmailsCryptType.NONE, strArr);
        int i3 = onValidateInAppFailure + 93;
        onValidateInApp = i3 % 128;
        if ((i3 % 2 == 0 ? '.' : 'K') != 'K') {
            int i4 = 93 / 0;
        }
    }

    @Override
    public final void setUserEmails(AppsFlyerProperties.EmailsCryptType emailsCryptType, String... strArr) {
        ArrayList arrayList = new ArrayList(strArr.length + 1);
        arrayList.add(emailsCryptType.toString());
        arrayList.addAll(Arrays.asList(strArr));
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setUserEmails", (String[]) arrayList.toArray(new String[strArr.length + 1]));
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EMAIL_CRYPT_TYPE, emailsCryptType.getValue());
        HashMap hashMap = new HashMap();
        String str = null;
        ArrayList arrayList2 = new ArrayList();
        int length = strArr.length;
        int i = 0;
        int i2 = onValidateInAppFailure + 53;
        onValidateInApp = i2 % 128;
        int i3 = i2 % 2;
        while (true) {
            if ((i < length ? 'G' : Typography.less) != '<') {
                String str2 = strArr[i];
                if (AnonymousClass7.AFKeystoreWrapper[emailsCryptType.ordinal()] != 2) {
                    arrayList2.add(AFb1tSDK.values(str2));
                    str = "sha256_el_arr";
                } else {
                    arrayList2.add(str2);
                    str = "plain_el_arr";
                }
                i++;
            } else {
                hashMap.put(str, arrayList2);
                AppsFlyerProperties.getInstance().setUserEmails(new JSONObject(hashMap).toString());
                int i4 = onValidateInApp + 119;
                onValidateInAppFailure = i4 % 128;
                int i5 = i4 % 2;
                return;
            }
        }
    }

    static class AnonymousClass7 {
        static final int[] AFKeystoreWrapper;

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

    @Override
    public final void setCollectAndroidID(boolean z) {
        int i = onValidateInApp + 15;
        onValidateInAppFailure = i % 128;
        if (!(i % 2 == 0)) {
            AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setCollectAndroidID", String.valueOf(z));
        } else {
            AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setCollectAndroidID", String.valueOf(z));
        }
        AFInAppEventParameterName(AppsFlyerProperties.COLLECT_ANDROID_ID, Boolean.toString(z));
        AFInAppEventParameterName(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, Boolean.toString(z));
    }

    @Override
    public final void setCollectIMEI(boolean z) {
        int i = onValidateInApp + 101;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setCollectIMEI", String.valueOf(z));
        AFInAppEventParameterName(AppsFlyerProperties.COLLECT_IMEI, Boolean.toString(z));
        AFInAppEventParameterName(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, Boolean.toString(z));
        int i3 = onValidateInAppFailure + 25;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    @Deprecated
    public final void setCollectOaid(boolean z) {
        int i = onValidateInAppFailure + 123;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setCollectOaid", String.valueOf(z));
        AFInAppEventParameterName(AppsFlyerProperties.COLLECT_OAID, Boolean.toString(z));
        int i3 = onValidateInAppFailure + 89;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void setResolveDeepLinkURLs(String... strArr) {
        int i = onValidateInAppFailure + 59;
        onValidateInApp = i % 128;
        AFLogger.afDebugLog((i % 2 == 0 ? (char) 27 : 'N') != 'N' ? String.format("setResolveDeepLinkURLs %s", Arrays.toString(strArr)) : String.format("setResolveDeepLinkURLs %s", Arrays.toString(strArr)));
        AFa1sSDK.AFInAppEventType.clear();
        AFa1sSDK.AFInAppEventType.addAll(Arrays.asList(strArr));
        int i2 = onValidateInAppFailure + 17;
        onValidateInApp = i2 % 128;
        int i3 = i2 % 2;
    }

    @Override
    public final void setOneLinkCustomDomain(String... strArr) {
        int i = onValidateInAppFailure + 35;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        AFLogger.afDebugLog(String.format("setOneLinkCustomDomain %s", Arrays.toString(strArr)));
        AFa1sSDK.valueOf = strArr;
        int i3 = onValidateInApp + 91;
        onValidateInAppFailure = i3 % 128;
        if (!(i3 % 2 != 0)) {
            return;
        }
        Object[] objArr = null;
        int length = objArr.length;
    }

    @Override
    public final AppsFlyerLib init(String str, AppsFlyerConversionListener appsFlyerConversionListener, Context context) {
        List<ResolveInfo> queryIntentContentProviders;
        AFb1bSDK aFb1bSDK;
        if ((this.onResponseNative ? (char) 27 : (char) 25) != 25) {
            int i = onValidateInApp + 105;
            onValidateInAppFailure = i % 128;
            int i2 = i % 2;
            return this;
        }
        this.onResponseNative = true;
        this.AppsFlyerLib.AFVersionDeclaration().values = str;
        AFb1rSDK.AFInAppEventType(str);
        if ((context != null ? (char) 26 : (char) 0) != 0) {
            this.onResponseErrorNative = (Application) context.getApplicationContext();
            AFc1xSDK aFc1xSDK = this.AppsFlyerLib;
            Object[] objArr = null;
            if (context != null) {
                int i3 = onValidateInApp + 115;
                onValidateInAppFailure = i3 % 128;
                if ((i3 % 2 != 0 ? '.' : '2') != '.') {
                    aFb1bSDK = aFc1xSDK.values;
                } else {
                    aFb1bSDK = aFc1xSDK.values;
                    int length = objArr.length;
                }
            }
            values().afInfoLog().AFInAppEventParameterName = System.currentTimeMillis();
            values().afDebugLog().AFInAppEventType((AFd1qSDK) null);
            AFe1iSDK init2 = values().init();
            final AFe1fSDK aFe1fSDK = new AFe1fSDK(new AnonymousClass5());
            Runnable runnable = new Runnable() {
                @Override
                public final void run() {
                    SharedPreferences valueOf2 = AFb1xSDK.valueOf(AFb1xSDK.AFKeystoreWrapper(AFb1xSDK.this));
                    int AFKeystoreWrapper2 = AFb1xSDK.AFKeystoreWrapper(valueOf2, false);
                    boolean z = valueOf2.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false);
                    boolean z2 = aFe1fSDK.afRDLog == AFe1hSDK.AFa1zSDK.NOT_STARTED;
                    if (AFKeystoreWrapper2 == 1) {
                        if (z2 || z) {
                            AFb1xSDK aFb1xSDK = AFb1xSDK.this;
                            AFe1vSDK aFe1vSDK = new AFe1vSDK();
                            Application AFKeystoreWrapper3 = AFb1xSDK.AFKeystoreWrapper(AFb1xSDK.this);
                            if (AFKeystoreWrapper3 != null) {
                                aFe1vSDK.valueOf = (Application) AFKeystoreWrapper3.getApplicationContext();
                            }
                            AFb1xSDK.AFKeystoreWrapper(aFb1xSDK, aFe1vSDK);
                        }
                    }
                }
            };
            init2.AFInAppEventType(aFe1fSDK);
            init2.AFInAppEventType(new AFe1aSDK(runnable));
            init2.AFInAppEventType(new AFe1gSDK(runnable, values()));
            init2.AFInAppEventType(new AFe1dSDK(runnable, values()));
            Application application = this.onResponseErrorNative;
            AFc1zSDK values2 = values();
            if (Build.VERSION.SDK_INT >= 19 && (queryIntentContentProviders = application.getPackageManager().queryIntentContentProviders(new Intent("com.appsflyer.referrer.INSTALL_PROVIDER"), 0)) != null) {
                int i4 = onValidateInApp + 85;
                onValidateInAppFailure = i4 % 128;
                int i5 = i4 % 2;
                if (!queryIntentContentProviders.isEmpty()) {
                    ArrayList arrayList = new ArrayList();
                    Iterator<ResolveInfo> it = queryIntentContentProviders.iterator();
                    while (true) {
                        if ((it.hasNext() ? (char) 19 : '#') == '#') {
                            break;
                        }
                        ProviderInfo providerInfo = it.next().providerInfo;
                        if (providerInfo != null) {
                            arrayList.add(new AFe1jSDK(providerInfo, runnable, values2));
                            int i6 = onValidateInApp + 107;
                            onValidateInAppFailure = i6 % 128;
                            int i7 = i6 % 2;
                        } else {
                            AFLogger.afWarnLog("[Preinstall]: com.appsflyer.referrer.INSTALL_PROVIDER Action is set for non ContentProvider component");
                        }
                    }
                    if (!arrayList.isEmpty()) {
                        init2.valueOf.addAll(arrayList);
                        StringBuilder sb = new StringBuilder("[Preinstall]: Detected ");
                        sb.append(arrayList.size());
                        sb.append(" valid preinstall provider(s)");
                        AFLogger.afDebugLog(sb.toString());
                    }
                }
            }
            for (AFe1hSDK aFe1hSDK : init2.AFInAppEventType()) {
                aFe1hSDK.valueOf(this.onResponseErrorNative);
            }
            this.AppsFlyerLib.AFVersionDeclaration().valueOf();
            AFb1dSDK.AFInAppEventType = this.onResponseErrorNative;
        } else {
            AFLogger.afWarnLog("context is null, Google Install Referrer will be not initialized");
        }
        AFb1qSDK AFInAppEventParameterName2 = AFb1qSDK.AFInAppEventParameterName();
        String[] strArr = new String[2];
        strArr[0] = str;
        strArr[1] = appsFlyerConversionListener == null ? "null" : "conversionDataListener";
        AFInAppEventParameterName2.AFInAppEventType("init", strArr);
        AFLogger.AFKeystoreWrapper(String.format("Initializing AppsFlyer SDK: (v%s.%s)", "6.9.2", AFKeystoreWrapper));
        AFInAppEventType = appsFlyerConversionListener;
        return this;
    }

    public final class AnonymousClass5 implements Runnable {
        AnonymousClass5() {
        }

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

        public void AFInAppEventParameterName() {
            try {
                AFe1vSDK aFe1vSDK = new AFe1vSDK();
                Application AFKeystoreWrapper = AFb1xSDK.AFKeystoreWrapper(AFb1xSDK.this);
                if (AFKeystoreWrapper != null) {
                    aFe1vSDK.valueOf = (Application) AFKeystoreWrapper.getApplicationContext();
                }
                if (AFb1xSDK.AFInAppEventParameterName(AFb1xSDK.this, aFe1vSDK, AFb1xSDK.valueOf(AFb1xSDK.AFKeystoreWrapper(AFb1xSDK.this)))) {
                    AFb1xSDK.AFKeystoreWrapper(AFb1xSDK.this, aFe1vSDK);
                }
            } catch (Throwable th) {
                AFLogger.afErrorLog(th.getMessage(), th);
            }
        }
    }

    private void afInfoLog(Context context) {
        this.onDeepLinking = new HashMap();
        final long currentTimeMillis = System.currentTimeMillis();
        final AFa1oSDK.AFa1zSDK aFa1zSDK = new AFa1oSDK.AFa1zSDK() {
            @Override
            public final void AFKeystoreWrapper(String str, String str2, String str3) {
                if (str != null) {
                    AFLogger.afInfoLog("Facebook Deferred AppLink data received: ".concat(String.valueOf(str)));
                    AFb1xSDK.AFInAppEventType(AFb1xSDK.this).put("link", str);
                    if (str2 != null) {
                        AFb1xSDK.AFInAppEventType(AFb1xSDK.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);
                        AFb1xSDK.AFInAppEventType(AFb1xSDK.this).put(AppLinks.KEY_NAME_EXTRAS, hashMap);
                    }
                } else {
                    AFb1xSDK.AFInAppEventType(AFb1xSDK.this).put("link", "");
                }
                AFb1xSDK.AFInAppEventType(AFb1xSDK.this).put("ttr", String.valueOf(System.currentTimeMillis() - currentTimeMillis));
            }

            @Override
            public final void values(String str) {
                AFb1xSDK.AFInAppEventType(AFb1xSDK.this).put("error", str);
            }
        };
        try {
            Class.forName("com.facebook.FacebookSdk").getMethod("sdkInitialize", Context.class).invoke(null, context);
            final Class<?> cls = Class.forName("com.facebook.applinks.AppLinkData");
            Class<?> cls2 = Class.forName("com.facebook.applinks.AppLinkData$CompletionHandler");
            Method method = cls.getMethod("fetchDeferredAppLinkData", Context.class, String.class, cls2);
            Object newProxyInstance = Proxy.newProxyInstance(cls2.getClassLoader(), new Class[]{cls2}, new InvocationHandler() {
                @Override
                public final Object invoke(Object obj, Method method2, Object[] objArr) throws Throwable {
                    String str;
                    String str2;
                    String str3;
                    Bundle bundle;
                    if (method2.getName().equals("onDeferredAppLinkDataFetched")) {
                        if (objArr[0] != null) {
                            Bundle bundle2 = (Bundle) Bundle.class.cast(cls.getMethod("getArgumentBundle", new Class[0]).invoke(cls.cast(objArr[0]), new Object[0]));
                            if (bundle2 != null) {
                                str2 = bundle2.getString("com.facebook.platform.APPLINK_NATIVE_URL");
                                str3 = bundle2.getString("target_url");
                                Bundle bundle3 = bundle2.getBundle(AppLinks.KEY_NAME_EXTRAS);
                                str = (bundle3 == null || (bundle = bundle3.getBundle("deeplink_context")) == null) ? null : bundle.getString("promo_code");
                            } else {
                                str = null;
                                str2 = null;
                                str3 = null;
                            }
                            AFa1zSDK aFa1zSDK2 = aFa1zSDK;
                            if (aFa1zSDK2 != null) {
                                aFa1zSDK2.AFKeystoreWrapper(str2, str3, str);
                            }
                        } else {
                            AFa1zSDK aFa1zSDK3 = aFa1zSDK;
                            if (aFa1zSDK3 != null) {
                                aFa1zSDK3.AFKeystoreWrapper(null, null, null);
                            }
                        }
                        return null;
                    }
                    AFa1zSDK aFa1zSDK4 = aFa1zSDK;
                    if (aFa1zSDK4 != null) {
                        aFa1zSDK4.values("onDeferredAppLinkDataFetched invocation failed");
                    }
                    return null;
                }
            });
            String string = context.getString(context.getResources().getIdentifier("facebook_app_id", "string", context.getPackageName()));
            if ((TextUtils.isEmpty(string) ? (char) 28 : (char) 15) == 15) {
                method.invoke(null, context, string, newProxyInstance);
                int i = onValidateInApp + 111;
                onValidateInAppFailure = i % 128;
                int i2 = i % 2;
                return;
            }
            int i3 = onValidateInApp + 49;
            onValidateInAppFailure = i3 % 128;
            int i4 = i3 % 2;
            aFa1zSDK.values("Facebook app id not defined in resources");
        } catch (ClassNotFoundException e) {
            aFa1zSDK.values(e.toString());
        } catch (IllegalAccessException e2) {
            aFa1zSDK.values(e2.toString());
        } catch (NoSuchMethodException e3) {
            aFa1zSDK.values(e3.toString());
        } catch (InvocationTargetException e4) {
            aFa1zSDK.values(e4.toString());
        }
    }

    @Override
    public final void enableFacebookDeferredApplinks(boolean z) {
        int i = onValidateInAppFailure + 5;
        onValidateInApp = i % 128;
        char c = i % 2 == 0 ? 'A' : (char) 3;
        this.onResponseError = z;
        if (c != 'A') {
            return;
        }
        int i2 = 92 / 0;
    }

    @Override
    public final void start(Context context) {
        int i = onValidateInAppFailure + 117;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        Object obj = null;
        start(context, null);
        int i3 = onValidateInAppFailure + 99;
        onValidateInApp = i3 % 128;
        if (i3 % 2 != 0) {
            return;
        }
        super.hashCode();
    }

    @Override
    public final void start(Context context, String str) {
        int i = onValidateInApp + 49;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        start(context, str, null);
        int i3 = onValidateInAppFailure + 39;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void start(Context context, String str, final AppsFlyerRequestListener appsFlyerRequestListener) {
        if (AFa1aSDK.AFKeystoreWrapper != null) {
            return;
        }
        if (!this.onResponseNative) {
            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) {
                int i = onValidateInApp + 33;
                onValidateInAppFailure = i % 128;
                if (i % 2 != 0) {
                    int i2 = 65 / 0;
                    if (appsFlyerRequestListener == null) {
                        return;
                    }
                } else if (appsFlyerRequestListener == null) {
                    return;
                }
                appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1cSDK.AFInAppEventType);
                return;
            }
        }
        AFc1xSDK aFc1xSDK = this.AppsFlyerLib;
        if (context != null) {
            int i3 = onValidateInApp + 59;
            onValidateInAppFailure = i3 % 128;
            int i4 = i3 % 2;
            AFb1bSDK aFb1bSDK = aFc1xSDK.values;
            if (context != null) {
                aFb1bSDK.values = context.getApplicationContext();
            }
        }
        final AFd1bSDK afInfoLog2 = values().afInfoLog();
        afInfoLog2.values(AFa1pSDK.values(context));
        this.onResponseErrorNative = (Application) context.getApplicationContext();
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType(TtmlNode.START, str);
        AFLogger.afInfoLog(String.format("Starting AppsFlyer: (v%s.%s)", "6.9.2", AFKeystoreWrapper));
        StringBuilder sb = new StringBuilder("Build Number: ");
        sb.append(AFKeystoreWrapper);
        AFLogger.afInfoLog(sb.toString());
        AppsFlyerProperties.getInstance().loadProperties(this.onResponseErrorNative.getApplicationContext());
        if (!(!TextUtils.isEmpty(str))) {
            if (TextUtils.isEmpty(this.AppsFlyerLib.AFVersionDeclaration().values)) {
                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;
                }
                appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1cSDK.AFInAppEventType);
                return;
            }
        } else {
            int i5 = onValidateInApp + 21;
            onValidateInAppFailure = i5 % 128;
            int i6 = i5 % 2;
            this.AppsFlyerLib.AFVersionDeclaration().values = str;
            AFb1rSDK.AFInAppEventType(str);
        }
        values().afDebugLog().AFInAppEventType((AFd1qSDK) null);
        afDebugLog();
        afRDLog(this.onResponseErrorNative.getBaseContext());
        if (!(this.onResponseError ? false : true)) {
            afInfoLog(this.onResponseErrorNative.getApplicationContext());
        }
        AFa1aSDK.AFKeystoreWrapper(context, new AFa1aSDK.AFa1xSDK() {
            @Override
            public final void AFKeystoreWrapper(Activity activity) {
                afInfoLog2.valueOf();
                AFb1xSDK.this.values().afDebugLog().AFInAppEventType((AFd1qSDK) null);
                AFb1xSDK.AFInAppEventParameterName(AFb1xSDK.this);
                int AFKeystoreWrapper2 = AFb1xSDK.AFKeystoreWrapper(AFb1xSDK.valueOf((Context) activity), false);
                AFLogger.afInfoLog("onBecameForeground");
                if (AFKeystoreWrapper2 < 2) {
                    AFa1cSDK valueOf2 = AFa1cSDK.valueOf(activity);
                    valueOf2.AFInAppEventType.post(valueOf2.afErrorLog);
                    valueOf2.AFInAppEventType.post(valueOf2.AFInAppEventParameterName);
                }
                AFe1pSDK aFe1pSDK = new AFe1pSDK();
                AFa1sSDK.AFInAppEventParameterName().AFKeystoreWrapper(aFe1pSDK.AFInAppEventParameterName(), activity.getIntent(), activity.getApplication());
                AFb1xSDK aFb1xSDK = AFb1xSDK.this;
                if (activity != null) {
                    aFe1pSDK.valueOf = (Application) activity.getApplicationContext();
                }
                aFe1pSDK.AFInAppEventType = appsFlyerRequestListener;
                aFb1xSDK.AFInAppEventType(aFe1pSDK, activity);
            }

            @Override
            public final void AFKeystoreWrapper(Context context2) {
                AFLogger.afInfoLog("onBecameBackground");
                AFd1bSDK aFd1bSDK = afInfoLog2;
                long currentTimeMillis = System.currentTimeMillis();
                if (aFd1bSDK.afRDLog != 0) {
                    long j = currentTimeMillis - aFd1bSDK.afRDLog;
                    if (j > 0 && j < 1000) {
                        j = 1000;
                    }
                    aFd1bSDK.AFLogger$LogLevel = TimeUnit.MILLISECONDS.toSeconds(j);
                    aFd1bSDK.AFInAppEventType.AFInAppEventParameterName("prev_session_dur", aFd1bSDK.AFLogger$LogLevel);
                } else {
                    AFLogger.afInfoLog("Metrics: fg ts is missing");
                }
                AFLogger.afInfoLog("callStatsBackground background call");
                AFb1xSDK.this.AFInAppEventType(new WeakReference<>(context2));
                AFb1qSDK AFInAppEventParameterName2 = AFb1qSDK.AFInAppEventParameterName();
                if (AFInAppEventParameterName2.afErrorLog()) {
                    AFInAppEventParameterName2.AFKeystoreWrapper();
                    if (context2 != null && !AppsFlyerLib.getInstance().isStopped()) {
                        AFInAppEventParameterName2.valueOf(context2.getPackageName(), context2.getPackageManager(), AFb1xSDK.valueOf(AFb1xSDK.this));
                    }
                    AFInAppEventParameterName2.valueOf();
                } else {
                    AFLogger.afDebugLog("RD status is OFF");
                }
                AFa1cSDK.valueOf(context2).AFKeystoreWrapper();
            }
        }, this.AppsFlyerLib.AFKeystoreWrapper());
    }

    private static void afRDLog(Context context) {
        int i = onValidateInAppFailure + 43;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        try {
            if (((context.getPackageManager().getPackageInfo(context.getPackageName(), 0).applicationInfo.flags & 32768) != 0 ? Typography.less : (char) 23) != 23) {
                int i3 = onValidateInAppFailure + 119;
                onValidateInApp = i3 % 128;
                int i4 = i3 % 2;
                if ((context.getResources().getIdentifier("appsflyer_backup_rules", "xml", context.getPackageName()) != 0 ? Typography.dollar : 'B') != '$') {
                    AFLogger.AFInAppEventParameterName("'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 i5 = onValidateInApp + 77;
                onValidateInAppFailure = i5 % 128;
                if ((i5 % 2 != 0 ? '!' : '/') != '/') {
                    AFLogger.afInfoLog("appsflyer_backup_rules.xml detected, using AppsFlyer defined backup rules for AppsFlyer SDK data", false);
                } else {
                    AFLogger.afInfoLog("appsflyer_backup_rules.xml detected, using AppsFlyer defined backup rules for AppsFlyer SDK data", true);
                }
            }
        } catch (Exception e) {
            AFLogger.afRDLog("checkBackupRules Exception: ".concat(String.valueOf(e)));
        }
    }

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

    public static String AFInAppEventType() {
        int i = onValidateInAppFailure + 35;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        String valueOf2 = valueOf(AppsFlyerProperties.APP_USER_ID);
        int i3 = onValidateInApp + 115;
        onValidateInAppFailure = i3 % 128;
        if ((i3 % 2 != 0 ? 'b' : ' ') == ' ') {
            return valueOf2;
        }
        Object[] objArr = null;
        int length = objArr.length;
        return valueOf2;
    }

    @Override
    public final void setCustomerUserId(String str) {
        int i = onValidateInAppFailure + 57;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setCustomerUserId", str);
        AFLogger.afInfoLog("setCustomerUserId = ".concat(String.valueOf(str)));
        AFInAppEventParameterName(AppsFlyerProperties.APP_USER_ID, str);
        values(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false);
        int i3 = onValidateInAppFailure + 121;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void setPhoneNumber(String str) {
        int i = onValidateInApp + 125;
        onValidateInAppFailure = i % 128;
        boolean z = i % 2 != 0;
        this.onAttributionFailure = AFb1tSDK.values(str);
        if (z) {
            Object obj = null;
            super.hashCode();
        }
    }

    private static String afRDLog() {
        int i = onValidateInAppFailure + 77;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        String valueOf2 = valueOf(AppsFlyerProperties.APP_ID);
        int i3 = onValidateInAppFailure + 31;
        onValidateInApp = i3 % 128;
        if ((i3 % 2 == 0 ? '\\' : (char) 28) == 28) {
            return valueOf2;
        }
        Object obj = null;
        super.hashCode();
        return valueOf2;
    }

    @Override
    public final void setAppId(String str) {
        int i = onValidateInApp + 23;
        onValidateInAppFailure = i % 128;
        if ((i % 2 != 0 ? '\t' : (char) 16) != '\t') {
            AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setAppId", str);
        } else {
            AFb1qSDK AFInAppEventParameterName2 = AFb1qSDK.AFInAppEventParameterName();
            String[] strArr = new String[0];
            strArr[1] = str;
            AFInAppEventParameterName2.AFInAppEventType("setAppId", strArr);
        }
        AFInAppEventParameterName(AppsFlyerProperties.APP_ID, str);
    }

    @Override
    public final void setExtension(String str) {
        int i = onValidateInAppFailure + 83;
        onValidateInApp = i % 128;
        if ((i % 2 == 0 ? '`' : ';') != ';') {
            AFb1qSDK AFInAppEventParameterName2 = AFb1qSDK.AFInAppEventParameterName();
            String[] strArr = new String[0];
            strArr[1] = str;
            AFInAppEventParameterName2.AFInAppEventType("setExtension", strArr);
        } else {
            AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setExtension", str);
        }
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EXTENSION, str);
        int i2 = onValidateInApp + 107;
        onValidateInAppFailure = i2 % 128;
        if (i2 % 2 == 0) {
            return;
        }
        Object obj = null;
        super.hashCode();
    }

    @Override
    public final void setIsUpdate(boolean z) {
        int i = onValidateInAppFailure + 123;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setIsUpdate", String.valueOf(z));
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.IS_UPDATE, z);
        int i3 = onValidateInApp + 31;
        onValidateInAppFailure = i3 % 128;
        if (i3 % 2 != 0) {
            Object obj = null;
            super.hashCode();
        }
    }

    @Override
    public final void setCurrencyCode(String str) {
        int i = onValidateInApp + 85;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setCurrencyCode", str);
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.CURRENCY_CODE, str);
        int i3 = onValidateInAppFailure + 111;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void logLocation(Context context, double d, double d2) {
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("logLocation", String.valueOf(d), String.valueOf(d2));
        HashMap hashMap = new HashMap();
        hashMap.put(AFInAppEventParameterName.LONGTITUDE, Double.toString(d2));
        hashMap.put(AFInAppEventParameterName.LATITUDE, Double.toString(d));
        values(context, AFInAppEventType.LOCATION_COORDINATES, hashMap);
        int i = onValidateInAppFailure + 53;
        onValidateInApp = i % 128;
        if ((i % 2 != 0 ? '(' : '5') != '(') {
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    final void AFInAppEventType(WeakReference<Context> weakReference) {
        if (weakReference.get() == null) {
            return;
        }
        AFLogger.afInfoLog("app went to background");
        SharedPreferences valueOf2 = valueOf(weakReference.get());
        AppsFlyerProperties.getInstance().saveProperties(valueOf2);
        long j = values().afInfoLog().AFLogger$LogLevel;
        HashMap hashMap = new HashMap();
        String str = this.AppsFlyerLib.AFVersionDeclaration().values;
        if (str == null) {
            int i = onValidateInApp + 29;
            onValidateInAppFailure = i % 128;
            int i2 = i % 2;
            AFLogger.afWarnLog("[callStats] AppsFlyer's SDK cannot send any event without providing DevKey.");
            return;
        }
        String valueOf3 = valueOf("KSAppsFlyerId");
        if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, false)) {
            int i3 = onValidateInApp + 111;
            onValidateInAppFailure = i3 % 128;
            int i4 = i3 % 2;
            hashMap.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);
        }
        AFa1uSDK valueOf4 = AFb1zSDK.valueOf(weakReference.get().getContentResolver());
        if (valueOf4 != null) {
            int i5 = onValidateInAppFailure + 65;
            onValidateInApp = i5 % 128;
            if (i5 % 2 != 0) {
                hashMap.put("amazon_aid", valueOf4.AFInAppEventParameterName);
                hashMap.put("amazon_aid_limit", String.valueOf(valueOf4.values));
            } else {
                hashMap.put("amazon_aid", valueOf4.AFInAppEventParameterName);
                hashMap.put("amazon_aid_limit", String.valueOf(valueOf4.values));
                Object obj = null;
                super.hashCode();
            }
        }
        String string = AppsFlyerProperties.getInstance().getString("advertiserId");
        if (string != null) {
            hashMap.put("advertiserId", string);
        }
        hashMap.put("app_id", weakReference.get().getPackageName());
        hashMap.put("devkey", str);
        hashMap.put("uid", AFb1uSDK.values(weakReference));
        hashMap.put("time_in_app", String.valueOf(j));
        hashMap.put("statType", "user_closed_app");
        hashMap.put("platform", APSAnalytics.OS_NAME);
        hashMap.put("launch_counter", Integer.toString(AFKeystoreWrapper(valueOf2, false)));
        hashMap.put(AppsFlyerProperties.CHANNEL, AFInAppEventType(weakReference.get()));
        if (!(valueOf3 != null)) {
            valueOf3 = "";
        }
        hashMap.put("originalAppsflyerId", valueOf3);
        if (!this.onConversionDataSuccess) {
            AFLogger.afDebugLog("Stats call is disabled, ignore ...");
            return;
        }
        AFe1tSDK aFe1tSDK = new AFe1tSDK();
        ((AFe1wSDK) aFe1tSDK).afWarnLog = isStopped();
        AFd1uSDK aFd1uSDK = new AFd1uSDK((AFe1tSDK) aFe1tSDK.AFInAppEventType(this.AppsFlyerLib.AFInAppEventParameterName().values.valueOf("appsFlyerCount")).AFInAppEventType(hashMap).AFKeystoreWrapper(String.format(afDebugLog, AppsFlyerLib.getInstance().getHostPrefix(), AFKeystoreWrapper().getHostName())), this.AppsFlyerLib);
        AFc1mSDK afErrorLog2 = this.AppsFlyerLib.afErrorLog();
        afErrorLog2.AFInAppEventParameterName.execute(new AFc1mSDK.AnonymousClass3(aFd1uSDK));
    }

    @Override
    public final void logSession(Context context) {
        int i = onValidateInApp + 109;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("logSession", new String[0]);
        AFb1qSDK.AFInAppEventParameterName().afInfoLog();
        AFInAppEventParameterName(context, AFd1dSDK.logSession);
        Object obj = null;
        values(context, null, null);
        int i3 = onValidateInApp + 37;
        onValidateInAppFailure = i3 % 128;
        if ((i3 % 2 != 0 ? (char) 30 : 'A') != 'A') {
            super.hashCode();
        }
    }

    @Override
    public final void sendAdRevenue(Context context, Map<String, Object> map) {
        AFb1aSDK AFInAppEventParameterName2 = this.AppsFlyerLib.AFInAppEventParameterName();
        AFc1xSDK aFc1xSDK = this.AppsFlyerLib;
        if (context != null) {
            int i = onValidateInAppFailure + 13;
            onValidateInApp = i % 128;
            int i2 = i % 2;
            AFb1bSDK aFb1bSDK = aFc1xSDK.values;
            if ((context != null ? (char) 28 : (char) 30) == 28) {
                aFb1bSDK.values = context.getApplicationContext();
            }
        }
        AFe1xSDK aFe1xSDK = new AFe1xSDK();
        byte b = 0;
        if (context != null) {
            int i3 = onValidateInApp + 59;
            onValidateInAppFailure = i3 % 128;
            int i4 = i3 % 2;
            aFe1xSDK.valueOf = (Application) context.getApplicationContext();
        }
        String format = String.format(afErrorLog, AppsFlyerLib.getInstance().getHostPrefix(), AFKeystoreWrapper().getHostName());
        StringBuilder sb = new StringBuilder();
        sb.append(format);
        sb.append(AFInAppEventParameterName2.AFKeystoreWrapper.values.getPackageName());
        String obj = sb.toString();
        int valueOf2 = AFInAppEventParameterName2.values.valueOf("appsFlyerAdRevenueCount");
        Map<String, Object> values2 = values(aFe1xSDK);
        values2.put("ad_network", map);
        values2.put("adrevenue_counter", Integer.valueOf(valueOf2));
        new AFa1wSDK(this, aFe1xSDK.AFKeystoreWrapper(obj).AFInAppEventType((Map<String, ?>) values2).AFInAppEventType(AFInAppEventParameterName2.values.valueOf("appsFlyerCount")), b).run();
        int i5 = onValidateInApp + 51;
        onValidateInAppFailure = i5 % 128;
        int i6 = i5 % 2;
    }

    @Override
    public final void logEvent(Context context, String str, Map<String, Object> map) {
        int i = onValidateInApp + 79;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        Object[] objArr = null;
        logEvent(context, str, map, null);
        int i3 = onValidateInApp + 85;
        onValidateInAppFailure = i3 % 128;
        if ((i3 % 2 != 0 ? (char) 23 : 'K') != 'K') {
            int length = objArr.length;
        }
    }

    private void values(Context context, String str, Map<String, Object> map) {
        Activity activity;
        AFe1sSDK aFe1sSDK = new AFe1sSDK();
        if ((context != null ? '?' : (char) 28) == '?') {
            int i = onValidateInAppFailure + 107;
            onValidateInApp = i % 128;
            int i2 = i % 2;
            aFe1sSDK.valueOf = (Application) context.getApplicationContext();
        }
        aFe1sSDK.AFLogger = str;
        aFe1sSDK.AFKeystoreWrapper = map;
        Object obj = null;
        Object[] objArr = 0;
        if (context instanceof Activity) {
            int i3 = onValidateInAppFailure + 93;
            onValidateInApp = i3 % 128;
            if ((i3 % 2 == 0 ? '7' : '\'') == '7') {
                activity = (Activity) context;
                int length = (objArr == true ? 1 : 0).length;
            } else {
                activity = (Activity) context;
            }
        } else {
            activity = null;
        }
        AFInAppEventType(aFe1sSDK, activity);
        int i4 = onValidateInAppFailure + 7;
        onValidateInApp = i4 % 128;
        if (i4 % 2 == 0) {
            super.hashCode();
        }
    }

    @Override
    public final void anonymizeUser(boolean z) {
        int i = onValidateInApp + 69;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("anonymizeUser", String.valueOf(z));
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, z);
        int i3 = onValidateInApp + 79;
        onValidateInAppFailure = i3 % 128;
        if ((i3 % 2 != 0 ? (char) 20 : (char) 28) != 28) {
            int i4 = 53 / 0;
        }
    }

    @Override
    public final void registerConversionListener(Context context, AppsFlyerConversionListener appsFlyerConversionListener) {
        int i = onValidateInApp + 17;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("registerConversionListener", new String[0]);
        AFInAppEventType(appsFlyerConversionListener);
        int i3 = onValidateInAppFailure + 99;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
    }

    private static void AFInAppEventType(AppsFlyerConversionListener appsFlyerConversionListener) {
        int i = onValidateInAppFailure + 113;
        onValidateInApp = i % 128;
        if ((i % 2 == 0 ? Typography.dollar : '\n') == '$') {
            Object obj = null;
            super.hashCode();
        }
    }

    @Override
    public final void unregisterConversionListener() {
        int i = onValidateInApp + 109;
        onValidateInAppFailure = i % 128;
        Object[] objArr = null;
        if ((i % 2 != 0 ? (char) 26 : 'H') != 26) {
            AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("unregisterConversionListener", new String[0]);
        } else {
            AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("unregisterConversionListener", new String[0]);
        }
        AFInAppEventType = null;
        int i2 = onValidateInAppFailure + 117;
        onValidateInApp = i2 % 128;
        if (i2 % 2 == 0) {
            int length = objArr.length;
        }
    }

    @Override
    public final void registerValidatorListener(Context context, AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener) {
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("registerValidatorListener", new String[0]);
        AFLogger.afDebugLog("registerValidatorListener called");
        if ((appsFlyerInAppPurchaseValidatorListener == null ? (char) 22 : (char) 7) == 22) {
            int i = onValidateInAppFailure + 79;
            onValidateInApp = i % 128;
            int i2 = i % 2;
            AFLogger.afDebugLog("registerValidatorListener null listener");
            int i3 = onValidateInAppFailure + 93;
            onValidateInApp = i3 % 128;
            if (i3 % 2 != 0) {
                return;
            }
            Object obj = null;
            super.hashCode();
            return;
        }
        valueOf = appsFlyerInAppPurchaseValidatorListener;
        int i4 = onValidateInApp + 123;
        onValidateInAppFailure = i4 % 128;
        int i5 = i4 % 2;
    }

    public static String valueOf(SimpleDateFormat simpleDateFormat, long j) {
        simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
        String format = simpleDateFormat.format(new Date(j));
        int i = onValidateInAppFailure + 59;
        onValidateInApp = i % 128;
        if (!(i % 2 == 0)) {
            return format;
        }
        Object[] objArr = null;
        int length = objArr.length;
        return format;
    }

    private void values(Context context, String str, Map<String, Object> map, String str2, String str3) {
        AFa1tSDK aFe1pSDK;
        if ((str == null) || str.trim().isEmpty()) {
            aFe1pSDK = new AFe1pSDK();
        } else {
            aFe1pSDK = new AFe1sSDK();
            int i = onValidateInApp + 91;
            onValidateInAppFailure = i % 128;
            int i2 = i % 2;
        }
        if ((context != null ? 'G' : 'Q') == 'G') {
            aFe1pSDK.valueOf = (Application) context.getApplicationContext();
            int i3 = onValidateInAppFailure + 103;
            onValidateInApp = i3 % 128;
            int i4 = i3 % 2;
        }
        aFe1pSDK.AFLogger = str;
        aFe1pSDK.AFKeystoreWrapper = map;
        aFe1pSDK.afRDLog = str2;
        aFe1pSDK.AFInAppEventParameterName = str3;
        AFInAppEventType(aFe1pSDK);
    }

    private void AFInAppEventType(AFa1tSDK aFa1tSDK) {
        boolean z;
        int i = onValidateInAppFailure + 7;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        byte b = 0;
        if (aFa1tSDK.AFLogger == null) {
            int i3 = onValidateInApp + 15;
            onValidateInAppFailure = i3 % 128;
            int i4 = i3 % 2;
            z = true;
        } else {
            z = false;
        }
        if (!(!AFInAppEventParameterName())) {
            AFLogger.afInfoLog("CustomerUserId not set, reporting is disabled", true);
            return;
        }
        if (z) {
            int i5 = onValidateInApp + 85;
            onValidateInAppFailure = i5 % 128;
            if (!(i5 % 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 (!(!afErrorLog())) {
                    AppsFlyerRequestListener appsFlyerRequestListener = aFa1tSDK.AFInAppEventType;
                    if ((appsFlyerRequestListener != null ? '`' : 'E') != 'E') {
                        appsFlyerRequestListener.onError(RequestError.EVENT_TIMEOUT, AFb1cSDK.AFInAppEventParameterName);
                        return;
                    }
                    return;
                }
            }
            this.onAttributionFailureNative = System.currentTimeMillis();
        }
        AFKeystoreWrapper(this.AppsFlyerLib.valueOf(), new AFa1xSDK(this, aFa1tSDK, b), 0L, TimeUnit.MILLISECONDS);
    }

    private boolean afErrorLog() {
        String format;
        if (this.onAttributionFailureNative > 0) {
            long currentTimeMillis = System.currentTimeMillis() - this.onAttributionFailureNative;
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS Z", Locale.US);
            String valueOf2 = valueOf(simpleDateFormat, this.onAttributionFailureNative);
            String valueOf3 = valueOf(simpleDateFormat, this.AppsFlyer2dXConversionCallback);
            if (!(currentTimeMillis >= this.onInstallConversionFailureNative)) {
                int i = onValidateInAppFailure + 37;
                onValidateInApp = i % 128;
                int i2 = i % 2;
                if (!isStopped()) {
                    int i3 = onValidateInApp + 61;
                    onValidateInAppFailure = i3 % 128;
                    if (i3 % 2 == 0) {
                        AFLogger.afInfoLog(String.format(Locale.US, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nThis launch is blocked: %s ms < %s ms", valueOf2, valueOf3, Long.valueOf(currentTimeMillis), Long.valueOf(this.onInstallConversionFailureNative)));
                        return true;
                    }
                    Locale locale = Locale.US;
                    Object[] objArr = new Object[5];
                    objArr[0] = valueOf2;
                    objArr[1] = valueOf3;
                    objArr[5] = Long.valueOf(currentTimeMillis);
                    objArr[3] = Long.valueOf(this.onInstallConversionFailureNative);
                    AFLogger.afInfoLog(String.format(locale, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nThis launch is blocked: %s ms < %s ms", objArr));
                    return false;
                }
            }
            if (!isStopped()) {
                int i4 = onValidateInApp + 1;
                onValidateInAppFailure = i4 % 128;
                if ((i4 % 2 != 0 ? '\f' : 'c') != '\f') {
                    format = String.format(Locale.US, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nSending launch (+%s ms)", valueOf2, valueOf3, Long.valueOf(currentTimeMillis));
                } else {
                    Locale locale2 = Locale.US;
                    Object[] objArr2 = new Object[3];
                    objArr2[0] = valueOf2;
                    objArr2[0] = valueOf3;
                    objArr2[3] = Long.valueOf(currentTimeMillis);
                    format = String.format(locale2, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nSending launch (+%s ms)", objArr2);
                }
                AFLogger.afInfoLog(format);
            }
        } else if (!isStopped()) {
            int i5 = onValidateInApp + 15;
            onValidateInAppFailure = i5 % 128;
            int i6 = i5 % 2;
            AFLogger.afInfoLog("Sending first launch for this session!");
        }
        return false;
    }

    private void AFKeystoreWrapper(Context context, String str) {
        AFe1uSDK aFe1uSDK = new AFe1uSDK();
        byte b = 0;
        if (!(context == null)) {
            aFe1uSDK.valueOf = (Application) context.getApplicationContext();
            int i = onValidateInAppFailure + 119;
            onValidateInApp = i % 128;
            int i2 = i % 2;
        }
        AFa1tSDK AFInAppEventType2 = aFe1uSDK.AFInAppEventType(this.AppsFlyerLib.AFInAppEventParameterName().values.valueOf("appsFlyerCount"));
        AFInAppEventType2.afRDLog = str;
        if (str != null) {
            int i3 = onValidateInAppFailure + 53;
            onValidateInApp = i3 % 128;
            int i4 = i3 % 2;
            if (str.length() > 5) {
                int i5 = onValidateInAppFailure + 57;
                onValidateInApp = i5 % 128;
                if (i5 % 2 == 0) {
                    boolean AFInAppEventType3 = AFInAppEventType(AFInAppEventType2, valueOf(context));
                    Object[] objArr = null;
                    int length = objArr.length;
                    if (!AFInAppEventType3) {
                        return;
                    }
                } else if (!AFInAppEventType(AFInAppEventType2, valueOf(context))) {
                    return;
                }
                AFKeystoreWrapper(this.AppsFlyerLib.valueOf(), new AFa1xSDK(this, AFInAppEventType2, b), 5L, TimeUnit.MILLISECONDS);
            }
        }
    }

    private boolean AFInAppEventType(AFa1tSDK aFa1tSDK, SharedPreferences sharedPreferences) {
        boolean z;
        boolean z2;
        int i;
        int AFKeystoreWrapper2 = AFKeystoreWrapper(sharedPreferences, false);
        if ((AFKeystoreWrapper2 == 1 ? '6' : (char) 6) == '6' && !(aFa1tSDK instanceof AFe1vSDK)) {
            int i2 = onValidateInApp + 29;
            onValidateInAppFailure = i2 % 128;
            int i3 = i2 % 2;
            z = true;
        } else {
            z = false;
        }
        if (!sharedPreferences.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false)) {
            if ((AFKeystoreWrapper2 == 1 ? (char) 24 : (char) 26) == 24) {
                int i4 = onValidateInAppFailure + 113;
                onValidateInApp = i4 % 128;
                if ((i4 % 2 == 0 ? (char) 14 : '4') == '4') {
                    z2 = true;
                    if (!z2) {
                        int i5 = onValidateInAppFailure + 15;
                        onValidateInApp = i5 % 128;
                        int i6 = i5 % 2;
                        if ((z ? ',' : (char) 27) == 27) {
                            return false;
                        }
                    }
                    i = onValidateInApp + 17;
                    onValidateInAppFailure = i % 128;
                    if (!(i % 2 != 0)) {
                        return true;
                    }
                    int i7 = 16 / 0;
                    return true;
                }
                z2 = false;
                if (!z2) {
                }
                i = onValidateInApp + 17;
                onValidateInAppFailure = i % 128;
                if (!(i % 2 != 0)) {
                }
            }
        }
        int i8 = onValidateInAppFailure + 101;
        onValidateInApp = i8 % 128;
        int i9 = i8 % 2;
        z2 = false;
        if (!z2) {
        }
        i = onValidateInApp + 17;
        onValidateInAppFailure = i % 128;
        if (!(i % 2 != 0)) {
        }
    }

    private void AFKeystoreWrapper(Map<String, Object> map) {
        boolean z;
        int i;
        if (!AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false)) {
            if ((AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, false) ? '_' : (char) 3) == 3) {
                z = false;
                if (!z && map.get("advertiserId") != null) {
                    i = onValidateInAppFailure + 85;
                    onValidateInApp = i % 128;
                    try {
                        if ((i % 2 != 0 ? (char) 24 : 'b') == 24) {
                            if (AFb1oSDK.valueOf(this.afRDLog)) {
                                if (map.remove(VungleApiClient.ANDROID_ID) != null) {
                                    AFLogger.afInfoLog("validateGaidAndIMEI :: removing: android_id");
                                }
                            }
                            if (AFb1oSDK.valueOf(this.AppsFlyerLib.AFVersionDeclaration().AFInAppEventType)) {
                                int i2 = onValidateInAppFailure + 115;
                                onValidateInApp = i2 % 128;
                                if (i2 % 2 == 0) {
                                    Object remove = map.remove("imei");
                                    Object obj = null;
                                    super.hashCode();
                                    if (remove == null) {
                                        return;
                                    }
                                } else if (map.remove("imei") == null) {
                                    return;
                                }
                                AFLogger.afInfoLog("validateGaidAndIMEI :: removing: imei");
                                return;
                            }
                            return;
                        }
                        int i3 = 30 / 0;
                    } catch (Exception e) {
                        AFLogger.afErrorLog("failed to remove IMEI or AndroidID key from params; ", e);
                    }
                    AFLogger.afErrorLog("failed to remove IMEI or AndroidID key from params; ", e);
                }
                int i4 = onValidateInAppFailure + 71;
                onValidateInApp = i4 % 128;
                int i5 = i4 % 2;
            }
        }
        z = true;
        if (!z) {
            i = onValidateInAppFailure + 85;
            onValidateInApp = i % 128;
            if ((i % 2 != 0 ? (char) 24 : 'b') == 24) {
            }
            AFLogger.afErrorLog("failed to remove IMEI or AndroidID key from params; ", e);
        }
        int i42 = onValidateInAppFailure + 71;
        onValidateInApp = i42 % 128;
        int i52 = i42 % 2;
    }

    private boolean AFLogger() {
        int i = onValidateInApp + 23;
        onValidateInAppFailure = i % 128;
        if ((i % 2 != 0 ? '\n' : '8') == '\n') {
            Map<String, Object> map = this.onDeepLinking;
            Object obj = null;
            super.hashCode();
        }
        return false;
    }

    public static Map<String, Object> AFInAppEventParameterName(Map<String, Object> map) {
        int i = onValidateInApp + 57;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        if (!(!map.containsKey(Mechanism.JsonKeys.META))) {
            return (Map) map.get(Mechanism.JsonKeys.META);
        }
        HashMap hashMap = new HashMap();
        map.put(Mechanism.JsonKeys.META, hashMap);
        int i3 = onValidateInAppFailure + 119;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
        return hashMap;
    }

    private static boolean AFInAppEventParameterName(SharedPreferences sharedPreferences) {
        int i = onValidateInApp + 43;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        Object obj = null;
        boolean parseBoolean = Boolean.parseBoolean(sharedPreferences.getString("sentSuccessfully", null));
        int i3 = onValidateInApp + 47;
        onValidateInAppFailure = i3 % 128;
        if (i3 % 2 == 0) {
            return parseBoolean;
        }
        super.hashCode();
        return parseBoolean;
    }

    private static void AFInAppEventType(Context context, Map<String, Object> map) {
        int i = onValidateInApp + 21;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        WindowManager windowManager = (WindowManager) context.getSystemService("window");
        if (!(windowManager == null)) {
            int i3 = onValidateInAppFailure + 51;
            onValidateInApp = i3 % 128;
            int i4 = i3 % 2;
            int rotation = windowManager.getDefaultDisplay().getRotation();
            map.put("sc_o", rotation != 0 ? rotation != 1 ? rotation != 2 ? rotation != 3 ? "" : "lr" : "pr" : "l" : TtmlNode.TAG_P);
        }
    }

    private static void AFKeystoreWrapper(Context context, boolean z, Map<String, Object> map, int i) {
        HashMap hashMap = new HashMap();
        hashMap.put("cpu_abi", values("ro.product.cpu.abi"));
        hashMap.put("cpu_abi2", values("ro.product.cpu.abi2"));
        hashMap.put(DebugImage.JsonKeys.ARCH, values("os.arch"));
        hashMap.put("build_display_id", values("ro.build.display.id"));
        if ((z ? (char) 7 : '9') != '9') {
            int i2 = onValidateInAppFailure + 111;
            onValidateInApp = i2 % 128;
            int i3 = i2 % 2;
            valueOf(context, hashMap);
            if (i <= 2) {
                int i4 = onValidateInAppFailure + 65;
                onValidateInApp = i4 % 128;
                if ((i4 % 2 == 0 ? '1' : 'W') != '1') {
                    hashMap.putAll(AFa1cSDK.valueOf(context).valueOf());
                } else {
                    hashMap.putAll(AFa1cSDK.valueOf(context).valueOf());
                    int i5 = 21 / 0;
                }
            }
        }
        hashMap.put("dim", AFa1dSDK.AFKeystoreWrapper(context));
        map.put("deviceData", hashMap);
    }

    public static void values(Context context, Map<String, ? super String> map) {
        boolean AFInAppEventType2;
        AFa1iSDK.AFa1ySDK values2;
        int i = onValidateInApp + 91;
        onValidateInAppFailure = i % 128;
        if (i % 2 != 0) {
            AFInAppEventType2 = AFInAppEventType(AppsFlyerProperties.DISABLE_NETWORK_DATA, false);
            AFa1iSDK aFa1iSDK = AFa1iSDK.AFa1vSDK.AFInAppEventType;
            values2 = AFa1iSDK.values(context);
            map.put("network", values2.values);
        } else {
            AFInAppEventType2 = AFInAppEventType(AppsFlyerProperties.DISABLE_NETWORK_DATA, false);
            AFa1iSDK aFa1iSDK2 = AFa1iSDK.AFa1vSDK.AFInAppEventType;
            values2 = AFa1iSDK.values(context);
            map.put("network", values2.values);
        }
        if ((!AFInAppEventType2 ? '\b' : 'a') != '\b') {
            return;
        }
        int i2 = onValidateInAppFailure + 79;
        onValidateInApp = i2 % 128;
        if (i2 % 2 == 0) {
            int i3 = 76 / 0;
            if (values2.AFInAppEventType == null) {
                return;
            }
        } else if (values2.AFInAppEventType == null) {
            return;
        }
        map.put("carrier", values2.AFInAppEventType);
    }

    private static void valueOf(Context context, Map<String, Object> map) {
        AFa1xSDK.AFa1zSDK AFInAppEventType2;
        int i = onValidateInAppFailure + 61;
        onValidateInApp = i % 128;
        if (i % 2 != 0) {
            AFInAppEventType2 = AFa1xSDK.AFa1ySDK.valueOf.AFInAppEventType(context);
            map.put("btl", Float.toString(AFInAppEventType2.AFKeystoreWrapper));
            if ((AFInAppEventType2.values != null ? 'I' : 'D') == 'D') {
                return;
            }
        } else {
            AFInAppEventType2 = AFa1xSDK.AFa1ySDK.valueOf.AFInAppEventType(context);
            map.put("btl", Float.toString(AFInAppEventType2.AFKeystoreWrapper));
            int i2 = 61 / 0;
            if (!(AFInAppEventType2.values != null)) {
                return;
            }
        }
        map.put("btch", AFInAppEventType2.values);
        int i3 = onValidateInAppFailure + 47;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
    }

    private static void AFInAppEventType(Map<String, Object> map) {
        String string;
        String string2;
        int i = onValidateInAppFailure + 25;
        onValidateInApp = i % 128;
        if (i % 2 == 0) {
            string = AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.ONELINK_ID);
            string2 = AppsFlyerProperties.getInstance().getString("onelinkVersion");
            Object[] objArr = null;
            int length = objArr.length;
        } else {
            string = AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.ONELINK_ID);
            string2 = AppsFlyerProperties.getInstance().getString("onelinkVersion");
        }
    }

    private static String valueOf(Activity activity) {
        Bundle extras;
        int i = onValidateInAppFailure + 69;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        String str = 0;
        str = 0;
        str = 0;
        String str2 = null;
        str = 0;
        if ((activity != null ? 'F' : '`') == 'F') {
            int i3 = onValidateInAppFailure + 69;
            onValidateInApp = i3 % 128;
            int i4 = i3 % 2;
            Intent intent = activity.getIntent();
            if (intent != null) {
                int i5 = onValidateInApp + 117;
                onValidateInAppFailure = i5 % 128;
                try {
                    if (i5 % 2 != 0) {
                        extras = intent.getExtras();
                        super.hashCode();
                        if (extras != null) {
                            int i6 = onValidateInAppFailure + 97;
                            onValidateInApp = i6 % 128;
                            if (i6 % 2 != 0) {
                                String string = extras.getString("af");
                                str = string;
                                if (string != null) {
                                    str2 = string;
                                    AFLogger.afInfoLog("Push Notification received af payload = ".concat(String.valueOf(str2)));
                                    extras.remove("af");
                                    activity.setIntent(intent.putExtras(extras));
                                    str = str2;
                                }
                            } else {
                                String string2 = extras.getString("af");
                                try {
                                    int length = str.length;
                                    String str3 = string2;
                                    str2 = str3;
                                    str = str3;
                                } catch (Throwable th) {
                                    th = th;
                                    str2 = string2;
                                    AFLogger.afErrorLog(th.getMessage(), th);
                                    str = str2;
                                    return str;
                                }
                            }
                        }
                    } else {
                        extras = intent.getExtras();
                    }
                } catch (Throwable th2) {
                    th = th2;
                }
            }
        }
        return str;
    }

    private static String AFKeystoreWrapper(String str) {
        if (str == null) {
            int i = onValidateInAppFailure + 77;
            onValidateInApp = i % 128;
            int i2 = i % 2;
            return null;
        }
        if (str.matches("fb\\d*?://authorize.*")) {
            if (str.contains("access_token")) {
                String AFInAppEventType2 = AFInAppEventType(str);
                if (AFInAppEventType2.length() != 0) {
                    ArrayList arrayList = new ArrayList();
                    if (AFInAppEventType2.contains("&")) {
                        arrayList = new ArrayList(Arrays.asList(AFInAppEventType2.split("&")));
                    } else {
                        arrayList.add(AFInAppEventType2);
                    }
                    StringBuilder sb = new StringBuilder();
                    Iterator it = arrayList.iterator();
                    while (it.hasNext()) {
                        int i3 = onValidateInAppFailure + 101;
                        onValidateInApp = i3 % 128;
                        int i4 = i3 % 2;
                        String str2 = (String) it.next();
                        if ((str2.contains("access_token") ? 'K' : '=') != 'K') {
                            if (!(sb.length() == 0)) {
                                int i5 = onValidateInAppFailure + 91;
                                onValidateInApp = i5 % 128;
                                int i6 = i5 % 2;
                                sb.append("&");
                                int i7 = onValidateInAppFailure + 85;
                                onValidateInApp = i7 % 128;
                                int i8 = i7 % 2;
                            } else if (!str2.startsWith("?")) {
                                sb.append("?");
                            }
                            sb.append(str2);
                        } else {
                            it.remove();
                        }
                    }
                    return str.replace(AFInAppEventType2, sb.toString());
                }
                int i9 = onValidateInApp + 89;
                onValidateInAppFailure = i9 % 128;
                int i10 = i9 % 2;
            }
        }
        return str;
    }

    private static String AFInAppEventType(String str) {
        int i = onValidateInApp + 117;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        int indexOf = str.indexOf(63);
        if ((indexOf == -1 ? '!' : 'A') != 'A') {
            return "";
        }
        String substring = str.substring(indexOf);
        int i3 = onValidateInApp + 91;
        onValidateInAppFailure = i3 % 128;
        int i4 = i3 % 2;
        return substring;
    }

    private AFd1wSDK.AFa1ySDK values(final Map<String, String> map) {
        AFd1wSDK.AFa1ySDK aFa1ySDK = new AFd1wSDK.AFa1ySDK() {
            @Override
            public final void valueOf(Map<String, String> map2) {
                for (String str : map2.keySet()) {
                    map.put(str, map2.get(str));
                }
                AFb1hSDK.values(map);
            }

            @Override
            public final void valueOf(String str) {
                AFb1hSDK.AFInAppEventParameterName(str, DeepLinkResult.Error.NETWORK);
            }
        };
        int i = onValidateInApp + 113;
        onValidateInAppFailure = i % 128;
        if ((i % 2 != 0 ? '\'' : ' ') == ' ') {
            return aFa1ySDK;
        }
        int i2 = 99 / 0;
        return aFa1ySDK;
    }

    private static void AFKeystoreWrapper(Context context, Map<String, Object> map, String str) {
        SharedPreferences valueOf2;
        SharedPreferences.Editor edit;
        String string;
        int i = onValidateInApp + 83;
        onValidateInAppFailure = i % 128;
        Object obj = null;
        try {
            if ((i % 2 != 0 ? 'K' : (char) 6) != 6) {
                valueOf2 = valueOf(context);
                edit = valueOf2.edit();
                string = valueOf2.getString("prev_event_name", null);
                super.hashCode();
            } else {
                valueOf2 = valueOf(context);
                edit = valueOf2.edit();
                string = valueOf2.getString("prev_event_name", null);
            }
        } catch (Exception e) {
            AFLogger.afErrorLog("Error while processing previous event.", e);
        }
    }

    public static boolean values(Context context) {
        int i = onValidateInApp + 69;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        try {
            if ((GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) == 0 ? '7' : '?') != '?') {
                int i3 = onValidateInAppFailure + 123;
                onValidateInApp = i3 % 128;
                return (i3 % 2 == 0 ? '7' : Typography.dollar) != '7';
            }
        } catch (Throwable th) {
            AFLogger.afErrorLog("WARNING:  Google play services is unavailable. ", th);
        }
        try {
            context.getPackageManager().getPackageInfo("com.google.android.gms", 0);
            return true;
        } catch (PackageManager.NameNotFoundException e) {
            AFLogger.afErrorLog("WARNING:  Google Play Services is unavailable. ", e);
            return false;
        }
    }

    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, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);
            return;
        }
        Context context2 = this.AppsFlyerLib.values.values;
        if (context2 != null) {
            AFc1ySDK aFc1ySDK = new AFc1ySDK(valueOf(context2));
            String AFInAppEventParameterName2 = this.AppsFlyerLib.AFVersionDeclaration().AFInAppEventParameterName(aFc1ySDK);
            if (!AFb1oSDK.valueOf(AFInAppEventParameterName2)) {
                map.put("imei", AFInAppEventParameterName2);
            }
            boolean z = appsFlyerProperties.getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID, false);
            String str = null;
            String AFInAppEventType2 = aFc1ySDK.AFInAppEventType("androidIdCached", (String) null);
            if (z && AFb1oSDK.valueOf(this.afRDLog)) {
                if (AFLogger(context)) {
                    try {
                        String string = Settings.Secure.getString(context.getContentResolver(), VungleApiClient.ANDROID_ID);
                        if (string != null) {
                            str = string;
                        } else if (AFInAppEventType2 != null) {
                            AFLogger.afDebugLog("use cached AndroidId: ".concat(String.valueOf(AFInAppEventType2)));
                            str = AFInAppEventType2;
                        }
                    } catch (Exception e) {
                        if (AFInAppEventType2 != null) {
                            AFLogger.afDebugLog("use cached AndroidId: ".concat(String.valueOf(AFInAppEventType2)));
                            str = AFInAppEventType2;
                        }
                        AFLogger.afErrorLog(e.getMessage(), e);
                    }
                }
            } else {
                String str2 = this.afRDLog;
                if (str2 != null) {
                    str = str2;
                }
            }
            if (str != null) {
                aFc1ySDK.valueOf("androidIdCached", str);
                map.put(VungleApiClient.ANDROID_ID, str);
            } else {
                AFLogger.afInfoLog("Android ID was not collected.");
            }
            AFa1uSDK values2 = AFb1zSDK.values(context);
            if (values2 != null) {
                HashMap hashMap = new HashMap();
                hashMap.put("isManual", values2.AFInAppEventType);
                hashMap.put("val", values2.AFInAppEventParameterName);
                Boolean bool = values2.values;
                if (bool != null) {
                    hashMap.put("isLat", bool);
                }
                map.put("oaid", hashMap);
                return;
            }
            return;
        }
        throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
    }

    private static boolean AFLogger(Context context) {
        boolean z;
        int i = onValidateInApp + 109;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        if ((!AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false)) && !AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, false)) {
            int i3 = onValidateInAppFailure + 89;
            onValidateInApp = i3 % 128;
            int i4 = i3 % 2;
            z = false;
        } else {
            z = true;
        }
        if ((!z ? '/' : ';') == '/') {
            if (values(context)) {
                return false;
            }
        }
        return true;
    }

    private static boolean afDebugLog(Context context) {
        int i = onValidateInAppFailure + 83;
        onValidateInApp = i % 128;
        if ((i % 2 == 0 ? '_' : (char) 20) == '_') {
            boolean contains = valueOf(context).contains("appsFlyerCount");
            Object obj = null;
            super.hashCode();
        }
    }

    private String afWarnLog(Context context) {
        String level;
        int i = onValidateInAppFailure + 87;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        SharedPreferences valueOf2 = valueOf(context);
        String str = null;
        if (!(valueOf2.contains("INSTALL_STORE"))) {
            if (!(!afDebugLog(context))) {
                int i3 = onValidateInAppFailure + 17;
                onValidateInApp = i3 % 128;
                if (i3 % 2 == 0) {
                    level = getLevel(context);
                    int i4 = 59 / 0;
                } else {
                    level = getLevel(context);
                }
                str = level;
            }
            AFInAppEventParameterName(context).valueOf("INSTALL_STORE", str);
            return str;
        }
        int i5 = onValidateInApp + 55;
        onValidateInAppFailure = i5 % 128;
        int i6 = i5 % 2;
        return valueOf2.getString("INSTALL_STORE", null);
    }

    private String getLevel(Context context) {
        String string;
        int i = onValidateInApp + 49;
        onValidateInAppFailure = i % 128;
        Object obj = null;
        Object[] objArr = 0;
        if ((i % 2 != 0 ? '^' : Typography.greater) != '>') {
            string = AppsFlyerProperties.getInstance().getString("api_store_value");
            int length = (objArr == true ? 1 : 0).length;
        } else {
            string = AppsFlyerProperties.getInstance().getString("api_store_value");
        }
    }

    private static String values(String str) {
        String str2;
        Object[] objArr = null;
        try {
            str2 = (String) Class.forName("android.os.SystemProperties").getMethod(com.appodeal.ads.modules.common.internal.Constants.GET, String.class).invoke(null, str);
            int i = onValidateInApp + 71;
            onValidateInAppFailure = i % 128;
            int i2 = i % 2;
        } catch (Throwable th) {
            AFLogger.afErrorLog(th.getMessage(), th);
            str2 = null;
        }
        int i3 = onValidateInAppFailure + 53;
        onValidateInApp = i3 % 128;
        if (!(i3 % 2 == 0)) {
            return str2;
        }
        int length = objArr.length;
        return str2;
    }

    private String valueOf(Context context, String str) {
        int i = onValidateInAppFailure + 85;
        onValidateInApp = i % 128;
        boolean z = false;
        Object[] objArr = null;
        Object[] objArr2 = 0;
        if ((i % 2 == 0 ? 'c' : (char) 7) == 'c') {
            int length = objArr.length;
        }
    }

    @Override
    public final void setPreinstallAttribution(String str, String str2, String str3) {
        AFLogger.afDebugLog("setPreinstallAttribution API called");
        JSONObject jSONObject = new JSONObject();
        try {
            if (str != null) {
                int i = onValidateInApp + 27;
                onValidateInAppFailure = i % 128;
                if ((i % 2 != 0 ? ':' : '[') != ':') {
                    jSONObject.put("pid", str);
                } else {
                    jSONObject.put("pid", str);
                    Object[] objArr = null;
                    int length = objArr.length;
                }
            }
            if (!(str2 == null)) {
                jSONObject.put("c", str2);
                int i2 = onValidateInAppFailure + 31;
                onValidateInApp = i2 % 128;
                int i3 = i2 % 2;
            }
            if (str3 != null) {
                int i4 = onValidateInApp + 43;
                onValidateInAppFailure = i4 % 128;
                int i5 = i4 % 2;
                jSONObject.put("af_siteid", str3);
            }
        } catch (JSONException e) {
            AFLogger.afErrorLog(e.getMessage(), e);
        }
        if (jSONObject.has("pid")) {
            AFInAppEventParameterName("preInstallName", jSONObject.toString());
        } else {
            AFLogger.afWarnLog("Cannot set preinstall attribution data without a media source");
        }
    }

    private static void AFInAppEventParameterName(String str) {
        try {
            if (!new JSONObject(str).has("pid")) {
                AFLogger.afWarnLog("Cannot set preinstall attribution data without a media source");
                int i = onValidateInApp + 115;
                onValidateInAppFailure = i % 128;
                int i2 = i % 2;
                return;
            }
            int i3 = onValidateInAppFailure + 37;
            onValidateInApp = i3 % 128;
            int i4 = i3 % 2;
            AFInAppEventParameterName("preInstallName", str);
            int i5 = onValidateInApp + 39;
            onValidateInAppFailure = i5 % 128;
            if ((i5 % 2 != 0 ? 'c' : ']') != 'c') {
                return;
            }
            Object[] objArr = null;
            int length = objArr.length;
        } catch (JSONException e) {
            AFLogger.afErrorLog("Error parsing JSON for preinstall", e);
        }
    }

    private String AFLogger$LogLevel(Context context) {
        File afRDLog;
        int i = onValidateInAppFailure + 83;
        onValidateInApp = i % 128;
        Object obj = null;
        if (i % 2 == 0) {
            afRDLog = afRDLog(values("ro.appsflyer.preinstall.path"));
            boolean AFKeystoreWrapper2 = AFKeystoreWrapper(afRDLog);
            super.hashCode();
        } else {
            afRDLog = afRDLog(values("ro.appsflyer.preinstall.path"));
        }
        if (!(!AFKeystoreWrapper(afRDLog))) {
            int i2 = onValidateInAppFailure + 51;
            onValidateInApp = i2 % 128;
            int i3 = i2 % 2;
            afRDLog = afRDLog("/data/local/tmp/pre_install.appsflyer");
        }
        if ((AFKeystoreWrapper(afRDLog) ? '\r' : Typography.less) != '<') {
            afRDLog = afRDLog("/etc/pre_install.appsflyer");
        }
        if (AFKeystoreWrapper(afRDLog)) {
            int i4 = onValidateInAppFailure + 107;
            onValidateInApp = i4 % 128;
            int i5 = i4 % 2;
            return null;
        }
        String AFInAppEventParameterName2 = AFInAppEventParameterName(afRDLog, context.getPackageName());
        int i6 = onValidateInAppFailure + 101;
        onValidateInApp = i6 % 128;
        if (i6 % 2 != 0) {
            return AFInAppEventParameterName2;
        }
        int i7 = 95 / 0;
        return AFInAppEventParameterName2;
    }

    private static String AFInAppEventParameterName(File file, String str) {
        FileReader fileReader;
        Properties properties;
        try {
            try {
                try {
                    properties = new Properties();
                    fileReader = new FileReader(file);
                } catch (Throwable th) {
                    AFLogger.afErrorLog(th.getMessage(), th);
                    int i = onValidateInApp + 17;
                    onValidateInAppFailure = i % 128;
                    int i2 = i % 2;
                    return null;
                }
                try {
                    properties.load(fileReader);
                    AFLogger.afInfoLog("Found PreInstall property!");
                    String property = properties.getProperty(str);
                    try {
                        fileReader.close();
                    } catch (Throwable th2) {
                        AFLogger.afErrorLog(th2.getMessage(), th2);
                    }
                    return property;
                } catch (FileNotFoundException unused) {
                    StringBuilder sb = new StringBuilder("PreInstall file wasn't found: ");
                    sb.append(file.getAbsolutePath());
                    AFLogger.afDebugLog(sb.toString());
                    if (fileReader != null) {
                        fileReader.close();
                    }
                    int i3 = onValidateInApp + 17;
                    onValidateInAppFailure = i3 % 128;
                    int i22 = i3 % 2;
                    return null;
                } catch (Throwable th3) {
                    th = th3;
                    AFLogger.afErrorLog(th.getMessage(), th);
                    if (fileReader != null) {
                        fileReader.close();
                    }
                    int i4 = onValidateInAppFailure + 107;
                    onValidateInApp = i4 % 128;
                    int i5 = i4 % 2;
                    int i32 = onValidateInApp + 17;
                    onValidateInAppFailure = i32 % 128;
                    int i222 = i32 % 2;
                    return null;
                }
            } catch (FileNotFoundException unused2) {
                fileReader = null;
            } catch (Throwable th4) {
                th = th4;
                fileReader = null;
            }
        } catch (Throwable th5) {
            if (fileReader != null) {
                try {
                    fileReader.close();
                } catch (Throwable th6) {
                    AFLogger.afErrorLog(th6.getMessage(), th6);
                }
            }
            throw th5;
        }
    }

    private static boolean AFKeystoreWrapper(File file) {
        if (file != null) {
            if (file.exists()) {
                int i = onValidateInApp + 61;
                onValidateInAppFailure = i % 128;
                if ((i % 2 != 0 ? 'E' : 'G') == 'G') {
                    return false;
                }
                int i2 = 83 / 0;
                return false;
            }
        }
        int i3 = onValidateInApp + 37;
        onValidateInAppFailure = i3 % 128;
        if (!(i3 % 2 != 0)) {
            return true;
        }
        int i4 = 16 / 0;
        return true;
    }

    private static File afRDLog(String str) {
        int i = onValidateInAppFailure + 87;
        onValidateInApp = i % 128;
        Object[] objArr = null;
        if (!(i % 2 != 0)) {
            try {
                int length = objArr.length;
            } catch (Throwable th) {
                AFLogger.afErrorLog(th.getMessage(), th);
            }
            if ((str != null ? 'b' : (char) 30) != 'b') {
                return null;
            }
        }
        if (str.trim().length() > 0) {
            File file = new File(str.trim());
            int i2 = onValidateInAppFailure + 75;
            onValidateInApp = i2 % 128;
            if (i2 % 2 != 0) {
                return file;
            }
            int i3 = 85 / 0;
            return file;
        }
        return null;
    }

    private String AFVersionDeclaration(Context context) {
        String str;
        SharedPreferences valueOf2 = valueOf(context);
        String valueOf3 = valueOf("preInstallName");
        if ((valueOf3 != null ? '\b' : Typography.less) == '\b') {
            return valueOf3;
        }
        if (valueOf2.contains("preInstallName")) {
            int i = onValidateInAppFailure + 103;
            onValidateInApp = i % 128;
            int i2 = i % 2;
            str = valueOf2.getString("preInstallName", null);
            int i3 = onValidateInAppFailure + 105;
            onValidateInApp = i3 % 128;
            int i4 = i3 % 2;
        } else {
            if ((afDebugLog(context) ? (char) 14 : 'L') != 'L') {
                valueOf3 = AFLogger$LogLevel(context);
                if (valueOf3 != null) {
                    int i5 = onValidateInAppFailure + 123;
                    onValidateInApp = i5 % 128;
                    if (i5 % 2 == 0) {
                        int i6 = 36 / 0;
                    }
                } else {
                    valueOf3 = valueOf(context, "AF_PRE_INSTALL_NAME");
                }
            }
            if ((valueOf3 != null ? (char) 6 : '\t') != '\t') {
                AFInAppEventParameterName(context).valueOf("preInstallName", valueOf3);
            }
            str = valueOf3;
        }
        if ((str != null ? ':' : (char) 19) != 19) {
            int i7 = onValidateInApp + 13;
            onValidateInAppFailure = i7 % 128;
            int i8 = i7 % 2;
            AFInAppEventParameterName("preInstallName", str);
        }
        return str;
    }

    @Deprecated
    public final String AFInAppEventType(Context context) {
        AFc1xSDK aFc1xSDK;
        int i = onValidateInAppFailure + 113;
        onValidateInApp = i % 128;
        boolean z = false;
        Object[] objArr = null;
        Object[] objArr2 = 0;
        if ((i % 2 == 0 ? 'O' : (char) 14) != 'O') {
            aFc1xSDK = this.AppsFlyerLib;
        } else {
            aFc1xSDK = this.AppsFlyerLib;
            int length = objArr.length;
        }
    }

    @Override
    public final boolean isPreInstalledApp(Context context) {
        int i = onValidateInAppFailure + 79;
        onValidateInApp = i % 128;
        try {
        } catch (PackageManager.NameNotFoundException e) {
            AFLogger.afErrorLog("Could not check if app is pre installed", e);
        }
        if ((i % 2 == 0 ? 'A' : ')') != 'A') {
            if (((context.getPackageManager().getApplicationInfo(context.getPackageName(), 0).flags & 1) != 0 ? '\t' : '\n') != '\t') {
                int i2 = onValidateInApp + 39;
                onValidateInAppFailure = i2 % 128;
                int i3 = i2 % 2;
                return false;
            }
            return true;
        }
    }

    public static String AFInAppEventParameterName(AFd1qSDK aFd1qSDK, String str) {
        int i = onValidateInAppFailure + 103;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        String AFInAppEventType2 = aFd1qSDK.AFInAppEventType("CACHED_CHANNEL", (String) null);
        if (!(AFInAppEventType2 != null)) {
            aFd1qSDK.valueOf("CACHED_CHANNEL", str);
            return str;
        }
        int i3 = onValidateInAppFailure + 43;
        onValidateInApp = i3 % 128;
        if ((i3 % 2 == 0 ? 'P' : 'R') == 'R') {
            return AFInAppEventType2;
        }
        int i4 = 84 / 0;
        return AFInAppEventType2;
    }

    private String AFInAppEventParameterName(SimpleDateFormat simpleDateFormat, Context context) {
        String string;
        int i = onValidateInAppFailure + 49;
        onValidateInApp = i % 128;
        Object[] objArr = null;
        if (i % 2 == 0) {
            string = valueOf(context).getString("appsFlyerFirstInstall", null);
            int i2 = 45 / 0;
        } else {
            string = valueOf(context).getString("appsFlyerFirstInstall", null);
        }
        AFLogger.afInfoLog("AppsFlyer: first launch date: ".concat(String.valueOf(string)));
        int i3 = onValidateInApp + 31;
        onValidateInAppFailure = i3 % 128;
        if (i3 % 2 == 0) {
            return string;
        }
        int length = objArr.length;
        return string;
    }

    @Override
    public final String getAttributionId(Context context) {
        try {
            String values2 = new AFb1ySDK(context, values()).values();
            int i = onValidateInAppFailure + 39;
            onValidateInApp = i % 128;
            int i2 = i % 2;
            return values2;
        } catch (Throwable th) {
            AFLogger.afErrorLog("Could not collect facebook attribution id. ", th);
            return null;
        }
    }

    public static synchronized SharedPreferences valueOf(Context context) {
        SharedPreferences sharedPreferences;
        synchronized (AFb1xSDK.class) {
            int i = onValidateInApp + 105;
            onValidateInAppFailure = i % 128;
            int i2 = i % 2;
            if (AFKeystoreWrapper().onResponse == null) {
                int i3 = onValidateInApp + 1;
                onValidateInAppFailure = i3 % 128;
                int i4 = i3 % 2;
                AFKeystoreWrapper().onResponse = context.getApplicationContext().getSharedPreferences("appsflyer-data", 0);
            }
            sharedPreferences = AFKeystoreWrapper().onResponse;
        }
        return sharedPreferences;
    }

    public final AFd1qSDK AFInAppEventParameterName(Context context) {
        AFc1xSDK aFc1xSDK = this.AppsFlyerLib;
        if (context != null) {
            AFb1bSDK aFb1bSDK = aFc1xSDK.values;
            if (context != null) {
                aFb1bSDK.values = context.getApplicationContext();
            }
        }
        Context context2 = this.AppsFlyerLib.values.values;
        if (context2 != null) {
            return new AFc1ySDK(valueOf(context2));
        }
        throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
    }

    public static int AFKeystoreWrapper(SharedPreferences sharedPreferences, boolean z) {
        int i = onValidateInAppFailure + 67;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        int AFKeystoreWrapper2 = AFKeystoreWrapper(sharedPreferences, "appsFlyerCount", z);
        int i3 = onValidateInAppFailure + 15;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
        return AFKeystoreWrapper2;
    }

    private static int valueOf(SharedPreferences sharedPreferences, boolean z) {
        int i = onValidateInApp + 73;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        int AFKeystoreWrapper2 = AFKeystoreWrapper(sharedPreferences, "appsFlyerInAppEventCount", z);
        int i3 = onValidateInAppFailure + 95;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
        return AFKeystoreWrapper2;
    }

    private static int AFKeystoreWrapper(SharedPreferences sharedPreferences, String str, boolean z) {
        int i;
        int i2 = onValidateInAppFailure + 23;
        onValidateInApp = i2 % 128;
        if (i2 % 2 == 0) {
            i = sharedPreferences.getInt(str, 0);
        } else {
            i = sharedPreferences.getInt(str, 0);
        }
        if ((AFb1qSDK.AFInAppEventParameterName().afErrorLog() ? (char) 14 : '.') == 14) {
            AFb1qSDK.AFInAppEventParameterName().AFKeystoreWrapper(String.valueOf(i));
        }
        int i3 = onValidateInAppFailure + 97;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
        return i;
    }

    private long init(Context context) {
        long j = valueOf(context).getLong("AppsFlyerTimePassedSincePrevLaunch", 0L);
        long currentTimeMillis = System.currentTimeMillis();
        AFInAppEventParameterName(context).AFInAppEventParameterName("AppsFlyerTimePassedSincePrevLaunch", currentTimeMillis);
        if (j <= 0) {
            int i = onValidateInApp + 75;
            onValidateInAppFailure = i % 128;
            int i2 = i % 2;
            return -1L;
        }
        int i3 = onValidateInApp + 15;
        onValidateInAppFailure = i3 % 128;
        if (i3 % 2 == 0) {
        }
        return (currentTimeMillis - j) / 1000;
    }

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

    private static void AFKeystoreWrapper(ScheduledExecutorService scheduledExecutorService, Runnable runnable, long j, TimeUnit timeUnit) {
        int i = onValidateInApp + 3;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        try {
            scheduledExecutorService.schedule(runnable, j, timeUnit);
            int i3 = onValidateInApp + 47;
            onValidateInAppFailure = i3 % 128;
            if (!(i3 % 2 == 0)) {
                Object obj = null;
                super.hashCode();
            }
        } catch (RejectedExecutionException e) {
            AFLogger.afErrorLog("scheduleJob failed with RejectedExecutionException Exception", e);
        } catch (Throwable th) {
            AFLogger.afErrorLog("scheduleJob failed with Exception", th);
        }
    }

    @Override
    @Deprecated
    public final boolean isStopped() {
        int i = onValidateInApp + 27;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        boolean values2 = this.AppsFlyerLib.AFVersionDeclaration().values();
        int i3 = onValidateInAppFailure + 77;
        onValidateInApp = i3 % 128;
        if (i3 % 2 != 0) {
            return values2;
        }
        Object obj = null;
        super.hashCode();
        return values2;
    }

    @Deprecated
    public static String valueOf(HttpURLConnection httpURLConnection) {
        String obj;
        int i;
        BufferedReader bufferedReader;
        InputStreamReader inputStreamReader;
        Object obj2;
        StringBuilder sb = new StringBuilder();
        Object obj3 = null;
        try {
            try {
                InputStream errorStream = httpURLConnection.getErrorStream();
                if (errorStream == null) {
                    errorStream = httpURLConnection.getInputStream();
                }
                inputStreamReader = new InputStreamReader(errorStream);
                try {
                    bufferedReader = new BufferedReader(inputStreamReader);
                    boolean z = false;
                    while (true) {
                        try {
                            String readLine = bufferedReader.readLine();
                            if ((readLine != null ? Typography.dollar : '_') == '_') {
                                break;
                            }
                            if (!(!z)) {
                                int i2 = onValidateInAppFailure + 91;
                                onValidateInApp = i2 % 128;
                                int i3 = i2 % 2;
                                obj2 = '\n';
                            } else {
                                obj2 = "";
                            }
                            sb.append(obj2);
                            sb.append(readLine);
                            z = true;
                        } catch (Throwable th) {
                            th = th;
                            try {
                                StringBuilder sb2 = new StringBuilder("Could not read connection response from: ");
                                sb2.append(httpURLConnection.getURL().toString());
                                AFLogger.afErrorLog(sb2.toString(), th);
                                if (bufferedReader != null) {
                                    bufferedReader.close();
                                }
                                if (inputStreamReader != null) {
                                    inputStreamReader.close();
                                }
                                obj = sb.toString();
                                new JSONObject(obj);
                                i = onValidateInAppFailure + 123;
                                onValidateInApp = i % 128;
                                if (i % 2 == 0) {
                                }
                            } catch (Throwable th2) {
                                if (bufferedReader != null) {
                                    try {
                                        bufferedReader.close();
                                    } catch (Throwable th3) {
                                        AFLogger.afErrorLog(th3);
                                        throw th2;
                                    }
                                }
                                if (inputStreamReader != null) {
                                    inputStreamReader.close();
                                }
                                throw th2;
                            }
                        }
                    }
                    bufferedReader.close();
                    inputStreamReader.close();
                } catch (Throwable th4) {
                    th = th4;
                    bufferedReader = null;
                }
            } catch (Throwable th5) {
                th = th5;
                bufferedReader = null;
                inputStreamReader = null;
            }
        } catch (Throwable th6) {
            AFLogger.afErrorLog(th6);
        }
        obj = sb.toString();
        try {
            new JSONObject(obj);
            i = onValidateInAppFailure + 123;
            onValidateInApp = i % 128;
            if (i % 2 == 0) {
                return obj;
            }
            super.hashCode();
            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 static float onInstallConversionFailureNative(Context context) {
        try {
            Object obj = null;
            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 ? '!' : 'R') == '!') {
                int i = onValidateInAppFailure + 71;
                onValidateInApp = i % 128;
                int i2 = i % 2;
                if (intExtra2 != -1) {
                    float f = (intExtra / intExtra2) * 100.0f;
                    int i3 = onValidateInApp + 21;
                    onValidateInAppFailure = i3 % 128;
                    int i4 = i3 % 2;
                    return f;
                }
            }
            int i5 = onValidateInApp + 81;
            onValidateInAppFailure = i5 % 128;
            if (!(i5 % 2 != 0)) {
                return 50.0f;
            }
            super.hashCode();
            return 50.0f;
        } catch (Throwable th) {
            AFLogger.afErrorLog(th.getMessage(), th);
            return 1.0f;
        }
    }

    private static boolean onAppOpenAttributionNative(Context context) {
        NetworkInterface networkInterface;
        int i = onValidateInAppFailure + 33;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        if (!(context == null)) {
            if (Build.VERSION.SDK_INT >= 23) {
                try {
                    ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
                    Network[] allNetworks = connectivityManager.getAllNetworks();
                    int length = allNetworks.length;
                    int i3 = 0;
                    while (true) {
                        if ((i3 < length ? '\f' : (char) 0) != '\f') {
                            return false;
                        }
                        NetworkCapabilities networkCapabilities = connectivityManager.getNetworkCapabilities(allNetworks[i3]);
                        if (networkCapabilities.hasTransport(4)) {
                            if (!networkCapabilities.hasCapability(15)) {
                                return true;
                            }
                        }
                        i3++;
                    }
                } catch (Exception e) {
                    AFLogger.afErrorLog("Failed collecting ivc data", e);
                }
            } else if (Build.VERSION.SDK_INT >= 16) {
                ArrayList arrayList = new ArrayList();
                try {
                    Iterator it = Collections.list(NetworkInterface.getNetworkInterfaces()).iterator();
                    while (it.hasNext()) {
                        int i4 = onValidateInAppFailure + 31;
                        onValidateInApp = i4 % 128;
                        if (i4 % 2 != 0) {
                            networkInterface = (NetworkInterface) it.next();
                            if (networkInterface.isUp()) {
                                arrayList.add(networkInterface.getName());
                            }
                        } else {
                            networkInterface = (NetworkInterface) it.next();
                            boolean isUp = networkInterface.isUp();
                            Object[] objArr = null;
                            int length2 = objArr.length;
                            if (isUp) {
                                arrayList.add(networkInterface.getName());
                            }
                        }
                    }
                    return arrayList.contains("tun0");
                } catch (Exception e2) {
                    AFLogger.afErrorLog("Failed collecting ivc data", e2);
                }
            }
        }
        return false;
    }

    @Override
    public final void setHost(String str, String str2) {
        if ((str != null ? (char) 19 : (char) 26) == 19) {
            AFInAppEventParameterName("custom_host_prefix", str);
        }
        if ((str2 != null ? 'F' : 'R') == 'F') {
            if (!str2.isEmpty()) {
                int i = onValidateInAppFailure + 1;
                onValidateInApp = i % 128;
                int i2 = i % 2;
                AFInAppEventParameterName("custom_host", str2);
                return;
            }
        }
        AFLogger.afWarnLog("hostName cannot be null or empty");
        int i3 = onValidateInAppFailure + 109;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final String getHostName() {
        String valueOf2 = valueOf("custom_host");
        if (valueOf2 == null) {
            int i = onValidateInAppFailure + 89;
            onValidateInApp = i % 128;
            int i2 = i % 2;
            return "appsflyer.com";
        }
        int i3 = onValidateInAppFailure + 71;
        onValidateInApp = i3 % 128;
        if (i3 % 2 == 0) {
            Object obj = null;
            super.hashCode();
        }
        return valueOf2;
    }

    @Override
    public final String getHostPrefix() {
        int i = onValidateInApp + 77;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        String valueOf2 = valueOf("custom_host_prefix");
        if (valueOf2 == null) {
            int i3 = onValidateInAppFailure + 85;
            onValidateInApp = i3 % 128;
            int i4 = i3 % 2;
            return "";
        }
        int i5 = onValidateInApp + 107;
        onValidateInAppFailure = i5 % 128;
        if ((i5 % 2 != 0 ? Typography.quote : (char) 27) != '\"') {
            return valueOf2;
        }
        Object obj = null;
        super.hashCode();
        return valueOf2;
    }

    @Override
    public final void setMinTimeBetweenSessions(int i) {
        int i2 = onValidateInAppFailure + 101;
        onValidateInApp = i2 % 128;
        int i3 = i2 % 2;
        this.onInstallConversionFailureNative = TimeUnit.SECONDS.toMillis(i);
        int i4 = onValidateInAppFailure + 91;
        onValidateInApp = i4 % 128;
        int i5 = i4 % 2;
    }

    private AFe1hSDK[] afInfoLog() {
        int i = onValidateInApp + 83;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        AFe1hSDK[] AFInAppEventType2 = values().init().AFInAppEventType();
        int i3 = onValidateInAppFailure + 45;
        onValidateInApp = i3 % 128;
        int i4 = i3 % 2;
        return AFInAppEventType2;
    }

    public class AFa1xSDK implements Runnable {
        private final AFa1tSDK AFInAppEventType;

        AFa1xSDK(AFb1xSDK aFb1xSDK, AFa1tSDK aFa1tSDK, byte b) {
            this(aFa1tSDK);
        }

        private AFa1xSDK(AFa1tSDK aFa1tSDK) {
            this.AFInAppEventType = aFa1tSDK;
        }

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

    public class AFa1wSDK implements Runnable {
        private final AFa1tSDK values;

        AFa1wSDK(AFb1xSDK aFb1xSDK, AFa1tSDK aFa1tSDK, byte b) {
            this(aFa1tSDK);
        }

        private AFa1wSDK(AFa1tSDK aFa1tSDK) {
            this.values = aFa1tSDK;
        }

        @Override
        public final void run() {
            AFd1uSDK aFd1uSDK;
            if (this.values.valueOf()) {
                AFd1sSDK aFd1sSDK = new AFd1sSDK(this.values, AFb1xSDK.this.values());
                aFd1sSDK.getLevel = AFb1xSDK.AFInAppEventType(AFb1xSDK.this);
                aFd1uSDK = aFd1sSDK;
            } else {
                aFd1uSDK = new AFd1uSDK(this.values, AFb1xSDK.this.values());
            }
            AFc1mSDK afErrorLog = AFb1xSDK.this.values().afErrorLog();
            afErrorLog.AFInAppEventParameterName.execute(new AFc1mSDK.AnonymousClass3(aFd1uSDK));
        }
    }

    class AFa1vSDK implements AFc1iSDK {
        @Override
        public final void valueOf(AFc1lSDK<?> aFc1lSDK) {
        }

        private AFa1vSDK() {
        }

        AFa1vSDK(AFb1xSDK aFb1xSDK, byte b) {
            this();
        }

        @Override
        public final void AFInAppEventType(AFc1lSDK<?> aFc1lSDK) {
            if (aFc1lSDK instanceof AFd1sSDK) {
                AFb1xSDK.this.values().afInfoLog().AFInAppEventType(((AFd1uSDK) aFc1lSDK).afRDLog.afInfoLog);
            }
        }

        @Override
        public final void valueOf(AFc1lSDK<?> aFc1lSDK, AFc1jSDK aFc1jSDK) {
            JSONObject AFInAppEventType;
            AFb1rSDK AFInAppEventParameterName;
            if (aFc1lSDK instanceof AFd1uSDK) {
                AFd1uSDK aFd1uSDK = (AFd1uSDK) aFc1lSDK;
                boolean z = aFc1lSDK instanceof AFd1sSDK;
                if (z) {
                    AFd1sSDK aFd1sSDK = (AFd1sSDK) aFc1lSDK;
                    boolean z2 = true;
                    if (aFd1sSDK.valueOf != AFc1jSDK.SUCCESS && aFd1sSDK.values != 1) {
                        z2 = false;
                    }
                    if (z2) {
                        Context context = AFb1xSDK.valueOf(AFb1xSDK.this).values.values;
                        if (context != null) {
                            AFd1aSDK aFd1aSDK = new AFd1aSDK(aFd1sSDK, new AFc1ySDK(AFb1xSDK.valueOf(context)));
                            AFc1mSDK afErrorLog = AFb1xSDK.valueOf(AFb1xSDK.this).afErrorLog();
                            afErrorLog.AFInAppEventParameterName.execute(new AFc1mSDK.AnonymousClass3(aFd1aSDK));
                        } else {
                            throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
                        }
                    }
                }
                if (aFc1jSDK == AFc1jSDK.SUCCESS) {
                    AFb1xSDK aFb1xSDK = AFb1xSDK.this;
                    aFb1xSDK.AFInAppEventParameterName(AFb1xSDK.AFKeystoreWrapper(aFb1xSDK)).valueOf("sentSuccessfully", ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);
                    if (!(aFc1lSDK instanceof AFd1rSDK) && (AFInAppEventParameterName = new AFd1iSDK(AFb1xSDK.AFKeystoreWrapper(AFb1xSDK.this)).AFInAppEventParameterName()) != null && AFInAppEventParameterName.valueOf()) {
                        String str = AFInAppEventParameterName.values;
                        AFLogger.afDebugLog("Resending Uninstall token to AF servers: ".concat(String.valueOf(str)));
                        AFd1iSDK.valueOf(str);
                    }
                    ResponseNetwork responseNetwork = aFd1uSDK.afDebugLog;
                    if (responseNetwork != null && (AFInAppEventType = AFb1nSDK.AFInAppEventType((String) responseNetwork.getBody())) != null) {
                        AFb1xSDK.values(AFb1xSDK.this, AFInAppEventType.optBoolean("send_background", false));
                    }
                    if (z) {
                        AFb1xSDK.AFInAppEventParameterName(AFb1xSDK.this, System.currentTimeMillis());
                        return;
                    }
                    return;
                }
                return;
            }
            if (!(aFc1lSDK instanceof AFd1aSDK) || aFc1jSDK == AFc1jSDK.SUCCESS) {
                return;
            }
            AFd1fSDK aFd1fSDK = new AFd1fSDK(AFb1xSDK.valueOf(AFb1xSDK.this));
            AFc1mSDK afErrorLog2 = AFb1xSDK.valueOf(AFb1xSDK.this).afErrorLog();
            afErrorLog2.AFInAppEventParameterName.execute(new AFc1mSDK.AnonymousClass3(aFd1fSDK));
        }
    }

    public final void AFKeystoreWrapper(Context context) {
        int i = onValidateInAppFailure + 63;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        AFc1xSDK aFc1xSDK = this.AppsFlyerLib;
        if (!(context == null)) {
            AFb1bSDK aFb1bSDK = aFc1xSDK.values;
            if (context != null) {
                int i3 = onValidateInApp + 55;
                onValidateInAppFailure = i3 % 128;
                int i4 = i3 % 2;
                aFb1bSDK.values = context.getApplicationContext();
            }
        }
        int i5 = onValidateInAppFailure + 9;
        onValidateInApp = i5 % 128;
        if (i5 % 2 != 0) {
            return;
        }
        Object[] objArr = null;
        int length = objArr.length;
    }

    @Override
    public final void sendPurchaseData(Context context, Map<String, Object> map, PurchaseHandler.PurchaseValidationCallback purchaseValidationCallback) {
        AFb1bSDK aFb1bSDK;
        int i = onValidateInAppFailure + 29;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        AFc1xSDK aFc1xSDK = this.AppsFlyerLib;
        Context applicationContext = context.getApplicationContext();
        Object[] objArr = null;
        Object[] objArr2 = 0;
        if (applicationContext != null) {
            int i3 = onValidateInAppFailure + 11;
            onValidateInApp = i3 % 128;
            if ((i3 % 2 == 0 ? '?' : Typography.less) != '?') {
                aFb1bSDK = aFc1xSDK.values;
            } else {
                aFb1bSDK = aFc1xSDK.values;
                super.hashCode();
            }
        }
        PurchaseHandler AFLogger = values().AFLogger();
        if (AFLogger.AFInAppEventType(map, purchaseValidationCallback, BillingClient.FeatureType.SUBSCRIPTIONS)) {
            AFc1eSDK aFc1eSDK = new AFc1eSDK(map, purchaseValidationCallback, AFLogger.AFInAppEventType);
            AFc1mSDK aFc1mSDK = AFLogger.AFKeystoreWrapper;
            aFc1mSDK.AFInAppEventParameterName.execute(new AFc1mSDK.AnonymousClass3(aFc1eSDK));
            int i4 = onValidateInApp + 49;
            onValidateInAppFailure = i4 % 128;
            int i5 = i4 % 2;
        }
        int i6 = onValidateInAppFailure + 99;
        onValidateInApp = i6 % 128;
        if (!(i6 % 2 == 0)) {
            return;
        }
        int length = objArr.length;
    }

    @Override
    public final void performOnDeepLinking(final Intent intent, Context context) {
        int i = onValidateInAppFailure + 5;
        onValidateInApp = i % 128;
        if (i % 2 == 0) {
            int i2 = 42 / 0;
        }
    }

    @Override
    public final void setPartnerData(String str, Map<String, Object> map) {
        int i = onValidateInAppFailure + 31;
        onValidateInApp = i % 128;
        Object[] objArr = null;
        Object[] objArr2 = 0;
        Object[] objArr3 = 0;
        if (i % 2 == 0) {
            AFb1eSDK aFb1eSDK = this.onAppOpenAttribution;
            super.hashCode();
        }
        AFb1eSDK aFb1eSDK2 = this.onAppOpenAttribution;
        boolean z = false;
        if (str != null) {
            int i2 = onValidateInApp + 37;
            onValidateInAppFailure = i2 % 128;
            if ((i2 % 2 != 0 ? '5' : '7') != '7') {
                boolean isEmpty = str.isEmpty();
                int length = (objArr3 == true ? 1 : 0).length;
            }
        }
        AFLogger.afWarnLog("Partner ID is missing or `null`");
    }

    @Override
    public final void setImeiData(String str) {
        int i = onValidateInAppFailure + 11;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("setImeiData", str);
        this.AppsFlyerLib.AFVersionDeclaration().AFInAppEventType = str;
        int i3 = onValidateInApp + 13;
        onValidateInAppFailure = i3 % 128;
        if ((i3 % 2 != 0 ? '9' : '%') != '%') {
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    private void AFInAppEventParameterName(Context context, AFd1dSDK aFd1dSDK) {
        int i = onValidateInApp + 81;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        AFc1xSDK aFc1xSDK = this.AppsFlyerLib;
        if (context != null) {
            AFb1bSDK aFb1bSDK = aFc1xSDK.values;
            if (!(context == null)) {
                int i3 = onValidateInAppFailure + 47;
                onValidateInApp = i3 % 128;
                if (i3 % 2 == 0) {
                    aFb1bSDK.values = context.getApplicationContext();
                    int i4 = 80 / 0;
                } else {
                    aFb1bSDK.values = context.getApplicationContext();
                }
            }
        }
        AFd1bSDK afInfoLog2 = values().afInfoLog();
        AFe1zSDK values2 = AFa1pSDK.values(context);
        if (afInfoLog2.AFKeystoreWrapper()) {
            int i5 = onValidateInApp + 63;
            onValidateInAppFailure = i5 % 128;
            if ((i5 % 2 != 0 ? '_' : (char) 22) != '_') {
                afInfoLog2.values.put("api_name", aFd1dSDK.toString());
                afInfoLog2.values(values2);
            } else {
                afInfoLog2.values.put("api_name", aFd1dSDK.toString());
                afInfoLog2.values(values2);
                Object obj = null;
                super.hashCode();
            }
        }
        afInfoLog2.valueOf();
        int i6 = onValidateInApp + 105;
        onValidateInAppFailure = i6 % 128;
        if (i6 % 2 != 0) {
            int i7 = 88 / 0;
        }
    }

    @Override
    public final void logEvent(Context context, String str, Map<String, Object> map, AppsFlyerRequestListener appsFlyerRequestListener) {
        HashMap hashMap = map == null ? null : new HashMap(map);
        AFc1xSDK aFc1xSDK = this.AppsFlyerLib;
        if (context != null) {
            AFb1bSDK aFb1bSDK = aFc1xSDK.values;
            if (context != null) {
                aFb1bSDK.values = context.getApplicationContext();
            }
        }
        AFe1sSDK aFe1sSDK = new AFe1sSDK();
        if (context != null) {
            aFe1sSDK.valueOf = (Application) context.getApplicationContext();
        }
        aFe1sSDK.AFLogger = str;
        aFe1sSDK.AFInAppEventType = appsFlyerRequestListener;
        if (hashMap != null && hashMap.containsKey(AFInAppEventParameterName.TOUCH_OBJ)) {
            HashMap hashMap2 = new HashMap();
            Object obj = hashMap.get(AFInAppEventParameterName.TOUCH_OBJ);
            if (obj instanceof MotionEvent) {
                MotionEvent motionEvent = (MotionEvent) obj;
                HashMap hashMap3 = new HashMap();
                hashMap3.put("x", Float.valueOf(motionEvent.getX()));
                hashMap3.put("y", Float.valueOf(motionEvent.getY()));
                hashMap2.put("loc", hashMap3);
                hashMap2.put("pf", Float.valueOf(motionEvent.getPressure()));
                hashMap2.put("rad", Float.valueOf(motionEvent.getTouchMajor() / 2.0f));
            } else {
                hashMap2.put("error", "Parsing failed due to invalid input in 'af_touch_obj'.");
                AFLogger.AFInAppEventParameterName("Parsing failed due to invalid input in 'af_touch_obj'.");
            }
            Map<String, ?> singletonMap = Collections.singletonMap("tch_data", hashMap2);
            hashMap.remove(AFInAppEventParameterName.TOUCH_OBJ);
            aFe1sSDK.AFInAppEventType(singletonMap);
        }
        aFe1sSDK.AFKeystoreWrapper = hashMap;
        AFb1qSDK afWarnLog2 = values().afWarnLog();
        String[] strArr = new String[2];
        strArr[0] = str;
        strArr[1] = new JSONObject(aFe1sSDK.AFKeystoreWrapper == null ? new HashMap() : aFe1sSDK.AFKeystoreWrapper).toString();
        afWarnLog2.AFInAppEventType("logEvent", strArr);
        if (str == null) {
            AFInAppEventParameterName(context, AFd1dSDK.logEvent);
        }
        AFInAppEventType(aFe1sSDK, context instanceof Activity ? (Activity) context : null);
    }

    final void AFInAppEventType(AFa1tSDK aFa1tSDK, Activity activity) {
        String str;
        AppsFlyerRequestListener appsFlyerRequestListener;
        Uri AFInAppEventType2;
        Application application = aFa1tSDK.valueOf;
        String str2 = "";
        if (activity != null) {
            int i = onValidateInAppFailure + 83;
            onValidateInApp = i % 128;
            int i2 = i % 2;
            if (activity.getIntent() != null) {
                int i3 = onValidateInAppFailure + 85;
                onValidateInApp = i3 % 128;
                if (!(i3 % 2 == 0)) {
                    AFInAppEventType2 = AFb1lSDK.AFInAppEventType(activity);
                } else {
                    AFInAppEventType2 = AFb1lSDK.AFInAppEventType(activity);
                    Object[] objArr = null;
                    int length = objArr.length;
                }
                if ((this.AppsFlyerLib.AFVersionDeclaration().values != null ? '%' : 'a') != 'a') {
                    String referrer = AppsFlyerProperties.getInstance().getReferrer(application);
                    if (!(referrer == null)) {
                        int i4 = onValidateInAppFailure + 5;
                        onValidateInApp = i4 % 128;
                        int i5 = i4 % 2;
                        str2 = referrer;
                    }
                    aFa1tSDK.afRDLog = str2;
                    aFa1tSDK.AFInAppEventParameterName = str;
                    AFInAppEventType(aFa1tSDK);
                    return;
                }
                int i6 = onValidateInAppFailure + 105;
                onValidateInApp = i6 % 128;
                if (i6 % 2 == 0) {
                    AFLogger.afWarnLog("[LogEvent/Launch] AppsFlyer's SDK cannot send any event without providing DevKey.");
                    appsFlyerRequestListener = aFa1tSDK.AFInAppEventType;
                    int i7 = 21 / 0;
                    if (appsFlyerRequestListener == null) {
                        return;
                    }
                } else {
                    AFLogger.afWarnLog("[LogEvent/Launch] AppsFlyer's SDK cannot send any event without providing DevKey.");
                    appsFlyerRequestListener = aFa1tSDK.AFInAppEventType;
                    if (appsFlyerRequestListener == null) {
                        return;
                    }
                }
                appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1cSDK.AFInAppEventType);
                return;
            }
        }
        str = "";
        if ((this.AppsFlyerLib.AFVersionDeclaration().values != null ? '%' : 'a') != 'a') {
        }
    }

    private void AFKeystoreWrapper(AFa1tSDK aFa1tSDK) {
        String format;
        Application application = aFa1tSDK.valueOf;
        Object[] objArr = null;
        Object[] objArr2 = 0;
        if ((application == null ? '9' : 'J') == '9') {
            int i = onValidateInApp + 121;
            onValidateInAppFailure = i % 128;
            if (i % 2 == 0) {
                AFLogger.afDebugLog("sendWithEvent - got null context. skipping event/launch.");
                return;
            } else {
                AFLogger.afDebugLog("sendWithEvent - got null context. skipping event/launch.");
                int length = objArr.length;
                return;
            }
        }
        SharedPreferences valueOf2 = valueOf(application);
        AppsFlyerProperties.getInstance().saveProperties(valueOf2);
        if (!this.AppsFlyerLib.AFVersionDeclaration().values()) {
            StringBuilder sb = new StringBuilder("sendWithEvent from activity: ");
            sb.append(application.getClass().getName());
            AFLogger.afInfoLog(sb.toString());
        }
        boolean valueOf3 = aFa1tSDK.valueOf();
        boolean z = aFa1tSDK instanceof AFe1uSDK;
        boolean z2 = aFa1tSDK instanceof AFe1vSDK;
        Map<String, ?> values2 = values(aFa1tSDK);
        String str = (String) values2.get("appsflyerKey");
        if (str != null) {
            byte b = 0;
            int i2 = 0;
            if (str.length() != 0) {
                if (!isStopped()) {
                    int i3 = onValidateInAppFailure + 9;
                    onValidateInApp = i3 % 128;
                    int i4 = i3 % 2;
                    AFLogger.afInfoLog("AppsFlyerLib.sendWithEvent");
                }
                int AFKeystoreWrapper2 = AFKeystoreWrapper(valueOf2, false);
                if (z2 || z) {
                    format = String.format(AFVersionDeclaration, AppsFlyerLib.getInstance().getHostPrefix(), AFKeystoreWrapper().getHostName());
                } else {
                    format = (valueOf3 ? ')' : 'K') != 'K' ? AFKeystoreWrapper2 < 2 ? String.format(init, AppsFlyerLib.getInstance().getHostPrefix(), AFKeystoreWrapper().getHostName()) : String.format(getLevel, AppsFlyerLib.getInstance().getHostPrefix(), AFKeystoreWrapper().getHostName()) : String.format(afWarnLog, AppsFlyerLib.getInstance().getHostPrefix(), AFKeystoreWrapper().getHostName());
                }
                StringBuilder sb2 = new StringBuilder();
                sb2.append(format);
                sb2.append(application.getPackageName());
                String obj = sb2.toString();
                StringBuilder sb3 = new StringBuilder();
                sb3.append(obj);
                sb3.append("&buildnumber=6.9.2");
                String obj2 = sb3.toString();
                String AFInAppEventType2 = AFInAppEventType(application);
                if (AFInAppEventType2 != null) {
                    StringBuilder sb4 = new StringBuilder();
                    sb4.append(obj2);
                    sb4.append("&channel=");
                    sb4.append(AFInAppEventType2);
                    obj2 = sb4.toString();
                }
                AFKeystoreWrapper(values2);
                AFa1wSDK aFa1wSDK = new AFa1wSDK(this, aFa1tSDK.AFKeystoreWrapper(obj2).AFInAppEventType(values2).AFInAppEventType(AFKeystoreWrapper2), b);
                if (valueOf3) {
                    AFe1hSDK[] afInfoLog2 = afInfoLog();
                    int length2 = afInfoLog2.length;
                    boolean z3 = false;
                    while (true) {
                        if ((i2 < length2 ? Typography.less : 'V') == 'V') {
                            break;
                        }
                        AFe1hSDK aFe1hSDK = afInfoLog2[i2];
                        if (aFe1hSDK.afRDLog == AFe1hSDK.AFa1zSDK.STARTED) {
                            StringBuilder sb5 = new StringBuilder("Failed to get ");
                            sb5.append(aFe1hSDK.AFKeystoreWrapper);
                            sb5.append(" referrer, wait ...");
                            AFLogger.afDebugLog(sb5.toString());
                            int i5 = onValidateInApp + 13;
                            onValidateInAppFailure = i5 % 128;
                            int i6 = i5 % 2;
                            z3 = true;
                        }
                        i2++;
                    }
                    if (this.onResponseError) {
                        if ((!AFLogger() ? '.' : Typography.dollar) == '.') {
                            AFLogger.afDebugLog("fetching Facebook deferred AppLink data, wait ...");
                            b = 1;
                            if (this.AppsFlyerLib.AFVersionDeclaration().AFKeystoreWrapper()) {
                                b = 1;
                            }
                        }
                    }
                    b = z3 ? 1 : 0;
                    if (this.AppsFlyerLib.AFVersionDeclaration().AFKeystoreWrapper()) {
                    }
                }
                ScheduledExecutorService valueOf4 = this.AppsFlyerLib.valueOf();
                long j = 500;
                if (b != 0) {
                    int i7 = onValidateInApp + 3;
                    onValidateInAppFailure = i7 % 128;
                    if (i7 % 2 != 0) {
                        int length3 = (objArr2 == true ? 1 : 0).length;
                    }
                } else {
                    j = 0;
                }
                AFKeystoreWrapper(valueOf4, aFa1wSDK, j, TimeUnit.MILLISECONDS);
                return;
            }
        }
        AFLogger.afDebugLog("Not sending data yet, waiting for dev key");
        AppsFlyerRequestListener appsFlyerRequestListener = aFa1tSDK.AFInAppEventType;
        if (appsFlyerRequestListener != null) {
            appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1cSDK.AFInAppEventType);
        }
    }

    public final Map<String, Object> values(AFa1tSDK aFa1tSDK) {
        String str;
        String str2;
        Object obj;
        String str3;
        String str4;
        AppsFlyerProperties appsFlyerProperties;
        AFb1fSDK aFb1fSDK;
        String str5;
        AppsFlyerProperties appsFlyerProperties2;
        Throwable th;
        AFa1uSDK valueOf2;
        long availableBlocks;
        long blockCount;
        Object obj2;
        PackageInfo packageInfo;
        Object values2;
        UiModeManager uiModeManager;
        Context context = aFa1tSDK.valueOf;
        String str6 = this.AppsFlyerLib.AFVersionDeclaration().values;
        String str7 = aFa1tSDK.AFLogger;
        Object jSONObject = new JSONObject(aFa1tSDK.AFKeystoreWrapper == null ? new HashMap() : aFa1tSDK.AFKeystoreWrapper).toString();
        String str8 = aFa1tSDK.afRDLog;
        SharedPreferences valueOf3 = valueOf(context);
        boolean valueOf4 = aFa1tSDK.valueOf();
        Object obj3 = aFa1tSDK.AFInAppEventParameterName;
        Map<String, Object> map = aFa1tSDK.values;
        AFb1zSDK.AFKeystoreWrapper(context, map);
        Boolean bool = AFb1zSDK.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(map);
            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();
        map.put(AFInAppEventParameterName(Process.myPid() >> 22, (char) (Process.getGidForName("") + 18029), 12 - (KeyEvent.getMaxKeyCode() >> 16)).intern(), Long.toString(time));
        Object valueOf5 = AFa1ySDK.valueOf(context, time);
        if (valueOf5 != null) {
            map.put("cksm_v1", valueOf5);
        }
        try {
            if (!isStopped()) {
                StringBuilder sb = new StringBuilder("******* sendTrackingWithEvent: ");
                sb.append(valueOf4 ? "Launch" : str7);
                AFLogger.afInfoLog(sb.toString());
            } else {
                AFLogger.afInfoLog("Reporting has been stopped");
            }
            AFa1pSDK level = values().getLevel();
            try {
                if (!new File(level.values.values.getFilesDir(), "AFRequestCache").exists()) {
                    new File(level.values.values.getFilesDir(), "AFRequestCache").mkdir();
                }
            } catch (Exception e) {
                AFLogger.afErrorLog("CACHE: Could not create cache directory", e);
            }
            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 e2) {
                AFLogger.afErrorLog("Exception while validation permissions. ", e2);
            }
            map.put("af_events_api", AFInAppEventParameterName(11 - Process.getGidForName(""), (char) (1 - (SystemClock.elapsedRealtime() > 0L ? 1 : (SystemClock.elapsedRealtime() == 0L ? 0 : -1))), 1 - TextUtils.indexOf("", "", 0)).intern());
            map.put(AFInAppEventParameterName(13 - (ViewConfiguration.getScrollBarFadeDuration() >> 16), (char) (TextUtils.getOffsetAfter("", 0) + 6857), (Process.myTid() >> 22) + 5).intern(), Build.BRAND);
            map.put(Device.TYPE, Build.DEVICE);
            map.put(AppLovinEventTypes.USER_VIEWED_PRODUCT, Build.PRODUCT);
            map.put("sdk", Integer.toString(Build.VERSION.SDK_INT));
            map.put(Device.JsonKeys.MODEL, Build.MODEL);
            map.put("deviceType", Build.TYPE);
            AFInAppEventType(context, map);
            AppsFlyerProperties appsFlyerProperties3 = AppsFlyerProperties.getInstance();
            AFb1fSDK aFb1fSDK2 = new AFb1fSDK(context);
            AFd1bSDK afInfoLog2 = values().afInfoLog();
            if (valueOf4) {
                if (afDebugLog(context)) {
                    if (!appsFlyerProperties3.isOtherSdkStringDisabled()) {
                        map.put("batteryLevel", String.valueOf(onInstallConversionFailureNative(context)));
                    }
                    afErrorLog(context);
                    if (Build.VERSION.SDK_INT >= 23) {
                        uiModeManager = (UiModeManager) context.getSystemService(UiModeManager.class);
                    } else {
                        uiModeManager = (UiModeManager) context.getSystemService("uimode");
                    }
                    if (uiModeManager != null && uiModeManager.getCurrentModeType() == 4) {
                        map.put("tv", Boolean.TRUE);
                    }
                    if (AFd1cSDK.valueOf(context)) {
                        map.put("inst_app", Boolean.TRUE);
                    }
                }
                map.put("timepassedsincelastlaunch", Long.toString(init(context)));
                AFInAppEventType(map);
                valueOf(map, afInfoLog2);
                if (this.onAttributionFailure != null) {
                    map.put("phone", this.onAttributionFailure);
                }
                if (!TextUtils.isEmpty(str8)) {
                    map.put(Constants.REFERRER, str8);
                }
                Object string = valueOf3.getString("extraReferrers", null);
                if (string != null) {
                    map.put("extraReferrers", string);
                }
                String referrer = appsFlyerProperties3.getReferrer(context);
                if (!TextUtils.isEmpty(referrer) && map.get(Constants.REFERRER) == null) {
                    map.put(Constants.REFERRER, referrer);
                }
                long j = afInfoLog2.AFLogger$LogLevel;
                if (j != 0) {
                    map.put("prev_session_dur", Long.valueOf(j));
                }
                map.put("exception_number", Long.valueOf(AFb1dSDK.AFInAppEventType == null ? -1L : valueOf(AFb1dSDK.AFInAppEventType).getLong("exception_number", 0L)));
                if (this.onAppOpenAttribution != null) {
                    AFb1eSDK aFb1eSDK = this.onAppOpenAttribution;
                    if (!aFb1eSDK.AFInAppEventParameterName.isEmpty()) {
                        map.put("partner_data", aFb1eSDK.AFInAppEventParameterName);
                    }
                    if (!aFb1eSDK.valueOf.isEmpty()) {
                        AFInAppEventParameterName(map).put("partner_data", aFb1eSDK.valueOf);
                        aFb1eSDK.valueOf = new HashMap();
                    }
                }
                str3 = str7;
            } else {
                str3 = str7;
                AFKeystoreWrapper(context, map, str3);
            }
            Object valueOf6 = valueOf("KSAppsFlyerId");
            String valueOf7 = valueOf("KSAppsFlyerRICounter");
            if (valueOf6 != null && valueOf7 != null && Integer.valueOf(valueOf7).intValue() > 0) {
                map.put("reinstallCounter", valueOf7);
                map.put("originalAppsflyerId", valueOf6);
            }
            Object valueOf8 = valueOf(AppsFlyerProperties.ADDITIONAL_CUSTOM_DATA);
            if (valueOf8 != null) {
                map.put("customData", valueOf8);
            }
            try {
                String installerPackageName = context.getPackageManager().getInstallerPackageName(context.getPackageName());
                if (installerPackageName != null) {
                    map.put("installer_package", installerPackageName);
                }
            } catch (Exception e3) {
                AFLogger.afErrorLog("Exception while getting the app's installer package. ", e3);
            }
            String string2 = appsFlyerProperties3.getString(AppsFlyerProperties.EXTENSION);
            if (string2 != null && string2.length() > 0) {
                map.put(AppsFlyerProperties.EXTENSION, string2);
            }
            String AFInAppEventType2 = AFInAppEventType(context);
            String AFInAppEventParameterName3 = AFInAppEventParameterName(AFInAppEventParameterName(context), AFInAppEventType2);
            if ((AFInAppEventParameterName3 != null && !AFInAppEventParameterName3.equals(AFInAppEventType2)) || (AFInAppEventParameterName3 == null && AFInAppEventType2 != null)) {
                map.put("af_latestchannel", AFInAppEventType2);
            }
            String afWarnLog2 = afWarnLog(context);
            if (afWarnLog2 != null) {
                map.put("af_installstore", afWarnLog2.toLowerCase());
            }
            String AFVersionDeclaration2 = AFVersionDeclaration(context);
            if (AFVersionDeclaration2 != null) {
                map.put("af_preinstall_name", AFVersionDeclaration2.toLowerCase());
            }
            String level2 = getLevel(context);
            if (level2 != null) {
                map.put("af_currentstore", level2.toLowerCase());
            }
            if (str6 != null && str6.length() > 0) {
                map.put("appsflyerKey", str6);
            } else {
                String str9 = this.AppsFlyerLib.AFVersionDeclaration().values;
                if (str9 != null && str9.length() > 0) {
                    map.put("appsflyerKey", str9);
                } else {
                    AFLogger.afInfoLog("AppsFlyer dev key is missing!!! Please use  AppsFlyerLib.getInstance().setAppsFlyerKey(...) to set it. ");
                    AFLogger.afInfoLog("AppsFlyer will not track this event.");
                    return null;
                }
            }
            Object AFInAppEventType3 = AFInAppEventType();
            if (AFInAppEventType3 != null) {
                map.put("appUserId", AFInAppEventType3);
            }
            Object string3 = appsFlyerProperties3.getString(AppsFlyerProperties.USER_EMAILS);
            if (string3 != null) {
                map.put("user_emails", string3);
            } else {
                String valueOf9 = valueOf(AppsFlyerProperties.USER_EMAIL);
                if (valueOf9 != null) {
                    map.put("sha1_el", AFb1tSDK.AFInAppEventParameterName(valueOf9));
                }
            }
            if (str3 != null) {
                map.put("eventName", str3);
                map.put("eventValue", jSONObject);
            }
            if (afRDLog() != null) {
                map.put(str2, valueOf(str2));
            }
            String valueOf10 = valueOf(AppsFlyerProperties.CURRENCY_CODE);
            if (valueOf10 != null) {
                if (valueOf10.length() != 3) {
                    StringBuilder sb2 = new StringBuilder("WARNING: currency code should be 3 characters!!! '");
                    sb2.append(valueOf10);
                    sb2.append("' is not a legal value.");
                    AFLogger.afWarnLog(sb2.toString());
                }
                map.put("currency", valueOf10);
            }
            Object valueOf11 = valueOf(AppsFlyerProperties.IS_UPDATE);
            if (valueOf11 != null) {
                map.put("isUpdate", valueOf11);
            }
            map.put("af_preinstalled", Boolean.toString(isPreInstalledApp(context)));
            if (appsFlyerProperties3.getBoolean(AppsFlyerProperties.COLLECT_FACEBOOK_ATTR_ID, true)) {
                try {
                    context.getPackageManager().getApplicationInfo(RemoteServiceWrapper.RECEIVER_SERVICE_PACKAGE, 0);
                    str4 = getAttributionId(context);
                } catch (PackageManager.NameNotFoundException unused) {
                    AFLogger.afWarnLog(str);
                    str4 = null;
                    if (str4 != null) {
                    }
                    AFKeystoreWrapper(context, map);
                    values2 = AFb1uSDK.values((WeakReference<Context>) new WeakReference(context));
                    if (values2 != null) {
                    }
                    map.put("lang", Locale.getDefault().getDisplayLanguage());
                    map.put("lang_code", Locale.getDefault().getLanguage());
                    map.put("country", Locale.getDefault().getCountry());
                    map.put("platformextension", this.onDeepLinkingNative.valueOf());
                    values(context, (Map<String, ? super String>) map);
                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
                    appsFlyerProperties = appsFlyerProperties3;
                    try {
                        map.put("installDate", valueOf(simpleDateFormat, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
                    } catch (Exception e4) {
                        e = e4;
                        AFLogger.afErrorLog("Exception while collecting install date. ", e);
                        packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                        if (packageInfo.versionCode > valueOf3.getInt("versionCode", 0)) {
                        }
                        map.put("app_version_code", Integer.toString(packageInfo.versionCode));
                        map.put("app_version_name", packageInfo.versionName);
                        str5 = str3;
                        long j2 = packageInfo.firstInstallTime;
                        try {
                            long j3 = packageInfo.lastUpdateTime;
                            appsFlyerProperties2 = appsFlyerProperties;
                            try {
                                aFb1fSDK = aFb1fSDK2;
                                try {
                                    map.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j2)));
                                    map.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j3)));
                                    map.put(AFInAppEventParameterName(Gravity.getAbsoluteGravity(0, 0) + 18, (char) Color.alpha(0), TextUtils.indexOf("", "", 0) + 15).intern(), AFInAppEventParameterName(simpleDateFormat, context));
                                } catch (Throwable th2) {
                                    th = th2;
                                    th = th;
                                    AFLogger.afErrorLog("Exception while collecting app version data ", th, true);
                                    this.onConversionDataFail = AFd1iSDK.AFInAppEventType(context);
                                    StringBuilder sb3 = new StringBuilder("didConfigureTokenRefreshService=");
                                    sb3.append(this.onConversionDataFail);
                                    AFLogger.afDebugLog(sb3.toString());
                                    if (!this.onConversionDataFail) {
                                    }
                                    if (valueOf4) {
                                    }
                                    if (!valueOf4) {
                                    }
                                    if (valueOf("advertiserId") == null) {
                                    }
                                    valueOf2 = AFb1zSDK.valueOf(context.getContentResolver());
                                    if (valueOf2 != null) {
                                    }
                                    map.put("registeredUninstall", Boolean.valueOf(AFd1iSDK.values(valueOf3)));
                                    int AFKeystoreWrapper2 = AFKeystoreWrapper(valueOf3, valueOf4);
                                    map.put("counter", Integer.toString(AFKeystoreWrapper2));
                                    map.put("iaecounter", Integer.toString(valueOf(valueOf3, str5 != null)));
                                    if (valueOf4) {
                                    }
                                    map.put("isFirstCall", Boolean.toString(!AFInAppEventParameterName(valueOf3)));
                                    AFKeystoreWrapper(context, valueOf4, map, AFKeystoreWrapper2);
                                    new AFb1tSDK();
                                    map.put("af_v", AFb1tSDK.valueOf(map));
                                    new AFb1tSDK();
                                    map.put("af_v2", AFb1tSDK.AFKeystoreWrapper(map));
                                    map.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(context)));
                                    if (valueOf3.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));
                                    map.put("cell", hashMap);
                                    AFb1fSDK aFb1fSDK3 = aFb1fSDK;
                                    map.put("sig", AFb1wSDK.AFInAppEventParameterName(aFb1fSDK3.AFKeystoreWrapper.getPackageManager(), aFb1fSDK3.AFKeystoreWrapper.getPackageName()));
                                    map.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                                    StatFs statFs = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                                    if (Build.VERSION.SDK_INT >= 18) {
                                    }
                                    double pow = Math.pow(2.0d, 20.0d);
                                    StringBuilder sb4 = new StringBuilder();
                                    sb4.append((long) (availableBlocks / pow));
                                    sb4.append("/");
                                    sb4.append((long) (blockCount / pow));
                                    map.put("disk", sb4.toString());
                                    if (this.AFLogger != null) {
                                    }
                                    return map;
                                }
                            } catch (Throwable th3) {
                                th = th3;
                                aFb1fSDK = aFb1fSDK2;
                            }
                        } catch (Throwable th4) {
                            th = th4;
                            aFb1fSDK = aFb1fSDK2;
                            appsFlyerProperties2 = appsFlyerProperties;
                            th = th;
                            AFLogger.afErrorLog("Exception while collecting app version data ", th, true);
                            this.onConversionDataFail = AFd1iSDK.AFInAppEventType(context);
                            StringBuilder sb32 = new StringBuilder("didConfigureTokenRefreshService=");
                            sb32.append(this.onConversionDataFail);
                            AFLogger.afDebugLog(sb32.toString());
                            if (!this.onConversionDataFail) {
                            }
                            if (valueOf4) {
                            }
                            if (!valueOf4) {
                            }
                            if (valueOf("advertiserId") == null) {
                            }
                            valueOf2 = AFb1zSDK.valueOf(context.getContentResolver());
                            if (valueOf2 != null) {
                            }
                            map.put("registeredUninstall", Boolean.valueOf(AFd1iSDK.values(valueOf3)));
                            int AFKeystoreWrapper22 = AFKeystoreWrapper(valueOf3, valueOf4);
                            map.put("counter", Integer.toString(AFKeystoreWrapper22));
                            map.put("iaecounter", Integer.toString(valueOf(valueOf3, str5 != null)));
                            if (valueOf4) {
                            }
                            map.put("isFirstCall", Boolean.toString(!AFInAppEventParameterName(valueOf3)));
                            AFKeystoreWrapper(context, valueOf4, map, AFKeystoreWrapper22);
                            new AFb1tSDK();
                            map.put("af_v", AFb1tSDK.valueOf(map));
                            new AFb1tSDK();
                            map.put("af_v2", AFb1tSDK.AFKeystoreWrapper(map));
                            map.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(context)));
                            if (valueOf3.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));
                            map.put("cell", hashMap2);
                            AFb1fSDK aFb1fSDK32 = aFb1fSDK;
                            map.put("sig", AFb1wSDK.AFInAppEventParameterName(aFb1fSDK32.AFKeystoreWrapper.getPackageManager(), aFb1fSDK32.AFKeystoreWrapper.getPackageName()));
                            map.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                            StatFs statFs2 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                            if (Build.VERSION.SDK_INT >= 18) {
                            }
                            double pow2 = Math.pow(2.0d, 20.0d);
                            StringBuilder sb42 = new StringBuilder();
                            sb42.append((long) (availableBlocks / pow2));
                            sb42.append("/");
                            sb42.append((long) (blockCount / pow2));
                            map.put("disk", sb42.toString());
                            if (this.AFLogger != null) {
                            }
                            return map;
                        }
                        this.onConversionDataFail = AFd1iSDK.AFInAppEventType(context);
                        StringBuilder sb322 = new StringBuilder("didConfigureTokenRefreshService=");
                        sb322.append(this.onConversionDataFail);
                        AFLogger.afDebugLog(sb322.toString());
                        if (!this.onConversionDataFail) {
                        }
                        if (valueOf4) {
                        }
                        if (!valueOf4) {
                        }
                        if (valueOf("advertiserId") == null) {
                        }
                        valueOf2 = AFb1zSDK.valueOf(context.getContentResolver());
                        if (valueOf2 != null) {
                        }
                        map.put("registeredUninstall", Boolean.valueOf(AFd1iSDK.values(valueOf3)));
                        int AFKeystoreWrapper222 = AFKeystoreWrapper(valueOf3, valueOf4);
                        map.put("counter", Integer.toString(AFKeystoreWrapper222));
                        map.put("iaecounter", Integer.toString(valueOf(valueOf3, str5 != null)));
                        if (valueOf4) {
                            appsFlyerProperties2.AFKeystoreWrapper = true;
                        }
                        map.put("isFirstCall", Boolean.toString(!AFInAppEventParameterName(valueOf3)));
                        AFKeystoreWrapper(context, valueOf4, map, AFKeystoreWrapper222);
                        new AFb1tSDK();
                        map.put("af_v", AFb1tSDK.valueOf(map));
                        new AFb1tSDK();
                        map.put("af_v2", AFb1tSDK.AFKeystoreWrapper(map));
                        map.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(context)));
                        if (valueOf3.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));
                        map.put("cell", hashMap22);
                        AFb1fSDK aFb1fSDK322 = aFb1fSDK;
                        map.put("sig", AFb1wSDK.AFInAppEventParameterName(aFb1fSDK322.AFKeystoreWrapper.getPackageManager(), aFb1fSDK322.AFKeystoreWrapper.getPackageName()));
                        map.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                        StatFs statFs22 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                        if (Build.VERSION.SDK_INT >= 18) {
                        }
                        double pow22 = Math.pow(2.0d, 20.0d);
                        StringBuilder sb422 = new StringBuilder();
                        sb422.append((long) (availableBlocks / pow22));
                        sb422.append("/");
                        sb422.append((long) (blockCount / pow22));
                        map.put("disk", sb422.toString());
                        if (this.AFLogger != null) {
                            map.put("sharing_filter", obj2);
                        }
                        return map;
                    }
                    packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                    if (packageInfo.versionCode > valueOf3.getInt("versionCode", 0)) {
                    }
                    map.put("app_version_code", Integer.toString(packageInfo.versionCode));
                    map.put("app_version_name", packageInfo.versionName);
                    str5 = str3;
                    try {
                        long j22 = packageInfo.firstInstallTime;
                        long j32 = packageInfo.lastUpdateTime;
                        appsFlyerProperties2 = appsFlyerProperties;
                        aFb1fSDK = aFb1fSDK2;
                        map.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j22)));
                        map.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j32)));
                        map.put(AFInAppEventParameterName(Gravity.getAbsoluteGravity(0, 0) + 18, (char) Color.alpha(0), TextUtils.indexOf("", "", 0) + 15).intern(), AFInAppEventParameterName(simpleDateFormat, context));
                    } catch (Throwable th5) {
                        th = th5;
                        aFb1fSDK = aFb1fSDK2;
                    }
                    this.onConversionDataFail = AFd1iSDK.AFInAppEventType(context);
                    StringBuilder sb3222 = new StringBuilder("didConfigureTokenRefreshService=");
                    sb3222.append(this.onConversionDataFail);
                    AFLogger.afDebugLog(sb3222.toString());
                    if (!this.onConversionDataFail) {
                    }
                    if (valueOf4) {
                    }
                    if (!valueOf4) {
                    }
                    if (valueOf("advertiserId") == null) {
                    }
                    valueOf2 = AFb1zSDK.valueOf(context.getContentResolver());
                    if (valueOf2 != null) {
                    }
                    map.put("registeredUninstall", Boolean.valueOf(AFd1iSDK.values(valueOf3)));
                    int AFKeystoreWrapper2222 = AFKeystoreWrapper(valueOf3, valueOf4);
                    map.put("counter", Integer.toString(AFKeystoreWrapper2222));
                    map.put("iaecounter", Integer.toString(valueOf(valueOf3, str5 != null)));
                    if (valueOf4) {
                    }
                    map.put("isFirstCall", Boolean.toString(!AFInAppEventParameterName(valueOf3)));
                    AFKeystoreWrapper(context, valueOf4, map, AFKeystoreWrapper2222);
                    new AFb1tSDK();
                    map.put("af_v", AFb1tSDK.valueOf(map));
                    new AFb1tSDK();
                    map.put("af_v2", AFb1tSDK.AFKeystoreWrapper(map));
                    map.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(context)));
                    if (valueOf3.contains("is_stop_tracking_used")) {
                    }
                    HashMap hashMap222 = new HashMap();
                    hashMap222.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
                    hashMap222.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
                    map.put("cell", hashMap222);
                    AFb1fSDK aFb1fSDK3222 = aFb1fSDK;
                    map.put("sig", AFb1wSDK.AFInAppEventParameterName(aFb1fSDK3222.AFKeystoreWrapper.getPackageManager(), aFb1fSDK3222.AFKeystoreWrapper.getPackageName()));
                    map.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                    StatFs statFs222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                    if (Build.VERSION.SDK_INT >= 18) {
                    }
                    double pow222 = Math.pow(2.0d, 20.0d);
                    StringBuilder sb4222 = new StringBuilder();
                    sb4222.append((long) (availableBlocks / pow222));
                    sb4222.append("/");
                    sb4222.append((long) (blockCount / pow222));
                    map.put("disk", sb4222.toString());
                    if (this.AFLogger != null) {
                    }
                    return map;
                } catch (Throwable th6) {
                    AFLogger.afErrorLog(str, th6);
                    str4 = null;
                    if (str4 != null) {
                    }
                    AFKeystoreWrapper(context, map);
                    values2 = AFb1uSDK.values((WeakReference<Context>) new WeakReference(context));
                    if (values2 != null) {
                    }
                    map.put("lang", Locale.getDefault().getDisplayLanguage());
                    map.put("lang_code", Locale.getDefault().getLanguage());
                    map.put("country", Locale.getDefault().getCountry());
                    map.put("platformextension", this.onDeepLinkingNative.valueOf());
                    values(context, (Map<String, ? super String>) map);
                    SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
                    appsFlyerProperties = appsFlyerProperties3;
                    map.put("installDate", valueOf(simpleDateFormat2, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
                    packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                    if (packageInfo.versionCode > valueOf3.getInt("versionCode", 0)) {
                    }
                    map.put("app_version_code", Integer.toString(packageInfo.versionCode));
                    map.put("app_version_name", packageInfo.versionName);
                    str5 = str3;
                    long j222 = packageInfo.firstInstallTime;
                    long j322 = packageInfo.lastUpdateTime;
                    appsFlyerProperties2 = appsFlyerProperties;
                    aFb1fSDK = aFb1fSDK2;
                    map.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j222)));
                    map.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j322)));
                    map.put(AFInAppEventParameterName(Gravity.getAbsoluteGravity(0, 0) + 18, (char) Color.alpha(0), TextUtils.indexOf("", "", 0) + 15).intern(), AFInAppEventParameterName(simpleDateFormat2, context));
                    this.onConversionDataFail = AFd1iSDK.AFInAppEventType(context);
                    StringBuilder sb32222 = new StringBuilder("didConfigureTokenRefreshService=");
                    sb32222.append(this.onConversionDataFail);
                    AFLogger.afDebugLog(sb32222.toString());
                    if (!this.onConversionDataFail) {
                    }
                    if (valueOf4) {
                    }
                    if (!valueOf4) {
                    }
                    if (valueOf("advertiserId") == null) {
                    }
                    valueOf2 = AFb1zSDK.valueOf(context.getContentResolver());
                    if (valueOf2 != null) {
                    }
                    map.put("registeredUninstall", Boolean.valueOf(AFd1iSDK.values(valueOf3)));
                    int AFKeystoreWrapper22222 = AFKeystoreWrapper(valueOf3, valueOf4);
                    map.put("counter", Integer.toString(AFKeystoreWrapper22222));
                    map.put("iaecounter", Integer.toString(valueOf(valueOf3, str5 != null)));
                    if (valueOf4) {
                    }
                    map.put("isFirstCall", Boolean.toString(!AFInAppEventParameterName(valueOf3)));
                    AFKeystoreWrapper(context, valueOf4, map, AFKeystoreWrapper22222);
                    new AFb1tSDK();
                    map.put("af_v", AFb1tSDK.valueOf(map));
                    new AFb1tSDK();
                    map.put("af_v2", AFb1tSDK.AFKeystoreWrapper(map));
                    map.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(context)));
                    if (valueOf3.contains("is_stop_tracking_used")) {
                    }
                    HashMap hashMap2222 = new HashMap();
                    hashMap2222.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
                    hashMap2222.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
                    map.put("cell", hashMap2222);
                    AFb1fSDK aFb1fSDK32222 = aFb1fSDK;
                    map.put("sig", AFb1wSDK.AFInAppEventParameterName(aFb1fSDK32222.AFKeystoreWrapper.getPackageManager(), aFb1fSDK32222.AFKeystoreWrapper.getPackageName()));
                    map.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                    StatFs statFs2222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                    if (Build.VERSION.SDK_INT >= 18) {
                    }
                    double pow2222 = Math.pow(2.0d, 20.0d);
                    StringBuilder sb42222 = new StringBuilder();
                    sb42222.append((long) (availableBlocks / pow2222));
                    sb42222.append("/");
                    sb42222.append((long) (blockCount / pow2222));
                    map.put("disk", sb42222.toString());
                    if (this.AFLogger != null) {
                    }
                    return map;
                }
                if (str4 != null) {
                    map.put("fb", str4);
                }
            }
            AFKeystoreWrapper(context, map);
            try {
                values2 = AFb1uSDK.values((WeakReference<Context>) new WeakReference(context));
                if (values2 != null) {
                    map.put("uid", values2);
                }
            } catch (Exception e5) {
                StringBuilder sb5 = new StringBuilder("ERROR: could not get uid ");
                sb5.append(e5.getMessage());
                AFLogger.afErrorLog(sb5.toString(), e5);
            }
            try {
                map.put("lang", Locale.getDefault().getDisplayLanguage());
            } catch (Exception e6) {
                AFLogger.afErrorLog("Exception while collecting display language name. ", e6);
            }
            try {
                map.put("lang_code", Locale.getDefault().getLanguage());
            } catch (Exception e7) {
                AFLogger.afErrorLog("Exception while collecting display language code. ", e7);
            }
            try {
                map.put("country", Locale.getDefault().getCountry());
            } catch (Exception e8) {
                AFLogger.afErrorLog("Exception while collecting country name. ", e8);
            }
            map.put("platformextension", this.onDeepLinkingNative.valueOf());
            values(context, (Map<String, ? super String>) map);
            SimpleDateFormat simpleDateFormat22 = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
            try {
                appsFlyerProperties = appsFlyerProperties3;
                map.put("installDate", valueOf(simpleDateFormat22, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
            } catch (Exception e9) {
                e = e9;
                appsFlyerProperties = appsFlyerProperties3;
            }
            try {
                packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                if (packageInfo.versionCode > valueOf3.getInt("versionCode", 0)) {
                    try {
                        AFInAppEventParameterName(context).AFInAppEventType("versionCode", packageInfo.versionCode);
                    } catch (Throwable th7) {
                        th = th7;
                        aFb1fSDK = aFb1fSDK2;
                        str5 = str3;
                        appsFlyerProperties2 = appsFlyerProperties;
                        AFLogger.afErrorLog("Exception while collecting app version data ", th, true);
                        this.onConversionDataFail = AFd1iSDK.AFInAppEventType(context);
                        StringBuilder sb322222 = new StringBuilder("didConfigureTokenRefreshService=");
                        sb322222.append(this.onConversionDataFail);
                        AFLogger.afDebugLog(sb322222.toString());
                        if (!this.onConversionDataFail) {
                        }
                        if (valueOf4) {
                        }
                        if (!valueOf4) {
                        }
                        if (valueOf("advertiserId") == null) {
                        }
                        valueOf2 = AFb1zSDK.valueOf(context.getContentResolver());
                        if (valueOf2 != null) {
                        }
                        map.put("registeredUninstall", Boolean.valueOf(AFd1iSDK.values(valueOf3)));
                        int AFKeystoreWrapper222222 = AFKeystoreWrapper(valueOf3, valueOf4);
                        map.put("counter", Integer.toString(AFKeystoreWrapper222222));
                        map.put("iaecounter", Integer.toString(valueOf(valueOf3, str5 != null)));
                        if (valueOf4) {
                        }
                        map.put("isFirstCall", Boolean.toString(!AFInAppEventParameterName(valueOf3)));
                        AFKeystoreWrapper(context, valueOf4, map, AFKeystoreWrapper222222);
                        new AFb1tSDK();
                        map.put("af_v", AFb1tSDK.valueOf(map));
                        new AFb1tSDK();
                        map.put("af_v2", AFb1tSDK.AFKeystoreWrapper(map));
                        map.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(context)));
                        if (valueOf3.contains("is_stop_tracking_used")) {
                        }
                        HashMap hashMap22222 = new HashMap();
                        hashMap22222.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
                        hashMap22222.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
                        map.put("cell", hashMap22222);
                        AFb1fSDK aFb1fSDK322222 = aFb1fSDK;
                        map.put("sig", AFb1wSDK.AFInAppEventParameterName(aFb1fSDK322222.AFKeystoreWrapper.getPackageManager(), aFb1fSDK322222.AFKeystoreWrapper.getPackageName()));
                        map.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                        StatFs statFs22222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                        if (Build.VERSION.SDK_INT >= 18) {
                        }
                        double pow22222 = Math.pow(2.0d, 20.0d);
                        StringBuilder sb422222 = new StringBuilder();
                        sb422222.append((long) (availableBlocks / pow22222));
                        sb422222.append("/");
                        sb422222.append((long) (blockCount / pow22222));
                        map.put("disk", sb422222.toString());
                        if (this.AFLogger != null) {
                        }
                        return map;
                    }
                }
                map.put("app_version_code", Integer.toString(packageInfo.versionCode));
                map.put("app_version_name", packageInfo.versionName);
                str5 = str3;
                long j2222 = packageInfo.firstInstallTime;
                long j3222 = packageInfo.lastUpdateTime;
                appsFlyerProperties2 = appsFlyerProperties;
                aFb1fSDK = aFb1fSDK2;
                map.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j2222)));
                map.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US).format(new Date(j3222)));
                map.put(AFInAppEventParameterName(Gravity.getAbsoluteGravity(0, 0) + 18, (char) Color.alpha(0), TextUtils.indexOf("", "", 0) + 15).intern(), AFInAppEventParameterName(simpleDateFormat22, context));
            } catch (Throwable th8) {
                th = th8;
                aFb1fSDK = aFb1fSDK2;
                str5 = str3;
            }
            this.onConversionDataFail = AFd1iSDK.AFInAppEventType(context);
            StringBuilder sb3222222 = new StringBuilder("didConfigureTokenRefreshService=");
            sb3222222.append(this.onConversionDataFail);
            AFLogger.afDebugLog(sb3222222.toString());
            if (!this.onConversionDataFail) {
                map.put("tokenRefreshConfigured", Boolean.FALSE);
            }
            if (valueOf4) {
                if (this.onInstallConversionDataLoadedNative != null) {
                    if (map.get("af_deeplink") != null) {
                        AFLogger.afDebugLog("Skip 'af' payload as deeplink was found by path");
                    } else {
                        JSONObject jSONObject2 = new JSONObject(this.onInstallConversionDataLoadedNative);
                        jSONObject2.put("isPush", ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);
                        map.put("af_deeplink", jSONObject2.toString());
                    }
                }
                this.onInstallConversionDataLoadedNative = null;
                map.put("open_referrer", obj);
            }
            if (!valueOf4) {
                try {
                    AFa1cSDK valueOf12 = AFa1cSDK.valueOf(context);
                    Map<? extends String, ? extends Object> concurrentHashMap = new ConcurrentHashMap<>();
                    List<Map<String, Object>> AFInAppEventParameterName4 = valueOf12.AFInAppEventParameterName();
                    if (!AFInAppEventParameterName4.isEmpty()) {
                        concurrentHashMap.put("sensors", new AFa1qSDK().AFInAppEventType(AFInAppEventParameterName4));
                    } else {
                        concurrentHashMap.put("sensors", "na");
                    }
                    map.putAll(concurrentHashMap);
                } catch (Exception e10) {
                    StringBuilder sb6 = new StringBuilder("Unexpected exception from AFSensorManager: ");
                    sb6.append(e10.getMessage());
                    AFLogger.afRDLog(sb6.toString());
                }
            }
            if (valueOf("advertiserId") == null) {
                AFb1zSDK.AFKeystoreWrapper(context, map);
                map.put("GAID_retry", String.valueOf(valueOf("advertiserId") != null));
            }
            valueOf2 = AFb1zSDK.valueOf(context.getContentResolver());
            if (valueOf2 != null) {
                map.put("amazon_aid", valueOf2.AFInAppEventParameterName);
                map.put("amazon_aid_limit", String.valueOf(valueOf2.values));
            }
            map.put("registeredUninstall", Boolean.valueOf(AFd1iSDK.values(valueOf3)));
            int AFKeystoreWrapper2222222 = AFKeystoreWrapper(valueOf3, valueOf4);
            map.put("counter", Integer.toString(AFKeystoreWrapper2222222));
            map.put("iaecounter", Integer.toString(valueOf(valueOf3, str5 != null)));
            if (valueOf4 && AFKeystoreWrapper2222222 == 1) {
                appsFlyerProperties2.AFKeystoreWrapper = true;
            }
            map.put("isFirstCall", Boolean.toString(!AFInAppEventParameterName(valueOf3)));
            AFKeystoreWrapper(context, valueOf4, map, AFKeystoreWrapper2222222);
            new AFb1tSDK();
            map.put("af_v", AFb1tSDK.valueOf(map));
            new AFb1tSDK();
            map.put("af_v2", AFb1tSDK.AFKeystoreWrapper(map));
            map.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(context)));
            if (valueOf3.contains("is_stop_tracking_used")) {
                map.put("istu", String.valueOf(valueOf3.getBoolean("is_stop_tracking_used", false)));
            }
            HashMap hashMap222222 = new HashMap();
            hashMap222222.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
            hashMap222222.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
            map.put("cell", hashMap222222);
            AFb1fSDK aFb1fSDK3222222 = aFb1fSDK;
            map.put("sig", AFb1wSDK.AFInAppEventParameterName(aFb1fSDK3222222.AFKeystoreWrapper.getPackageManager(), aFb1fSDK3222222.AFKeystoreWrapper.getPackageName()));
            map.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
            StatFs statFs222222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
            if (Build.VERSION.SDK_INT >= 18) {
                long blockSizeLong = statFs222222.getBlockSizeLong();
                availableBlocks = statFs222222.getAvailableBlocksLong() * blockSizeLong;
                blockCount = statFs222222.getBlockCountLong() * blockSizeLong;
            } else {
                int blockSize = statFs222222.getBlockSize();
                availableBlocks = statFs222222.getAvailableBlocks() * blockSize;
                blockCount = statFs222222.getBlockCount() * blockSize;
            }
            double pow222222 = Math.pow(2.0d, 20.0d);
            StringBuilder sb4222222 = new StringBuilder();
            sb4222222.append((long) (availableBlocks / pow222222));
            sb4222222.append("/");
            sb4222222.append((long) (blockCount / pow222222));
            map.put("disk", sb4222222.toString());
            if (this.AFLogger != null && (obj2 = this.AFLogger.valueOf) != null) {
                map.put("sharing_filter", obj2);
            }
        } catch (Throwable th9) {
            AFLogger.afErrorLog(th9.getLocalizedMessage(), th9, true);
        }
        return map;
    }

    private static void valueOf(Map<String, Object> map, AFd1bSDK aFd1bSDK) {
        HashMap hashMap = new HashMap(aFd1bSDK.AFKeystoreWrapper);
        aFd1bSDK.AFKeystoreWrapper.clear();
        aFd1bSDK.AFInAppEventType.values("gcd");
        if ((!hashMap.isEmpty() ? 'L' : ' ') != 'L') {
            return;
        }
        int i = onValidateInAppFailure + 81;
        onValidateInApp = i % 128;
        if ((i % 2 == 0 ? 'Y' : '_') != 'Y') {
            AFInAppEventParameterName(map).put("gcd", hashMap);
        } else {
            AFInAppEventParameterName(map).put("gcd", hashMap);
            Object[] objArr = null;
            int length = objArr.length;
        }
        int i2 = onValidateInApp + 63;
        onValidateInAppFailure = i2 % 128;
        int i3 = i2 % 2;
    }

    public final void AFInAppEventType(Context context, Map<String, Object> map, Uri uri) {
        AFc1xSDK aFc1xSDK;
        int i = onValidateInAppFailure + 101;
        onValidateInApp = i % 128;
        if (i % 2 == 0) {
            aFc1xSDK = this.AppsFlyerLib;
            int i2 = 79 / 0;
        } else {
            aFc1xSDK = this.AppsFlyerLib;
        }
        if (!map.containsKey("af_deeplink")) {
            String AFKeystoreWrapper2 = AFKeystoreWrapper(uri.toString());
            AFa1sSDK AFInAppEventParameterName2 = AFa1sSDK.AFInAppEventParameterName();
            if (AFInAppEventParameterName2.values != null) {
                if (!(AFInAppEventParameterName2.afRDLog == null) && AFKeystoreWrapper2.contains(AFInAppEventParameterName2.values)) {
                    Uri.Builder buildUpon = Uri.parse(AFKeystoreWrapper2).buildUpon();
                    Uri.Builder buildUpon2 = Uri.EMPTY.buildUpon();
                    for (Map.Entry<String, String> entry : AFInAppEventParameterName2.afRDLog.entrySet()) {
                        buildUpon.appendQueryParameter(entry.getKey(), entry.getValue());
                        buildUpon2.appendQueryParameter(entry.getKey(), entry.getValue());
                    }
                    String obj = buildUpon.build().toString();
                    map.put("appended_query_params", buildUpon2.build().getEncodedQuery());
                    AFKeystoreWrapper2 = obj;
                }
            }
            map.put("af_deeplink", AFKeystoreWrapper2);
        }
        HashMap hashMap = new HashMap();
        hashMap.put("link", uri.toString());
        AFd1wSDK aFd1wSDK = new AFd1wSDK(values(), UUID.randomUUID(), uri);
        if (aFd1wSDK.AFLogger$LogLevel()) {
            int i3 = onValidateInApp + 97;
            onValidateInAppFailure = i3 % 128;
            int i4 = i3 % 2;
            map.put("isBrandedDomain", Boolean.TRUE);
        }
        AFb1wSDK.valueOf(context, hashMap, uri);
        if (!aFd1wSDK.afWarnLog()) {
            AFb1hSDK.values(hashMap);
            return;
        }
        aFd1wSDK.afRDLog = values(hashMap);
        AFc1mSDK afErrorLog2 = this.AppsFlyerLib.afErrorLog();
        afErrorLog2.AFInAppEventParameterName.execute(new AFc1mSDK.AnonymousClass3(aFd1wSDK));
    }

    private void afDebugLog() {
        int i = onValidateInApp + 51;
        onValidateInAppFailure = i % 128;
        int i2 = i % 2;
        if (AFc1bSDK.afRDLog()) {
            return;
        }
        AFc1zSDK values2 = values();
        AFc1mSDK afErrorLog2 = values2.afErrorLog();
        afErrorLog2.AFInAppEventParameterName.execute(new AFc1mSDK.AnonymousClass3(new AFc1bSDK(values2)));
        int i3 = onValidateInAppFailure + 67;
        onValidateInApp = i3 % 128;
        if (!(i3 % 2 != 0)) {
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    @Override
    public final String getAppsFlyerUID(Context context) {
        AFb1bSDK aFb1bSDK;
        int i = onValidateInAppFailure + 91;
        onValidateInApp = i % 128;
        int i2 = i % 2;
        AFb1qSDK.AFInAppEventParameterName().AFInAppEventType("getAppsFlyerUID", new String[0]);
        if ((context == null ? (char) 0 : 'I') == 0) {
            int i3 = onValidateInApp + 91;
            onValidateInAppFailure = i3 % 128;
            int i4 = i3 % 2;
            return null;
        }
        AFc1xSDK aFc1xSDK = this.AppsFlyerLib;
        if (context != null) {
            int i5 = onValidateInApp + 15;
            onValidateInAppFailure = i5 % 128;
            if ((i5 % 2 != 0 ? '=' : '\n') != '=') {
                aFb1bSDK = aFc1xSDK.values;
            } else {
                aFb1bSDK = aFc1xSDK.values;
                int i6 = 37 / 0;
            }
        }
        return AFb1uSDK.values((WeakReference<Context>) new WeakReference(this.AppsFlyerLib.AFInAppEventParameterName().AFKeystoreWrapper.values));
    }

    @Override
    public final void setLogLevel(AFLogger.LogLevel logLevel) {
        boolean z;
        int i = onValidateInApp + 81;
        onValidateInAppFailure = i % 128;
        if (i % 2 != 0) {
            int i2 = 8 / 0;
        }
        this.AppsFlyerLib.afWarnLog().AFInAppEventType("log", String.valueOf(z));
        AppsFlyerProperties.getInstance().set("logLevel", logLevel.getLevel());
        int i3 = onValidateInApp + 59;
        onValidateInAppFailure = i3 % 128;
        int i4 = i3 % 2;
    }

    private static String AFInAppEventParameterName(int i, char c, int i2) {
        String str;
        synchronized (AFf1vSDK.AFInAppEventParameterName) {
            char[] cArr = new char[i2];
            AFf1vSDK.AFInAppEventType = 0;
            while (AFf1vSDK.AFInAppEventType < i2) {
                cArr[AFf1vSDK.AFInAppEventType] = (char) ((AppsFlyerConversionListener[AFf1vSDK.AFInAppEventType + i] ^ (AFf1vSDK.AFInAppEventType * AppsFlyerInAppPurchaseValidatorListener)) ^ c);
                AFf1vSDK.AFInAppEventType++;
            }
            str = new String(cArr);
        }
        return str;
    }
}