McAfee Security v6.7.1.27版本的 MD5 值为:f931794df50c0876bab25b112d85d702

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


package com.appsflyer.internal;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Application;
import android.app.UiModeManager;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.location.Location;
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.text.TextUtils;
import android.util.Base64;
import android.view.KeyEvent;
import android.view.ViewConfiguration;
import android.view.WindowManager;
import android.widget.ExpandableListView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.android.mcafee.identity.dws.DwsConstants;
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.attribution.AppsFlyerRequestListener;
import com.appsflyer.attribution.RequestError;
import com.appsflyer.deeplink.DeepLinkListener;
import com.appsflyer.deeplink.DeepLinkResult;
import com.appsflyer.internal.af;
import com.appsflyer.internal.aj;
import com.appsflyer.internal.as;
import com.appsflyer.internal.b;
import com.appsflyer.internal.bv;
import com.appsflyer.internal.c;
import com.appsflyer.internal.ct;
import com.appsflyer.internal.o;
import com.appsflyer.internal.v;
import com.appsflyer.internal.x;
import com.appsflyer.internal.y;
import com.google.android.gms.common.GoogleApiAvailability;
import com.google.common.net.HttpHeaders;
import com.google.firebase.perf.network.FirebasePerfUrlConnection;
import com.mcafee.android.network.NetworkChangesReceiver;
import com.mcafee.bp.messaging.internal.provider.ConstantsCampaign;
import com.mcafee.csp.internal.base.analytics.AnalyticsConstants;
import com.mcafee.csp.internal.base.servicediscovery.CspServiceDiscoveryClient;
import com.mcafee.mcs.McsErrors;
import com.mcanalytics.pluginmessaging.Constants;
import com.moengage.core.internal.MoEConstants;
import com.moengage.core.internal.actions.ActionMapperConstants;
import com.moengage.enum_models.FilterParameter;
import com.tunnelbear.sdk.model.ConnectionAnalyticEventStep;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
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.net.URL;
import java.net.URLConnection;
import java.security.KeyStoreException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.TimeZone;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import kotlin.text.Typography;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class ah extends AppsFlyerLib {
    static final String AFInAppEventParameterName;
    static AppsFlyerInAppPurchaseValidatorListener AFInAppEventType = null;
    public static AppsFlyerConversionListener AFKeystoreWrapper = null;
    private static String init = null;
    @VisibleForTesting
    private static ah onAppOpenAttribution = null;
    private static String onAppOpenAttributionNative = null;
    private static String onAttributionFailureNative = null;
    @VisibleForTesting
    private static String onConversionDataFail = null;
    private static final String onDeepLinkingNative;
    private static String onInstallConversionDataLoadedNative = null;
    private static String onInstallConversionFailureNative = null;
    private static int setCustomerIdAndLogSession = 0;
    private static char[] setOutOfStore = null;
    private static long setPhoneNumber = 0;
    private static int setUserEmails = 1;
    public static final String valueOf;
    public static final String values;
    @VisibleForTesting
    long AFLogger$LogLevel;
    String AFVersionDeclaration;
    String AppsFlyer2dXConversionCallback;
    private Map<Long, String> AppsFlyerConversionListener;
    private boolean AppsFlyerInAppPurchaseValidatorListener;
    private boolean getInstance;
    public k getLevel;
    @Nullable
    private cw getOutOfStore;
    private String onDeepLinking;
    private Application onPause;
    @Nullable
    private ct[] setAndroidIdData;
    private ba setCustomerUserId;
    private SharedPreferences setImeiData;
    private String setOaidData;
    private Map<String, Object> stop;
    private Map<String, Object> updateServerUninstallToken;
    @NonNull
    private final be waitForCustomerUserId;
    private long onConversionDataSuccess = -1;
    private long onResponseErrorNative = -1;
    private long onResponseNative = TimeUnit.SECONDS.toMillis(5);
    private boolean onResponseError = false;
    private ScheduledExecutorService onAttributionFailure = null;
    private boolean onResponse = false;
    private final an onValidateInApp = new an();
    private boolean AppsFlyerLib = false;
    private boolean onValidateInAppFailure = false;
    private boolean getSdkVersion = false;
    private boolean setDebugLog = false;
    private final Executor enableLocationCollection = Executors.newSingleThreadExecutor();

    static class AnonymousClass6 {
        static final int[] AFInAppEventParameterName;
        static final int[] values;

        static {
            int[] iArr = new int[ct.c.values().length];
            AFInAppEventParameterName = iArr;
            try {
                iArr[ct.c.FINISHED.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                AFInAppEventParameterName[ct.c.STARTED.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            int[] iArr2 = new int[AppsFlyerProperties.EmailsCryptType.values().length];
            values = iArr2;
            try {
                iArr2[AppsFlyerProperties.EmailsCryptType.SHA256.ordinal()] = 1;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                values[AppsFlyerProperties.EmailsCryptType.NONE.ordinal()] = 2;
            } catch (NoSuchFieldError unused4) {
            }
        }
    }

    public class a implements Runnable {
        private final g AFInAppEventType;

        private a(g gVar) {
            this.AFInAppEventType = gVar;
        }

        a(ah ahVar, g gVar, byte b) {
            this(gVar);
        }

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

    public class b implements Runnable {
        private final Application valueOf;

        public b(Context context) {
            this.valueOf = (Application) context.getApplicationContext();
        }

        @Override
        public final void run() {
            if (ah.AppsFlyer2dXConversionCallback(ah.this)) {
                return;
            }
            ah.this.AFLogger$LogLevel = System.currentTimeMillis();
            ah.AFInAppEventType(ah.this, true);
            try {
                try {
                    String devKey = AppsFlyerProperties.getInstance().getDevKey();
                    ai.AFKeystoreWrapper();
                    for (o oVar : ai.AFInAppEventParameterName(this.valueOf)) {
                        StringBuilder sb = new StringBuilder("resending request: ");
                        sb.append(oVar.AFInAppEventType);
                        AFLogger.AFKeystoreWrapper(sb.toString());
                        try {
                            long currentTimeMillis = System.currentTimeMillis();
                            long parseLong = Long.parseLong(oVar.AFKeystoreWrapper, 10);
                            ah ahVar = ah.this;
                            ch chVar = new ch();
                            StringBuilder sb2 = new StringBuilder();
                            sb2.append(oVar.AFInAppEventType);
                            sb2.append("&isCachedRequest=true&timeincache=");
                            sb2.append((currentTimeMillis - parseLong) / 1000);
                            g AFKeystoreWrapper = chVar.AFKeystoreWrapper(sb2.toString());
                            AFKeystoreWrapper.AFVersionDeclaration = oVar.values();
                            AFKeystoreWrapper.AFLogger$LogLevel = devKey;
                            Application application = this.valueOf;
                            if (application != null) {
                                AFKeystoreWrapper.AFInAppEventType = (Application) application.getApplicationContext();
                            }
                            AFKeystoreWrapper.AppsFlyer2dXConversionCallback = oVar.AFKeystoreWrapper;
                            AFKeystoreWrapper.onInstallConversionDataLoadedNative = false;
                            ah.AFInAppEventParameterName(ahVar, AFKeystoreWrapper);
                        } catch (Exception e) {
                            AFLogger.AFKeystoreWrapper("Failed to resend cached request", e);
                        }
                    }
                } catch (Throwable th) {
                    ah.AFInAppEventType(ah.this, false);
                    throw th;
                }
            } catch (Exception e2) {
                AFLogger.AFKeystoreWrapper("failed to check cache. ", e2);
            }
            ah.AFInAppEventType(ah.this, false);
            ah.getLevel(ah.this).shutdown();
            ah.valueOf(ah.this, (ScheduledExecutorService) null);
        }
    }

    public class e implements Runnable {
        private final g values;

        private e(g gVar) {
            this.values = gVar;
        }

        e(ah ahVar, g gVar, byte b) {
            this(gVar);
        }

        @Override
        public final void run() {
            IOException iOException;
            AppsFlyerRequestListener appsFlyerRequestListener;
            Throwable th;
            File valueOf;
            ct[] AFInAppEventType;
            Map<String, Object> AFKeystoreWrapper = this.values.AFKeystoreWrapper();
            boolean AFInAppEventType2 = this.values.AFInAppEventType();
            g gVar = this.values;
            String str = gVar.onDeepLinkingNative;
            int i = gVar.onAppOpenAttributionNative;
            Application application = gVar.AFInAppEventType;
            if (ah.this.isStopped()) {
                AppsFlyerRequestListener appsFlyerRequestListener2 = this.values.AFInAppEventParameterName;
                if (appsFlyerRequestListener2 != null) {
                    appsFlyerRequestListener2.onError(RequestError.STOP_TRACKING, bc.AFKeystoreWrapper);
                    return;
                }
                return;
            }
            byte[] bArr = new byte[0];
            if (AFInAppEventType2 && i <= 2) {
                ArrayList arrayList = new ArrayList();
                if (ah.AFInAppEventType(ah.this) != null) {
                    for (ct ctVar : ah.AFInAppEventType(ah.this)) {
                        boolean z = ctVar instanceof cv;
                        int i2 = AnonymousClass6.AFInAppEventParameterName[ctVar.values.ordinal()];
                        if (i2 == 1) {
                            if (z) {
                                AFKeystoreWrapper.put("rfr", ((cv) ctVar).AFKeystoreWrapper);
                                ah.valueOf(application).edit().putBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, true).apply();
                            }
                            arrayList.add(ctVar.AFInAppEventType);
                        } else if (i2 == 2 && i == 2 && !z) {
                            HashMap hashMap = new HashMap();
                            hashMap.put("source", ctVar.AFInAppEventParameterName);
                            hashMap.put("response", "TIMEOUT");
                            hashMap.putAll(new cr());
                            arrayList.add(hashMap);
                        }
                    }
                }
                if (!arrayList.isEmpty()) {
                    AFKeystoreWrapper.put("referrers", arrayList);
                }
                if (ah.values(ah.this) != null) {
                    AFKeystoreWrapper.put("fb_ddl", ah.values(ah.this));
                }
                if (ah.init(ah.this) != null) {
                    if (ah.init(ah.this).AFKeystoreWrapper()) {
                        List<String> values = ah.init(ah.this).values();
                        if (values != null && !values.isEmpty()) {
                            AFKeystoreWrapper.put("preload_id", values);
                        }
                    } else {
                        AFKeystoreWrapper.put("preload_id", Collections.singletonList("timeout"));
                    }
                }
            }
            if (!(this.values instanceof cc)) {
                AFKeystoreWrapper.putAll(new c.e(AFKeystoreWrapper, application));
                AFKeystoreWrapper.putAll(ah.this.init());
            }
            OutputStreamWriter outputStreamWriter = null;
            try {
                try {
                    g gVar2 = this.values;
                    gVar2.AFLogger$LogLevel = gVar2 instanceof cc ? (String) AFKeystoreWrapper.get("af_key") : (String) AFKeystoreWrapper.get("appsflyerKey");
                    synchronized (AFKeystoreWrapper) {
                        try {
                            byte[] bArr2 = (byte[]) ((Class) d.valueOf(Drawable.resolveOpacity(0, 0) + 48, (char) ((ExpandableListView.getPackedPositionForGroup(0) > 0L ? 1 : (ExpandableListView.getPackedPositionForGroup(0) == 0L ? 0 : -1)) + 63493), KeyEvent.normalizeMetaState(0) + 24)).getDeclaredMethod(ActionMapperConstants.KEY_VALUE_OF, g.class).invoke(null, this.values);
                            try {
                                try {
                                    ah ahVar = ah.this;
                                    g gVar3 = this.values;
                                    gVar3.AFVersionDeclaration = bArr2;
                                    ah.AFInAppEventParameterName(ahVar, gVar3);
                                    return;
                                } catch (IOException e) {
                                    iOException = e;
                                    bArr = bArr2;
                                    AFLogger.AFKeystoreWrapper("Exception while sending request to server. ", iOException);
                                    if (bArr != null && application != null && !str.contains("&isCachedRequest=true&timeincache=")) {
                                        ai.AFKeystoreWrapper();
                                        o oVar = new o(str, bArr, "6.5.2");
                                        try {
                                            try {
                                                try {
                                                    valueOf = ai.valueOf(application);
                                                } catch (IOException e2) {
                                                    AFLogger.AFInAppEventType(e2);
                                                }
                                            } catch (Exception e3) {
                                                e = e3;
                                            }
                                            if (valueOf.exists()) {
                                                File[] listFiles = valueOf.listFiles();
                                                if (listFiles == null || listFiles.length <= 40) {
                                                    AFLogger.AFKeystoreWrapper("caching request...");
                                                    File file = new File(ai.valueOf(application), Long.toString(System.currentTimeMillis()));
                                                    file.createNewFile();
                                                    OutputStreamWriter outputStreamWriter2 = new OutputStreamWriter(new FileOutputStream(file.getPath(), true));
                                                    try {
                                                        outputStreamWriter2.write("version=");
                                                        outputStreamWriter2.write(oVar.values);
                                                        outputStreamWriter2.write(10);
                                                        outputStreamWriter2.write("url=");
                                                        outputStreamWriter2.write(oVar.AFInAppEventType);
                                                        outputStreamWriter2.write(10);
                                                        ?? r3 = "data=";
                                                        outputStreamWriter2.write("data=");
                                                        outputStreamWriter2.write(Base64.encodeToString(oVar.values(), 2));
                                                        outputStreamWriter2.write(10);
                                                        outputStreamWriter2.flush();
                                                        outputStreamWriter2.close();
                                                        outputStreamWriter = r3;
                                                    } catch (Exception e4) {
                                                        e = e4;
                                                        outputStreamWriter = outputStreamWriter2;
                                                        AFLogger.AFKeystoreWrapper("Could not cache request", e);
                                                        if (outputStreamWriter != null) {
                                                            outputStreamWriter.close();
                                                            outputStreamWriter = outputStreamWriter;
                                                        }
                                                        AFLogger.AFKeystoreWrapper(iOException.getMessage(), iOException);
                                                        appsFlyerRequestListener = this.values.AFInAppEventParameterName;
                                                        if (appsFlyerRequestListener != null) {
                                                        }
                                                        ah ahVar2 = ah.this;
                                                        g gVar4 = this.values;
                                                        bz.valueOf(ahVar2, gVar4, gVar4.AFLogger$LogLevel, application, ah.valueOf(application), null, iOException);
                                                        return;
                                                    } catch (Throwable th2) {
                                                        th = th2;
                                                        outputStreamWriter = outputStreamWriter2;
                                                        if (outputStreamWriter != null) {
                                                            try {
                                                                outputStreamWriter.close();
                                                            } catch (IOException e5) {
                                                                AFLogger.AFInAppEventType(e5);
                                                            }
                                                        }
                                                        throw th;
                                                    }
                                                } else {
                                                    AFLogger.AFKeystoreWrapper("reached cache limit, not caching request");
                                                }
                                            } else {
                                                valueOf.mkdir();
                                            }
                                            AFLogger.AFKeystoreWrapper(iOException.getMessage(), iOException);
                                        } catch (Throwable th3) {
                                            th = th3;
                                        }
                                    }
                                    appsFlyerRequestListener = this.values.AFInAppEventParameterName;
                                    if (appsFlyerRequestListener != null) {
                                        appsFlyerRequestListener.onError(RequestError.NETWORK_FAILURE, iOException.getMessage());
                                    }
                                    ah ahVar22 = ah.this;
                                    g gVar42 = this.values;
                                    bz.valueOf(ahVar22, gVar42, gVar42.AFLogger$LogLevel, application, ah.valueOf(application), null, iOException);
                                    return;
                                }
                            } catch (Throwable th4) {
                                th = th4;
                                bArr = bArr2;
                            }
                        } catch (Throwable th5) {
                            th = th5;
                        }
                    }
                    throw th;
                } catch (Throwable th6) {
                    AFLogger.valueOf(th6.getMessage(), th6);
                    AppsFlyerRequestListener appsFlyerRequestListener3 = this.values.AFInAppEventParameterName;
                    if (appsFlyerRequestListener3 != null) {
                        appsFlyerRequestListener3.onError(RequestError.NETWORK_FAILURE, th6.getMessage());
                    }
                }
            } catch (IOException e6) {
                iOException = e6;
            }
        }
    }

    static {
        AFLogger$LogLevel();
        AFInAppEventParameterName = "158";
        String substring = "6.5.2".substring(0, "6.5.2".lastIndexOf(AFInAppEventType(1 - (ViewConfiguration.getEdgeSlop() >> 16), (ViewConfiguration.getTouchSlop() >> 8) + 33, (char) ((SystemClock.uptimeMillis() > 0L ? 1 : (SystemClock.uptimeMillis() == 0L ? 0 : -1)) + 64089)).intern()));
        values = substring;
        init = "https://%sstats.%s/stats";
        StringBuilder sb = new StringBuilder();
        sb.append(substring);
        sb.append("/androidevent?buildnumber=6.5.2&app_id=");
        valueOf = sb.toString();
        StringBuilder sb2 = new StringBuilder("https://%sadrevenue.%s/api/v");
        sb2.append(substring);
        sb2.append("/android?buildnumber=6.5.2&app_id=");
        onAttributionFailureNative = sb2.toString();
        StringBuilder sb3 = new StringBuilder();
        sb3.append(substring);
        sb3.append("/androidevent?app_id=");
        String obj = sb3.toString();
        onDeepLinkingNative = obj;
        StringBuilder sb4 = new StringBuilder("https://%sconversions.%s/api/v");
        sb4.append(obj);
        onInstallConversionDataLoadedNative = sb4.toString();
        StringBuilder sb5 = new StringBuilder("https://%slaunches.%s/api/v");
        sb5.append(obj);
        onInstallConversionFailureNative = sb5.toString();
        StringBuilder sb6 = new StringBuilder("https://%sinapps.%s/api/v");
        sb6.append(obj);
        onAppOpenAttributionNative = sb6.toString();
        StringBuilder sb7 = new StringBuilder("https://%sattr.%s/api/v");
        sb7.append(obj);
        onConversionDataFail = sb7.toString();
        AFInAppEventType = null;
        AFKeystoreWrapper = null;
        onAppOpenAttribution = new ah();
        int i = setCustomerIdAndLogSession + 7;
        setUserEmails = i % 128;
        int i2 = i % 2;
    }

    @VisibleForTesting
    public ah() {
        AFVersionDeclaration.init();
        this.waitForCustomerUserId = new be();
    }

    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.AFKeystoreWrapper(th.getMessage(), th);
                    return null;
                }
                try {
                    properties.load(fileReader);
                    AFLogger.AFKeystoreWrapper("Found PreInstall property!");
                    String property = properties.getProperty(str);
                    try {
                        fileReader.close();
                    } catch (Throwable th2) {
                        AFLogger.AFKeystoreWrapper(th2.getMessage(), th2);
                    }
                    return property;
                } catch (FileNotFoundException unused) {
                    StringBuilder sb = new StringBuilder("PreInstall file wasn't found: ");
                    sb.append(file.getAbsolutePath());
                    AFLogger.values(sb.toString());
                    if (fileReader != null) {
                        fileReader.close();
                    }
                    return null;
                } catch (Throwable th3) {
                    th = th3;
                    AFLogger.AFKeystoreWrapper(th.getMessage(), th);
                    if (fileReader != null) {
                        fileReader.close();
                        int i = setUserEmails + 25;
                        setCustomerIdAndLogSession = i % 128;
                        int i2 = i % 2;
                    }
                    int i3 = setCustomerIdAndLogSession + 109;
                    setUserEmails = i3 % 128;
                    int i4 = i3 % 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.AFKeystoreWrapper(th6.getMessage(), th6);
                }
            }
            throw th5;
        }
    }

    private static String AFInAppEventParameterName(String str) {
        int indexOf = str.indexOf(63);
        if (!(indexOf == -1)) {
            return str.substring(indexOf);
        }
        int i = setUserEmails + 91;
        int i2 = i % 128;
        setCustomerIdAndLogSession = i2;
        if ((i % 2 != 0 ? (char) 21 : 'P') != 'P') {
            Object[] objArr = null;
            int length = objArr.length;
        }
        int i3 = i2 + 17;
        setUserEmails = i3 % 128;
        int i4 = i3 % 2;
        return "";
    }

    static Map AFInAppEventParameterName(ah ahVar) {
        int i = setCustomerIdAndLogSession + 89;
        int i2 = i % 128;
        setUserEmails = i2;
        int i3 = i % 2;
        Map<String, Object> map = ahVar.updateServerUninstallToken;
        int i4 = i2 + 121;
        setCustomerIdAndLogSession = i4 % 128;
        if (i4 % 2 != 0) {
            Object[] objArr = null;
            int length = objArr.length;
            return map;
        }
        return map;
    }

    private void AFInAppEventParameterName(Context context, String str) {
        cd cdVar = new cd();
        if (context != null) {
            int i = setCustomerIdAndLogSession + 123;
            setUserEmails = i % 128;
            int i2 = i % 2;
            cdVar.AFInAppEventType = (Application) context.getApplicationContext();
            int i3 = setUserEmails + 93;
            setCustomerIdAndLogSession = i3 % 128;
            int i4 = i3 % 2;
        }
        cdVar.init = str;
        if (str == null) {
            return;
        }
        int i5 = setUserEmails + 9;
        setCustomerIdAndLogSession = i5 % 128;
        int i6 = i5 % 2;
        if ((str.length() > 5) && AFInAppEventType(cdVar, valueOf(context))) {
            int i7 = setCustomerIdAndLogSession + 15;
            setUserEmails = i7 % 128;
            if (i7 % 2 == 0) {
                int i8 = 71 / 0;
            }
            AFKeystoreWrapper(m.AFInAppEventType.values(), new a(this, cdVar, (byte) 0), 5L, TimeUnit.MILLISECONDS);
        }
    }

    private void AFInAppEventParameterName(Context context, String str, Map<String, Object> map) {
        Activity activity;
        cl clVar = new cl();
        if (context != null) {
            int i = setCustomerIdAndLogSession + 107;
            setUserEmails = i % 128;
            if (i % 2 == 0) {
                clVar.AFInAppEventType = (Application) context.getApplicationContext();
                int i2 = 87 / 0;
            } else {
                clVar.AFInAppEventType = (Application) context.getApplicationContext();
            }
        }
        clVar.getLevel = str;
        clVar.values = map;
        if ((context instanceof Activity ? 'L' : '%') != '%') {
            int i3 = setCustomerIdAndLogSession + 73;
            setUserEmails = i3 % 128;
            if ((i3 % 2 == 0 ? 'S' : (char) 24) != 24) {
                activity = (Activity) context;
                int i4 = 1 / 0;
            } else {
                activity = (Activity) context;
            }
        } else {
            activity = null;
        }
        AFKeystoreWrapper(clVar, activity);
    }

    private void AFInAppEventParameterName(Context context, Map<String, Object> map) {
        int i = setCustomerIdAndLogSession + 117;
        setUserEmails = i % 128;
        boolean z = false;
        AppsFlyerProperties appsFlyerProperties = i % 2 == 0 ? AppsFlyerProperties.getInstance() : AppsFlyerProperties.getInstance();
    }

    static void AFInAppEventParameterName(ah ahVar, g gVar) throws IOException {
        int i = setUserEmails + 3;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        ahVar.AFInAppEventParameterName(gVar);
        int i3 = setUserEmails + 33;
        setCustomerIdAndLogSession = i3 % 128;
        int i4 = i3 % 2;
    }

    private void AFInAppEventParameterName(g gVar) throws IOException {
        String replaceAll;
        StringBuilder sb = new StringBuilder("url: ");
        sb.append(gVar.onDeepLinkingNative);
        AFLogger.AFKeystoreWrapper(sb.toString());
        if ((gVar.AppsFlyer2dXConversionCallback != null ? '`' : (char) 22) != 22) {
            int i = setUserEmails + 77;
            setCustomerIdAndLogSession = i % 128;
            replaceAll = i % 2 != 0 ? Base64.encodeToString(gVar.AFInAppEventParameterName(), 3) : Base64.encodeToString(gVar.AFInAppEventParameterName(), 2);
            AFLogger.AFKeystoreWrapper("cached data: ".concat(String.valueOf(replaceAll)));
        } else {
            String jSONObject = new JSONObject(gVar.AFKeystoreWrapper()).toString();
            replaceAll = jSONObject.replaceAll("\\p{C}", "*Non-printing character*");
            if (!(!replaceAll.equals(jSONObject))) {
                replaceAll = jSONObject;
            } else {
                int i2 = setCustomerIdAndLogSession + 107;
                setUserEmails = i2 % 128;
                if ((i2 % 2 == 0 ? 'A' : '^') != 'A') {
                    AFLogger.AppsFlyer2dXConversionCallback("Payload contains non-printing characters");
                } else {
                    AFLogger.AppsFlyer2dXConversionCallback("Payload contains non-printing characters");
                    Object[] objArr = null;
                    int length = objArr.length;
                }
            }
            ak.valueOf("data: ".concat(String.valueOf(replaceAll)));
        }
        am.AFKeystoreWrapper().AFInAppEventParameterName(gVar.onDeepLinkingNative, replaceAll);
        try {
            init(gVar);
        } catch (IOException e2) {
            AFLogger.AFKeystoreWrapper("Exception in sendRequestToServer. ", e2);
            if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.USE_HTTP_FALLBACK, false)) {
                init(gVar.AFKeystoreWrapper(gVar.onDeepLinkingNative.replace("https:", "http:")));
                return;
            }
            StringBuilder sb2 = new StringBuilder("failed to send request to server. ");
            sb2.append(e2.getLocalizedMessage());
            AFLogger.AFKeystoreWrapper(sb2.toString());
            throw e2;
        }
    }

    private static void AFInAppEventParameterName(String str, String str2) {
        int i = setUserEmails + 113;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        AppsFlyerProperties.getInstance().set(str, str2);
        int i3 = setCustomerIdAndLogSession + 25;
        setUserEmails = i3 % 128;
        int i4 = i3 % 2;
    }

    private static void AFInAppEventParameterName(Map<String, Object> map) {
        String string = AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.ONELINK_ID);
        String string2 = AppsFlyerProperties.getInstance().getString("onelinkVersion");
        if (string != null) {
            int i = setUserEmails + 63;
            setCustomerIdAndLogSession = i % 128;
            if (!(i % 2 != 0)) {
                map.put("onelink_id", string);
            } else {
                map.put("onelink_id", string);
                int i2 = 70 / 0;
            }
            int i3 = setUserEmails + 95;
            setCustomerIdAndLogSession = i3 % 128;
            int i4 = i3 % 2;
        }
        if ((string2 != null ? (char) 29 : (char) 26) != 29) {
            return;
        }
        int i5 = setUserEmails + 25;
        setCustomerIdAndLogSession = i5 % 128;
        boolean z = i5 % 2 != 0;
        map.put("onelink_ver", string2);
        if (z) {
            Object obj = null;
            super.hashCode();
        }
    }

    public static boolean AFInAppEventParameterName(Context context) {
        if ((!valueOf(context).contains("appsFlyerCount") ? 'T' : (char) 28) != 28) {
            int i = setCustomerIdAndLogSession + 21;
            int i2 = i % 128;
            setUserEmails = i2;
            boolean z = !(i % 2 == 0);
            int i3 = i2 + 117;
            setCustomerIdAndLogSession = i3 % 128;
            int i4 = i3 % 2;
            return z;
        }
        return false;
    }

    static boolean AFInAppEventParameterName(ah ahVar, g gVar, SharedPreferences sharedPreferences) {
        int i = setCustomerIdAndLogSession + 37;
        setUserEmails = i % 128;
        boolean z = i % 2 == 0;
        boolean AFInAppEventType2 = ahVar.AFInAppEventType(gVar, sharedPreferences);
        if (z) {
            Object obj = null;
            super.hashCode();
        }
        return AFInAppEventType2;
    }

    private static boolean AFInAppEventParameterName(File file) {
        int i = setUserEmails + 111;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        if ((file != null) && file.exists()) {
            int i3 = setCustomerIdAndLogSession + 41;
            setUserEmails = i3 % 128;
            int i4 = i3 % 2;
            return false;
        }
        int i5 = setUserEmails + 25;
        setCustomerIdAndLogSession = i5 % 128;
        if (!(i5 % 2 == 0)) {
            int i6 = 76 / 0;
            return true;
        }
        return true;
    }

    private static boolean AFInAppEventParameterName(String str, boolean z) {
        int i = setCustomerIdAndLogSession + 63;
        setUserEmails = i % 128;
        int i2 = i % 2;
        boolean z2 = AppsFlyerProperties.getInstance().getBoolean(str, z);
        int i3 = setCustomerIdAndLogSession + 11;
        setUserEmails = i3 % 128;
        int i4 = i3 % 2;
        return z2;
    }

    private static String AFInAppEventType(int i, int i2, char c) {
        String str;
        synchronized (dg.AFInAppEventParameterName) {
            char[] cArr = new char[i];
            dg.values = 0;
            while (true) {
                int i3 = dg.values;
                if (i3 < i) {
                    cArr[i3] = (char) ((setOutOfStore[i2 + i3] ^ (i3 * setPhoneNumber)) ^ c);
                    dg.values = i3 + 1;
                } else {
                    str = new String(cArr);
                }
            }
        }
        return str;
    }

    private static String AFInAppEventType(Activity activity) {
        Intent intent;
        String str = null;
        if ((activity != null) && (intent = activity.getIntent()) != null) {
            try {
                Bundle extras = intent.getExtras();
                if (!(extras == null)) {
                    int i = setCustomerIdAndLogSession + 103;
                    setUserEmails = i % 128;
                    int i2 = i % 2;
                    str = extras.getString("af");
                    if (str != null) {
                        AFLogger.AFKeystoreWrapper("Push Notification received af payload = ".concat(String.valueOf(str)));
                        extras.remove("af");
                        activity.setIntent(intent.putExtras(extras));
                        int i3 = setUserEmails + 87;
                        setCustomerIdAndLogSession = i3 % 128;
                        int i4 = i3 % 2;
                    }
                }
                int i5 = setCustomerIdAndLogSession + 97;
                setUserEmails = i5 % 128;
                int i6 = i5 % 2;
            } catch (Throwable th) {
                AFLogger.AFKeystoreWrapper(th.getMessage(), th);
            }
        }
        return str;
    }

    private static void AFInAppEventType(Context context, String str, int i) {
        int i2 = setCustomerIdAndLogSession + 117;
        setUserEmails = i2 % 128;
        int i3 = i2 % 2;
        SharedPreferences.Editor edit = valueOf(context).edit();
        edit.putInt(str, i);
        valueOf(edit);
        int i4 = setCustomerIdAndLogSession + 11;
        setUserEmails = i4 % 128;
        if (!(i4 % 2 != 0)) {
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    private void AFInAppEventType(Context context, String str, String str2, Map<String, Object> map, String str3, String str4) {
        cj cjVar = new cj();
        if (context != null) {
            int i = setCustomerIdAndLogSession + 111;
            setUserEmails = i % 128;
            int i2 = i % 2;
            cjVar.AFInAppEventType = (Application) context.getApplicationContext();
            int i3 = setUserEmails + 55;
            setCustomerIdAndLogSession = i3 % 128;
            int i4 = i3 % 2;
        }
        cjVar.getLevel = str2;
        cjVar.AFLogger$LogLevel = str;
        cjVar.values = map;
        cjVar.init = str3;
        cjVar.AFKeystoreWrapper = str4;
        valueOf(cjVar);
    }

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

    private void AFInAppEventType(Context context, boolean z, Map<String, Object> map, int i) {
        Map<String, Object> AppsFlyer2dXConversionCallback;
        HashMap hashMap = new HashMap();
        hashMap.put("cpu_abi", AFKeystoreWrapper("ro.product.cpu.abi"));
        hashMap.put("cpu_abi2", AFKeystoreWrapper("ro.product.cpu.abi2"));
        hashMap.put("arch", AFKeystoreWrapper("os.arch"));
        hashMap.put("build_display_id", AFKeystoreWrapper("ro.build.display.id"));
        if (z ? true : true) {
            int i2 = setCustomerIdAndLogSession + 29;
            int i3 = i2 % 128;
            setUserEmails = i3;
            int i4 = i2 % 2;
            if (this.onResponse) {
                int i5 = i3 + 51;
                setCustomerIdAndLogSession = i5 % 128;
                if (!(i5 % 2 != 0 ? true : true)) {
                    AppsFlyer2dXConversionCallback = AppsFlyer2dXConversionCallback(context);
                    boolean isEmpty = AppsFlyer2dXConversionCallback.isEmpty();
                    Object[] objArr = null;
                    int length = objArr.length;
                } else {
                    AppsFlyer2dXConversionCallback = AppsFlyer2dXConversionCallback(context);
                }
            }
            valueOf(context, hashMap);
            if (i <= 2) {
                int i6 = setCustomerIdAndLogSession + 67;
                setUserEmails = i6 % 128;
                if (i6 % 2 == 0) {
                    hashMap.putAll(ac.AFInAppEventType(context).AFKeystoreWrapper());
                    int i7 = 63 / 0;
                } else {
                    hashMap.putAll(ac.AFInAppEventType(context).AFKeystoreWrapper());
                }
            }
        }
        hashMap.put("dim", u.AFKeystoreWrapper(context));
        map.put("deviceData", hashMap);
    }

    private static void AFInAppEventType(SharedPreferences sharedPreferences, String str, long j) {
        int i = setUserEmails + 3;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        SharedPreferences.Editor edit = sharedPreferences.edit();
        edit.putLong(str, j);
        valueOf(edit);
        int i3 = setUserEmails + 43;
        setCustomerIdAndLogSession = i3 % 128;
        if ((i3 % 2 != 0 ? ',' : 'F') != ',') {
            return;
        }
        Object obj = null;
        super.hashCode();
    }

    private static void AFInAppEventType(AppsFlyerConversionListener appsFlyerConversionListener) {
        int i = setUserEmails;
        int i2 = i + 23;
        setCustomerIdAndLogSession = i2 % 128;
        if ((i2 % 2 != 0 ? '_' : '\t') == '_') {
            Object[] objArr = null;
            int length = objArr.length;
            if (appsFlyerConversionListener == null) {
                return;
            }
        } else if (appsFlyerConversionListener == null) {
            return;
        }
        AFKeystoreWrapper = appsFlyerConversionListener;
        int i3 = i + 27;
        setCustomerIdAndLogSession = i3 % 128;
        int i4 = i3 % 2;
    }

    private static void AFInAppEventType(String str) {
        try {
            if (!(new JSONObject(str).has("pid"))) {
                AFLogger.AppsFlyer2dXConversionCallback("Cannot set preinstall attribution data without a media source");
                return;
            }
            int i = setUserEmails + 83;
            setCustomerIdAndLogSession = i % 128;
            int i2 = i % 2;
            AFInAppEventParameterName("preInstallName", str);
            int i3 = setUserEmails + 121;
            setCustomerIdAndLogSession = i3 % 128;
            int i4 = i3 % 2;
        } catch (JSONException e2) {
            AFLogger.AFKeystoreWrapper("Error parsing JSON for preinstall", e2);
        }
    }

    private void AFInAppEventType(Map<String, Object> map) {
        int i = setCustomerIdAndLogSession + 97;
        setUserEmails = i % 128;
        int i2 = i % 2;
        bv values2 = AFInAppEventType().values();
        aq aqVar = values2.AFInAppEventParameterName;
        values2.AFInAppEventParameterName = null;
        if (!(aqVar == null)) {
            map.put("rc", aqVar.valueOf());
        }
        int i3 = setUserEmails + 93;
        setCustomerIdAndLogSession = i3 % 128;
        int i4 = i3 % 2;
    }

    private boolean AFInAppEventType(Context context) {
        try {
            Class.forName("com.appsflyer.lvl.AppsFlyerLVL");
            final long currentTimeMillis = System.currentTimeMillis();
            this.updateServerUninstallToken = new ConcurrentHashMap();
            final x.d dVar = new x.d() {
                @Override
                public final void AFInAppEventType(String str, Exception exc) {
                    String message = exc.getMessage();
                    if (message == null) {
                        message = "unknown";
                    }
                    ah.AFInAppEventParameterName(ah.this).put("error", message);
                    AFLogger.valueOf(str, exc);
                }

                @Override
                public final void valueOf(@NonNull String str, @NonNull String str2) {
                    ah.AFInAppEventParameterName(ah.this).put("signedData", str);
                    ah.AFInAppEventParameterName(ah.this).put("signature", str2);
                    ah.AFInAppEventParameterName(ah.this).put("ttr", Long.valueOf(System.currentTimeMillis() - currentTimeMillis));
                    AFLogger.AFKeystoreWrapper("Successfully retrieved Google LVL data.");
                }
            };
            try {
                try {
                    Class<?> cls = Class.forName("com.appsflyer.lvl.AppsFlyerLVL");
                    Class<?> cls2 = Class.forName("com.appsflyer.lvl.AppsFlyerLVL$resultListener");
                    cls.getMethod("checkLicense", Long.TYPE, Context.class, cls2).invoke(null, Long.valueOf(currentTimeMillis), context, Proxy.newProxyInstance(cls2.getClassLoader(), new Class[]{cls2}, new InvocationHandler() {
                        @Override
                        public final Object invoke(Object obj, Method method, Object[] objArr) {
                            if (method.getName().equals("onLvlResult")) {
                                String str = objArr[0] != null ? (String) objArr[0] : null;
                                String str2 = objArr[1] != null ? (String) objArr[1] : null;
                                d dVar2 = dVar;
                                if (dVar2 == null) {
                                    AFLogger.values("onLvlResult invocation succeeded, but listener is null");
                                } else if (str != null && str2 != null) {
                                    dVar2.valueOf(str, str2);
                                } else if (str2 == null) {
                                    dVar2.AFInAppEventType("onLvlResult with error", new Exception("AFLVL Invalid signature"));
                                } else {
                                    dVar2.AFInAppEventType("onLvlResult with error", new Exception("AFLVL Invalid signedData"));
                                }
                            } else if (method.getName().equals("onLvlFailure")) {
                                d dVar3 = dVar;
                                if (dVar3 == null) {
                                    AFLogger.values("onLvlFailure: listener is null");
                                } else if (objArr[0] != null) {
                                    dVar3.AFInAppEventType("onLvlFailure with exception", (Exception) objArr[0]);
                                } else {
                                    dVar3.AFInAppEventType("onLvlFailure", new Exception("unknown"));
                                }
                            } else {
                                d dVar4 = dVar;
                                if (dVar4 != null) {
                                    dVar4.AFInAppEventType("lvlInvocation failed", new Exception("com.appsflyer.lvl.AppsFlyerLVL$resultListener invocation failed"));
                                }
                            }
                            return null;
                        }
                    }));
                    int i = setCustomerIdAndLogSession + 49;
                    setUserEmails = i % 128;
                    int i2 = i % 2;
                } catch (ClassNotFoundException e2) {
                    dVar.AFInAppEventType(e2.getClass().getSimpleName(), e2);
                } catch (NoSuchMethodException e3) {
                    dVar.AFInAppEventType(e3.getClass().getSimpleName(), e3);
                }
            } catch (IllegalAccessException e4) {
                dVar.AFInAppEventType(e4.getClass().getSimpleName(), e4);
            } catch (InvocationTargetException e5) {
                dVar.AFInAppEventType(e5.getClass().getSimpleName(), e5);
            }
            return true;
        } catch (ClassNotFoundException unused) {
            return false;
        }
    }

    static boolean AFInAppEventType(ah ahVar, boolean z) {
        int i = setCustomerIdAndLogSession + 71;
        int i2 = i % 128;
        setUserEmails = i2;
        int i3 = i % 2;
        ahVar.onResponseError = z;
        int i4 = i2 + 47;
        setCustomerIdAndLogSession = i4 % 128;
        int i5 = i4 % 2;
        return z;
    }

    private boolean AFInAppEventType(g gVar, SharedPreferences sharedPreferences) {
        boolean z;
        boolean z2;
        int i = setCustomerIdAndLogSession + 111;
        setUserEmails = i % 128;
        int i2 = i % 2;
        int valueOf2 = valueOf(sharedPreferences, false);
        if ((valueOf2 != 1) || (gVar instanceof cg)) {
            int i3 = setCustomerIdAndLogSession + 61;
            setUserEmails = i3 % 128;
            int i4 = i3 % 2;
        } else {
            int i5 = setCustomerIdAndLogSession + 77;
            setUserEmails = i5 % 128;
            if (i5 % 2 != 0) {
                z = true;
                if (sharedPreferences.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false)) {
                    if ((valueOf2 == 1 ? (char) 26 : (char) 23) != 23) {
                        z2 = true;
                        if ((!z2 ? (char) 20 : 'F') != 'F') {
                            int i6 = setUserEmails + 121;
                            setCustomerIdAndLogSession = i6 % 128;
                            int i7 = i6 % 2;
                            if (!(z)) {
                                return false;
                            }
                        }
                        return true;
                    }
                }
                z2 = false;
                if ((!z2 ? (char) 20 : 'F') != 'F') {
                }
                return true;
            }
        }
        z = false;
        if (sharedPreferences.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false)) {
        }
        z2 = false;
        if ((!z2 ? (char) 20 : 'F') != 'F') {
        }
        return true;
    }

    static ct[] AFInAppEventType(ah ahVar) {
        int i = setUserEmails + 111;
        int i2 = i % 128;
        setCustomerIdAndLogSession = i2;
        int i3 = i % 2;
        ct[] ctVarArr = ahVar.setAndroidIdData;
        int i4 = i2 + 99;
        setUserEmails = i4 % 128;
        int i5 = i4 % 2;
        return ctVarArr;
    }

    static be AFKeystoreWrapper(ah ahVar) {
        int i = setCustomerIdAndLogSession + 53;
        setUserEmails = i % 128;
        boolean z = i % 2 == 0 ? true : true;
        be beVar = ahVar.waitForCustomerUserId;
        if (z) {
            Object obj = null;
            super.hashCode();
        }
        int i2 = setUserEmails + 57;
        setCustomerIdAndLogSession = i2 % 128;
        int i3 = i2 % 2;
        return beVar;
    }

    public static String AFKeystoreWrapper() {
        int i = setUserEmails + 1;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        String valueOf2 = valueOf(AppsFlyerProperties.APP_USER_ID);
        int i3 = setUserEmails + 49;
        setCustomerIdAndLogSession = i3 % 128;
        int i4 = i3 % 2;
        return valueOf2;
    }

    @Nullable
    @VisibleForTesting
    private String AFKeystoreWrapper(Context context, String str) {
        int i = setCustomerIdAndLogSession + 9;
        setUserEmails = i % 128;
        Object obj = null;
        if ((i % 2 == 0 ? ',' : 'Z') != 'Z') {
            super.hashCode();
        }
    }

    private static String AFKeystoreWrapper(String str) {
        int i = setUserEmails + 37;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        try {
            String str2 = (String) Class.forName("android.os.SystemProperties").getMethod(CspServiceDiscoveryClient.OP_CODE_GET, String.class).invoke(null, str);
            int i3 = setUserEmails + 71;
            setCustomerIdAndLogSession = i3 % 128;
            int i4 = i3 % 2;
            return str2;
        } catch (Throwable th) {
            AFLogger.AFKeystoreWrapper(th.getMessage(), th);
            return null;
        }
    }

    @NonNull
    public static String AFKeystoreWrapper(HttpURLConnection httpURLConnection) {
        String obj;
        InputStreamReader inputStreamReader;
        StringBuilder sb = new StringBuilder();
        BufferedReader bufferedReader = null;
        try {
            try {
                InputStream errorStream = httpURLConnection.getErrorStream();
                if ((errorStream == null ? ',' : ']') != ']') {
                    errorStream = httpURLConnection.getInputStream();
                }
                inputStreamReader = new InputStreamReader(errorStream);
                try {
                    BufferedReader bufferedReader2 = new BufferedReader(inputStreamReader);
                    int i = setUserEmails + 53;
                    setCustomerIdAndLogSession = i % 128;
                    int i2 = i % 2;
                    boolean z = false;
                    while (true) {
                        try {
                            String readLine = bufferedReader2.readLine();
                            if (readLine == null) {
                                break;
                            }
                            sb.append(z ? '\n' : "");
                            sb.append(readLine);
                            z = true;
                        } catch (Throwable th) {
                            th = th;
                            bufferedReader = bufferedReader2;
                            try {
                                StringBuilder sb2 = new StringBuilder("Could not read connection response from: ");
                                sb2.append(httpURLConnection.getURL().toString());
                                AFLogger.AFKeystoreWrapper(sb2.toString(), th);
                                if (bufferedReader != null) {
                                    bufferedReader.close();
                                }
                                if (inputStreamReader != null) {
                                    int i3 = setUserEmails + 81;
                                    setCustomerIdAndLogSession = i3 % 128;
                                    int i4 = i3 % 2;
                                    inputStreamReader.close();
                                }
                                obj = sb.toString();
                                new JSONObject(obj);
                                return obj;
                            } catch (Throwable th2) {
                                if (bufferedReader != null) {
                                    try {
                                        bufferedReader.close();
                                    } catch (Throwable th3) {
                                        AFLogger.AFInAppEventType(th3);
                                        throw th2;
                                    }
                                }
                                if (inputStreamReader != null) {
                                    inputStreamReader.close();
                                }
                                throw th2;
                            }
                        }
                    }
                    bufferedReader2.close();
                    inputStreamReader.close();
                } catch (Throwable th4) {
                    th = th4;
                }
            } catch (Throwable th5) {
                th = th5;
                inputStreamReader = null;
            }
        } catch (Throwable th6) {
            AFLogger.AFInAppEventType(th6);
        }
        obj = sb.toString();
        try {
            new JSONObject(obj);
            return obj;
        } catch (JSONException unused) {
            JSONObject jSONObject = new JSONObject();
            try {
                jSONObject.put("string_response", obj);
                return jSONObject.toString();
            } catch (JSONException unused2) {
                return new JSONObject().toString();
            }
        }
    }

    public static Map<String, Object> AFKeystoreWrapper(Map<String, Object> map) {
        int i = setUserEmails + 99;
        setCustomerIdAndLogSession = i % 128;
        if (i % 2 != 0) {
            boolean containsKey = map.containsKey(MoEConstants.ATTR_SDK_META);
            Object obj = null;
            super.hashCode();
        }
    }

    public static void AFKeystoreWrapper(Context context, String str, String str2) {
        int i = setCustomerIdAndLogSession + 63;
        setUserEmails = i % 128;
        if (!(i % 2 == 0)) {
            SharedPreferences.Editor edit = valueOf(context).edit();
            edit.putString(str, str2);
            valueOf(edit);
            return;
        }
        SharedPreferences.Editor edit2 = valueOf(context).edit();
        edit2.putString(str, str2);
        valueOf(edit2);
        Object[] objArr = null;
        int length = objArr.length;
    }

    public static void AFKeystoreWrapper(Context context, Map<String, ? super String> map) {
        y yVar = y.b.AFInAppEventType;
        y.d AFInAppEventParameterName2 = y.AFInAppEventParameterName(context);
        map.put("network", AFInAppEventParameterName2.AFKeystoreWrapper);
        String str = AFInAppEventParameterName2.AFInAppEventParameterName;
        Object obj = null;
        if (str != null) {
            int i = setUserEmails + 47;
            setCustomerIdAndLogSession = i % 128;
            if (!(i % 2 != 0)) {
                map.put(FilterParameter.OPERATOR, str);
            } else {
                map.put(FilterParameter.OPERATOR, str);
                super.hashCode();
            }
        }
        String str2 = AFInAppEventParameterName2.valueOf;
        if (str2 != null) {
            int i2 = setCustomerIdAndLogSession + 27;
            setUserEmails = i2 % 128;
            char c = i2 % 2 == 0 ? '=' : 'Q';
            map.put("carrier", str2);
            if (c != 'Q') {
                super.hashCode();
            }
        }
    }

    static void AFKeystoreWrapper(ah ahVar, g gVar) {
        int i = setCustomerIdAndLogSession + 17;
        setUserEmails = i % 128;
        boolean z = i % 2 != 0;
        ahVar.AFKeystoreWrapper(gVar);
        if (!z) {
            Object obj = null;
            super.hashCode();
        }
        int i2 = setCustomerIdAndLogSession + 57;
        setUserEmails = i2 % 128;
        int i3 = i2 % 2;
    }

    private void AFKeystoreWrapper(g gVar) {
        boolean z;
        String format;
        String values2;
        ScheduledExecutorService values3;
        boolean z2;
        Application application = gVar.AFInAppEventType;
        String str = gVar.getLevel;
        if (application == null) {
            AFLogger.values("sendWithEvent - got null context. skipping event/launch.");
            return;
        }
        SharedPreferences valueOf2 = valueOf(application);
        AppsFlyerProperties.getInstance().saveProperties(valueOf2);
        if (!isStopped()) {
            StringBuilder sb = new StringBuilder("sendWithEvent from activity: ");
            sb.append(application.getClass().getName());
            AFLogger.AFKeystoreWrapper(sb.toString());
        }
        if ((str == null ? (char) 5 : 'Y') != 'Y') {
            int i = setCustomerIdAndLogSession + 27;
            setUserEmails = i % 128;
            int i2 = i % 2;
            z = true;
        } else {
            z = false;
        }
        boolean z3 = gVar instanceof cd;
        boolean z4 = gVar instanceof cg;
        gVar.onInstallConversionDataLoadedNative = z;
        Map<String, ?> AFInAppEventType2 = AFInAppEventType(gVar);
        String str2 = (String) AFInAppEventType2.get("appsflyerKey");
        if ((str2 != null ? 'X' : (char) 28) == 'X') {
            if (str2.length() != 0) {
                if (!isStopped()) {
                    AFLogger.AFKeystoreWrapper("AppsFlyerLib.sendWithEvent");
                }
                int valueOf3 = valueOf(valueOf2, false);
                if (!z4) {
                    if (!(z3)) {
                        if (!z) {
                            format = String.format(onAppOpenAttributionNative, AppsFlyerLib.getInstance().getHostPrefix(), valueOf().getHostName());
                        } else {
                            int i3 = setUserEmails + 85;
                            int i4 = i3 % 128;
                            setCustomerIdAndLogSession = i4;
                            int i5 = i3 % 2;
                            if (valueOf3 < 2) {
                                int i6 = i4 + 107;
                                setUserEmails = i6 % 128;
                                int i7 = i6 % 2;
                                format = String.format(onInstallConversionDataLoadedNative, AppsFlyerLib.getInstance().getHostPrefix(), valueOf().getHostName());
                            } else {
                                format = String.format(onInstallConversionFailureNative, AppsFlyerLib.getInstance().getHostPrefix(), valueOf().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.5.2");
                        String obj2 = sb3.toString();
                        values2 = values(application);
                        if (values2 != null) {
                            StringBuilder sb4 = new StringBuilder();
                            sb4.append(obj2);
                            sb4.append("&channel=");
                            sb4.append(values2);
                            obj2 = sb4.toString();
                        }
                        valueOf(AFInAppEventType2);
                        g valueOf4 = gVar.AFKeystoreWrapper(obj2).valueOf(AFInAppEventType2);
                        valueOf4.onAppOpenAttributionNative = valueOf3;
                        e eVar = new e(this, valueOf4, (byte) 0);
                        if (!(z)) {
                            ct[] ctVarArr = this.setAndroidIdData;
                            if (ctVarArr != null) {
                                int i8 = setUserEmails + 97;
                                setCustomerIdAndLogSession = i8 % 128;
                                int i9 = i8 % 2;
                                z2 = false;
                                for (ct ctVar : ctVarArr) {
                                    if (ctVar.values == ct.c.STARTED) {
                                        StringBuilder sb5 = new StringBuilder("Failed to get ");
                                        sb5.append(ctVar.AFInAppEventParameterName);
                                        sb5.append(" referrer, wait ...");
                                        AFLogger.values(sb5.toString());
                                        z2 = true;
                                    }
                                }
                            } else {
                                z2 = false;
                            }
                            if (this.getSdkVersion && !getLevel()) {
                                int i10 = setUserEmails + 101;
                                setCustomerIdAndLogSession = i10 % 128;
                                int i11 = i10 % 2;
                                AFLogger.values("fetching Facebook deferred AppLink data, wait ...");
                                z2 = true;
                            }
                            if (this.setDebugLog) {
                                int i12 = setUserEmails + 77;
                                setCustomerIdAndLogSession = i12 % 128;
                                if (i12 % 2 != 0) {
                                    int i13 = 38 / 0;
                                }
                            }
                            r5 = z2;
                        }
                        if (i.values) {
                            if (m.AFInAppEventType == null) {
                                m.AFInAppEventType = new m();
                            }
                            values3 = m.AFInAppEventType.values();
                        } else {
                            AFLogger.AFInAppEventType("ESP deeplink: execute launch on SerialExecutor");
                            if (m.AFInAppEventType == null) {
                                m.AFInAppEventType = new m();
                            }
                            m mVar = m.AFInAppEventType;
                            if ((mVar.AFKeystoreWrapper == null ? Typography.quote : '#') != '#') {
                                int i14 = setUserEmails + 27;
                                setCustomerIdAndLogSession = i14 % 128;
                                if (i14 % 2 != 0) {
                                    mVar.AFKeystoreWrapper = Executors.newSingleThreadScheduledExecutor(mVar.valueOf);
                                    Object[] objArr = null;
                                    int length = objArr.length;
                                } else {
                                    mVar.AFKeystoreWrapper = Executors.newSingleThreadScheduledExecutor(mVar.valueOf);
                                }
                            }
                            values3 = mVar.AFKeystoreWrapper;
                            int i15 = setUserEmails + 61;
                            setCustomerIdAndLogSession = i15 % 128;
                            int i16 = i15 % 2;
                        }
                        AFKeystoreWrapper(values3, eVar, !r5 ? 500L : 0L, TimeUnit.MILLISECONDS);
                        return;
                    }
                }
                format = String.format(onConversionDataFail, AppsFlyerLib.getInstance().getHostPrefix(), valueOf().getHostName());
                StringBuilder sb22 = new StringBuilder();
                sb22.append(format);
                sb22.append(application.getPackageName());
                String obj3 = sb22.toString();
                StringBuilder sb32 = new StringBuilder();
                sb32.append(obj3);
                sb32.append("&buildnumber=6.5.2");
                String obj22 = sb32.toString();
                values2 = values(application);
                if (values2 != null) {
                }
                valueOf(AFInAppEventType2);
                g valueOf42 = gVar.AFKeystoreWrapper(obj22).valueOf(AFInAppEventType2);
                valueOf42.onAppOpenAttributionNative = valueOf3;
                e eVar2 = new e(this, valueOf42, (byte) 0);
                if (!(z)) {
                }
                if (i.values) {
                }
                AFKeystoreWrapper(values3, eVar2, !r5 ? 500L : 0L, TimeUnit.MILLISECONDS);
                return;
            }
        }
        AFLogger.values("Not sending data yet, waiting for dev key");
        AppsFlyerRequestListener appsFlyerRequestListener = gVar.AFInAppEventParameterName;
        if (appsFlyerRequestListener != null) {
            appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, bc.AFInAppEventType);
        }
    }

    public static void AFKeystoreWrapper(ScheduledExecutorService scheduledExecutorService, Runnable runnable, long j, TimeUnit timeUnit) {
        Object[] objArr = null;
        try {
            if (scheduledExecutorService != null) {
                int i = setCustomerIdAndLogSession + 49;
                setUserEmails = i % 128;
                if (i % 2 == 0) {
                    boolean isShutdown = scheduledExecutorService.isShutdown();
                    int length = objArr.length;
                    if (!isShutdown) {
                        if (!scheduledExecutorService.isTerminated()) {
                            int i2 = setUserEmails + 123;
                            setCustomerIdAndLogSession = i2 % 128;
                            int i3 = i2 % 2;
                            scheduledExecutorService.schedule(runnable, j, timeUnit);
                            return;
                        }
                    }
                } else {
                    if (!(!scheduledExecutorService.isShutdown())) {
                    }
                    if (!scheduledExecutorService.isTerminated()) {
                    }
                }
            }
            AFLogger.AppsFlyer2dXConversionCallback("scheduler is null, shut downed or terminated");
            int i4 = setUserEmails + 11;
            setCustomerIdAndLogSession = i4 % 128;
            if (!(i4 % 2 != 0)) {
                return;
            }
            int length2 = objArr.length;
        } catch (RejectedExecutionException e2) {
            AFLogger.AFKeystoreWrapper("scheduleJob failed with RejectedExecutionException Exception", e2);
        } catch (Throwable th) {
            AFLogger.AFKeystoreWrapper("scheduleJob failed with Exception", th);
        }
    }

    private static void AFKeystoreWrapper(JSONObject jSONObject) {
        String str;
        ArrayList arrayList = new ArrayList();
        Iterator<String> keys = jSONObject.keys();
        while (true) {
            if (!keys.hasNext()) {
                break;
            }
            try {
                JSONArray jSONArray = new JSONArray((String) jSONObject.get(keys.next()));
                for (int i = 0; i < jSONArray.length(); i++) {
                    arrayList.add(Long.valueOf(jSONArray.getLong(i)));
                }
            } catch (JSONException unused) {
            }
        }
        Collections.sort(arrayList);
        Iterator<String> keys2 = jSONObject.keys();
        loop2: while (true) {
            str = null;
            while (keys2.hasNext()) {
                int i2 = setUserEmails + 5;
                setCustomerIdAndLogSession = i2 % 128;
                int i3 = i2 % 2;
                if (str != null) {
                    break loop2;
                }
                String next = keys2.next();
                try {
                    JSONArray jSONArray2 = new JSONArray((String) jSONObject.get(next));
                    int i4 = setUserEmails + 83;
                    setCustomerIdAndLogSession = i4 % 128;
                    int i5 = i4 % 2;
                    int i6 = 0;
                    while (true) {
                        if (!(i6 < jSONArray2.length())) {
                            break;
                        } else if (jSONArray2.getLong(i6) != ((Long) arrayList.get(0)).longValue()) {
                            int i7 = setCustomerIdAndLogSession + 25;
                            setUserEmails = i7 % 128;
                            int i8 = i7 % 2;
                            if (jSONArray2.getLong(i6) != ((Long) arrayList.get(1)).longValue()) {
                                int i9 = setUserEmails + 83;
                                setCustomerIdAndLogSession = i9 % 128;
                                if (i9 % 2 != 0) {
                                    if (jSONArray2.getLong(i6) == ((Long) arrayList.get(arrayList.size() + 0)).longValue()) {
                                        break;
                                    }
                                    i6++;
                                    str = next;
                                } else if (jSONArray2.getLong(i6) == ((Long) arrayList.get(arrayList.size() - 1)).longValue()) {
                                    break;
                                } else {
                                    i6++;
                                    str = next;
                                }
                            }
                        }
                    }
                } catch (JSONException unused2) {
                }
            }
        }
        if (str != null) {
            int i10 = setCustomerIdAndLogSession + 55;
            setUserEmails = i10 % 128;
            int i11 = i10 % 2;
            jSONObject.remove(str);
        }
    }

    static void AFLogger$LogLevel() {
        setOutOfStore = new char[]{30299, 50024, 7181, 27090, 41603, 64595, 18791, 33317, 57326, 10383, 25183, 49014, 60868, 'b', 46406, 27145, 8178, 54452, 2134, 48493, 25130, 6111, 56468, 33400, 14185, 64553, 41470, 22151, 7248, 49480, 30241, 15328, 57485, 64116};
        setPhoneNumber = -2201700898335509196L;
    }

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

    private boolean AFVersionDeclaration() {
        String format;
        int i = setUserEmails + 57;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        if (this.onConversionDataSuccess > 0) {
            long currentTimeMillis = System.currentTimeMillis() - this.onConversionDataSuccess;
            Locale locale = Locale.US;
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS Z", locale);
            String valueOf2 = valueOf(simpleDateFormat, this.onConversionDataSuccess);
            String valueOf3 = valueOf(simpleDateFormat, this.onResponseErrorNative);
            if ((currentTimeMillis < this.onResponseNative ? (char) 16 : '=') != '=') {
                int i3 = setCustomerIdAndLogSession + 109;
                setUserEmails = i3 % 128;
                int i4 = i3 % 2;
                if (!isStopped()) {
                    int i5 = setUserEmails + 41;
                    setCustomerIdAndLogSession = i5 % 128;
                    if (i5 % 2 == 0) {
                        format = String.format(locale, "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.onResponseNative));
                    } else {
                        Object[] objArr = new Object[3];
                        objArr[1] = valueOf2;
                        objArr[1] = valueOf3;
                        objArr[5] = Long.valueOf(currentTimeMillis);
                        objArr[2] = Long.valueOf(this.onResponseNative);
                        format = String.format(locale, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nThis launch is blocked: %s ms < %s ms", objArr);
                    }
                    AFLogger.AFKeystoreWrapper(format);
                    return true;
                }
            }
            if (!(isStopped())) {
                AFLogger.AFKeystoreWrapper(String.format(locale, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nSending launch (+%s ms)", valueOf2, valueOf3, Long.valueOf(currentTimeMillis)));
            }
        } else if (!isStopped()) {
            AFLogger.AFKeystoreWrapper("Sending first launch for this session!");
        }
        return false;
    }

    private static boolean AFVersionDeclaration(Context context) {
        int i = setUserEmails + 19;
        setCustomerIdAndLogSession = i % 128;
        try {
        } catch (Throwable th) {
            AFLogger.AFKeystoreWrapper("WARNING:  Google play services is unavailable. ", th);
        }
        if ((i % 2 != 0 ? '$' : '5') != '$') {
            if ((GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) == 0 ? 'c' : (char) 31) != 31) {
            }
            try {
                context.getPackageManager().getPackageInfo("com.google.android.gms", 0);
                return true;
            } catch (PackageManager.NameNotFoundException e2) {
                AFLogger.AFKeystoreWrapper("WARNING:  Google Play Services is unavailable. ", e2);
                return false;
            }
        }
        int i2 = 0 / 0;
        int i3 = setUserEmails + 37;
        setCustomerIdAndLogSession = i3 % 128;
        context = i3 % 2;
        return true;
    }

    private static String AppsFlyer2dXConversionCallback() {
        String valueOf2;
        int i = setUserEmails + 77;
        setCustomerIdAndLogSession = i % 128;
        if (!(i % 2 != 0)) {
            valueOf2 = valueOf(AppsFlyerProperties.APP_ID);
        } else {
            valueOf2 = valueOf(AppsFlyerProperties.APP_ID);
            int i2 = 45 / 0;
        }
        int i3 = setUserEmails + 7;
        setCustomerIdAndLogSession = i3 % 128;
        if ((i3 % 2 != 0 ? 'D' : Typography.less) != 'D') {
            return valueOf2;
        }
        int i4 = 25 / 0;
        return valueOf2;
    }

    @Nullable
    private static Map<String, Object> AppsFlyer2dXConversionCallback(Context context) {
        Location AFKeystoreWrapper2 = v.c.valueOf.AFKeystoreWrapper(context);
        HashMap hashMap = new HashMap(3);
        if ((AFKeystoreWrapper2 != null ? '1' : (char) 20) != 20) {
            int i = setCustomerIdAndLogSession + 1;
            setUserEmails = i % 128;
            int i2 = i % 2;
            hashMap.put("lat", String.valueOf(AFKeystoreWrapper2.getLatitude()));
            hashMap.put("lon", String.valueOf(AFKeystoreWrapper2.getLongitude()));
            hashMap.put("ts", String.valueOf(AFKeystoreWrapper2.getTime()));
            int i3 = setCustomerIdAndLogSession + 39;
            setUserEmails = i3 % 128;
            int i4 = i3 % 2;
        }
        int i5 = setCustomerIdAndLogSession + 71;
        setUserEmails = i5 % 128;
        int i6 = i5 % 2;
        return hashMap;
    }

    static boolean AppsFlyer2dXConversionCallback(ah ahVar) {
        int i = setCustomerIdAndLogSession + 83;
        setUserEmails = i % 128;
        char c = i % 2 == 0 ? ',' : (char) 27;
        boolean z = ahVar.onResponseError;
        if (c == ',') {
            Object obj = null;
            super.hashCode();
        }
        return z;
    }

    static ScheduledExecutorService getLevel(ah ahVar) {
        int i = setCustomerIdAndLogSession + 103;
        int i2 = i % 128;
        setUserEmails = i2;
        int i3 = i % 2;
        ScheduledExecutorService scheduledExecutorService = ahVar.onAttributionFailure;
        int i4 = i2 + 21;
        setCustomerIdAndLogSession = i4 % 128;
        if ((i4 % 2 != 0 ? 'R' : 'W') != 'R') {
            return scheduledExecutorService;
        }
        Object obj = null;
        super.hashCode();
        return scheduledExecutorService;
    }

    private static void getLevel(Context context) {
        try {
            if (((context.getPackageManager().getPackageInfo(context.getPackageName(), 0).applicationInfo.flags & 32768) != 0 ? ';' : '2') != '2') {
                if ((context.getResources().getIdentifier("appsflyer_backup_rules", "xml", context.getPackageName()) != 0 ? 'Q' : (char) 28) != 28) {
                    int i = setUserEmails + 7;
                    setCustomerIdAndLogSession = i % 128;
                    if ((i % 2 != 0 ? '.' : (char) 22) != '.') {
                        AFLogger.AFInAppEventType("appsflyer_backup_rules.xml detected, using AppsFlyer defined backup rules for AppsFlyer SDK data", true);
                        return;
                    } else {
                        AFLogger.AFInAppEventType("appsflyer_backup_rules.xml detected, using AppsFlyer defined backup rules for AppsFlyer SDK data", true);
                        return;
                    }
                }
                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");
            }
            int i2 = setUserEmails + 9;
            setCustomerIdAndLogSession = i2 % 128;
            if (i2 % 2 != 0) {
                Object obj = null;
                super.hashCode();
            }
        } catch (Exception e2) {
            StringBuilder sb = new StringBuilder("checkBackupRules Exception: ");
            sb.append(e2.toString());
            AFLogger.AFInAppEventType(sb.toString());
        }
    }

    private boolean getLevel() {
        int i = setCustomerIdAndLogSession + 97;
        int i2 = i % 128;
        setUserEmails = i2;
        int i3 = i % 2;
        Map<String, Object> map = this.stop;
        if (map != null) {
            int i4 = i2 + 5;
            setCustomerIdAndLogSession = i4 % 128;
            int i5 = i4 % 2;
            if ((!map.isEmpty() ? '/' : '+') == '/') {
                return true;
            }
        }
        return false;
    }

    static cw init(ah ahVar) {
        int i = setUserEmails + 71;
        int i2 = i % 128;
        setCustomerIdAndLogSession = i2;
        int i3 = i % 2;
        cw cwVar = ahVar.getOutOfStore;
        int i4 = i2 + 3;
        setUserEmails = i4 % 128;
        int i5 = i4 % 2;
        return cwVar;
    }

    private static File init(String str) {
        int i = setCustomerIdAndLogSession + 17;
        int i2 = i % 128;
        setUserEmails = i2;
        if ((i % 2 == 0 ? ']' : 'R') != 'R') {
            try {
                int i3 = 36 / 0;
                if (str == null) {
                    return null;
                }
            } catch (Throwable th) {
                AFLogger.AFKeystoreWrapper(th.getMessage(), th);
                return null;
            }
        } else {
            if ((str != null ? '8' : '9') != '8') {
                return null;
            }
        }
        int i4 = i2 + 105;
        setCustomerIdAndLogSession = i4 % 128;
        int i5 = i4 % 2;
        if (str.trim().length() > 0) {
            return new File(str.trim());
        }
        return null;
    }

    private void init(Context context) {
        this.stop = new HashMap();
        final long currentTimeMillis = System.currentTimeMillis();
        final o.e eVar = new o.e() {
            @Override
            public final void AFInAppEventType(String str) {
                ah.values(ah.this).put("error", str);
            }

            @Override
            public final void valueOf(String str, String str2, String str3) {
                if (str != null) {
                    AFLogger.AFKeystoreWrapper("Facebook Deferred AppLink data received: ".concat(String.valueOf(str)));
                    ah.values(ah.this).put("link", str);
                    if (str2 != null) {
                        ah.values(ah.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);
                        ah.values(ah.this).put(ActionMapperConstants.KEY_EXTRA, hashMap);
                    }
                } else {
                    ah.values(ah.this).put("link", "");
                }
                ah.values(ah.this).put("ttr", String.valueOf(System.currentTimeMillis() - currentTimeMillis));
            }
        };
        try {
            Object[] objArr = null;
            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[] objArr2) throws Throwable {
                    String str;
                    String str2;
                    String str3;
                    Bundle bundle;
                    if (!method2.getName().equals("onDeferredAppLinkDataFetched")) {
                        e eVar2 = eVar;
                        if (eVar2 != null) {
                            eVar2.AFInAppEventType("onDeferredAppLinkDataFetched invocation failed");
                        }
                        return null;
                    }
                    if (objArr2[0] != null) {
                        Bundle bundle2 = (Bundle) Bundle.class.cast(cls.getMethod("getArgumentBundle", new Class[0]).invoke(cls.cast(objArr2[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(ActionMapperConstants.KEY_EXTRA);
                            str = (bundle3 == null || (bundle = bundle3.getBundle("deeplink_context")) == null) ? null : bundle.getString("promo_code");
                        } else {
                            str = null;
                            str2 = null;
                            str3 = null;
                        }
                        e eVar3 = eVar;
                        if (eVar3 != null) {
                            eVar3.valueOf(str2, str3, str);
                        }
                    } else {
                        e eVar4 = eVar;
                        if (eVar4 != null) {
                            eVar4.valueOf(null, null, null);
                        }
                    }
                    return null;
                }
            });
            String string = context.getString(context.getResources().getIdentifier("facebook_app_id", "string", context.getPackageName()));
            if ((TextUtils.isEmpty(string) ? '@' : '5') != '@') {
                method.invoke(null, context, string, newProxyInstance);
                int i = setUserEmails + 59;
                setCustomerIdAndLogSession = i % 128;
                if (!(i % 2 != 0)) {
                    return;
                }
                int length = objArr.length;
                return;
            }
            int i2 = setCustomerIdAndLogSession + 47;
            setUserEmails = i2 % 128;
            if (i2 % 2 != 0) {
                eVar.AFInAppEventType("Facebook app id not defined in resources");
                return;
            }
            eVar.AFInAppEventType("Facebook app id not defined in resources");
            super.hashCode();
        } catch (ClassNotFoundException e2) {
            eVar.AFInAppEventType(e2.toString());
        } catch (IllegalAccessException e3) {
            eVar.AFInAppEventType(e3.toString());
        } catch (NoSuchMethodException e4) {
            eVar.AFInAppEventType(e4.toString());
        } catch (InvocationTargetException e5) {
            eVar.AFInAppEventType(e5.toString());
        }
    }

    private void init(g gVar) throws IOException {
        HttpURLConnection httpURLConnection;
        String str;
        URL url = new URL(gVar.onDeepLinkingNative);
        byte[] AFInAppEventParameterName2 = gVar.AFInAppEventParameterName();
        String str2 = gVar.AFLogger$LogLevel;
        String str3 = gVar.AppsFlyer2dXConversionCallback;
        boolean AFInAppEventType2 = gVar.AFInAppEventType();
        Application application = gVar.AFInAppEventType;
        AppsFlyerRequestListener appsFlyerRequestListener = gVar.AFInAppEventParameterName;
        cf init2 = AFInAppEventType().init();
        init2.valueOf(gVar.onAppOpenAttributionNative);
        ?? r10 = 0;
        DataOutputStream dataOutputStream = null;
        try {
            httpURLConnection = (HttpURLConnection) ((URLConnection) FirebasePerfUrlConnection.instrument(url.openConnection()));
        } catch (Throwable th) {
            th = th;
        }
        try {
            httpURLConnection.setRequestMethod("POST");
            httpURLConnection.setRequestProperty(HttpHeaders.CONTENT_LENGTH, String.valueOf(AFInAppEventParameterName2.length));
            if ((gVar.valueOf() ? '`' : 'L') != 'L') {
                int i = setUserEmails + 93;
                setCustomerIdAndLogSession = i % 128;
                if (i % 2 != 0) {
                    int length = r10.length;
                }
                str = "application/octet-stream";
            } else {
                str = "application/json";
            }
            httpURLConnection.setRequestProperty("Content-Type", str);
            httpURLConnection.setConnectTimeout(McsErrors.HTTP_UNKNOWN);
            httpURLConnection.setDoOutput(true);
            if ((AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.HTTP_CACHE, true)) != true) {
                int i2 = setUserEmails + 113;
                setCustomerIdAndLogSession = i2 % 128;
                int i3 = i2 % 2;
                httpURLConnection.setUseCaches(false);
                int i4 = setCustomerIdAndLogSession + 121;
                setUserEmails = i4 % 128;
                int i5 = i4 % 2;
            }
            try {
                DataOutputStream dataOutputStream2 = new DataOutputStream(httpURLConnection.getOutputStream());
                try {
                    dataOutputStream2.write(AFInAppEventParameterName2);
                    dataOutputStream2.close();
                    int responseCode = httpURLConnection.getResponseCode();
                    init2.AFInAppEventParameterName(gVar.onAppOpenAttributionNative);
                    String AFKeystoreWrapper2 = AFKeystoreWrapper(httpURLConnection);
                    am.AFKeystoreWrapper().AFKeystoreWrapper(url.toString(), responseCode, AFKeystoreWrapper2);
                    AFLogger.AFKeystoreWrapper("response code: ".concat(String.valueOf(responseCode)));
                    SharedPreferences valueOf2 = valueOf(application);
                    if (responseCode == 200) {
                        if (application != null && AFInAppEventType2) {
                            this.onResponseErrorNative = System.currentTimeMillis();
                            AFInAppEventType().AFInAppEventType();
                        }
                        if (appsFlyerRequestListener != null) {
                            int i6 = setUserEmails + 119;
                            setCustomerIdAndLogSession = i6 % 128;
                            if ((i6 % 2 != 0 ? 'V' : '\n') != '\n') {
                                appsFlyerRequestListener.onSuccess();
                                super.hashCode();
                            } else {
                                appsFlyerRequestListener.onSuccess();
                            }
                        }
                        if (str3 != null) {
                            int i7 = setCustomerIdAndLogSession + 1;
                            setUserEmails = i7 % 128;
                            if (i7 % 2 == 0) {
                                ai.AFKeystoreWrapper();
                                ai.AFInAppEventParameterName(str3, application);
                                int i8 = 63 / 0;
                            } else {
                                ai.AFKeystoreWrapper();
                                ai.AFInAppEventParameterName(str3, application);
                            }
                        } else {
                            AFKeystoreWrapper(application, "sentSuccessfully", "true");
                            onResponseErrorNative(application);
                        }
                        new bt(application).values();
                        this.AppsFlyerLib = ap.AFKeystoreWrapper(AFKeystoreWrapper2).optBoolean("send_background", false);
                    } else if (appsFlyerRequestListener != null) {
                        int i9 = RequestError.RESPONSE_CODE_FAILURE;
                        StringBuilder sb = new StringBuilder();
                        sb.append(bc.AFInAppEventParameterName);
                        sb.append(" ");
                        sb.append(responseCode);
                        appsFlyerRequestListener.onError(i9, sb.toString());
                    }
                    bz.valueOf(this, gVar, str2, application, valueOf2, Integer.valueOf(responseCode), null);
                    if (httpURLConnection == null) {
                        return;
                    }
                    int i10 = setUserEmails + 3;
                    setCustomerIdAndLogSession = i10 % 128;
                    if (i10 % 2 == 0) {
                        httpURLConnection.disconnect();
                        return;
                    }
                    httpURLConnection.disconnect();
                    int i11 = 64 / 0;
                } catch (Throwable th2) {
                    th = th2;
                    dataOutputStream = dataOutputStream2;
                    if (dataOutputStream != null) {
                        dataOutputStream.close();
                    }
                    throw th;
                }
            } catch (Throwable th3) {
                th = th3;
            }
        } catch (Throwable th4) {
            th = th4;
            r10 = httpURLConnection;
            if (r10 != 0) {
                r10.disconnect();
            }
            throw th;
        }
    }

    private static boolean onAppOpenAttribution(Context context) {
        NetworkCapabilities networkCapabilities;
        if (context != null) {
            int i = Build.VERSION.SDK_INT;
            if (i >= 23) {
                int i2 = setUserEmails + 77;
                setCustomerIdAndLogSession = i2 % 128;
                int i3 = i2 % 2;
                try {
                    ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(NetworkChangesReceiver.BROADCAST_ENTRY);
                    Network[] allNetworks = connectivityManager.getAllNetworks();
                    int length = allNetworks.length;
                    int i4 = setUserEmails + 45;
                    setCustomerIdAndLogSession = i4 % 128;
                    int i5 = i4 % 2;
                    for (int i6 = 0; i6 < length; i6++) {
                        int i7 = setCustomerIdAndLogSession + 39;
                        setUserEmails = i7 % 128;
                        if (!(i7 % 2 == 0)) {
                            networkCapabilities = connectivityManager.getNetworkCapabilities(allNetworks[i6]);
                            if ((networkCapabilities.hasTransport(4) ? '.' : (char) 25) != '.') {
                            }
                            if (!(networkCapabilities.hasCapability(15))) {
                                return true;
                            }
                        } else {
                            networkCapabilities = connectivityManager.getNetworkCapabilities(allNetworks[i6]);
                            if (!networkCapabilities.hasTransport(4)) {
                                continue;
                            }
                            if (!(networkCapabilities.hasCapability(15))) {
                            }
                        }
                    }
                    return false;
                } catch (Exception e2) {
                    AFLogger.AFKeystoreWrapper("Failed collecting ivc data", e2);
                }
            } else if (i >= 16) {
                ArrayList arrayList = new ArrayList();
                try {
                    Iterator it = Collections.list(NetworkInterface.getNetworkInterfaces()).iterator();
                    while (it.hasNext()) {
                        NetworkInterface networkInterface = (NetworkInterface) it.next();
                        if (!(!networkInterface.isUp())) {
                            arrayList.add(networkInterface.getName());
                        }
                    }
                    return arrayList.contains("tun0");
                } catch (Exception e3) {
                    AFLogger.AFKeystoreWrapper("Failed collecting ivc data", e3);
                }
            }
        }
        return false;
    }

    private String onAppOpenAttributionNative(Context context) {
        int i = setCustomerIdAndLogSession + 41;
        setUserEmails = i % 128;
        int i2 = i % 2;
        SharedPreferences valueOf2 = valueOf(context);
        if (!valueOf2.contains("INSTALL_STORE")) {
            String onDeepLinkingNative2 = (AFInAppEventParameterName(context) ? (char) 19 : '#') == 19 ? onDeepLinkingNative(context) : null;
            AFKeystoreWrapper(context, "INSTALL_STORE", onDeepLinkingNative2);
            return onDeepLinkingNative2;
        }
        int i3 = setUserEmails + 25;
        setCustomerIdAndLogSession = i3 % 128;
        int i4 = i3 % 2;
        String string = valueOf2.getString("INSTALL_STORE", null);
        int i5 = setUserEmails + 93;
        setCustomerIdAndLogSession = i5 % 128;
        int i6 = i5 % 2;
        return string;
    }

    private static boolean onAttributionFailureNative(Context context) {
        boolean z;
        int i = setCustomerIdAndLogSession + 41;
        setUserEmails = i % 128;
        if ((i % 2 == 0 ? (char) 25 : 'T') == 'T' ? !AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false) : !AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false)) {
            if ((AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, false) ? 'b' : ' ') == ' ') {
                z = false;
                if ((z ? '7' : 'A') != 'A') {
                    int i2 = setUserEmails + 121;
                    setCustomerIdAndLogSession = i2 % 128;
                    int i3 = i2 % 2;
                    if (AFVersionDeclaration(context)) {
                        return false;
                    }
                }
                return true;
            }
        }
        z = true;
        if ((z ? '7' : 'A') != 'A') {
        }
        return true;
    }

    private long onConversionDataFail(Context context) {
        int i = setCustomerIdAndLogSession + 19;
        setUserEmails = i % 128;
        int i2 = i % 2;
        long j = valueOf(context).getLong("AppsFlyerTimePassedSincePrevLaunch", 0L);
        long currentTimeMillis = System.currentTimeMillis();
        valueOf(context, "AppsFlyerTimePassedSincePrevLaunch", currentTimeMillis);
        if ((j > 0 ? 'L' : '$') != '$') {
            int i3 = setCustomerIdAndLogSession + 49;
            setUserEmails = i3 % 128;
            int i4 = i3 % 2;
            return (currentTimeMillis - j) / 1000;
        }
        return -1L;
    }

    private String onDeepLinkingNative(Context context) {
        String string = AppsFlyerProperties.getInstance().getString("api_store_value");
        if (!(string != null)) {
            return AFKeystoreWrapper(context, "AF_STORE");
        }
        int i = setUserEmails;
        int i2 = i + 123;
        setCustomerIdAndLogSession = i2 % 128;
        int i3 = i2 % 2;
        int i4 = i + 123;
        setCustomerIdAndLogSession = i4 % 128;
        int i5 = i4 % 2;
        return string;
    }

    private String onInstallConversionDataLoadedNative(Context context) {
        SharedPreferences valueOf2;
        String valueOf3;
        int i = setUserEmails + 109;
        setCustomerIdAndLogSession = i % 128;
        boolean z = false;
        Object[] objArr = null;
        if (i % 2 != 0) {
            valueOf2 = valueOf(context);
            valueOf3 = valueOf("preInstallName");
            super.hashCode();
        } else {
            valueOf2 = valueOf(context);
            valueOf3 = valueOf("preInstallName");
        }
    }

    private boolean onInstallConversionDataLoadedNative() {
        Map<String, Object> map = this.updateServerUninstallToken;
        if ((map != null ? '0' : (char) 26) == 26 || map.isEmpty()) {
            int i = setCustomerIdAndLogSession + 49;
            setUserEmails = i % 128;
            int i2 = i % 2;
            return false;
        }
        int i3 = setUserEmails + 5;
        setCustomerIdAndLogSession = i3 % 128;
        if (!(i3 % 2 == 0)) {
            Object obj = null;
            super.hashCode();
            return true;
        }
        return true;
    }

    private String onInstallConversionFailureNative(Context context) {
        File init2;
        int i = setUserEmails + 91;
        setCustomerIdAndLogSession = i % 128;
        if ((i % 2 != 0 ? (char) 26 : '[') != '[') {
            init2 = init(AFKeystoreWrapper("ro.appsflyer.preinstall.path"));
            int i2 = 23 / 0;
        } else {
            init2 = init(AFKeystoreWrapper("ro.appsflyer.preinstall.path"));
        }
        Object obj = null;
        if (AFInAppEventParameterName(init2)) {
            int i3 = setUserEmails + 43;
            setCustomerIdAndLogSession = i3 % 128;
            if (i3 % 2 != 0) {
                init2 = init("/data/local/tmp/pre_install.appsflyer");
                super.hashCode();
            } else {
                init2 = init("/data/local/tmp/pre_install.appsflyer");
            }
        }
        if (AFInAppEventParameterName(init2)) {
            init2 = init("/etc/pre_install.appsflyer");
        }
        if (AFInAppEventParameterName(init2)) {
            int i4 = setCustomerIdAndLogSession + 69;
            setUserEmails = i4 % 128;
            if (i4 % 2 == 0) {
                super.hashCode();
                return null;
            }
            return null;
        }
        return AFInAppEventParameterName(init2, context.getPackageName());
    }

    private void onResponseErrorNative(Context context) {
        int i = setCustomerIdAndLogSession;
        int i2 = i + 55;
        setUserEmails = i2 % 128;
        int i3 = i2 % 2;
        if ((!this.onResponseError ? (char) 5 : (char) 4) != 4) {
            int i4 = i + 41;
            setUserEmails = i4 % 128;
            if (i4 % 2 == 0) {
                if (System.currentTimeMillis() / this.AFLogger$LogLevel < 15000) {
                    return;
                }
            } else if (System.currentTimeMillis() - this.AFLogger$LogLevel < 15000) {
                return;
            }
            if (this.onAttributionFailure != null) {
                return;
            }
            if (m.AFInAppEventType == null) {
                m.AFInAppEventType = new m();
            }
            this.onAttributionFailure = m.AFInAppEventType.values();
            AFKeystoreWrapper(this.onAttributionFailure, new b(context), 1L, TimeUnit.SECONDS);
        }
    }

    private static float onResponseNative(Context context) {
        int intExtra;
        int intExtra2;
        float f = 1.0f;
        try {
            Intent registerReceiver = context.getApplicationContext().registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
            intExtra = registerReceiver.getIntExtra("level", -1);
            intExtra2 = registerReceiver.getIntExtra("scale", -1);
        } catch (Throwable th) {
            AFLogger.AFKeystoreWrapper(th.getMessage(), th);
        }
        if ((intExtra != -1 ? '\'' : (char) 29) != 29) {
            int i = setCustomerIdAndLogSession;
            int i2 = i + 101;
            setUserEmails = i2 % 128;
            int i3 = i2 % 2;
            if (intExtra2 == -1) {
                return 50.0f;
            }
            int i4 = i + 43;
            setUserEmails = i4 % 128;
            int i5 = i4 % 2;
            f = 100.0f * (intExtra / intExtra2);
            int i6 = setCustomerIdAndLogSession + 9;
            setUserEmails = i6 % 128;
            int i7 = i6 % 2;
            return f;
        }
        return 50.0f;
    }

    static Application valueOf(ah ahVar) {
        int i = setCustomerIdAndLogSession;
        int i2 = i + 111;
        setUserEmails = i2 % 128;
        int i3 = i2 % 2;
        Application application = ahVar.onPause;
        int i4 = i + 83;
        setUserEmails = i4 % 128;
        int i5 = i4 % 2;
        return application;
    }

    public static SharedPreferences valueOf(Context context) {
        int i = setUserEmails + 57;
        setCustomerIdAndLogSession = i % 128;
        if (i % 2 != 0) {
            SharedPreferences sharedPreferences = valueOf().setImeiData;
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    public static ah valueOf() {
        int i = setCustomerIdAndLogSession + 113;
        int i2 = i % 128;
        setUserEmails = i2;
        int i3 = i % 2;
        ah ahVar = onAppOpenAttribution;
        int i4 = i2 + 63;
        setCustomerIdAndLogSession = i4 % 128;
        int i5 = i4 % 2;
        return ahVar;
    }

    private static String valueOf(String str) {
        String string;
        int i = setCustomerIdAndLogSession + 83;
        setUserEmails = i % 128;
        Object[] objArr = null;
        if ((i % 2 == 0 ? '6' : (char) 17) != '6') {
            string = AppsFlyerProperties.getInstance().getString(str);
        } else {
            string = AppsFlyerProperties.getInstance().getString(str);
            super.hashCode();
        }
        int i2 = setUserEmails + 27;
        setCustomerIdAndLogSession = i2 % 128;
        if ((i2 % 2 != 0 ? (char) 3 : (char) 4) != 4) {
            int length = objArr.length;
            return string;
        }
        return string;
    }

    public static String valueOf(SimpleDateFormat simpleDateFormat, long j) {
        simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
        String format = simpleDateFormat.format(new Date(j));
        int i = setCustomerIdAndLogSession + 37;
        setUserEmails = i % 128;
        if ((i % 2 == 0 ? 'T' : Typography.less) != 'T') {
            return format;
        }
        int i2 = 12 / 0;
        return format;
    }

    static ScheduledExecutorService valueOf(ah ahVar, ScheduledExecutorService scheduledExecutorService) {
        int i = setUserEmails;
        int i2 = i + 63;
        setCustomerIdAndLogSession = i2 % 128;
        int i3 = i2 % 2;
        ahVar.onAttributionFailure = scheduledExecutorService;
        int i4 = i + 37;
        setCustomerIdAndLogSession = i4 % 128;
        int i5 = i4 % 2;
        return scheduledExecutorService;
    }

    private void valueOf(Context context, bx bxVar) {
        cf init2;
        cb AFInAppEventParameterName2;
        int i = setCustomerIdAndLogSession + 89;
        setUserEmails = i % 128;
        if (!(i % 2 != 0)) {
            this.waitForCustomerUserId.AFInAppEventType = context.getApplicationContext();
            init2 = AFInAppEventType().init();
            AFInAppEventParameterName2 = k.AFInAppEventParameterName(context);
            int i2 = 21 / 0;
        } else {
            this.waitForCustomerUserId.AFInAppEventType = context.getApplicationContext();
            init2 = AFInAppEventType().init();
            AFInAppEventParameterName2 = k.AFInAppEventParameterName(context);
        }
        init2.AFInAppEventType();
        int i3 = setUserEmails + 125;
        setCustomerIdAndLogSession = i3 % 128;
        int i4 = i3 % 2;
    }

    private static void valueOf(Context context, Map<String, Object> map) {
        b.e AFInAppEventParameterName2;
        int i = setUserEmails + 55;
        setCustomerIdAndLogSession = i % 128;
        if (i % 2 != 0) {
            AFInAppEventParameterName2 = b.c.AFInAppEventType.AFInAppEventParameterName(context);
            map.put("btl", Float.toString(AFInAppEventParameterName2.AFKeystoreWrapper));
            String str = AFInAppEventParameterName2.AFInAppEventType;
            Object[] objArr = null;
            int length = objArr.length;
        } else {
            AFInAppEventParameterName2 = b.c.AFInAppEventType.AFInAppEventParameterName(context);
            map.put("btl", Float.toString(AFInAppEventParameterName2.AFKeystoreWrapper));
        }
    }

    @SuppressLint({"CommitPrefEdits"})
    private static void valueOf(SharedPreferences.Editor editor) {
        int i = setUserEmails + 41;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        editor.apply();
        int i3 = setCustomerIdAndLogSession + 7;
        setUserEmails = i3 % 128;
        if (i3 % 2 != 0) {
            return;
        }
        Object[] objArr = null;
        int length = objArr.length;
    }

    private void valueOf(g gVar) {
        boolean z;
        int i = setUserEmails;
        int i2 = i + 55;
        setCustomerIdAndLogSession = i2 % 128;
        int i3 = i2 % 2;
        if ((gVar.getLevel == null ? '-' : '(') != '(') {
            z = true;
        } else {
            int i4 = i + 69;
            setCustomerIdAndLogSession = i4 % 128;
            int i5 = i4 % 2;
            z = false;
        }
        if (values()) {
            int i6 = setCustomerIdAndLogSession + 49;
            setUserEmails = i6 % 128;
            int i7 = i6 % 2;
            AFLogger.AFInAppEventType("CustomerUserId not set, reporting is disabled", true);
            return;
        }
        if ((z ? 'T' : (char) 24) == 'T') {
            int i8 = setUserEmails + 95;
            setCustomerIdAndLogSession = i8 % 128;
            int i9 = i8 % 2;
            if (!AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.LAUNCH_PROTECT_ENABLED, true)) {
                AFLogger.AFKeystoreWrapper("Allowing multiple launches within a 5 second time window.");
            } else if (AFVersionDeclaration()) {
                AppsFlyerRequestListener appsFlyerRequestListener = gVar.AFInAppEventParameterName;
                if (appsFlyerRequestListener != null) {
                    appsFlyerRequestListener.onError(RequestError.EVENT_TIMEOUT, bc.values);
                    return;
                }
                return;
            }
            this.onConversionDataSuccess = System.currentTimeMillis();
        }
        if (m.AFInAppEventType == null) {
            m.AFInAppEventType = new m();
        }
        AFKeystoreWrapper(m.AFInAppEventType.values(), new a(this, gVar, (byte) 0), 0L, TimeUnit.MILLISECONDS);
    }

    private void valueOf(Map<String, Object> map) {
        boolean z;
        int i = setCustomerIdAndLogSession + 7;
        setUserEmails = i % 128;
        boolean z2 = false;
        if (i % 2 == 0) {
        }
        if ((!z ? (char) 15 : 'A') != 15) {
            return;
        }
        if (map.get("advertiserId") != null) {
            try {
                if (!TextUtils.isEmpty(this.AFVersionDeclaration)) {
                    z2 = true;
                }
                if (!z2 && map.remove("android_id") != null) {
                    AFLogger.AFKeystoreWrapper("validateGaidAndIMEI :: removing: android_id");
                }
                if (TextUtils.isEmpty(this.AppsFlyer2dXConversionCallback) && map.remove("imei") != null) {
                    int i2 = setCustomerIdAndLogSession + 69;
                    setUserEmails = i2 % 128;
                    int i3 = i2 % 2;
                    AFLogger.AFKeystoreWrapper("validateGaidAndIMEI :: removing: imei");
                }
                int i4 = setUserEmails + 77;
                setCustomerIdAndLogSession = i4 % 128;
                int i5 = i4 % 2;
            } catch (Exception e2) {
                AFLogger.AFKeystoreWrapper("failed to remove IMEI or AndroidID key from params; ", e2);
            }
        }
    }

    public static boolean valueOf(@NonNull SharedPreferences sharedPreferences) {
        int i = setUserEmails + 89;
        setCustomerIdAndLogSession = i % 128;
        char c = i % 2 != 0 ? (char) 11 : '4';
        Object obj = null;
        boolean parseBoolean = Boolean.parseBoolean(sharedPreferences.getString("sentSuccessfully", null));
        if (c == 11) {
            super.hashCode();
        }
        return parseBoolean;
    }

    private int values(SharedPreferences sharedPreferences) {
        int i = setUserEmails + 7;
        setCustomerIdAndLogSession = i % 128;
        return !(i % 2 != 0 ? true : false) ? values(sharedPreferences, "appsFlyerAdRevenueCount", true) : values(sharedPreferences, "appsFlyerAdRevenueCount", false);
    }

    private static int values(SharedPreferences sharedPreferences, String str, boolean z) {
        int i = sharedPreferences.getInt(str, 0);
        if (z) {
            int i2 = setUserEmails + 87;
            setCustomerIdAndLogSession = i2 % 128;
            i = i2 % 2 != 0 ? i + 127 : i + 1;
            SharedPreferences.Editor edit = sharedPreferences.edit();
            edit.putInt(str, i);
            valueOf(edit);
        }
        if ((am.AFKeystoreWrapper().getLevel() ? (char) 22 : '9') == 22) {
            int i3 = setCustomerIdAndLogSession + 17;
            setUserEmails = i3 % 128;
            int i4 = i3 % 2;
            am.AFKeystoreWrapper().AFKeystoreWrapper(String.valueOf(i));
            int i5 = setCustomerIdAndLogSession + 73;
            setUserEmails = i5 % 128;
            int i6 = i5 % 2;
        }
        return i;
    }

    private int values(SharedPreferences sharedPreferences, boolean z) {
        int i = setCustomerIdAndLogSession + 39;
        setUserEmails = i % 128;
        char c = i % 2 == 0 ? '#' : '4';
        int values2 = values(sharedPreferences, "appsFlyerInAppEventCount", z);
        if (c != '4') {
            int i2 = 6 / 0;
        }
        return values2;
    }

    private as.d values(final Map<String, String> map) {
        as.d dVar = new as.d() {
            @Override
            public final void AFInAppEventParameterName(String str) {
                aq.AFInAppEventParameterName(str, DeepLinkResult.Error.NETWORK);
            }

            @Override
            public final void values(Map<String, String> map2) {
                for (String str : map2.keySet()) {
                    map.put(str, map2.get(str));
                }
                aq.AFKeystoreWrapper(map);
            }
        };
        int i = setCustomerIdAndLogSession + 5;
        setUserEmails = i % 128;
        int i2 = i % 2;
        return dVar;
    }

    private static String values(@Nullable String str) {
        if (str == null) {
            int i = setCustomerIdAndLogSession + 43;
            setUserEmails = i % 128;
            boolean z = i % 2 == 0;
            Object obj = null;
            if (!z) {
                return null;
            }
            super.hashCode();
            return null;
        } else if (str.matches("fb\\d*?://authorize.*") && str.contains("access_token")) {
            String AFInAppEventParameterName2 = AFInAppEventParameterName(str);
            if (AFInAppEventParameterName2.length() == 0) {
                int i2 = setCustomerIdAndLogSession + 113;
                setUserEmails = i2 % 128;
                int i3 = i2 % 2;
                return str;
            }
            ArrayList arrayList = new ArrayList();
            if (AFInAppEventParameterName2.contains("&")) {
                arrayList = new ArrayList(Arrays.asList(AFInAppEventParameterName2.split("&")));
            } else {
                arrayList.add(AFInAppEventParameterName2);
            }
            StringBuilder sb = new StringBuilder();
            Iterator it = arrayList.iterator();
            while (it.hasNext()) {
                String str2 = (String) it.next();
                if (str2.contains("access_token")) {
                    int i4 = setCustomerIdAndLogSession + 47;
                    setUserEmails = i4 % 128;
                    int i5 = i4 % 2;
                    it.remove();
                } else {
                    if ((sb.length() != 0 ? (char) 16 : (char) 18) == 16) {
                        sb.append("&");
                    } else if (!str2.startsWith("?")) {
                        sb.append("?");
                    }
                    sb.append(str2);
                    int i6 = setUserEmails + 41;
                    setCustomerIdAndLogSession = i6 % 128;
                    int i7 = i6 % 2;
                }
            }
            return str.replace(AFInAppEventParameterName2, sb.toString());
        } else {
            return str;
        }
    }

    private String values(SimpleDateFormat simpleDateFormat, Context context) {
        String string;
        int i = setUserEmails + 121;
        setCustomerIdAndLogSession = i % 128;
        Object obj = null;
        if (!(i % 2 != 0)) {
            string = valueOf(context).getString("appsFlyerFirstInstall", null);
        } else {
            string = valueOf(context).getString("appsFlyerFirstInstall", null);
            super.hashCode();
        }
    }

    static Map values(ah ahVar) {
        int i = setUserEmails + 87;
        setCustomerIdAndLogSession = i % 128;
        char c = i % 2 != 0 ? '[' : 'J';
        Object obj = null;
        Map<String, Object> map = ahVar.stop;
        if (c == '[') {
            super.hashCode();
        }
        int i2 = setCustomerIdAndLogSession + 109;
        setUserEmails = i2 % 128;
        if (!(i2 % 2 != 0)) {
            super.hashCode();
            return map;
        }
        return map;
    }

    public static void values(Context context, String str) {
        int i = setCustomerIdAndLogSession + 9;
        setUserEmails = i % 128;
        int i2 = i % 2;
        SharedPreferences.Editor edit = valueOf(context).edit();
        edit.putBoolean(str, true);
        valueOf(edit);
        int i3 = setUserEmails + 125;
        setCustomerIdAndLogSession = i3 % 128;
        if ((i3 % 2 != 0 ? (char) 11 : 'c') != 'c') {
            int i4 = 54 / 0;
        }
    }

    private static void values(Context context, Map<String, Object> map, String str) {
        int i = setUserEmails + 1;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        SharedPreferences valueOf2 = valueOf(context);
        SharedPreferences.Editor edit = valueOf2.edit();
        Object[] objArr = null;
        try {
            String string = valueOf2.getString("prev_event_name", null);
            if (string != null) {
                JSONObject jSONObject = new JSONObject();
                jSONObject.put("prev_event_timestamp", valueOf2.getLong("prev_event_timestamp", -1L));
                jSONObject.put("prev_event_name", string);
                map.put("prev_event", jSONObject);
            }
            edit.putString("prev_event_name", str);
            edit.putLong("prev_event_timestamp", System.currentTimeMillis());
            valueOf(edit);
            int i3 = setCustomerIdAndLogSession + 81;
            setUserEmails = i3 % 128;
            if (i3 % 2 != 0) {
                return;
            }
            int length = objArr.length;
        } catch (Exception e2) {
            AFLogger.AFKeystoreWrapper("Error while processing previous event.", e2);
        }
    }

    private void values(g gVar) {
        Application application = gVar.AFInAppEventType;
        String format = String.format(onAttributionFailureNative, AppsFlyerLib.getInstance().getHostPrefix(), valueOf().getHostName());
        StringBuilder sb = new StringBuilder();
        sb.append(format);
        sb.append(application.getPackageName());
        String obj = sb.toString();
        SharedPreferences valueOf2 = valueOf(application);
        int valueOf3 = valueOf(valueOf2, false);
        int values2 = values(valueOf2);
        HashMap hashMap = new HashMap();
        hashMap.put("ad_network", gVar.values);
        hashMap.put("adrevenue_counter", Integer.valueOf(values2));
        String devKey = AppsFlyerProperties.getInstance().getDevKey();
        hashMap.put("af_key", devKey);
        hashMap.put("launch_counter", Integer.valueOf(valueOf3));
        hashMap.put(AFInAppEventType((SystemClock.uptimeMillis() > 0L ? 1 : (SystemClock.uptimeMillis() == 0L ? 0 : -1)) + 11, Process.myTid() >> 22, (char) ((ViewConfiguration.getFadingEdgeLength() >> 16) + 30266)).intern(), Long.toString(new Date().getTime()));
        hashMap.put("uid", al.AFKeystoreWrapper(new WeakReference(application)));
        String string = AppsFlyerProperties.getInstance().getString("advertiserId");
        String string2 = AppsFlyerProperties.getInstance().getString("advertiserIdEnabled");
        if (!(string2 == null)) {
            hashMap.put("advertiserIdEnabled", string2);
        }
        if (string != null) {
            int i = setUserEmails + 41;
            setCustomerIdAndLogSession = i % 128;
            int i2 = i % 2;
            hashMap.put("advertiserId", string);
        }
        hashMap.put(Constants.SCOPE_DEVICE, Build.DEVICE);
        AFInAppEventType(application, hashMap);
        try {
            PackageInfo packageInfo = application.getPackageManager().getPackageInfo(application.getPackageName(), 0);
            hashMap.put("app_version_code", Integer.toString(packageInfo.versionCode));
            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
            hashMap.put("install_date", valueOf(simpleDateFormat, packageInfo.firstInstallTime));
            String string3 = valueOf2.getString("appsFlyerFirstInstall", null);
            if (string3 == null) {
                string3 = values(simpleDateFormat, application);
            }
            hashMap.put("first_launch_date", string3);
        } catch (Throwable th) {
            AFLogger.AFKeystoreWrapper("AdRevenue - Exception while collecting app version data ", th);
        }
        g valueOf4 = gVar.AFKeystoreWrapper(obj).valueOf(hashMap);
        valueOf4.onAppOpenAttributionNative = valueOf3;
        valueOf4.AFLogger$LogLevel = devKey;
        e eVar = new e(this, valueOf4, (byte) 0);
        if (m.AFInAppEventType == null) {
            m.AFInAppEventType = new m();
            int i3 = setUserEmails + 21;
            setCustomerIdAndLogSession = i3 % 128;
            int i4 = i3 % 2;
        }
        AFKeystoreWrapper(m.AFInAppEventType.values(), eVar, 1L, TimeUnit.MILLISECONDS);
    }

    private static void values(String str, boolean z) {
        int i = setUserEmails + 29;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        AppsFlyerProperties.getInstance().set(str, z);
        int i3 = setCustomerIdAndLogSession + 55;
        setUserEmails = i3 % 128;
        int i4 = i3 % 2;
    }

    private static void values(Map<String, Object> map, cf cfVar) {
        HashMap hashMap = new HashMap(cfVar.AFInAppEventParameterName);
        cfVar.AFInAppEventParameterName.clear();
        cfVar.valueOf.valueOf("gcd");
        if ((!hashMap.isEmpty() ? '\n' : 'P') != 'P') {
            int i = setUserEmails + 91;
            setCustomerIdAndLogSession = i % 128;
            if ((i % 2 != 0 ? 'R' : ' ') != ' ') {
                AFKeystoreWrapper(map).put("gcd", hashMap);
                int i2 = 44 / 0;
            } else {
                AFKeystoreWrapper(map).put("gcd", hashMap);
            }
        }
        int i3 = setUserEmails + 33;
        setCustomerIdAndLogSession = i3 % 128;
        int i4 = i3 % 2;
    }

    public final ct[] AFInAppEventParameterName() {
        ct[] ctVarArr;
        int i = setUserEmails;
        int i2 = i + 121;
        setCustomerIdAndLogSession = i2 % 128;
        if ((i2 % 2 != 0 ? '?' : 'b') != '?') {
            ctVarArr = this.setAndroidIdData;
        } else {
            ctVarArr = this.setAndroidIdData;
            Object[] objArr = null;
            int length = objArr.length;
        }
        int i3 = i + 55;
        setCustomerIdAndLogSession = i3 % 128;
        int i4 = i3 % 2;
        return ctVarArr;
    }

    public final bd AFInAppEventType() {
        int i = setCustomerIdAndLogSession + 5;
        setUserEmails = i % 128;
        if (i % 2 == 0) {
            int i2 = 48 / 0;
            return this.waitForCustomerUserId;
        }
        return this.waitForCustomerUserId;
    }

    public final Map<String, Object> AFInAppEventType(g gVar) {
        String str;
        String str2;
        AppsFlyerProperties appsFlyerProperties;
        ax axVar;
        cf cfVar;
        String str3;
        SharedPreferences sharedPreferences;
        AppsFlyerProperties appsFlyerProperties2;
        cf cfVar2;
        String str4;
        h valueOf2;
        SharedPreferences sharedPreferences2;
        boolean z;
        long availableBlocks;
        long blockCount;
        k kVar;
        Object obj;
        int i;
        int i2;
        cf cfVar3;
        Object AFKeystoreWrapper2;
        Context context = gVar.AFInAppEventType;
        String str5 = gVar.AFLogger$LogLevel;
        String str6 = gVar.getLevel;
        Map map = gVar.values;
        if (map == null) {
            map = new HashMap();
        }
        Object jSONObject = new JSONObject(map).toString();
        String str7 = gVar.init;
        SharedPreferences valueOf3 = valueOf(context);
        boolean AFInAppEventType2 = gVar.AFInAppEventType();
        Object obj2 = gVar.AFKeystoreWrapper;
        Map<String, Object> map2 = gVar.valueOf;
        z.valueOf(context, map2);
        Boolean bool = z.values;
        if (bool == null || bool.booleanValue()) {
            str = "Exception while collecting facebook's attribution ID. ";
            str2 = AppsFlyerProperties.APP_ID;
        } else {
            Map<String, Object> AFKeystoreWrapper3 = AFKeystoreWrapper(map2);
            str = "Exception while collecting facebook's attribution ID. ";
            Boolean valueOf4 = Boolean.valueOf(!bool.booleanValue());
            str2 = AppsFlyerProperties.APP_ID;
            AFKeystoreWrapper3.put("ad_ids_disabled", valueOf4);
        }
        long time = new Date().getTime();
        map2.put(AFInAppEventType(12 - (ViewConfiguration.getDoubleTapTimeout() >> 16), (AudioTrack.getMinVolume() > com.google.firebase.perf.util.Constants.MIN_SAMPLING_RATE ? 1 : (AudioTrack.getMinVolume() == com.google.firebase.perf.util.Constants.MIN_SAMPLING_RATE ? 0 : -1)), (char) ((ViewConfiguration.getScrollFriction() > com.google.firebase.perf.util.Constants.MIN_SAMPLING_RATE ? 1 : (ViewConfiguration.getScrollFriction() == com.google.firebase.perf.util.Constants.MIN_SAMPLING_RATE ? 0 : -1)) + 30265)).intern(), Long.toString(time));
        Object values2 = c.values(context, time);
        if (values2 != null) {
            map2.put("cksm_v1", values2);
        }
        try {
            if (isStopped()) {
                AFLogger.AFKeystoreWrapper("Reporting has been stopped");
            } else {
                StringBuilder sb = new StringBuilder("******* sendTrackingWithEvent: ");
                sb.append(AFInAppEventType2 ? "Launch" : str6);
                AFLogger.AFKeystoreWrapper(sb.toString());
            }
            ai.AFKeystoreWrapper();
            try {
                if (!ai.valueOf(context).exists()) {
                    ai.valueOf(context).mkdir();
                }
            } catch (Exception e2) {
                AFLogger.AFKeystoreWrapper("Could not create cache directory", e2);
            }
            try {
                List asList = Arrays.asList(context.getPackageManager().getPackageInfo(context.getPackageName(), 4096).requestedPermissions);
                if (!asList.contains("android.permission.INTERNET")) {
                    AFLogger.AppsFlyer2dXConversionCallback("Permission android.permission.INTERNET is missing in the AndroidManifest.xml");
                }
                if (!asList.contains("android.permission.ACCESS_NETWORK_STATE")) {
                    AFLogger.AppsFlyer2dXConversionCallback("Permission android.permission.ACCESS_NETWORK_STATE is missing in the AndroidManifest.xml");
                }
                if (!asList.contains("android.permission.ACCESS_WIFI_STATE")) {
                    AFLogger.AppsFlyer2dXConversionCallback("Permission android.permission.ACCESS_WIFI_STATE is missing in the AndroidManifest.xml");
                }
            } catch (Exception e3) {
                AFLogger.AFKeystoreWrapper("Exception while validation permissions. ", e3);
            }
            map2.put("af_events_api", AFInAppEventType((SystemClock.currentThreadTimeMillis() > (-1L) ? 1 : (SystemClock.currentThreadTimeMillis() == (-1L) ? 0 : -1)), 12 - (ViewConfiguration.getPressedStateDuration() >> 16), (char) ((ViewConfiguration.getLongPressTimeout() >> 16) + 60917)).intern());
            map2.put(AFInAppEventType(TextUtils.indexOf("", "") + 5, TextUtils.indexOf("", "") + 13, (char) (ViewConfiguration.getScrollBarSize() >> 8)).intern(), Build.BRAND);
            map2.put(Constants.SCOPE_DEVICE, Build.DEVICE);
            map2.put("product", Build.PRODUCT);
            int i3 = Build.VERSION.SDK_INT;
            map2.put(ConnectionAnalyticEventStep.SDK_STEP_NAME, Integer.toString(i3));
            map2.put("model", Build.MODEL);
            map2.put("deviceType", Build.TYPE);
            AFInAppEventType(context, map2);
            appsFlyerProperties = AppsFlyerProperties.getInstance();
            ax axVar2 = new ax(context);
            cf init2 = AFInAppEventType().init();
            if (AFInAppEventType2) {
                if (AFInAppEventParameterName(context)) {
                    if (appsFlyerProperties.isOtherSdkStringDisabled()) {
                        axVar = axVar2;
                    } else {
                        axVar = axVar2;
                        map2.put("batteryLevel", String.valueOf(onResponseNative(context)));
                    }
                    AFLogger$LogLevel(context);
                    UiModeManager uiModeManager = i3 >= 23 ? (UiModeManager) context.getSystemService(UiModeManager.class) : (UiModeManager) context.getSystemService("uimode");
                    if (uiModeManager != null && uiModeManager.getCurrentModeType() == 4) {
                        map2.put("tv", Boolean.TRUE);
                    }
                    if (ca.AFInAppEventType(context)) {
                        map2.put("inst_app", Boolean.TRUE);
                    }
                } else {
                    axVar = axVar2;
                }
                map2.put("timepassedsincelastlaunch", Long.toString(onConversionDataFail(context)));
                AFInAppEventParameterName(map2);
                values(map2, init2);
                Object obj3 = this.setOaidData;
                if (obj3 != null) {
                    map2.put("phone", obj3);
                }
                if (!TextUtils.isEmpty(str7)) {
                    map2.put("referrer", str7);
                }
                Object string = valueOf3.getString("extraReferrers", null);
                if (string != null) {
                    map2.put("extraReferrers", string);
                }
                String referrer = appsFlyerProperties.getReferrer(context);
                if (!TextUtils.isEmpty(referrer) && map2.get("referrer") == null) {
                    map2.put("referrer", referrer);
                }
                long j = init2.onInstallConversionDataLoadedNative;
                cfVar = init2;
                if (j != 0) {
                    map2.put("prev_session_dur", Long.valueOf(j));
                }
                Application application = bb.AFInAppEventType;
                map2.put("exception_number", Long.valueOf(application != null ? valueOf(application).getLong("exception_number", 0L) : -1L));
                ba baVar = this.setCustomerUserId;
                if (baVar != null) {
                    if (!baVar.values.isEmpty()) {
                        map2.put("partner_data", baVar.values);
                    }
                    if (!baVar.AFInAppEventType.isEmpty()) {
                        AFKeystoreWrapper(map2).put("partner_data", baVar.AFInAppEventType);
                        baVar.AFInAppEventType = new HashMap();
                    }
                }
            } else {
                axVar = axVar2;
                cfVar = init2;
                values(context, map2, str6);
            }
            Object valueOf5 = valueOf("KSAppsFlyerId");
            String valueOf6 = valueOf("KSAppsFlyerRICounter");
            if (valueOf5 != null && valueOf6 != null && Integer.valueOf(valueOf6).intValue() > 0) {
                map2.put("reinstallCounter", valueOf6);
                map2.put("originalAppsflyerId", valueOf5);
            }
            Object valueOf7 = valueOf(AppsFlyerProperties.ADDITIONAL_CUSTOM_DATA);
            if (valueOf7 != null) {
                map2.put("customData", valueOf7);
            }
            try {
                String installerPackageName = context.getPackageManager().getInstallerPackageName(context.getPackageName());
                if (installerPackageName != null) {
                    map2.put("installer_package", installerPackageName);
                }
            } catch (Exception e4) {
                AFLogger.AFKeystoreWrapper("Exception while getting the app's installer package. ", e4);
            }
            String string2 = appsFlyerProperties.getString(AppsFlyerProperties.EXTENSION);
            if (string2 != null && string2.length() > 0) {
                map2.put(AppsFlyerProperties.EXTENSION, string2);
            }
            String values3 = values(context);
            String valueOf8 = valueOf(context, values3);
            if ((valueOf8 != null && !valueOf8.equals(values3)) || (valueOf8 == null && values3 != null)) {
                map2.put("af_latestchannel", values3);
            }
            String onAppOpenAttributionNative2 = onAppOpenAttributionNative(context);
            if (onAppOpenAttributionNative2 != null) {
                map2.put("af_installstore", onAppOpenAttributionNative2.toLowerCase());
            }
            String onInstallConversionDataLoadedNative2 = onInstallConversionDataLoadedNative(context);
            if (onInstallConversionDataLoadedNative2 != null) {
                map2.put("af_preinstall_name", onInstallConversionDataLoadedNative2.toLowerCase());
            }
            String onDeepLinkingNative2 = onDeepLinkingNative(context);
            if (onDeepLinkingNative2 != null) {
                map2.put("af_currentstore", onDeepLinkingNative2.toLowerCase());
            }
            if (str5 == null || str5.length() <= 0) {
                String devKey = AppsFlyerProperties.getInstance().getDevKey();
                if (devKey == null || devKey.length() <= 0) {
                    AFLogger.AFKeystoreWrapper("AppsFlyer dev key is missing!!! Please use  AppsFlyerLib.getInstance().setAppsFlyerKey(...) to set it. ");
                    AFLogger.AFKeystoreWrapper("AppsFlyer will not track this event.");
                    return null;
                }
                map2.put("appsflyerKey", devKey);
            } else {
                map2.put("appsflyerKey", str5);
            }
            Object AFKeystoreWrapper4 = AFKeystoreWrapper();
            if (AFKeystoreWrapper4 != null) {
                map2.put("appUserId", AFKeystoreWrapper4);
            }
            Object string3 = appsFlyerProperties.getString(AppsFlyerProperties.USER_EMAILS);
            if (string3 != null) {
                map2.put("user_emails", string3);
            } else {
                String valueOf9 = valueOf(AppsFlyerProperties.USER_EMAIL);
                if (valueOf9 != null) {
                    map2.put("sha1_el", ae.AFKeystoreWrapper(valueOf9));
                }
            }
            if (str6 != null) {
                map2.put("eventName", str6);
                map2.put("eventValue", jSONObject);
            }
            if (AppsFlyer2dXConversionCallback() != null) {
                map2.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.AppsFlyer2dXConversionCallback(sb2.toString());
                }
                map2.put("currency", valueOf10);
            }
            Object valueOf11 = valueOf(AppsFlyerProperties.IS_UPDATE);
            if (valueOf11 != null) {
                map2.put("isUpdate", valueOf11);
            }
            map2.put("af_preinstalled", Boolean.toString(isPreInstalledApp(context)));
            if (appsFlyerProperties.getBoolean(AppsFlyerProperties.COLLECT_FACEBOOK_ATTR_ID, true)) {
                try {
                    context.getPackageManager().getApplicationInfo("com.facebook.katana", 0);
                    str3 = getAttributionId(context);
                } catch (PackageManager.NameNotFoundException unused) {
                    AFLogger.AppsFlyer2dXConversionCallback(str);
                    str3 = null;
                    if (str3 != null) {
                    }
                    AFInAppEventParameterName(context, map2);
                    AFKeystoreWrapper2 = al.AFKeystoreWrapper(new WeakReference(context));
                    if (AFKeystoreWrapper2 != null) {
                    }
                    map2.put("lang", Locale.getDefault().getDisplayLanguage());
                    map2.put("lang_code", Locale.getDefault().getLanguage());
                    map2.put("country", Locale.getDefault().getCountry());
                    map2.put("platformextension", this.onValidateInApp.AFKeystoreWrapper());
                    AFKeystoreWrapper(context, map2);
                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
                    map2.put("installDate", valueOf(simpleDateFormat, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
                    PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                    i = valueOf3.getInt("versionCode", 0);
                    i2 = packageInfo.versionCode;
                    if (i2 > i) {
                    }
                    map2.put("app_version_code", Integer.toString(packageInfo.versionCode));
                    map2.put(MoEConstants.GENERIC_PARAM_V2_KEY_APP_VERSION_NAME, packageInfo.versionName);
                    cfVar3 = cfVar;
                    try {
                        long j2 = packageInfo.firstInstallTime;
                        str4 = str6;
                        long j3 = packageInfo.lastUpdateTime;
                        cfVar2 = cfVar3;
                        try {
                            appsFlyerProperties2 = appsFlyerProperties;
                            try {
                                Locale locale = Locale.US;
                                sharedPreferences = valueOf3;
                                try {
                                    map2.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", locale).format(new Date(j2)));
                                    map2.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", locale).format(new Date(j3)));
                                    map2.put(AFInAppEventType(KeyEvent.normalizeMetaState(0) + 15, 18 - TextUtils.indexOf("", ""), (char) (2096 - (ViewConfiguration.getKeyRepeatTimeout() >> 16))).intern(), values(simpleDateFormat, context));
                                } catch (Throwable th) {
                                    th = th;
                                    AFLogger.AFKeystoreWrapper("Exception while collecting app version data ", th);
                                    this.getInstance = bt.AFInAppEventParameterName(context);
                                    StringBuilder sb3 = new StringBuilder("didConfigureTokenRefreshService=");
                                    sb3.append(this.getInstance);
                                    AFLogger.values(sb3.toString());
                                    if (!this.getInstance) {
                                    }
                                    if (AFInAppEventType2) {
                                    }
                                    if (!AFInAppEventType2) {
                                    }
                                    if (valueOf("advertiserId") == null) {
                                    }
                                    valueOf2 = z.valueOf(context.getContentResolver());
                                    if (valueOf2 != null) {
                                    }
                                    map2.put("registeredUninstall", Boolean.valueOf(bt.valueOf(sharedPreferences)));
                                    sharedPreferences2 = sharedPreferences;
                                    int valueOf12 = valueOf(sharedPreferences2, AFInAppEventType2);
                                    map2.put("counter", Integer.toString(valueOf12));
                                    map2.put("iaecounter", Integer.toString(values(sharedPreferences2, str4 != null)));
                                    if (AFInAppEventType2) {
                                    }
                                    if (valueOf(sharedPreferences2)) {
                                    }
                                    map2.put("isFirstCall", Boolean.toString(z));
                                    AFInAppEventType(context, AFInAppEventType2, map2, valueOf12);
                                    new ae();
                                    map2.put("af_v", ae.AFInAppEventType(map2));
                                    new ae();
                                    map2.put("af_v2", ae.AFInAppEventParameterName(map2));
                                    map2.put("ivc", Boolean.valueOf(onAppOpenAttribution(context)));
                                    if (sharedPreferences2.contains("is_stop_tracking_used")) {
                                    }
                                    HashMap hashMap = new HashMap();
                                    hashMap.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
                                    hashMap.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
                                    map2.put("cell", hashMap);
                                    ax axVar3 = axVar;
                                    map2.put("sig", aa.AFInAppEventParameterName(axVar3.valueOf.getPackageManager(), axVar3.valueOf.getPackageName()));
                                    map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                                    StatFs statFs = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                                    if (Build.VERSION.SDK_INT >= 18) {
                                    }
                                    double pow = Math.pow(2.0d, 20.0d);
                                    StringBuilder sb4 = new StringBuilder();
                                    sb4.append((long) (availableBlocks / pow));
                                    sb4.append("/");
                                    sb4.append((long) (blockCount / pow));
                                    map2.put("disk", sb4.toString());
                                    kVar = this.getLevel;
                                    if (kVar != null) {
                                        map2.put("sharing_filter", obj);
                                    }
                                    return map2;
                                }
                            } catch (Throwable th2) {
                                th = th2;
                                sharedPreferences = valueOf3;
                            }
                        } catch (Throwable th3) {
                            th = th3;
                            sharedPreferences = valueOf3;
                            appsFlyerProperties2 = appsFlyerProperties;
                        }
                    } catch (Throwable th4) {
                        th = th4;
                        sharedPreferences = valueOf3;
                        appsFlyerProperties2 = appsFlyerProperties;
                        str4 = str6;
                    }
                    this.getInstance = bt.AFInAppEventParameterName(context);
                    StringBuilder sb32 = new StringBuilder("didConfigureTokenRefreshService=");
                    sb32.append(this.getInstance);
                    AFLogger.values(sb32.toString());
                    if (!this.getInstance) {
                    }
                    if (AFInAppEventType2) {
                    }
                    if (!AFInAppEventType2) {
                    }
                    if (valueOf("advertiserId") == null) {
                    }
                    valueOf2 = z.valueOf(context.getContentResolver());
                    if (valueOf2 != null) {
                    }
                    map2.put("registeredUninstall", Boolean.valueOf(bt.valueOf(sharedPreferences)));
                    sharedPreferences2 = sharedPreferences;
                    int valueOf122 = valueOf(sharedPreferences2, AFInAppEventType2);
                    map2.put("counter", Integer.toString(valueOf122));
                    map2.put("iaecounter", Integer.toString(values(sharedPreferences2, str4 != null)));
                    if (AFInAppEventType2) {
                    }
                    if (valueOf(sharedPreferences2)) {
                    }
                    map2.put("isFirstCall", Boolean.toString(z));
                    AFInAppEventType(context, AFInAppEventType2, map2, valueOf122);
                    new ae();
                    map2.put("af_v", ae.AFInAppEventType(map2));
                    new ae();
                    map2.put("af_v2", ae.AFInAppEventParameterName(map2));
                    map2.put("ivc", Boolean.valueOf(onAppOpenAttribution(context)));
                    if (sharedPreferences2.contains("is_stop_tracking_used")) {
                    }
                    HashMap hashMap2 = new HashMap();
                    hashMap2.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
                    hashMap2.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
                    map2.put("cell", hashMap2);
                    ax axVar32 = axVar;
                    map2.put("sig", aa.AFInAppEventParameterName(axVar32.valueOf.getPackageManager(), axVar32.valueOf.getPackageName()));
                    map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                    StatFs statFs2 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                    if (Build.VERSION.SDK_INT >= 18) {
                    }
                    double pow2 = Math.pow(2.0d, 20.0d);
                    StringBuilder sb42 = new StringBuilder();
                    sb42.append((long) (availableBlocks / pow2));
                    sb42.append("/");
                    sb42.append((long) (blockCount / pow2));
                    map2.put("disk", sb42.toString());
                    kVar = this.getLevel;
                    if (kVar != null) {
                    }
                    return map2;
                } catch (Throwable th5) {
                    AFLogger.AFKeystoreWrapper(str, th5);
                    str3 = null;
                    if (str3 != null) {
                    }
                    AFInAppEventParameterName(context, map2);
                    AFKeystoreWrapper2 = al.AFKeystoreWrapper(new WeakReference(context));
                    if (AFKeystoreWrapper2 != null) {
                    }
                    map2.put("lang", Locale.getDefault().getDisplayLanguage());
                    map2.put("lang_code", Locale.getDefault().getLanguage());
                    map2.put("country", Locale.getDefault().getCountry());
                    map2.put("platformextension", this.onValidateInApp.AFKeystoreWrapper());
                    AFKeystoreWrapper(context, map2);
                    SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
                    map2.put("installDate", valueOf(simpleDateFormat2, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
                    PackageInfo packageInfo2 = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                    i = valueOf3.getInt("versionCode", 0);
                    i2 = packageInfo2.versionCode;
                    if (i2 > i) {
                    }
                    map2.put("app_version_code", Integer.toString(packageInfo2.versionCode));
                    map2.put(MoEConstants.GENERIC_PARAM_V2_KEY_APP_VERSION_NAME, packageInfo2.versionName);
                    cfVar3 = cfVar;
                    long j22 = packageInfo2.firstInstallTime;
                    str4 = str6;
                    long j32 = packageInfo2.lastUpdateTime;
                    cfVar2 = cfVar3;
                    appsFlyerProperties2 = appsFlyerProperties;
                    Locale locale2 = Locale.US;
                    sharedPreferences = valueOf3;
                    map2.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", locale2).format(new Date(j22)));
                    map2.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", locale2).format(new Date(j32)));
                    map2.put(AFInAppEventType(KeyEvent.normalizeMetaState(0) + 15, 18 - TextUtils.indexOf("", ""), (char) (2096 - (ViewConfiguration.getKeyRepeatTimeout() >> 16))).intern(), values(simpleDateFormat2, context));
                    this.getInstance = bt.AFInAppEventParameterName(context);
                    StringBuilder sb322 = new StringBuilder("didConfigureTokenRefreshService=");
                    sb322.append(this.getInstance);
                    AFLogger.values(sb322.toString());
                    if (!this.getInstance) {
                    }
                    if (AFInAppEventType2) {
                    }
                    if (!AFInAppEventType2) {
                    }
                    if (valueOf("advertiserId") == null) {
                    }
                    valueOf2 = z.valueOf(context.getContentResolver());
                    if (valueOf2 != null) {
                    }
                    map2.put("registeredUninstall", Boolean.valueOf(bt.valueOf(sharedPreferences)));
                    sharedPreferences2 = sharedPreferences;
                    int valueOf1222 = valueOf(sharedPreferences2, AFInAppEventType2);
                    map2.put("counter", Integer.toString(valueOf1222));
                    map2.put("iaecounter", Integer.toString(values(sharedPreferences2, str4 != null)));
                    if (AFInAppEventType2) {
                    }
                    if (valueOf(sharedPreferences2)) {
                    }
                    map2.put("isFirstCall", Boolean.toString(z));
                    AFInAppEventType(context, AFInAppEventType2, map2, valueOf1222);
                    new ae();
                    map2.put("af_v", ae.AFInAppEventType(map2));
                    new ae();
                    map2.put("af_v2", ae.AFInAppEventParameterName(map2));
                    map2.put("ivc", Boolean.valueOf(onAppOpenAttribution(context)));
                    if (sharedPreferences2.contains("is_stop_tracking_used")) {
                    }
                    HashMap hashMap22 = new HashMap();
                    hashMap22.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
                    hashMap22.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
                    map2.put("cell", hashMap22);
                    ax axVar322 = axVar;
                    map2.put("sig", aa.AFInAppEventParameterName(axVar322.valueOf.getPackageManager(), axVar322.valueOf.getPackageName()));
                    map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
                    StatFs statFs22 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
                    if (Build.VERSION.SDK_INT >= 18) {
                    }
                    double pow22 = Math.pow(2.0d, 20.0d);
                    StringBuilder sb422 = new StringBuilder();
                    sb422.append((long) (availableBlocks / pow22));
                    sb422.append("/");
                    sb422.append((long) (blockCount / pow22));
                    map2.put("disk", sb422.toString());
                    kVar = this.getLevel;
                    if (kVar != null) {
                    }
                    return map2;
                }
                if (str3 != null) {
                    map2.put("fb", str3);
                }
            }
            AFInAppEventParameterName(context, map2);
            try {
                AFKeystoreWrapper2 = al.AFKeystoreWrapper(new WeakReference(context));
                if (AFKeystoreWrapper2 != null) {
                    map2.put("uid", AFKeystoreWrapper2);
                }
            } catch (Exception e5) {
                StringBuilder sb5 = new StringBuilder("ERROR: could not get uid ");
                sb5.append(e5.getMessage());
                AFLogger.AFKeystoreWrapper(sb5.toString(), e5);
            }
            try {
                map2.put("lang", Locale.getDefault().getDisplayLanguage());
            } catch (Exception e6) {
                AFLogger.AFKeystoreWrapper("Exception while collecting display language name. ", e6);
            }
            try {
                map2.put("lang_code", Locale.getDefault().getLanguage());
            } catch (Exception e7) {
                AFLogger.AFKeystoreWrapper("Exception while collecting display language code. ", e7);
            }
            try {
                map2.put("country", Locale.getDefault().getCountry());
            } catch (Exception e8) {
                AFLogger.AFKeystoreWrapper("Exception while collecting country name. ", e8);
            }
            map2.put("platformextension", this.onValidateInApp.AFKeystoreWrapper());
            AFKeystoreWrapper(context, map2);
            SimpleDateFormat simpleDateFormat22 = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
            try {
                map2.put("installDate", valueOf(simpleDateFormat22, context.getPackageManager().getPackageInfo(context.getPackageName(), 0).firstInstallTime));
            } catch (Exception e9) {
                AFLogger.AFKeystoreWrapper("Exception while collecting install date. ", e9);
            }
            try {
                PackageInfo packageInfo22 = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
                i = valueOf3.getInt("versionCode", 0);
                i2 = packageInfo22.versionCode;
                if (i2 > i) {
                    AFInAppEventType(context, "versionCode", i2);
                }
                map2.put("app_version_code", Integer.toString(packageInfo22.versionCode));
                map2.put(MoEConstants.GENERIC_PARAM_V2_KEY_APP_VERSION_NAME, packageInfo22.versionName);
                cfVar3 = cfVar;
                long j222 = packageInfo22.firstInstallTime;
                str4 = str6;
            } catch (Throwable th6) {
                th = th6;
                sharedPreferences = valueOf3;
                appsFlyerProperties2 = appsFlyerProperties;
                cfVar2 = cfVar;
                str4 = str6;
            }
        } catch (Throwable th7) {
            AFLogger.valueOf(th7.getLocalizedMessage(), th7);
        }
        try {
            long j322 = packageInfo22.lastUpdateTime;
            cfVar2 = cfVar3;
            appsFlyerProperties2 = appsFlyerProperties;
            Locale locale22 = Locale.US;
            sharedPreferences = valueOf3;
            map2.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", locale22).format(new Date(j222)));
            map2.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", locale22).format(new Date(j322)));
            map2.put(AFInAppEventType(KeyEvent.normalizeMetaState(0) + 15, 18 - TextUtils.indexOf("", ""), (char) (2096 - (ViewConfiguration.getKeyRepeatTimeout() >> 16))).intern(), values(simpleDateFormat22, context));
        } catch (Throwable th8) {
            th = th8;
            sharedPreferences = valueOf3;
            appsFlyerProperties2 = appsFlyerProperties;
            cfVar2 = cfVar3;
            AFLogger.AFKeystoreWrapper("Exception while collecting app version data ", th);
            this.getInstance = bt.AFInAppEventParameterName(context);
            StringBuilder sb3222 = new StringBuilder("didConfigureTokenRefreshService=");
            sb3222.append(this.getInstance);
            AFLogger.values(sb3222.toString());
            if (!this.getInstance) {
            }
            if (AFInAppEventType2) {
            }
            if (!AFInAppEventType2) {
            }
            if (valueOf("advertiserId") == null) {
            }
            valueOf2 = z.valueOf(context.getContentResolver());
            if (valueOf2 != null) {
            }
            map2.put("registeredUninstall", Boolean.valueOf(bt.valueOf(sharedPreferences)));
            sharedPreferences2 = sharedPreferences;
            int valueOf12222 = valueOf(sharedPreferences2, AFInAppEventType2);
            map2.put("counter", Integer.toString(valueOf12222));
            map2.put("iaecounter", Integer.toString(values(sharedPreferences2, str4 != null)));
            if (AFInAppEventType2) {
            }
            if (valueOf(sharedPreferences2)) {
            }
            map2.put("isFirstCall", Boolean.toString(z));
            AFInAppEventType(context, AFInAppEventType2, map2, valueOf12222);
            new ae();
            map2.put("af_v", ae.AFInAppEventType(map2));
            new ae();
            map2.put("af_v2", ae.AFInAppEventParameterName(map2));
            map2.put("ivc", Boolean.valueOf(onAppOpenAttribution(context)));
            if (sharedPreferences2.contains("is_stop_tracking_used")) {
            }
            HashMap hashMap222 = new HashMap();
            hashMap222.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
            hashMap222.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
            map2.put("cell", hashMap222);
            ax axVar3222 = axVar;
            map2.put("sig", aa.AFInAppEventParameterName(axVar3222.valueOf.getPackageManager(), axVar3222.valueOf.getPackageName()));
            map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
            StatFs statFs222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
            if (Build.VERSION.SDK_INT >= 18) {
            }
            double pow222 = Math.pow(2.0d, 20.0d);
            StringBuilder sb4222 = new StringBuilder();
            sb4222.append((long) (availableBlocks / pow222));
            sb4222.append("/");
            sb4222.append((long) (blockCount / pow222));
            map2.put("disk", sb4222.toString());
            kVar = this.getLevel;
            if (kVar != null) {
            }
            return map2;
        }
        this.getInstance = bt.AFInAppEventParameterName(context);
        StringBuilder sb32222 = new StringBuilder("didConfigureTokenRefreshService=");
        sb32222.append(this.getInstance);
        AFLogger.values(sb32222.toString());
        if (!this.getInstance) {
            map2.put("tokenRefreshConfigured", Boolean.FALSE);
        }
        if (AFInAppEventType2) {
            if (this.onDeepLinking != null) {
                if (map2.get("af_deeplink") != null) {
                    AFLogger.values("Skip 'af' payload as deeplink was found by path");
                } else {
                    JSONObject jSONObject2 = new JSONObject(this.onDeepLinking);
                    jSONObject2.put("isPush", "true");
                    map2.put("af_deeplink", jSONObject2.toString());
                }
            }
            this.onDeepLinking = null;
            map2.put("open_referrer", obj2);
        }
        if (!AFInAppEventType2) {
            try {
                ac AFInAppEventType3 = ac.AFInAppEventType(context);
                Map<? extends String, ? extends Object> concurrentHashMap = new ConcurrentHashMap<>();
                List<Map<String, Object>> valueOf13 = AFInAppEventType3.valueOf();
                if (valueOf13.isEmpty()) {
                    concurrentHashMap.put("sensors", DwsConstants.NA);
                } else {
                    concurrentHashMap.put("sensors", new j().AFInAppEventParameterName(valueOf13));
                }
                map2.putAll(concurrentHashMap);
            } catch (Exception e10) {
                StringBuilder sb6 = new StringBuilder("Unexpected exception from AFSensorManager: ");
                sb6.append(e10.getMessage());
                AFLogger.AFInAppEventType(sb6.toString());
            }
        }
        if (valueOf("advertiserId") == null) {
            z.valueOf(context, map2);
            map2.put("GAID_retry", String.valueOf(valueOf("advertiserId") != null));
        }
        valueOf2 = z.valueOf(context.getContentResolver());
        if (valueOf2 != null) {
            map2.put("amazon_aid", valueOf2.valueOf);
            map2.put("amazon_aid_limit", String.valueOf(valueOf2.AFInAppEventParameterName));
        }
        map2.put("registeredUninstall", Boolean.valueOf(bt.valueOf(sharedPreferences)));
        sharedPreferences2 = sharedPreferences;
        int valueOf122222 = valueOf(sharedPreferences2, AFInAppEventType2);
        map2.put("counter", Integer.toString(valueOf122222));
        map2.put("iaecounter", Integer.toString(values(sharedPreferences2, str4 != null)));
        if (AFInAppEventType2) {
            Map<String, Object> AFKeystoreWrapper5 = AFKeystoreWrapper(map2);
            AFInAppEventType(AFKeystoreWrapper5);
            if (valueOf122222 != 1) {
                if (valueOf122222 == 2) {
                    cf cfVar4 = cfVar2;
                    HashMap hashMap3 = new HashMap(cfVar4.AFInAppEventType);
                    if (!hashMap3.isEmpty()) {
                        AFKeystoreWrapper5.put("first_launch", hashMap3);
                    }
                    cfVar4.valueOf.valueOf("first_launch");
                }
                z = true;
            } else {
                z = true;
                cf cfVar5 = cfVar2;
                appsFlyerProperties2.values = true;
                if (AFInAppEventParameterName(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false)) {
                    map2.put("wait_cid", Boolean.toString(true));
                }
                HashMap hashMap4 = new HashMap(cfVar5.AFKeystoreWrapper);
                cfVar5.valueOf.valueOf("ddl");
                if (!hashMap4.isEmpty()) {
                    AFKeystoreWrapper5.put("ddl", hashMap4);
                }
                HashMap hashMap5 = new HashMap(cfVar5.AFInAppEventType);
                if (!hashMap5.isEmpty()) {
                    AFKeystoreWrapper5.put("first_launch", hashMap5);
                }
            }
            if (AFKeystoreWrapper5.isEmpty()) {
                map2.remove(MoEConstants.ATTR_SDK_META);
            }
        } else {
            z = true;
        }
        if (valueOf(sharedPreferences2)) {
            z = false;
        }
        map2.put("isFirstCall", Boolean.toString(z));
        AFInAppEventType(context, AFInAppEventType2, map2, valueOf122222);
        new ae();
        map2.put("af_v", ae.AFInAppEventType(map2));
        new ae();
        map2.put("af_v2", ae.AFInAppEventParameterName(map2));
        map2.put("ivc", Boolean.valueOf(onAppOpenAttribution(context)));
        if (sharedPreferences2.contains("is_stop_tracking_used")) {
            map2.put("istu", String.valueOf(sharedPreferences2.getBoolean("is_stop_tracking_used", false)));
        }
        HashMap hashMap2222 = new HashMap();
        hashMap2222.put("mcc", Integer.valueOf(context.getResources().getConfiguration().mcc));
        hashMap2222.put("mnc", Integer.valueOf(context.getResources().getConfiguration().mnc));
        map2.put("cell", hashMap2222);
        ax axVar32222 = axVar;
        map2.put("sig", aa.AFInAppEventParameterName(axVar32222.valueOf.getPackageManager(), axVar32222.valueOf.getPackageName()));
        map2.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
        StatFs statFs2222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
        if (Build.VERSION.SDK_INT >= 18) {
            long blockSizeLong = statFs2222.getBlockSizeLong();
            availableBlocks = statFs2222.getAvailableBlocksLong() * blockSizeLong;
            blockCount = statFs2222.getBlockCountLong() * blockSizeLong;
        } else {
            int blockSize = statFs2222.getBlockSize();
            availableBlocks = statFs2222.getAvailableBlocks() * blockSize;
            blockCount = statFs2222.getBlockCount() * blockSize;
        }
        double pow2222 = Math.pow(2.0d, 20.0d);
        StringBuilder sb42222 = new StringBuilder();
        sb42222.append((long) (availableBlocks / pow2222));
        sb42222.append("/");
        sb42222.append((long) (blockCount / pow2222));
        map2.put("disk", sb42222.toString());
        kVar = this.getLevel;
        if (kVar != null && (obj = kVar.values) != null) {
            map2.put("sharing_filter", obj);
        }
        return map2;
    }

    public final void AFInAppEventType(Context context, String str) {
        JSONArray jSONArray;
        JSONObject jSONObject;
        AFLogger.values("received a new (extra) referrer: ".concat(String.valueOf(str)));
        try {
            long currentTimeMillis = System.currentTimeMillis();
            String string = valueOf(context).getString("extraReferrers", null);
            if (string == null) {
                jSONObject = new JSONObject();
                jSONArray = new JSONArray();
            } else {
                JSONObject jSONObject2 = new JSONObject(string);
                jSONArray = jSONObject2.has(str) ? new JSONArray((String) jSONObject2.get(str)) : new JSONArray();
                jSONObject = jSONObject2;
            }
            if ((((long) jSONArray.length()) < 5 ? ' ' : 'J') == ' ') {
                jSONArray.put(currentTimeMillis);
            }
            if (!(((long) jSONObject.length()) < 4)) {
                int i = setCustomerIdAndLogSession + 79;
                setUserEmails = i % 128;
                int i2 = i % 2;
                AFKeystoreWrapper(jSONObject);
                int i3 = setUserEmails + 73;
                setCustomerIdAndLogSession = i3 % 128;
                int i4 = i3 % 2;
            }
            jSONObject.put(str, jSONArray.toString());
            AFKeystoreWrapper(context, "extraReferrers", jSONObject.toString());
        } catch (JSONException unused) {
        } catch (Throwable th) {
            StringBuilder sb = new StringBuilder("Couldn't save referrer - ");
            sb.append(str);
            sb.append(": ");
            AFLogger.AFKeystoreWrapper(sb.toString(), th);
        }
    }

    final void AFInAppEventType(WeakReference<Context> weakReference) {
        int i = setUserEmails + 95;
        setCustomerIdAndLogSession = i % 128;
        if ((i % 2 != 0 ? ' ' : 'S') == ' ') {
            Context context = weakReference.get();
            Object obj = null;
            super.hashCode();
            if (context == null) {
                return;
            }
        } else if (weakReference.get() == null) {
            return;
        }
        AFLogger.AFKeystoreWrapper("app went to background");
        SharedPreferences valueOf2 = valueOf(weakReference.get());
        AppsFlyerProperties.getInstance().saveProperties(valueOf2);
        long j = AFInAppEventType().init().onInstallConversionDataLoadedNative;
        HashMap hashMap = new HashMap();
        String devKey = AppsFlyerProperties.getInstance().getDevKey();
        if (!(devKey != null)) {
            AFLogger.AppsFlyer2dXConversionCallback("[callStats] AppsFlyer's SDK cannot send any event without providing DevKey.");
            int i2 = setCustomerIdAndLogSession + 29;
            setUserEmails = i2 % 128;
            int i3 = i2 % 2;
            return;
        }
        String valueOf3 = valueOf("KSAppsFlyerId");
        if (!(!AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, false))) {
            hashMap.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
        }
        h valueOf4 = z.valueOf(weakReference.get().getContentResolver());
        if (valueOf4 != null) {
            int i4 = setCustomerIdAndLogSession + 59;
            setUserEmails = i4 % 128;
            int i5 = i4 % 2;
            hashMap.put("amazon_aid", valueOf4.valueOf);
            hashMap.put("amazon_aid_limit", String.valueOf(valueOf4.AFInAppEventParameterName));
        }
        String string = AppsFlyerProperties.getInstance().getString("advertiserId");
        if (string != null) {
            hashMap.put("advertiserId", string);
        }
        hashMap.put("app_id", weakReference.get().getPackageName());
        hashMap.put("devkey", devKey);
        hashMap.put("uid", al.AFKeystoreWrapper(weakReference));
        hashMap.put("time_in_app", String.valueOf(j));
        hashMap.put("statType", "user_closed_app");
        hashMap.put(AnalyticsConstants.ANALYTICS_PLATFORM, ConstantsCampaign.PLATFORM_VALUE);
        hashMap.put("launch_counter", Integer.toString(valueOf(valueOf2, false)));
        hashMap.put(AppsFlyerProperties.CHANNEL, values(weakReference.get()));
        if (valueOf3 == null) {
            valueOf3 = "";
        }
        hashMap.put("originalAppsflyerId", valueOf3);
        if (!this.AppsFlyerLib) {
            AFLogger.values("Stats call is disabled, ignore ...");
            return;
        }
        try {
            AFLogger.values("Running callStats task");
            cm cmVar = new cm();
            cmVar.onConversionDataSuccess = isStopped();
            new Thread(new aj.a((ce) cmVar.valueOf(hashMap).AFKeystoreWrapper(String.format(init, AppsFlyerLib.getInstance().getHostPrefix(), valueOf().getHostName())))).start();
        } catch (Throwable th) {
            AFLogger.AFKeystoreWrapper("Could not send callStats request", th);
        }
    }

    public final bo AFKeystoreWrapper(Context context) {
        this.waitForCustomerUserId.AFInAppEventType = context.getApplicationContext();
        Context context2 = this.waitForCustomerUserId.AFInAppEventType;
        if (context2 != null) {
            return new ay(valueOf(context2));
        }
        throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
    }

    @VisibleForTesting
    final void AFKeystoreWrapper(@NonNull g gVar, @Nullable Activity activity) {
        String str;
        Uri values2;
        Application application = gVar.AFInAppEventType;
        if ((activity != null ? 'K' : (char) 25) != 25) {
            int i = setUserEmails + 61;
            setCustomerIdAndLogSession = i % 128;
            int i2 = i % 2;
            if (activity.getIntent() != null && (values2 = ar.values(activity)) != null) {
                str = values2.toString();
                if (AppsFlyerProperties.getInstance().getDevKey() == null) {
                    String referrer = AppsFlyerProperties.getInstance().getReferrer(application);
                    gVar.init = referrer != null ? referrer : "";
                    gVar.AFKeystoreWrapper = str;
                    valueOf(gVar);
                    return;
                }
                AFLogger.AppsFlyer2dXConversionCallback("[LogEvent/Launch] AppsFlyer's SDK cannot send any event without providing DevKey.");
                AppsFlyerRequestListener appsFlyerRequestListener = gVar.AFInAppEventParameterName;
                if (!(appsFlyerRequestListener != null)) {
                    return;
                }
                int i3 = setUserEmails + 91;
                setCustomerIdAndLogSession = i3 % 128;
                if (i3 % 2 == 0) {
                    appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, bc.AFInAppEventType);
                    return;
                }
                appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, bc.AFInAppEventType);
                int i4 = 17 / 0;
                return;
            }
        }
        str = "";
        if (AppsFlyerProperties.getInstance().getDevKey() == null) {
        }
    }

    @Override
    public final void addPushNotificationDeepLinkPath(String... strArr) {
        List<String> asList;
        List<List<String>> list;
        int i = setUserEmails + 49;
        setCustomerIdAndLogSession = i % 128;
        if ((i % 2 != 0 ? 'F' : '<') != '<') {
            asList = Arrays.asList(strArr);
            list = i.AFKeystoreWrapper().init;
            int i2 = 91 / 0;
            if ((!list.contains(asList) ? ',' : '\n') != ',') {
                return;
            }
        } else {
            asList = Arrays.asList(strArr);
            list = i.AFKeystoreWrapper().init;
            if (list.contains(asList)) {
                return;
            }
        }
        int i3 = setUserEmails + 97;
        setCustomerIdAndLogSession = i3 % 128;
        int i4 = i3 % 2;
        list.add(asList);
    }

    @Override
    public final void anonymizeUser(boolean z) {
        int i = setUserEmails + 109;
        setCustomerIdAndLogSession = i % 128;
        if (!(i % 2 != 0)) {
            am.AFKeystoreWrapper().values("anonymizeUser", String.valueOf(z));
        } else {
            am AFKeystoreWrapper2 = am.AFKeystoreWrapper();
            String[] strArr = new String[1];
            strArr[1] = String.valueOf(z);
            AFKeystoreWrapper2.values("anonymizeUser", strArr);
        }
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, z);
    }

    @Override
    public final void appendParametersToDeepLinkingURL(String str, Map<String, String> map) {
        int i = setUserEmails + 73;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        i AFKeystoreWrapper2 = i.AFKeystoreWrapper();
        AFKeystoreWrapper2.getLevel = str;
        AFKeystoreWrapper2.AFVersionDeclaration = map;
        int i3 = setCustomerIdAndLogSession + 59;
        setUserEmails = i3 % 128;
        if ((i3 % 2 == 0 ? 'L' : (char) 18) != 18) {
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    @Override
    public final void enableFacebookDeferredApplinks(boolean z) {
        int i = setCustomerIdAndLogSession + 19;
        int i2 = i % 128;
        setUserEmails = i2;
        int i3 = i % 2;
        this.getSdkVersion = z;
        int i4 = i2 + 113;
        setCustomerIdAndLogSession = i4 % 128;
        if ((i4 % 2 != 0 ? (char) 27 : 'P') != 'P') {
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    @Override
    public final AppsFlyerLib enableLocationCollection(boolean z) {
        int i = setCustomerIdAndLogSession;
        int i2 = i + 67;
        setUserEmails = i2 % 128;
        int i3 = i2 % 2;
        this.onResponse = z;
        int i4 = i + 115;
        setUserEmails = i4 % 128;
        int i5 = i4 % 2;
        return this;
    }

    @Override
    @Nullable
    public final String getAppsFlyerUID(@NonNull Context context) {
        int i = setUserEmails + 55;
        setCustomerIdAndLogSession = i % 128;
        if (i % 2 != 0) {
            am.AFKeystoreWrapper().values("getAppsFlyerUID", new String[0]);
        } else {
            am.AFKeystoreWrapper().values("getAppsFlyerUID", new String[0]);
        }
    }

    @Override
    public final String getAttributionId(Context context) {
        try {
            String values2 = new ag(context).values();
            int i = setUserEmails + 27;
            setCustomerIdAndLogSession = i % 128;
            if (!(i % 2 == 0)) {
                int i2 = 44 / 0;
                return values2;
            }
            return values2;
        } catch (Throwable th) {
            AFLogger.AFKeystoreWrapper("Could not collect facebook attribution id. ", th);
            return null;
        }
    }

    @Override
    public final String getHostName() {
        String valueOf2 = valueOf("custom_host");
        Object[] objArr = null;
        if (!(valueOf2 != null)) {
            int i = setCustomerIdAndLogSession + 109;
            setUserEmails = i % 128;
            if (i % 2 == 0) {
                int length = objArr.length;
                return "appsflyer.com";
            }
            return "appsflyer.com";
        }
        int i2 = setUserEmails + 99;
        setCustomerIdAndLogSession = i2 % 128;
        if ((i2 % 2 != 0 ? '7' : (char) 11) != '7') {
            return valueOf2;
        }
        int length2 = objArr.length;
        return valueOf2;
    }

    @Override
    public final String getHostPrefix() {
        int i = setUserEmails + 57;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        String valueOf2 = valueOf("custom_host_prefix");
        if (valueOf2 == null) {
            return "";
        }
        int i3 = setCustomerIdAndLogSession + 101;
        setUserEmails = i3 % 128;
        if ((i3 % 2 == 0 ? ':' : (char) 14) != 14) {
            int i4 = 48 / 0;
            return valueOf2;
        }
        return valueOf2;
    }

    @Override
    public final String getOutOfStore(Context context) {
        int i = setCustomerIdAndLogSession + 67;
        setUserEmails = i % 128;
        int i2 = i % 2;
        String string = AppsFlyerProperties.getInstance().getString("api_store_value");
        if (string != null) {
            int i3 = setCustomerIdAndLogSession + 89;
            setUserEmails = i3 % 128;
            int i4 = i3 % 2;
            return string;
        }
        String AFKeystoreWrapper2 = AFKeystoreWrapper(context, "AF_STORE");
        if ((AFKeystoreWrapper2 != null ? (char) 17 : 'G') != 17) {
            AFLogger.AFKeystoreWrapper("No out-of-store value set");
            return null;
        }
        int i5 = setCustomerIdAndLogSession + 1;
        setUserEmails = i5 % 128;
        if ((i5 % 2 == 0 ? '8' : 'P') != '8') {
            return AFKeystoreWrapper2;
        }
        int i6 = 55 / 0;
        return AFKeystoreWrapper2;
    }

    @Override
    public final String getSdkVersion() {
        am.AFKeystoreWrapper().values("getSdkVersion", new String[0]);
        StringBuilder sb = new StringBuilder("version: 6.5.2 (build ");
        sb.append(AFInAppEventParameterName);
        sb.append(")");
        String obj = sb.toString();
        int i = setCustomerIdAndLogSession + 101;
        setUserEmails = i % 128;
        if ((i % 2 == 0 ? '7' : 'G') != '7') {
            return obj;
        }
        Object[] objArr = null;
        int length = objArr.length;
        return obj;
    }

    @Override
    public final AppsFlyerLib init(@NonNull String str, AppsFlyerConversionListener appsFlyerConversionListener, @NonNull Context context) {
        int i = setCustomerIdAndLogSession + 121;
        setUserEmails = i % 128;
        Object[] objArr = null;
        if (i % 2 == 0) {
            boolean z = this.AppsFlyerInAppPurchaseValidatorListener;
            int length = objArr.length;
        }
    }

    public final Map<String, Object> init() {
        HashMap hashMap = new HashMap();
        if ((onInstallConversionDataLoadedNative() ? '8' : '\r') == '8') {
            int i = setUserEmails + 33;
            setCustomerIdAndLogSession = i % 128;
            if ((i % 2 != 0 ? '(' : 'W') != 'W') {
                hashMap.put("lvl", this.updateServerUninstallToken);
                Object[] objArr = null;
                int length = objArr.length;
            } else {
                hashMap.put("lvl", this.updateServerUninstallToken);
            }
        } else if (this.setDebugLog) {
            HashMap hashMap2 = new HashMap();
            this.updateServerUninstallToken = hashMap2;
            hashMap2.put("error", "operation timed out.");
            hashMap.put("lvl", this.updateServerUninstallToken);
            int i2 = setUserEmails + 101;
            setCustomerIdAndLogSession = i2 % 128;
            int i3 = i2 % 2;
        }
        return hashMap;
    }

    @Override
    public final boolean isPreInstalledApp(Context context) {
        int i = setCustomerIdAndLogSession + 61;
        setUserEmails = i % 128;
        try {
        } catch (PackageManager.NameNotFoundException e2) {
            AFLogger.AFKeystoreWrapper("Could not check if app is pre installed", e2);
        }
        if (i % 2 != 0) {
            if (!((context.getPackageManager().getApplicationInfo(context.getPackageName(), 0).flags & 1) != 0)) {
                int i2 = setCustomerIdAndLogSession + 69;
                setUserEmails = i2 % 128;
                int i3 = i2 % 2;
                return false;
            }
            int i4 = setUserEmails;
            int i5 = i4 + 69;
            setCustomerIdAndLogSession = i5 % 128;
            int i6 = i5 % 2;
            int i7 = i4 + 13;
            setCustomerIdAndLogSession = i7 % 128;
            int i8 = i7 % 2;
            return true;
        }
    }

    @Override
    public final boolean isStopped() {
        int i = setUserEmails;
        int i2 = i + 9;
        setCustomerIdAndLogSession = i2 % 128;
        int i3 = i2 % 2;
        boolean z = this.onValidateInAppFailure;
        int i4 = i + 87;
        setCustomerIdAndLogSession = i4 % 128;
        if ((i4 % 2 != 0 ? '\r' : (char) 26) != 26) {
            Object obj = null;
            super.hashCode();
            return z;
        }
        return z;
    }

    @Override
    public final void logEvent(Context context, String str, Map<String, Object> map) {
        int i = setCustomerIdAndLogSession + 39;
        setUserEmails = i % 128;
        char c = i % 2 == 0 ? Typography.dollar : 'O';
        Object[] objArr = null;
        logEvent(context, str, map, null);
        if (c != 'O') {
            int length = objArr.length;
        }
    }

    @Override
    public final void logEvent(@NonNull Context context, String str, Map<String, Object> map, AppsFlyerRequestListener appsFlyerRequestListener) {
        cl clVar = new cl();
        if (context != null) {
            clVar.AFInAppEventType = (Application) context.getApplicationContext();
        }
        clVar.getLevel = str;
        clVar.values = map == null ? null : new HashMap(map);
        clVar.AFInAppEventParameterName = appsFlyerRequestListener;
        am AFKeystoreWrapper2 = am.AFKeystoreWrapper();
        String[] strArr = new String[2];
        strArr[0] = str;
        Map map2 = clVar.values;
        if (map2 == null) {
            map2 = new HashMap();
        }
        strArr[1] = new JSONObject(map2).toString();
        AFKeystoreWrapper2.values("logEvent", strArr);
        if (str != null) {
            ac.AFInAppEventType(context).values();
        } else {
            valueOf(context, bx.logEvent);
        }
        AFKeystoreWrapper(clVar, context instanceof Activity ? (Activity) context : null);
    }

    @Override
    public final void logLocation(Context context, double d, double d2) {
        am.AFKeystoreWrapper().values("logLocation", String.valueOf(d), String.valueOf(d2));
        HashMap hashMap = new HashMap();
        hashMap.put(AFInAppEventParameterName.LONGTITUDE, Double.toString(d2));
        hashMap.put(AFInAppEventParameterName.LATITUDE, Double.toString(d));
        AFInAppEventParameterName(context, AFInAppEventType.LOCATION_COORDINATES, hashMap);
        int i = setUserEmails + 125;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
    }

    @Override
    public final void logSession(Context context) {
        int i = setUserEmails + 115;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        am.AFKeystoreWrapper().values("logSession", new String[0]);
        am.AFKeystoreWrapper().AFVersionDeclaration();
        valueOf(context, bx.logSession);
        AFInAppEventParameterName(context, (String) null, (Map<String, Object>) null);
        int i3 = setCustomerIdAndLogSession + 125;
        setUserEmails = i3 % 128;
        if (!(i3 % 2 == 0)) {
            return;
        }
        int i4 = 48 / 0;
    }

    @Override
    public final void onPause(Context context) {
        int i = setCustomerIdAndLogSession + 113;
        setUserEmails = i % 128;
        int i2 = i % 2;
        af.d dVar = af.valueOf;
        if (dVar == null) {
            return;
        }
        dVar.AFInAppEventParameterName(context);
        int i3 = setCustomerIdAndLogSession + 13;
        setUserEmails = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    @Deprecated
    public final void performOnAppAttribution(@NonNull Context context, @NonNull URI uri) {
        int i = setCustomerIdAndLogSession + 41;
        setUserEmails = i % 128;
        int i2 = i % 2;
        if ((uri != null ? 'L' : '\"') == '\"' || uri.toString().isEmpty()) {
            StringBuilder sb = new StringBuilder("Link is \"");
            sb.append(uri);
            sb.append("\"");
            aq.AFInAppEventParameterName(sb.toString(), DeepLinkResult.Error.NETWORK);
        } else if (context == null) {
            StringBuilder sb2 = new StringBuilder("Context is \"");
            sb2.append(context);
            sb2.append("\"");
            aq.AFInAppEventParameterName(sb2.toString(), DeepLinkResult.Error.NETWORK);
        } else {
            i.AFKeystoreWrapper().AFInAppEventParameterName(context, new HashMap(), Uri.parse(uri.toString()));
            int i3 = setCustomerIdAndLogSession + 43;
            setUserEmails = i3 % 128;
            int i4 = i3 % 2;
        }
    }

    @Override
    public final void performOnDeepLinking(@NonNull final Intent intent, @NonNull Context context) {
        int i = setUserEmails;
        int i2 = i + 79;
        setCustomerIdAndLogSession = i2 % 128;
        int i3 = i2 % 2;
        if (intent == null) {
            int i4 = i + 81;
            setCustomerIdAndLogSession = i4 % 128;
            int i5 = i4 % 2;
            aq.AFInAppEventParameterName("performOnDeepLinking was called with null intent", DeepLinkResult.Error.DEVELOPER_ERROR);
            return;
        }
        if (!(context == null)) {
            final Context applicationContext = context.getApplicationContext();
            this.waitForCustomerUserId.AFInAppEventType = applicationContext.getApplicationContext();
            final cf init2 = AFInAppEventType().init();
            this.enableLocationCollection.execute(new Runnable() {
                @Override
                public final void run() {
                    i.AFKeystoreWrapper();
                    Intent intent2 = intent;
                    Context context2 = applicationContext;
                    cf cfVar = init2;
                    Context context3 = ah.AFKeystoreWrapper(ah.this).AFInAppEventType;
                    if (context3 == null) {
                        throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
                    }
                    ay ayVar = new ay(ah.valueOf(context3));
                    Uri values2 = i.values(intent2);
                    boolean z = (values2 == null || values2.toString().isEmpty()) ? false : true;
                    if (!ah.valueOf(context2).getBoolean("ddl_sent", false) || z) {
                        i.AFKeystoreWrapper().AFKeystoreWrapper(new HashMap(), cfVar, intent2, ayVar, context2);
                    } else {
                        aq.AFInAppEventParameterName("No direct deep link", null);
                    }
                }
            });
            return;
        }
        aq.AFInAppEventParameterName("performOnDeepLinking was called with null context", DeepLinkResult.Error.DEVELOPER_ERROR);
        int i6 = setUserEmails + 101;
        setCustomerIdAndLogSession = i6 % 128;
        int i7 = i6 % 2;
    }

    @Override
    public final void registerConversionListener(Context context, AppsFlyerConversionListener appsFlyerConversionListener) {
        int i = setUserEmails + 75;
        setCustomerIdAndLogSession = i % 128;
        if (i % 2 == 0) {
            am.AFKeystoreWrapper().values("registerConversionListener", new String[0]);
        } else {
            am.AFKeystoreWrapper().values("registerConversionListener", new String[1]);
        }
        AFInAppEventType(appsFlyerConversionListener);
        int i2 = setCustomerIdAndLogSession + 57;
        setUserEmails = i2 % 128;
        if (i2 % 2 == 0) {
            int i3 = 30 / 0;
        }
    }

    @Override
    public final void registerValidatorListener(Context context, AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener) {
        am.AFKeystoreWrapper().values("registerValidatorListener", new String[0]);
        AFLogger.values("registerValidatorListener called");
        if (appsFlyerInAppPurchaseValidatorListener != null) {
            AFInAppEventType = appsFlyerInAppPurchaseValidatorListener;
            return;
        }
        int i = setUserEmails + 121;
        setCustomerIdAndLogSession = i % 128;
        boolean z = i % 2 != 0;
        AFLogger.values("registerValidatorListener null listener");
        if (z) {
            int i2 = 26 / 0;
        }
        int i3 = setCustomerIdAndLogSession + 107;
        setUserEmails = i3 % 128;
        if (i3 % 2 == 0) {
            int i4 = 86 / 0;
        }
    }

    @Override
    public final void sendAdRevenue(Context context, Map<String, Object> map) {
        cc ccVar = new cc();
        if (context != null) {
            int i = setCustomerIdAndLogSession + 115;
            setUserEmails = i % 128;
            if ((i % 2 == 0 ? 'M' : '6') != '6') {
                ccVar.AFInAppEventType = (Application) context.getApplicationContext();
                int i2 = 46 / 0;
            } else {
                ccVar.AFInAppEventType = (Application) context.getApplicationContext();
            }
            int i3 = setCustomerIdAndLogSession + 15;
            setUserEmails = i3 % 128;
            int i4 = i3 % 2;
        }
        ccVar.values = map;
        values(ccVar);
    }

    @Override
    public final void sendPushNotificationData(@NonNull Activity activity) {
        long j;
        if ((activity != null ? '_' : (char) 28) != 28 && activity.getIntent() != null) {
            am AFKeystoreWrapper2 = am.AFKeystoreWrapper();
            StringBuilder sb = new StringBuilder("activity_intent_");
            sb.append(activity.getIntent().toString());
            AFKeystoreWrapper2.values("sendPushNotificationData", activity.getLocalClassName(), sb.toString());
        } else if ((activity != null ? (char) 31 : '\'') != 31) {
            am.AFKeystoreWrapper().values("sendPushNotificationData", "activity_null");
        } else {
            int i = setUserEmails + 93;
            setCustomerIdAndLogSession = i % 128;
            int i2 = i % 2;
            am.AFKeystoreWrapper().values("sendPushNotificationData", activity.getLocalClassName(), "activity_intent_null");
            int i3 = setUserEmails + 75;
            setCustomerIdAndLogSession = i3 % 128;
            int i4 = i3 % 2;
        }
        String AFInAppEventType2 = AFInAppEventType(activity);
        this.onDeepLinking = AFInAppEventType2;
        if ((AFInAppEventType2 != null ? (char) 1 : Typography.amp) != 1) {
            return;
        }
        long currentTimeMillis = System.currentTimeMillis();
        if (this.AppsFlyerConversionListener == null) {
            AFLogger.AFKeystoreWrapper("pushes: initializing pushes history..");
            this.AppsFlyerConversionListener = new ConcurrentHashMap();
            j = currentTimeMillis;
        } else {
            try {
                long j2 = AppsFlyerProperties.getInstance().getLong("pushPayloadMaxAging", 1800000L);
                j = currentTimeMillis;
                for (Long l : this.AppsFlyerConversionListener.keySet()) {
                    try {
                        JSONObject jSONObject = new JSONObject(this.onDeepLinking);
                        JSONObject jSONObject2 = new JSONObject(this.AppsFlyerConversionListener.get(l));
                        if (jSONObject.opt("pid").equals(jSONObject2.opt("pid"))) {
                            int i5 = setUserEmails + 33;
                            setCustomerIdAndLogSession = i5 % 128;
                            int i6 = i5 % 2;
                            if (jSONObject.opt("c").equals(jSONObject2.opt("c"))) {
                                StringBuilder sb2 = new StringBuilder("PushNotificationMeasurement: A previous payload with same PID and campaign was already acknowledged! (old: ");
                                sb2.append(jSONObject2);
                                sb2.append(", new: ");
                                sb2.append(jSONObject);
                                sb2.append(")");
                                AFLogger.AFKeystoreWrapper(sb2.toString());
                                this.onDeepLinking = null;
                                return;
                            }
                        }
                        if ((currentTimeMillis - l.longValue() > j2 ? '[' : ';') == '[') {
                            this.AppsFlyerConversionListener.remove(l);
                        }
                        if (l.longValue() <= j) {
                            j = l.longValue();
                        }
                    } catch (Throwable th) {
                        th = th;
                        StringBuilder sb3 = new StringBuilder("Error while handling push notification measurement: ");
                        sb3.append(th.getClass().getSimpleName());
                        AFLogger.AFKeystoreWrapper(sb3.toString(), th);
                        if (this.AppsFlyerConversionListener.size() == AppsFlyerProperties.getInstance().getInt("pushPayloadHistorySize", 2)) {
                        }
                        this.AppsFlyerConversionListener.put(Long.valueOf(currentTimeMillis), this.onDeepLinking);
                        start(activity);
                        int i7 = setCustomerIdAndLogSession + 79;
                        setUserEmails = i7 % 128;
                        int i8 = i7 % 2;
                    }
                }
            } catch (Throwable th2) {
                th = th2;
                j = currentTimeMillis;
            }
        }
        if (this.AppsFlyerConversionListener.size() == AppsFlyerProperties.getInstance().getInt("pushPayloadHistorySize", 2)) {
            StringBuilder sb4 = new StringBuilder("pushes: removing oldest overflowing push (oldest push:");
            sb4.append(j);
            sb4.append(")");
            AFLogger.AFKeystoreWrapper(sb4.toString());
            this.AppsFlyerConversionListener.remove(Long.valueOf(j));
        }
        this.AppsFlyerConversionListener.put(Long.valueOf(currentTimeMillis), this.onDeepLinking);
        start(activity);
        int i72 = setCustomerIdAndLogSession + 79;
        setUserEmails = i72 % 128;
        int i82 = i72 % 2;
    }

    @Override
    public final void setAdditionalData(Map<String, Object> map) {
        int i = setUserEmails + 107;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        if (map != null) {
            am.AFKeystoreWrapper().values("setAdditionalData", map.toString());
            AppsFlyerProperties.getInstance().setCustomData(new JSONObject(map).toString());
            int i3 = setUserEmails + 21;
            setCustomerIdAndLogSession = i3 % 128;
            int i4 = i3 % 2;
        }
    }

    @Override
    public final void setAndroidIdData(String str) {
        int i = setCustomerIdAndLogSession + 21;
        setUserEmails = i % 128;
        if ((i % 2 == 0 ? 'L' : 'Z') != 'L') {
            am.AFKeystoreWrapper().values("setAndroidIdData", str);
        } else {
            am AFKeystoreWrapper2 = am.AFKeystoreWrapper();
            String[] strArr = new String[1];
            strArr[1] = str;
            AFKeystoreWrapper2.values("setAndroidIdData", strArr);
        }
        this.AFVersionDeclaration = str;
    }

    @Override
    public final void setAppId(String str) {
        int i = setCustomerIdAndLogSession + 5;
        setUserEmails = i % 128;
        if ((i % 2 == 0 ? 'Z' : 'J') != 'Z') {
            am.AFKeystoreWrapper().values("setAppId", str);
        } else {
            am AFKeystoreWrapper2 = am.AFKeystoreWrapper();
            String[] strArr = new String[1];
            strArr[1] = str;
            AFKeystoreWrapper2.values("setAppId", strArr);
        }
        AFInAppEventParameterName(AppsFlyerProperties.APP_ID, str);
    }

    @Override
    public final void setAppInviteOneLink(String str) {
        int i = setCustomerIdAndLogSession + 13;
        setUserEmails = i % 128;
        boolean z = false;
        if ((i % 2 == 0 ? ':' : (char) 6) != 6) {
            am.AFKeystoreWrapper().values("setAppInviteOneLink", str);
            AFLogger.AFKeystoreWrapper("setAppInviteOneLink = ".concat(String.valueOf(str)));
        } else {
            am.AFKeystoreWrapper().values("setAppInviteOneLink", str);
            AFLogger.AFKeystoreWrapper("setAppInviteOneLink = ".concat(String.valueOf(str)));
        }
        AFInAppEventParameterName(AppsFlyerProperties.ONELINK_ID, str);
    }

    @Override
    public final void setCollectAndroidID(boolean z) {
        int i = setUserEmails + 93;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        am.AFKeystoreWrapper().values("setCollectAndroidID", String.valueOf(z));
        AFInAppEventParameterName(AppsFlyerProperties.COLLECT_ANDROID_ID, Boolean.toString(z));
        AFInAppEventParameterName(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, Boolean.toString(z));
        int i3 = setUserEmails + 91;
        setCustomerIdAndLogSession = i3 % 128;
        if ((i3 % 2 != 0 ? 'L' : (char) 2) != 'L') {
            return;
        }
        int i4 = 65 / 0;
    }

    @Override
    public final void setCollectIMEI(boolean z) {
        int i = setCustomerIdAndLogSession + 15;
        setUserEmails = i % 128;
        int i2 = i % 2;
        am.AFKeystoreWrapper().values("setCollectIMEI", String.valueOf(z));
        AFInAppEventParameterName(AppsFlyerProperties.COLLECT_IMEI, Boolean.toString(z));
        AFInAppEventParameterName(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, Boolean.toString(z));
        int i3 = setCustomerIdAndLogSession + 41;
        setUserEmails = i3 % 128;
        if ((i3 % 2 == 0 ? (char) 21 : (char) 16) != 16) {
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    @Override
    @Deprecated
    public final void setCollectOaid(boolean z) {
        int i = setUserEmails + 9;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        am.AFKeystoreWrapper().values("setCollectOaid", String.valueOf(z));
        AFInAppEventParameterName(AppsFlyerProperties.COLLECT_OAID, Boolean.toString(z));
        int i3 = setCustomerIdAndLogSession + 57;
        setUserEmails = i3 % 128;
        if ((i3 % 2 == 0 ? (char) 26 : '\\') != 26) {
            return;
        }
        Object[] objArr = null;
        int length = objArr.length;
    }

    @Override
    public final void setCurrencyCode(String str) {
        int i = setUserEmails + 109;
        setCustomerIdAndLogSession = i % 128;
        if ((i % 2 != 0 ? (char) 5 : '9') != 5) {
            am.AFKeystoreWrapper().values("setCurrencyCode", str);
        } else {
            am AFKeystoreWrapper2 = am.AFKeystoreWrapper();
            String[] strArr = new String[1];
            strArr[1] = str;
            AFKeystoreWrapper2.values("setCurrencyCode", strArr);
        }
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.CURRENCY_CODE, str);
        int i2 = setUserEmails + 37;
        setCustomerIdAndLogSession = i2 % 128;
        int i3 = i2 % 2;
    }

    @Override
    public final void setCustomerIdAndLogSession(String str, @NonNull Context context) {
        if ((context != null ? (char) 27 : '(') == '(') {
            return;
        }
        int i = setCustomerIdAndLogSession + 97;
        setUserEmails = i % 128;
        if (i % 2 == 0) {
            boolean values2 = values();
            Object obj = null;
            super.hashCode();
        }
    }

    @Override
    public final void setCustomerUserId(String str) {
        int i = setUserEmails + 105;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        am.AFKeystoreWrapper().values("setCustomerUserId", str);
        AFLogger.AFKeystoreWrapper("setCustomerUserId = ".concat(String.valueOf(str)));
        AFInAppEventParameterName(AppsFlyerProperties.APP_USER_ID, str);
        values(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false);
        int i3 = setUserEmails + 83;
        setCustomerIdAndLogSession = i3 % 128;
        if (i3 % 2 == 0) {
            return;
        }
        int i4 = 98 / 0;
    }

    @Override
    public final void setDebugLog(boolean z) {
        AFLogger.LogLevel logLevel;
        int i;
        int i2 = setCustomerIdAndLogSession + 41;
        setUserEmails = i2 % 128;
        if (i2 % 2 == 0) {
            Object[] objArr = null;
            int length = objArr.length;
        }
        int i3 = i % 2;
        setLogLevel(logLevel);
        int i4 = setUserEmails + 37;
        setCustomerIdAndLogSession = i4 % 128;
        int i5 = i4 % 2;
    }

    @Override
    public final void setDisableAdvertisingIdentifiers(boolean z) {
        AFLogger.values("setDisableAdvertisingIdentifiers: ".concat(String.valueOf(z)));
        boolean z2 = false;
        if (!(z)) {
            int i = setUserEmails + 23;
            setCustomerIdAndLogSession = i % 128;
            int i2 = i % 2;
            z2 = true;
        }
        z.values = Boolean.valueOf(z2);
        AppsFlyerProperties.getInstance().remove("advertiserIdEnabled");
        AppsFlyerProperties.getInstance().remove("advertiserId");
        int i3 = setCustomerIdAndLogSession + 87;
        setUserEmails = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void setExtension(String str) {
        int i = setUserEmails + 97;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        am.AFKeystoreWrapper().values("setExtension", str);
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EXTENSION, str);
        int i3 = setUserEmails + 39;
        setCustomerIdAndLogSession = i3 % 128;
        if ((i3 % 2 != 0 ? (char) 27 : 'I') != 27) {
            return;
        }
        int i4 = 97 / 0;
    }

    @Override
    public final void setHost(String str, String str2) {
        int i = setCustomerIdAndLogSession;
        int i2 = i + 53;
        setUserEmails = i2 % 128;
        int i3 = i2 % 2;
        if ((str != null ? '\t' : 'D') == '\t') {
            int i4 = i + 89;
            setUserEmails = i4 % 128;
            int i5 = i4 % 2;
            AFInAppEventParameterName("custom_host_prefix", str);
        }
        if (!(str2 == null)) {
            int i6 = setUserEmails + 43;
            setCustomerIdAndLogSession = i6 % 128;
            if (i6 % 2 != 0) {
                boolean isEmpty = str2.isEmpty();
                Object obj = null;
                super.hashCode();
            }
        }
        AFLogger.AppsFlyer2dXConversionCallback("hostName cannot be null or empty");
        int i7 = setUserEmails + 51;
        setCustomerIdAndLogSession = i7 % 128;
        int i8 = i7 % 2;
    }

    @Override
    public final void setImeiData(String str) {
        int i = setUserEmails + 19;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        am.AFKeystoreWrapper().values("setImeiData", str);
        this.AppsFlyer2dXConversionCallback = str;
        int i3 = setUserEmails + 97;
        setCustomerIdAndLogSession = i3 % 128;
        if ((i3 % 2 != 0 ? 'E' : (char) 3) != 'E') {
            return;
        }
        Object obj = null;
        super.hashCode();
    }

    @Override
    public final void setIsUpdate(boolean z) {
        int i = setCustomerIdAndLogSession + 41;
        setUserEmails = i % 128;
        int i2 = i % 2;
        am.AFKeystoreWrapper().values("setIsUpdate", String.valueOf(z));
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.IS_UPDATE, z);
        int i3 = setCustomerIdAndLogSession + 33;
        setUserEmails = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void setLogLevel(@NonNull AFLogger.LogLevel logLevel) {
        boolean z;
        int i = setCustomerIdAndLogSession + 89;
        setUserEmails = i % 128;
        int i2 = i % 2;
        if (logLevel.getLevel() > AFLogger.LogLevel.NONE.getLevel()) {
            int i3 = setUserEmails + 67;
            setCustomerIdAndLogSession = i3 % 128;
            if (i3 % 2 == 0) {
                z = true;
                am.AFKeystoreWrapper().values("log", String.valueOf(z));
                AppsFlyerProperties.getInstance().set("logLevel", logLevel.getLevel());
            }
        }
        z = false;
        am.AFKeystoreWrapper().values("log", String.valueOf(z));
        AppsFlyerProperties.getInstance().set("logLevel", logLevel.getLevel());
    }

    @Override
    public final void setMinTimeBetweenSessions(int i) {
        int i2 = setUserEmails + 95;
        setCustomerIdAndLogSession = i2 % 128;
        if ((i2 % 2 != 0 ? '\\' : 'V') != 'V') {
            this.onResponseNative = TimeUnit.SECONDS.toMillis(i);
            int i3 = 37 / 0;
        } else {
            this.onResponseNative = TimeUnit.SECONDS.toMillis(i);
        }
        int i4 = setCustomerIdAndLogSession + 111;
        setUserEmails = i4 % 128;
        if (i4 % 2 == 0) {
            Object[] objArr = null;
            int length = objArr.length;
        }
    }

    @Override
    public final void setOaidData(String str) {
        int i = setUserEmails + 89;
        setCustomerIdAndLogSession = i % 128;
        if (!(i % 2 == 0)) {
            am AFKeystoreWrapper2 = am.AFKeystoreWrapper();
            String[] strArr = new String[0];
            strArr[1] = str;
            AFKeystoreWrapper2.values("setOaidData", strArr);
        } else {
            am.AFKeystoreWrapper().values("setOaidData", str);
        }
        z.AFInAppEventParameterName = str;
    }

    @Override
    public final void setOneLinkCustomDomain(String... strArr) {
        String format;
        int i = setCustomerIdAndLogSession + 67;
        setUserEmails = i % 128;
        if (i % 2 != 0) {
            format = String.format("setOneLinkCustomDomain %s", Arrays.toString(strArr));
        } else {
            Object[] objArr = new Object[0];
            objArr[1] = Arrays.toString(strArr);
            format = String.format("setOneLinkCustomDomain %s", objArr);
        }
        AFLogger.values(format);
        i.AFLogger$LogLevel = strArr;
    }

    @Override
    public final void setOutOfStore(String str) {
        int i = setUserEmails + 33;
        setCustomerIdAndLogSession = i % 128;
        if ((i % 2 != 0 ? (char) 25 : '\t') != '\t') {
            int i2 = 82 / 0;
        }
    }

    @Override
    public final void setPartnerData(@NonNull String str, Map<String, Object> map) {
        String concat;
        int i = setUserEmails + 87;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        if (this.setCustomerUserId == null) {
            this.setCustomerUserId = new ba();
        }
        ba baVar = this.setCustomerUserId;
        if ((str != null ? '\'' : 'P') == 'P' || str.isEmpty()) {
            AFLogger.AppsFlyer2dXConversionCallback("Partner ID is missing or `null`");
            return;
        }
        if (map != null) {
            int i3 = setUserEmails + 41;
            setCustomerIdAndLogSession = i3 % 128;
            if (i3 % 2 != 0) {
                boolean isEmpty = map.isEmpty();
                Object obj = null;
                super.hashCode();
            }
        }
        if (baVar.values.remove(str) == null) {
            concat = "Partner data is missing or `null`";
        } else {
            concat = "Cleared partner data for ".concat(String.valueOf(str));
            int i4 = setUserEmails + 33;
            setCustomerIdAndLogSession = i4 % 128;
            int i5 = i4 % 2;
        }
        AFLogger.AppsFlyer2dXConversionCallback(concat);
    }

    @Override
    public final void setPhoneNumber(String str) {
        int i = setCustomerIdAndLogSession + 119;
        setUserEmails = i % 128;
        int i2 = i % 2;
        this.setOaidData = ae.values(str);
        int i3 = setCustomerIdAndLogSession + 7;
        setUserEmails = i3 % 128;
        if ((i3 % 2 == 0 ? 'V' : (char) 0) != 0) {
            int i4 = 54 / 0;
        }
    }

    @Override
    public final void setPreinstallAttribution(String str, String str2, String str3) {
        AFLogger.values("setPreinstallAttribution API called");
        JSONObject jSONObject = new JSONObject();
        if (str != null) {
            try {
                jSONObject.put("pid", str);
                int i = setUserEmails + 47;
                setCustomerIdAndLogSession = i % 128;
                int i2 = i % 2;
            } catch (JSONException e2) {
                AFLogger.AFKeystoreWrapper(e2.getMessage(), e2);
            }
        }
        if ((str2 != null ? 'R' : (char) 30) != 30) {
            int i3 = setCustomerIdAndLogSession + 105;
            setUserEmails = i3 % 128;
            int i4 = i3 % 2;
            jSONObject.put("c", str2);
        }
        if ((str3 != null ? (char) 29 : '8') == 29) {
            int i5 = setUserEmails + 45;
            setCustomerIdAndLogSession = i5 % 128;
            if (i5 % 2 != 0) {
                jSONObject.put("af_siteid", str3);
                Object[] objArr = null;
                int length = objArr.length;
            } else {
                jSONObject.put("af_siteid", str3);
            }
        }
        if (jSONObject.has("pid")) {
            AFInAppEventParameterName("preInstallName", jSONObject.toString());
        } else {
            AFLogger.AppsFlyer2dXConversionCallback("Cannot set preinstall attribution data without a media source");
        }
    }

    @Override
    public final void setResolveDeepLinkURLs(String... strArr) {
        int i = setCustomerIdAndLogSession + 105;
        setUserEmails = i % 128;
        AFLogger.values(!(i % 2 == 0) ? String.format("setResolveDeepLinkURLs %s", Arrays.toString(strArr)) : String.format("setResolveDeepLinkURLs %s", Arrays.toString(strArr)));
        i.AFInAppEventType = strArr;
        int i2 = setUserEmails + 37;
        setCustomerIdAndLogSession = i2 % 128;
        if ((i2 % 2 != 0 ? (char) 21 : (char) 17) != 21) {
            return;
        }
        int i3 = 94 / 0;
    }

    @Override
    @Deprecated
    public final void setSharingFilter(@NonNull String... strArr) {
        int i = setCustomerIdAndLogSession + 55;
        setUserEmails = i % 128;
        boolean z = i % 2 == 0;
        setSharingFilterForPartners(strArr);
        if (z) {
            int i2 = 88 / 0;
        }
        int i3 = setCustomerIdAndLogSession + 65;
        setUserEmails = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    @Deprecated
    public final void setSharingFilterForAllPartners() {
        int i = setCustomerIdAndLogSession + 71;
        setUserEmails = i % 128;
        if ((i % 2 == 0 ? (char) 5 : '1') == '1') {
            setSharingFilterForPartners("all");
            return;
        }
        String[] strArr = new String[0];
        strArr[0] = "all";
        setSharingFilterForPartners(strArr);
    }

    @Override
    public final void setSharingFilterForPartners(String... strArr) {
        this.getLevel = new k(strArr);
        int i = setUserEmails + 105;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
    }

    @Override
    public final void setUserEmails(AppsFlyerProperties.EmailsCryptType emailsCryptType, String... strArr) {
        ArrayList arrayList = new ArrayList(strArr.length + 1);
        arrayList.add(emailsCryptType.toString());
        arrayList.addAll(Arrays.asList(strArr));
        am.AFKeystoreWrapper().values("setUserEmails", (String[]) arrayList.toArray(new String[strArr.length + 1]));
        AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EMAIL_CRYPT_TYPE, emailsCryptType.getValue());
        HashMap hashMap = new HashMap();
        String str = null;
        ArrayList arrayList2 = new ArrayList();
        int length = strArr.length;
        int i = 0;
        while (true) {
            if ((i < length ? 'R' : '%') == '%') {
                hashMap.put(str, arrayList2);
                AppsFlyerProperties.getInstance().setUserEmails(new JSONObject(hashMap).toString());
                int i2 = setUserEmails + 83;
                setCustomerIdAndLogSession = i2 % 128;
                int i3 = i2 % 2;
                return;
            }
            String str2 = strArr[i];
            if (AnonymousClass6.values[emailsCryptType.ordinal()] != 2) {
                arrayList2.add(ae.values(str2));
                int i4 = setCustomerIdAndLogSession + 51;
                setUserEmails = i4 % 128;
                int i5 = i4 % 2;
                str = "sha256_el_arr";
            } else {
                arrayList2.add(str2);
                str = "plain_el_arr";
            }
            i++;
        }
    }

    @Override
    public final void setUserEmails(String... strArr) {
        int i = setUserEmails + 7;
        setCustomerIdAndLogSession = i % 128;
        int i2 = i % 2;
        am.AFKeystoreWrapper().values("setUserEmails", strArr);
        setUserEmails(AppsFlyerProperties.EmailsCryptType.NONE, strArr);
        int i3 = setUserEmails + 101;
        setCustomerIdAndLogSession = i3 % 128;
        if ((i3 % 2 != 0 ? (char) 0 : '/') != 0) {
            return;
        }
        Object obj = null;
        super.hashCode();
    }

    @Override
    public final void start(@NonNull Context context) {
        int i = setCustomerIdAndLogSession + 47;
        setUserEmails = i % 128;
        boolean z = i % 2 == 0;
        Object obj = null;
        start(context, null);
        if (!z) {
            return;
        }
        super.hashCode();
    }

    @Override
    public final void start(@NonNull Context context, String str) {
        int i = setCustomerIdAndLogSession + 65;
        setUserEmails = i % 128;
        boolean z = i % 2 == 0;
        Object[] objArr = null;
        start(context, str, null);
        if (z) {
            int i2 = 63 / 0;
        }
        int i3 = setUserEmails + 115;
        setCustomerIdAndLogSession = i3 % 128;
        if (i3 % 2 == 0) {
            return;
        }
        int length = objArr.length;
    }

    @Override
    public final void start(@NonNull Context context, final String str, final AppsFlyerRequestListener appsFlyerRequestListener) {
        int i = setUserEmails + 75;
        setCustomerIdAndLogSession = i % 128;
        if (!(i % 2 == 0)) {
            int i2 = 53 / 0;
            if (af.valueOf != null) {
                return;
            }
        } else if (af.valueOf != null) {
            return;
        }
        if (!this.AppsFlyerInAppPurchaseValidatorListener) {
            AFLogger.AppsFlyer2dXConversionCallback("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 i3 = setUserEmails + 115;
                setCustomerIdAndLogSession = i3 % 128;
                int i4 = i3 % 2;
                if ((appsFlyerRequestListener != null ? '7' : '%') != '7') {
                    return;
                }
                appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, bc.AFInAppEventType);
                int i5 = setCustomerIdAndLogSession + 117;
                setUserEmails = i5 % 128;
                int i6 = i5 % 2;
                return;
            }
        }
        this.waitForCustomerUserId.AFInAppEventType = context.getApplicationContext();
        final cf init2 = AFInAppEventType().init();
        init2.valueOf(k.AFInAppEventParameterName(context));
        this.onPause = (Application) context.getApplicationContext();
        am.AFKeystoreWrapper().values("start", str);
        String str2 = AFInAppEventParameterName;
        AFLogger.AFKeystoreWrapper(String.format("Starting AppsFlyer: (v%s.%s)", "6.5.2", str2));
        StringBuilder sb = new StringBuilder("Build Number: ");
        sb.append(str2);
        AFLogger.AFKeystoreWrapper(sb.toString());
        AppsFlyerProperties.getInstance().loadProperties(this.onPause.getApplicationContext());
        if (TextUtils.isEmpty(str)) {
            if (!(TextUtils.isEmpty(AppsFlyerProperties.getInstance().getDevKey()) ? false : true)) {
                AFLogger.AppsFlyer2dXConversionCallback("ERROR: AppsFlyer SDK is not initialized! You must provide AppsFlyer Dev-Key either in the 'init' API method (should be called on Application's onCreate),or in the start() API (should be called on Activity's onCreate).");
                if (appsFlyerRequestListener != null) {
                    appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, bc.AFInAppEventType);
                    return;
                }
                return;
            }
        } else {
            AppsFlyerProperties.getInstance().setDevKey(str);
            ak.values(str);
        }
        bv values2 = AFInAppEventType().values();
        values2.valueOf.execute(new bv.AnonymousClass1(null));
        getLevel(this.onPause.getBaseContext());
        if (this.getSdkVersion) {
            init(this.onPause.getApplicationContext());
        }
        af.AFKeystoreWrapper(context, new af.d() {
            @Override
            public final void AFInAppEventParameterName(Activity activity) {
                init2.AFInAppEventType();
                bv values3 = ah.this.AFInAppEventType().values();
                values3.valueOf.execute(new bv.AnonymousClass1(null));
                int valueOf2 = ah.this.valueOf(ah.valueOf(activity), false);
                AFLogger.AFKeystoreWrapper("onBecameForeground");
                if (valueOf2 < 2) {
                    ac AFInAppEventType2 = ac.AFInAppEventType(activity);
                    AFInAppEventType2.AFInAppEventParameterName.post(AFInAppEventType2.init);
                    AFInAppEventType2.AFInAppEventParameterName.post(AFInAppEventType2.AFKeystoreWrapper);
                }
                cj cjVar = new cj();
                i.AFKeystoreWrapper().AFKeystoreWrapper(cjVar.AFKeystoreWrapper(), init2, activity.getIntent(), ah.this.AFInAppEventType().AFKeystoreWrapper(), activity.getApplication());
                ah ahVar = ah.this;
                if (activity != null) {
                    cjVar.AFInAppEventType = (Application) activity.getApplicationContext();
                }
                cjVar.AFLogger$LogLevel = str;
                cjVar.AFInAppEventParameterName = appsFlyerRequestListener;
                ahVar.AFKeystoreWrapper(cjVar, activity);
            }

            @Override
            public final void AFInAppEventParameterName(Context context2) {
                AFLogger.AFKeystoreWrapper("onBecameBackground");
                cf cfVar = init2;
                long currentTimeMillis = System.currentTimeMillis();
                long j = cfVar.AFVersionDeclaration;
                if (j != 0) {
                    long j2 = currentTimeMillis - j;
                    if (j2 > 0 && j2 < 1000) {
                        j2 = 1000;
                    }
                    long seconds = TimeUnit.MILLISECONDS.toSeconds(j2);
                    cfVar.onInstallConversionDataLoadedNative = seconds;
                    cfVar.valueOf.valueOf("prev_session_dur", seconds);
                } else {
                    AFLogger.AFKeystoreWrapper("Metrics: fg ts is missing");
                }
                AFLogger.AFKeystoreWrapper("callStatsBackground background call");
                ah.this.AFInAppEventType(new WeakReference<>(context2));
                am AFKeystoreWrapper2 = am.AFKeystoreWrapper();
                if (AFKeystoreWrapper2.getLevel()) {
                    AFKeystoreWrapper2.valueOf();
                    if (context2 != null && !AppsFlyerLib.getInstance().isStopped()) {
                        AFKeystoreWrapper2.valueOf(context2.getPackageName(), context2.getPackageManager());
                    }
                    AFKeystoreWrapper2.values();
                } else {
                    AFLogger.values("RD status is OFF");
                }
                if (m.AFInAppEventType == null) {
                    m.AFInAppEventType = new m();
                }
                m mVar = m.AFInAppEventType;
                try {
                    m.AFKeystoreWrapper(mVar.values);
                    Executor executor = mVar.AFInAppEventParameterName;
                    if (executor instanceof ThreadPoolExecutor) {
                        m.AFKeystoreWrapper((ThreadPoolExecutor) executor);
                    }
                } catch (Throwable th) {
                    AFLogger.AFKeystoreWrapper("failed to stop Executors", th);
                }
                ac AFInAppEventType2 = ac.AFInAppEventType(context2);
                AFInAppEventType2.AFInAppEventParameterName.post(AFInAppEventType2.init);
            }
        }, this.enableLocationCollection);
        int i7 = setCustomerIdAndLogSession + 19;
        setUserEmails = i7 % 128;
        int i8 = i7 % 2;
    }

    @Override
    public final void stop(boolean z, Context context) {
        File valueOf2;
        int i = setUserEmails + 73;
        setCustomerIdAndLogSession = i % 128;
        try {
            if (i % 2 != 0) {
                this.onValidateInAppFailure = z;
                ai.AFKeystoreWrapper();
                valueOf2 = ai.valueOf(context);
                int i2 = 68 / 0;
            } else {
                this.onValidateInAppFailure = z;
                ai.AFKeystoreWrapper();
                valueOf2 = ai.valueOf(context);
            }
        } catch (Exception e2) {
            AFLogger.AFKeystoreWrapper("Could not cache request", e2);
        }
        if (this.onValidateInAppFailure) {
            int i3 = setCustomerIdAndLogSession + 71;
            setUserEmails = i3 % 128;
            int i4 = i3 % 2;
            values(context, "is_stop_tracking_used");
            if (i4 == 0) {
                int i5 = 69 / 0;
            }
        }
    }

    @Override
    public final void subscribeForDeepLink(@NonNull DeepLinkListener deepLinkListener) {
        int i = setUserEmails + 1;
        setCustomerIdAndLogSession = i % 128;
        boolean z = i % 2 != 0;
        TimeUnit timeUnit = TimeUnit.SECONDS;
        if (z) {
            subscribeForDeepLink(deepLinkListener, timeUnit.toMillis(3L));
            int i2 = 62 / 0;
        } else {
            subscribeForDeepLink(deepLinkListener, timeUnit.toMillis(3L));
        }
        int i3 = setCustomerIdAndLogSession + 59;
        setUserEmails = i3 % 128;
        int i4 = i3 % 2;
    }

    @Override
    public final void subscribeForDeepLink(@NonNull DeepLinkListener deepLinkListener, long j) {
        int i = setCustomerIdAndLogSession + 69;
        setUserEmails = i % 128;
        if ((i % 2 == 0 ? (char) 7 : '@') != 7) {
            i.AFKeystoreWrapper().AFInAppEventParameterName = deepLinkListener;
            ao.onAttributionFailureNative = j;
            return;
        }
        i.AFKeystoreWrapper().AFInAppEventParameterName = deepLinkListener;
        ao.onAttributionFailureNative = j;
        Object[] objArr = null;
        int length = objArr.length;
    }

    @Override
    public final void unregisterConversionListener() {
        int i = setUserEmails + 65;
        setCustomerIdAndLogSession = i % 128;
        if (!(i % 2 != 0)) {
            am.AFKeystoreWrapper().values("unregisterConversionListener", new String[0]);
        } else {
            am.AFKeystoreWrapper().values("unregisterConversionListener", new String[0]);
        }
        AFKeystoreWrapper = null;
    }

    @Override
    public final void updateServerUninstallToken(Context context, String str) {
        new bt(context).values(str);
        int i = setCustomerIdAndLogSession + 23;
        setUserEmails = i % 128;
        int i2 = i % 2;
    }

    @Override
    public final void validateAndLogInAppPurchase(Context context, String str, String str2, String str3, String str4, String str5, Map<String, String> map) {
        am AFKeystoreWrapper2 = am.AFKeystoreWrapper();
        String[] strArr = new String[6];
        strArr[0] = str;
        strArr[1] = str2;
        strArr[2] = str3;
        strArr[3] = str4;
        strArr[4] = str5;
        strArr[5] = map == null ? "" : map.toString();
        AFKeystoreWrapper2.values("validateAndTrackInAppPurchase", strArr);
        if (!isStopped()) {
            StringBuilder sb = new StringBuilder("Validate in app called with parameters: ");
            sb.append(str3);
            sb.append(" ");
            sb.append(str4);
            sb.append(" ");
            sb.append(str5);
            AFLogger.AFKeystoreWrapper(sb.toString());
        }
        if (str == null || str4 == null || str2 == null || str5 == null || str3 == null) {
            AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener = AFInAppEventType;
            if (appsFlyerInAppPurchaseValidatorListener != null) {
                appsFlyerInAppPurchaseValidatorListener.onValidateInAppFailure("Please provide purchase parameters");
                return;
            }
            return;
        }
        Context applicationContext = context.getApplicationContext();
        String devKey = AppsFlyerProperties.getInstance().getDevKey();
        if (context instanceof Activity) {
            ((Activity) context).getIntent();
        }
        new Thread(new ad(applicationContext, devKey, str, str2, str3, str4, str5, map)).start();
    }

    public final int valueOf(SharedPreferences sharedPreferences, boolean z) {
        int i = setCustomerIdAndLogSession + 65;
        setUserEmails = i % 128;
        char c = i % 2 == 0 ? '9' : (char) 28;
        int values2 = values(sharedPreferences, "appsFlyerCount", z);
        if (c != 28) {
            Object[] objArr = null;
            int length = objArr.length;
        }
        return values2;
    }

    public final String valueOf(Context context, String str) {
        SharedPreferences valueOf2 = valueOf(context);
        Object[] objArr = null;
        if ((valueOf2.contains("CACHED_CHANNEL") ? (char) 11 : (char) 18) == 11) {
            int i = setCustomerIdAndLogSession + 31;
            setUserEmails = i % 128;
            int i2 = i % 2;
            return valueOf2.getString("CACHED_CHANNEL", null);
        }
        AFKeystoreWrapper(context, "CACHED_CHANNEL", str);
        int i3 = setCustomerIdAndLogSession + 25;
        setUserEmails = i3 % 128;
        if (i3 % 2 == 0) {
            int length = objArr.length;
            return str;
        }
        return str;
    }

    public final void valueOf(Context context, String str, long j) {
        int i = setCustomerIdAndLogSession + 101;
        setUserEmails = i % 128;
        char c = i % 2 == 0 ? (char) 18 : (char) 27;
        AFInAppEventType(valueOf(context), str, j);
        if (c != 18) {
            return;
        }
        Object[] objArr = null;
        int length = objArr.length;
    }

    public final void valueOf(Context context, Map<String, Object> map, Uri uri) {
        if (!map.containsKey("af_deeplink")) {
            String values2 = values(uri.toString());
            i AFKeystoreWrapper2 = i.AFKeystoreWrapper();
            String str = AFKeystoreWrapper2.getLevel;
            if (str != null) {
                int i = setCustomerIdAndLogSession + 101;
                setUserEmails = i % 128;
                int i2 = i % 2;
                if (AFKeystoreWrapper2.AFVersionDeclaration != null && values2.contains(str)) {
                    int i3 = setCustomerIdAndLogSession + 1;
                    setUserEmails = i3 % 128;
                    int i4 = i3 % 2;
                    Uri.Builder buildUpon = Uri.parse(values2).buildUpon();
                    Uri.Builder buildUpon2 = Uri.EMPTY.buildUpon();
                    Iterator<Map.Entry<String, String>> it = AFKeystoreWrapper2.AFVersionDeclaration.entrySet().iterator();
                    while (true) {
                        if (!it.hasNext()) {
                            break;
                        }
                        int i5 = setCustomerIdAndLogSession + 29;
                        setUserEmails = i5 % 128;
                        int i6 = i5 % 2;
                        Map.Entry<String, String> next = it.next();
                        buildUpon.appendQueryParameter(next.getKey(), next.getValue());
                        buildUpon2.appendQueryParameter(next.getKey(), next.getValue());
                    }
                    values2 = buildUpon.build().toString();
                    map.put("appended_query_params", buildUpon2.build().getEncodedQuery());
                }
            }
            map.put("af_deeplink", values2);
            int i7 = setUserEmails + 21;
            setCustomerIdAndLogSession = i7 % 128;
            int i8 = i7 % 2;
        }
        HashMap hashMap = new HashMap();
        hashMap.put("link", uri.toString());
        as asVar = new as(uri, this, context);
        if ((asVar.valueOf ? 'Q' : ']') == 'Q') {
            map.put("isBrandedDomain", Boolean.TRUE);
        }
        aa.AFInAppEventParameterName(context, hashMap, uri);
        if (!asVar.values()) {
            aq.AFKeystoreWrapper(hashMap);
            return;
        }
        asVar.AFKeystoreWrapper = values(hashMap);
        if (m.AFInAppEventType == null) {
            m.AFInAppEventType = new m();
        }
        m.AFInAppEventType.AFKeystoreWrapper().execute(asVar);
    }

    @Nullable
    public final String values(Context context) {
        String string = AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.CHANNEL);
        if ((string == null ? (char) 29 : (char) 28) == 29) {
            string = AFKeystoreWrapper(context, "CHANNEL");
        }
        if (string != null) {
            int i = setUserEmails + 89;
            setCustomerIdAndLogSession = i % 128;
            int i2 = i % 2;
            if (!(!string.equals(""))) {
                int i3 = setUserEmails + 107;
                setCustomerIdAndLogSession = i3 % 128;
                int i4 = i3 % 2;
                return null;
            }
        }
        int i5 = setUserEmails + 21;
        setCustomerIdAndLogSession = i5 % 128;
        int i6 = i5 % 2;
        return string;
    }

    public final void values(Context context, Intent intent) {
        int i = setCustomerIdAndLogSession + 125;
        setUserEmails = i % 128;
        if (i % 2 == 0) {
            String stringExtra = intent.getStringExtra("appsflyer_preinstall");
            Object[] objArr = null;
            int length = objArr.length;
        }
        AFLogger.AFKeystoreWrapper("****** onReceive called *******");
        AppsFlyerProperties.getInstance();
        String stringExtra2 = intent.getStringExtra("referrer");
        AFLogger.AFKeystoreWrapper("Play store referrer: ".concat(String.valueOf(stringExtra2)));
        if (stringExtra2 != null) {
            int i2 = setUserEmails + 43;
            setCustomerIdAndLogSession = i2 % 128;
            int i3 = i2 % 2;
            AFKeystoreWrapper(context, "referrer", stringExtra2);
            AppsFlyerProperties appsFlyerProperties = AppsFlyerProperties.getInstance();
            appsFlyerProperties.set("AF_REFERRER", stringExtra2);
            appsFlyerProperties.valueOf = stringExtra2;
            if ((AppsFlyerProperties.getInstance().AFKeystoreWrapper() ? ')' : '^') != '^') {
                int i4 = setUserEmails + 83;
                setCustomerIdAndLogSession = i4 % 128;
                int i5 = i4 % 2;
                AFLogger.AFKeystoreWrapper("onReceive: isLaunchCalled");
                valueOf(context, bx.onReceive);
                AFInAppEventParameterName(context, stringExtra2);
            }
        }
    }

    public final boolean values() {
        if (AFInAppEventParameterName(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false)) {
            int i = setUserEmails + 113;
            setCustomerIdAndLogSession = i % 128;
            if ((i % 2 != 0 ? '(' : 'Q') == '(') {
                String AFKeystoreWrapper2 = AFKeystoreWrapper();
                Object[] objArr = null;
                int length = objArr.length;
            }
        }
        return false;
    }

    @Override
    public final void waitForCustomerUserId(boolean z) {
        int i = setCustomerIdAndLogSession + 51;
        setUserEmails = i % 128;
        if (i % 2 == 0) {
        }
        AFLogger.AFInAppEventType("initAfterCustomerUserID: ".concat(String.valueOf(z)), true);
        values(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, z);
    }
}