Swiggy v4.51.1版本的 MD5 值为:5af7ec91512a0a8c1510e3f8bac20b8b
以下内容为反编译后的 AFb1wSDK.java 源代码,内容仅作参考
package com.appsflyer.internal;
import android.app.Activity;
import android.app.Application;
import android.app.UiModeManager;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ProviderInfo;
import android.content.pm.ResolveInfo;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.StatFs;
import android.os.SystemClock;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.MotionEvent;
import android.view.ViewConfiguration;
import android.view.WindowManager;
import android.widget.ExpandableListView;
import androidx.annotation.NonNull;
import com.appsflyer.AFInAppEventParameterName;
import com.appsflyer.AFInAppEventType;
import com.appsflyer.AFKeystoreWrapper;
import com.appsflyer.AFLogger;
import com.appsflyer.AFVersionDeclaration;
import com.appsflyer.AppsFlyerConversionListener;
import com.appsflyer.AppsFlyerInAppPurchaseValidatorListener;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerProperties;
import com.appsflyer.PurchaseHandler;
import com.appsflyer.attribution.AppsFlyerRequestListener;
import com.appsflyer.attribution.RequestError;
import com.appsflyer.deeplink.DeepLinkListener;
import com.appsflyer.deeplink.DeepLinkResult;
import com.appsflyer.internal.AFa1kSDK;
import com.appsflyer.internal.AFa1qSDK;
import com.appsflyer.internal.AFa1uSDK;
import com.appsflyer.internal.AFb1cSDK;
import com.appsflyer.internal.AFb1wSDK;
import com.appsflyer.internal.AFb1xSDK;
import com.appsflyer.internal.AFc1oSDK;
import com.appsflyer.internal.AFd1eSDK;
import com.appsflyer.internal.AFd1vSDK;
import com.appsflyer.internal.AFf1oSDK;
import com.appsflyer.internal.components.network.http.ResponseNetwork;
import com.google.android.gms.common.GoogleApiAvailability;
import com.newrelic.agent.android.analytics.AnalyticsAttribute;
import com.newrelic.agent.android.instrumentation.Instrumented;
import com.newrelic.agent.android.instrumentation.JSONArrayInstrumentation;
import com.newrelic.agent.android.instrumentation.JSONObjectInstrumentation;
import com.payu.threeDS2.constants.LoggingConstants;
import com.rudderstack.android.sdk.core.ecomm.ECommerceParamNames;
import com.xiaomi.mipush.sdk.Constants;
import in.juspay.hyper.constants.LogSubCategory;
import in.juspay.hypersdk.core.PaymentConstants;
import in.swiggy.android.tejas.feature.trackv3.responsedatatypes.NbaMetaDataType;
import in.swiggy.android.tejas.oldapi.models.KeySeparator;
import j$.util.DesugarTimeZone;
import j$.util.concurrent.ConcurrentHashMap;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.HttpURLConnection;
import java.net.URI;
import java.security.KeyStoreException;
import java.text.DecimalFormat;
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.UUID;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.apache.pdfbox.pdmodel.documentinterchange.taggedpdf.PDPrintFieldAttributeObject;
import org.apache.pdfbox.pdmodel.interactive.action.PDActionLaunch;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@Instrumented
public final class AFb1wSDK extends AppsFlyerLib {
public static final String AFInAppEventParameterName;
public static volatile AppsFlyerConversionListener AFInAppEventType = null;
public static final String AFKeystoreWrapper;
private static String AFLogger$LogLevel = null;
private static AFb1wSDK AFVersionDeclaration = null;
private static int AppsFlyerLib = 1;
private static String afDebugLog;
private static String afErrorLog;
private static String afErrorLogForExcManagerOnly;
private static final String afRDLog;
private static String afWarnLog;
private static char getInstance;
private static String getLevel;
private static int onPause;
private static char onResponseError;
private static char onValidateInApp;
private static char stop;
static final String valueOf;
static AppsFlyerInAppPurchaseValidatorListener values;
String AFLogger;
private AFb1dSDK AppsFlyerConversionListener;
public AFa1fSDK afInfoLog;
private Application onAppOpenAttribution;
private boolean onAttributionFailureNative;
private String onConversionDataFail;
private Map<Long, String> onConversionDataSuccess;
private SharedPreferences onDeepLinking;
private String onInstallConversionDataLoadedNative;
private Map<String, Object> onResponse;
private boolean onResponseNative;
@NonNull
private final AFb1aSDK onValidateInAppFailure;
private long AppsFlyer2dXConversionCallback = -1;
private long init = -1;
private long onAppOpenAttributionNative = TimeUnit.SECONDS.toMillis(5);
private boolean onInstallConversionFailureNative = false;
private final AFb1vSDK onResponseErrorNative = new AFb1vSDK();
private boolean onDeepLinkingNative = false;
private boolean onAttributionFailure = false;
private final Executor AppsFlyerInAppPurchaseValidatorListener = Executors.newSingleThreadExecutor();
public final class AnonymousClass2 implements Runnable {
AnonymousClass2() {
}
public void AFInAppEventType() {
try {
AFe1fSDK aFe1fSDK = new AFe1fSDK();
Application valueOf = AFb1wSDK.valueOf(AFb1wSDK.this);
if (valueOf != null) {
aFe1fSDK.AFKeystoreWrapper = (Application) valueOf.getApplicationContext();
}
AFb1wSDK aFb1wSDK = AFb1wSDK.this;
if (AFb1wSDK.AFInAppEventType(aFb1wSDK, aFe1fSDK, AFb1wSDK.valueOf(AFb1wSDK.valueOf(aFb1wSDK)))) {
AFb1wSDK.valueOf(AFb1wSDK.this, aFe1fSDK);
}
} catch (Throwable th) {
AFLogger.afErrorLog(th.getMessage(), th);
}
}
@Override
public final void run() {
AFb1wSDK.AFInAppEventType(AFb1wSDK.AFInAppEventParameterName(AFb1wSDK.this).AFKeystoreWrapper(), new Runnable() {
@Override
public final void run() {
AFb1wSDK.AnonymousClass2.this.AFInAppEventType();
}
}, TimeUnit.MILLISECONDS);
}
}
static class AnonymousClass6 {
static final int[] AFInAppEventParameterName;
static {
int[] iArr = new int[AppsFlyerProperties.EmailsCryptType.values().length];
AFInAppEventParameterName = iArr;
try {
iArr[AppsFlyerProperties.EmailsCryptType.SHA256.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
AFInAppEventParameterName[AppsFlyerProperties.EmailsCryptType.NONE.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
}
}
public class AFa1vSDK implements Runnable {
private final AFa1tSDK values;
AFa1vSDK(AFb1wSDK aFb1wSDK, AFa1tSDK aFa1tSDK, byte b) {
this(aFa1tSDK);
}
@Override
public final void run() {
AFb1wSDK.valueOf(AFb1wSDK.this, this.values);
}
private AFa1vSDK(AFa1tSDK aFa1tSDK) {
this.values = aFa1tSDK;
}
}
class AFa1ySDK implements AFd1xSDK {
private AFa1ySDK() {
}
private static boolean AFInAppEventParameterName() {
if (AFb1wSDK.AFInAppEventType != null) {
return true;
}
return false;
}
@Override
public final void AFInAppEventType(AFd1wSDK<?> aFd1wSDK) {
}
@Override
public final void valueOf(AFd1wSDK<?> aFd1wSDK) {
if (aFd1wSDK instanceof AFd1cSDK) {
AFb1wSDK.this.valueOf().afRDLog().AFInAppEventParameterName(((AFd1hSDK) aFd1wSDK).afRDLog.afRDLog);
}
}
AFa1ySDK(AFb1wSDK aFb1wSDK, byte b) {
this();
}
@Override
public final void AFInAppEventType(AFd1wSDK<?> aFd1wSDK, AFd1tSDK aFd1tSDK) {
JSONObject AFInAppEventParameterName;
AFb1sSDK AFInAppEventType;
if (aFd1wSDK instanceof AFd1hSDK) {
AFd1hSDK aFd1hSDK = (AFd1hSDK) aFd1wSDK;
boolean z = aFd1wSDK instanceof AFd1cSDK;
if (z && AFInAppEventParameterName()) {
AFd1cSDK aFd1cSDK = (AFd1cSDK) aFd1wSDK;
if (aFd1cSDK.values == AFd1tSDK.SUCCESS || aFd1cSDK.valueOf == 1) {
Context context = AFb1wSDK.AFInAppEventParameterName(AFb1wSDK.this).AFInAppEventType.AFKeystoreWrapper;
if (context != null) {
AFe1lSDK aFe1lSDK = new AFe1lSDK(aFd1cSDK, new AFc1ySDK(AFb1wSDK.valueOf(context)));
AFd1vSDK AFLogger = AFb1wSDK.AFInAppEventParameterName(AFb1wSDK.this).AFLogger();
AFLogger.values.execute(new AFd1vSDK.AnonymousClass2(aFe1lSDK));
} else {
throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
}
}
}
if (aFd1tSDK == AFd1tSDK.SUCCESS) {
AFb1wSDK aFb1wSDK = AFb1wSDK.this;
aFb1wSDK.AFInAppEventParameterName(AFb1wSDK.valueOf(aFb1wSDK)).AFInAppEventType("sentSuccessfully", "true");
if (!(aFd1wSDK instanceof AFd1bSDK) && (AFInAppEventType = new AFe1rSDK(AFb1wSDK.valueOf(AFb1wSDK.this)).AFInAppEventType()) != null && AFInAppEventType.AFKeystoreWrapper()) {
String str = AFInAppEventType.valueOf;
AFLogger.afDebugLog("Resending Uninstall token to AF servers: ".concat(String.valueOf(str)));
AFe1rSDK.AFInAppEventParameterName(str);
}
ResponseNetwork responseNetwork = ((AFd1nSDK) aFd1hSDK).afErrorLog;
if (responseNetwork != null && (AFInAppEventParameterName = AFb1oSDK.AFInAppEventParameterName((String) responseNetwork.getBody())) != null) {
AFb1wSDK.valueOf(AFb1wSDK.this, AFInAppEventParameterName.optBoolean("send_background", false));
}
if (z) {
AFb1wSDK.AFKeystoreWrapper(AFb1wSDK.this, System.currentTimeMillis());
}
}
} else if (!(aFd1wSDK instanceof AFe1lSDK) || aFd1tSDK == AFd1tSDK.SUCCESS) {
} else {
AFe1mSDK aFe1mSDK = new AFe1mSDK(AFb1wSDK.AFInAppEventParameterName(AFb1wSDK.this));
AFd1vSDK AFLogger2 = AFb1wSDK.AFInAppEventParameterName(AFb1wSDK.this).AFLogger();
AFLogger2.values.execute(new AFd1vSDK.AnonymousClass2(aFe1mSDK));
}
}
}
public class AFa1zSDK implements Runnable {
private final AFa1tSDK AFKeystoreWrapper;
AFa1zSDK(AFb1wSDK aFb1wSDK, AFa1tSDK aFa1tSDK, byte b) {
this(aFa1tSDK);
}
@Override
public final void run() {
AFd1cSDK aFd1cSDK;
if (this.AFKeystoreWrapper.AFInAppEventParameterName()) {
AFd1cSDK aFd1cSDK2 = new AFd1cSDK(this.AFKeystoreWrapper, AFb1wSDK.this.valueOf());
aFd1cSDK2.AFVersionDeclaration = AFb1wSDK.values(AFb1wSDK.this);
aFd1cSDK = aFd1cSDK2;
} else {
aFd1cSDK = new AFd1hSDK(this.AFKeystoreWrapper, AFb1wSDK.this.valueOf());
}
AFd1vSDK AFLogger = AFb1wSDK.this.valueOf().AFLogger();
AFLogger.values.execute(new AFd1vSDK.AnonymousClass2(aFd1cSDK));
}
private AFa1zSDK(AFa1tSDK aFa1tSDK) {
this.AFKeystoreWrapper = aFa1tSDK;
}
}
static {
values();
valueOf = "230";
Object[] objArr = new Object[1];
AFInAppEventParameterName("\ufff8ꗛ", 1 - ExpandableListView.getPackedPositionGroup(0L), objArr);
String substring = "6.10.1".substring(0, "6.10.1".lastIndexOf(((String) objArr[0]).intern()));
AFInAppEventParameterName = substring;
afErrorLog = "https://%sstats.%s/stats";
StringBuilder sb = new StringBuilder();
sb.append(substring);
sb.append("/androidevent?buildnumber=6.10.1&app_id=");
AFKeystoreWrapper = sb.toString();
afDebugLog = "https://%sadrevenue.%s/api/v2/generic/v6.10.1/android?app_id=";
StringBuilder sb2 = new StringBuilder();
sb2.append(substring);
sb2.append("/androidevent?app_id=");
String obj = sb2.toString();
afRDLog = obj;
StringBuilder sb3 = new StringBuilder("https://%sconversions.%s/api/v");
sb3.append(obj);
afWarnLog = sb3.toString();
StringBuilder sb4 = new StringBuilder("https://%slaunches.%s/api/v");
sb4.append(obj);
getLevel = sb4.toString();
StringBuilder sb5 = new StringBuilder("https://%sinapps.%s/api/v");
sb5.append(obj);
afErrorLogForExcManagerOnly = sb5.toString();
StringBuilder sb6 = new StringBuilder("https://%sattr.%s/api/v");
sb6.append(obj);
AFLogger$LogLevel = sb6.toString();
values = null;
AFInAppEventType = null;
AFVersionDeclaration = new AFb1wSDK();
int i = AppsFlyerLib + 119;
onPause = i % 128;
int i2 = i % 2;
}
public AFb1wSDK() {
AFVersionDeclaration.init();
AFb1aSDK aFb1aSDK = new AFb1aSDK();
this.onValidateInAppFailure = aFb1aSDK;
AFd1vSDK AFLogger = aFb1aSDK.AFLogger();
AFLogger.AFKeystoreWrapper.add(new AFa1ySDK(this, (byte) 0));
}
static AFb1aSDK AFInAppEventParameterName(AFb1wSDK aFb1wSDK) {
int i = AppsFlyerLib;
int i2 = i + 43;
onPause = i2 % 128;
int i3 = i2 % 2;
AFb1aSDK aFb1aSDK = aFb1wSDK.onValidateInAppFailure;
int i4 = i + 41;
onPause = i4 % 128;
if (i4 % 2 != 0) {
int i5 = 11 / 0;
}
return aFb1aSDK;
}
static void AFInAppEventType(ScheduledExecutorService scheduledExecutorService, Runnable runnable, TimeUnit timeUnit) {
int i = onPause + 29;
AppsFlyerLib = i % 128;
AFInAppEventParameterName(scheduledExecutorService, runnable, i % 2 == 0 ? 1L : 0L, timeUnit);
}
static long AFKeystoreWrapper(AFb1wSDK aFb1wSDK, long j) {
int i = onPause + 17;
int i2 = i % 128;
AppsFlyerLib = i2;
int i3 = i % 2;
aFb1wSDK.init = j;
int i4 = i2 + 21;
onPause = i4 % 128;
int i5 = i4 % 2;
return j;
}
private void AFLogger(Context context) {
this.onResponse = new HashMap();
final long currentTimeMillis = System.currentTimeMillis();
final AFa1uSDK.AFa1ySDK aFa1ySDK = new AFa1uSDK.AFa1ySDK() {
@Override
public final void AFInAppEventParameterName(String str) {
AFb1wSDK.values(AFb1wSDK.this).put("error", str);
}
@Override
public final void AFInAppEventType(String str, String str2, String str3) {
if (str != null) {
AFLogger.afInfoLog("Facebook Deferred AppLink data received: ".concat(str));
AFb1wSDK.values(AFb1wSDK.this).put(NbaMetaDataType.LINK, str);
if (str2 != null) {
AFb1wSDK.values(AFb1wSDK.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);
AFb1wSDK.values(AFb1wSDK.this).put("extras", hashMap);
}
} else {
AFb1wSDK.values(AFb1wSDK.this).put(NbaMetaDataType.LINK, "");
}
AFb1wSDK.values(AFb1wSDK.this).put("ttr", String.valueOf(System.currentTimeMillis() - currentTimeMillis));
}
};
try {
Class.forName("com.facebook.FacebookSdk").getMethod("sdkInitialize", Context.class).invoke(null, context);
final Class<?> cls = Class.forName("com.facebook.applinks.AppLinkData");
Class<?> cls2 = Class.forName("com.facebook.applinks.AppLinkData$CompletionHandler");
Method method = cls.getMethod("fetchDeferredAppLinkData", Context.class, String.class, cls2);
Object newProxyInstance = Proxy.newProxyInstance(cls2.getClassLoader(), new Class[]{cls2}, new InvocationHandler() {
@Override
public final Object invoke(Object obj, Method method2, Object[] objArr) throws Throwable {
String str;
String str2;
String str3;
Bundle bundle;
if (method2.getName().equals("onDeferredAppLinkDataFetched")) {
Object obj2 = objArr[0];
if (obj2 != null) {
Bundle bundle2 = (Bundle) Bundle.class.cast(cls.getMethod("getArgumentBundle", new Class[0]).invoke(cls.cast(obj2), new Object[0]));
if (bundle2 != null) {
str2 = bundle2.getString("com.facebook.platform.APPLINK_NATIVE_URL");
str3 = bundle2.getString("target_url");
Bundle bundle3 = bundle2.getBundle("extras");
if (bundle3 != null && (bundle = bundle3.getBundle("deeplink_context")) != null) {
str = bundle.getString("promo_code");
} else {
str = null;
}
} else {
str = null;
str2 = null;
str3 = null;
}
AFa1ySDK aFa1ySDK2 = aFa1ySDK;
if (aFa1ySDK2 != null) {
aFa1ySDK2.AFInAppEventType(str2, str3, str);
}
} else {
AFa1ySDK aFa1ySDK3 = aFa1ySDK;
if (aFa1ySDK3 != null) {
aFa1ySDK3.AFInAppEventType(null, null, null);
}
}
return null;
}
AFa1ySDK aFa1ySDK4 = aFa1ySDK;
if (aFa1ySDK4 != null) {
aFa1ySDK4.AFInAppEventParameterName("onDeferredAppLinkDataFetched invocation failed");
}
return null;
}
});
String string = context.getString(context.getResources().getIdentifier("facebook_app_id", "string", context.getPackageName()));
if (TextUtils.isEmpty(string)) {
int i = onPause + 37;
AppsFlyerLib = i % 128;
if (i % 2 != 0) {
aFa1ySDK.AFInAppEventParameterName("Facebook app id not defined in resources");
int i2 = onPause + 19;
AppsFlyerLib = i2 % 128;
if (i2 % 2 == 0) {
throw null;
}
return;
}
aFa1ySDK.AFInAppEventParameterName("Facebook app id not defined in resources");
throw null;
}
method.invoke(null, context, string, newProxyInstance);
} catch (ClassNotFoundException e) {
AFLogger.afErrorLogForExcManagerOnly("FB class missing error", e);
aFa1ySDK.AFInAppEventParameterName(e.toString());
} catch (IllegalAccessException e2) {
AFLogger.afErrorLogForExcManagerOnly("FB illegal access", e2);
aFa1ySDK.AFInAppEventParameterName(e2.toString());
} catch (NoSuchMethodException e3) {
AFLogger.afErrorLogForExcManagerOnly("FB method missing error", e3);
aFa1ySDK.AFInAppEventParameterName(e3.toString());
} catch (InvocationTargetException e4) {
AFLogger.afErrorLogForExcManagerOnly("FB invocation error", e4);
aFa1ySDK.AFInAppEventParameterName(e4.toString());
}
}
private String AFLogger$LogLevel(Context context) {
File afInfoLog = afInfoLog(AFKeystoreWrapper("ro.appsflyer.preinstall.path"));
if (valueOf(afInfoLog)) {
afInfoLog = afInfoLog(AFInAppEventParameterName(context, "AF_PRE_INSTALL_PATH"));
int i = AppsFlyerLib + 125;
onPause = i % 128;
int i2 = i % 2;
}
if (valueOf(afInfoLog)) {
int i3 = AppsFlyerLib + 9;
onPause = i3 % 128;
int i4 = i3 % 2;
afInfoLog = afInfoLog("/data/local/tmp/pre_install.appsflyer");
}
if (valueOf(afInfoLog)) {
afInfoLog = afInfoLog("/etc/pre_install.appsflyer");
}
if (valueOf(afInfoLog)) {
int i5 = onPause + 43;
AppsFlyerLib = i5 % 128;
int i6 = i5 % 2;
return null;
}
return valueOf(afInfoLog, context.getPackageName());
}
private long AFVersionDeclaration(Context context) {
long j;
int i = onPause + 1;
AppsFlyerLib = i % 128;
int i2 = i % 2;
long j2 = valueOf(context).getLong("AppsFlyerTimePassedSincePrevLaunch", 0L);
long currentTimeMillis = System.currentTimeMillis();
AFInAppEventParameterName(context).values("AppsFlyerTimePassedSincePrevLaunch", currentTimeMillis);
if (j2 > 0) {
long j3 = currentTimeMillis - j2;
int i3 = onPause + 21;
int i4 = i3 % 128;
AppsFlyerLib = i4;
if (i3 % 2 == 0) {
j = 1000 | j3;
} else {
j = j3 / 1000;
}
int i5 = i4 + 109;
onPause = i5 % 128;
int i6 = i5 % 2;
return j;
}
return -1L;
}
private static void afDebugLog(Context context) {
int i;
if (AFa1cSDK.AFInAppEventType()) {
AFLogger.afRDLog("OPPO device found");
i = 23;
} else {
i = 18;
}
int i2 = Build.VERSION.SDK_INT;
if (i2 >= i && !AFKeystoreWrapper(AppsFlyerProperties.DISABLE_KEYSTORE, true)) {
StringBuilder sb = new StringBuilder("OS SDK is=");
sb.append(i2);
sb.append("; use KeyStore");
AFLogger.afRDLog(sb.toString());
AFKeystoreWrapper aFKeystoreWrapper = new AFKeystoreWrapper(context);
if (!aFKeystoreWrapper.AFInAppEventType()) {
aFKeystoreWrapper.AFKeystoreWrapper = AFb1zSDK.AFInAppEventParameterName(new WeakReference(context));
aFKeystoreWrapper.values = 0;
aFKeystoreWrapper.valueOf(aFKeystoreWrapper.AFInAppEventParameterName());
} else {
String AFInAppEventParameterName2 = aFKeystoreWrapper.AFInAppEventParameterName();
synchronized (aFKeystoreWrapper.valueOf) {
aFKeystoreWrapper.values++;
AFLogger.afInfoLog("Deleting key with alias: ".concat(String.valueOf(AFInAppEventParameterName2)));
try {
synchronized (aFKeystoreWrapper.valueOf) {
aFKeystoreWrapper.AFInAppEventType.deleteEntry(AFInAppEventParameterName2);
}
} catch (KeyStoreException e) {
StringBuilder sb2 = new StringBuilder("Exception ");
sb2.append(e.getMessage());
sb2.append(" occurred");
AFLogger.afErrorLog(sb2.toString(), e);
}
}
aFKeystoreWrapper.valueOf(aFKeystoreWrapper.AFInAppEventParameterName());
}
AFInAppEventType("KSAppsFlyerId", aFKeystoreWrapper.AFKeystoreWrapper());
AFInAppEventType("KSAppsFlyerRICounter", String.valueOf(aFKeystoreWrapper.valueOf()));
return;
}
StringBuilder sb3 = new StringBuilder("OS SDK is=");
sb3.append(i2);
sb3.append("; no KeyStore usage");
AFLogger.afRDLog(sb3.toString());
}
private boolean afErrorLog() {
boolean AFKeystoreWrapper2;
int i = onPause + 25;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
AFKeystoreWrapper2 = valueOf().valueOf().AFKeystoreWrapper("AF_PREINSTALL_DISABLED");
int i2 = 36 / 0;
} else {
AFKeystoreWrapper2 = valueOf().valueOf().AFKeystoreWrapper("AF_PREINSTALL_DISABLED");
}
int i3 = onPause + 107;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
return AFKeystoreWrapper2;
}
private String afErrorLogForExcManagerOnly(Context context) {
int i = onPause + 111;
AppsFlyerLib = i % 128;
int i2 = i % 2;
String string = AppsFlyerProperties.getInstance().getString("api_store_value");
if (string != null) {
int i3 = AppsFlyerLib;
int i4 = i3 + 73;
onPause = i4 % 128;
if (i4 % 2 == 0) {
int i5 = i3 + 71;
onPause = i5 % 128;
int i6 = i5 % 2;
return string;
}
throw null;
}
return AFInAppEventParameterName(context, "AF_STORE");
}
private static void afInfoLog(Context context) {
try {
if ((context.getPackageManager().getPackageInfo(context.getPackageName(), 0).applicationInfo.flags & 32768) != 0) {
if (context.getResources().getIdentifier("appsflyer_backup_rules", "xml", context.getPackageName()) != 0) {
int i = AppsFlyerLib + 17;
onPause = i % 128;
int i2 = i % 2;
AFLogger.afInfoLog("appsflyer_backup_rules.xml detected, using AppsFlyer defined backup rules for AppsFlyer SDK data", true);
int i3 = AppsFlyerLib + 73;
onPause = i3 % 128;
if (i3 % 2 != 0) {
throw null;
}
return;
}
AFLogger.AFKeystoreWrapper("'allowBackup' is set to true; appsflyer_backup_rules.xml not detected.\nAppsFlyer shared preferences should be excluded from auto backup by adding: <exclude domain=\"sharedpref\" path=\"appsflyer-data\"/> to the Application's <full-backup-content> rules");
}
} catch (Exception e) {
AFLogger.afErrorLogForExcManagerOnly("checkBackupRules Exception", e);
AFLogger.afRDLog("checkBackupRules Exception: ".concat(String.valueOf(e)));
}
}
private boolean afRDLog() {
int i = onPause + 123;
AppsFlyerLib = i % 128;
int i2 = i % 2;
if (this.AppsFlyer2dXConversionCallback > 0) {
long currentTimeMillis = System.currentTimeMillis() - this.AppsFlyer2dXConversionCallback;
Locale locale = Locale.US;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS Z", locale);
String valueOf2 = valueOf(simpleDateFormat, this.AppsFlyer2dXConversionCallback);
String valueOf3 = valueOf(simpleDateFormat, this.init);
if (currentTimeMillis < this.onAppOpenAttributionNative) {
int i3 = onPause + 7;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
if (!isStopped()) {
AFLogger.afInfoLog(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.onAppOpenAttributionNative)));
int i5 = onPause + 109;
AppsFlyerLib = i5 % 128;
int i6 = i5 % 2;
return true;
}
}
if (!isStopped()) {
AFLogger.afInfoLog(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.afInfoLog("Sending first launch for this session!");
}
int i7 = onPause + 25;
AppsFlyerLib = i7 % 128;
int i8 = i7 % 2;
return false;
}
private String afWarnLog(Context context) {
String str;
int i = AppsFlyerLib + 31;
onPause = i % 128;
int i2 = i % 2;
SharedPreferences valueOf2 = valueOf(context);
String valueOf3 = valueOf("preInstallName");
if (valueOf3 != null) {
int i3 = AppsFlyerLib + 115;
onPause = i3 % 128;
int i4 = i3 % 2;
return valueOf3;
}
if (valueOf2.contains("preInstallName")) {
int i5 = AppsFlyerLib + 87;
onPause = i5 % 128;
if (i5 % 2 != 0) {
valueOf2.getString("preInstallName", null);
throw null;
}
str = valueOf2.getString("preInstallName", null);
} else {
if (afErrorLog(context) && (valueOf3 = AFLogger$LogLevel(context)) == null) {
valueOf3 = AFInAppEventParameterName(context, "AF_PRE_INSTALL_NAME");
int i6 = onPause + 37;
AppsFlyerLib = i6 % 128;
int i7 = i6 % 2;
}
if (valueOf3 != null) {
AFInAppEventParameterName(context).AFInAppEventType("preInstallName", valueOf3);
}
str = valueOf3;
}
if (str != null) {
AFInAppEventType("preInstallName", str);
}
return str;
}
private String getLevel(Context context) {
int i = AppsFlyerLib + 19;
onPause = i % 128;
int i2 = i % 2;
SharedPreferences valueOf2 = valueOf(context);
String str = null;
if (!valueOf2.contains("INSTALL_STORE")) {
if (afErrorLog(context)) {
str = afErrorLogForExcManagerOnly(context);
}
AFInAppEventParameterName(context).AFInAppEventType("INSTALL_STORE", str);
return str;
}
int i3 = onPause + 47;
AppsFlyerLib = i3 % 128;
if (i3 % 2 == 0) {
String string = valueOf2.getString("INSTALL_STORE", null);
int i4 = 88 / 0;
return string;
}
return valueOf2.getString("INSTALL_STORE", null);
}
private static boolean onAppOpenAttributionNative(Context context) {
if (context != null) {
int i = AppsFlyerLib + 93;
onPause = i % 128;
int i2 = i % 2;
try {
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
Network[] allNetworks = connectivityManager.getAllNetworks();
int i3 = onPause + 85;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
for (Network network : allNetworks) {
NetworkCapabilities networkCapabilities = connectivityManager.getNetworkCapabilities(network);
if (networkCapabilities.hasTransport(4) && !networkCapabilities.hasCapability(15)) {
return true;
}
}
return false;
} catch (Exception e) {
AFLogger.afErrorLog("Failed collecting ivc data", e);
}
}
return false;
}
private static float onInstallConversionDataLoadedNative(Context context) {
float f;
int intExtra;
int intExtra2;
try {
Intent registerReceiver = context.getApplicationContext().registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
intExtra = registerReceiver.getIntExtra("level", -1);
intExtra2 = registerReceiver.getIntExtra("scale", -1);
} catch (Throwable th) {
AFLogger.afErrorLog(th.getMessage(), th);
f = 1.0f;
}
if (intExtra != -1 && intExtra2 != -1) {
f = (intExtra / intExtra2) * 100.0f;
int i = AppsFlyerLib + 107;
onPause = i % 128;
int i2 = i % 2;
int i3 = AppsFlyerLib + 101;
onPause = i3 % 128;
int i4 = i3 % 2;
return f;
}
return 50.0f;
}
static Application valueOf(AFb1wSDK aFb1wSDK) {
int i = AppsFlyerLib + 15;
onPause = i % 128;
int i2 = i % 2;
Application application = aFb1wSDK.onAppOpenAttribution;
if (i2 == 0) {
return application;
}
throw null;
}
static void values() {
onValidateInApp = (char) 33969;
getInstance = (char) 34764;
onResponseError = (char) 62172;
stop = (char) 22361;
}
@Override
public final void addPushNotificationDeepLinkPath(String... strArr) {
int i = onPause + 79;
AppsFlyerLib = i % 128;
if (i % 2 != 0) {
List<String> asList = Arrays.asList(strArr);
List<List<String>> list = AFa1sSDK.AFInAppEventParameterName().AFLogger;
if (!list.contains(asList)) {
list.add(asList);
}
int i2 = AppsFlyerLib + 115;
onPause = i2 % 128;
int i3 = i2 % 2;
return;
}
AFa1sSDK.AFInAppEventParameterName().AFLogger.contains(Arrays.asList(strArr));
throw null;
}
@Override
public final void anonymizeUser(boolean z) {
int i = AppsFlyerLib + 7;
onPause = i % 128;
int i2 = i % 2;
valueOf().getLevel().AFKeystoreWrapper("anonymizeUser", String.valueOf(z));
AppsFlyerProperties.getInstance().set(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, z);
int i3 = AppsFlyerLib + 101;
onPause = i3 % 128;
if (i3 % 2 == 0) {
return;
}
throw null;
}
@Override
public final void appendParametersToDeepLinkingURL(String str, Map<String, String> map) {
int i = AppsFlyerLib + 125;
onPause = i % 128;
if (i % 2 == 0) {
AFa1sSDK AFInAppEventParameterName2 = AFa1sSDK.AFInAppEventParameterName();
AFInAppEventParameterName2.valueOf = str;
AFInAppEventParameterName2.afInfoLog = map;
int i2 = onPause + 9;
AppsFlyerLib = i2 % 128;
if (i2 % 2 != 0) {
return;
}
throw null;
}
AFa1sSDK AFInAppEventParameterName3 = AFa1sSDK.AFInAppEventParameterName();
AFInAppEventParameterName3.valueOf = str;
AFInAppEventParameterName3.afInfoLog = map;
throw null;
}
@Override
public final void enableFacebookDeferredApplinks(boolean z) {
int i = onPause + 37;
int i2 = i % 128;
AppsFlyerLib = i2;
int i3 = i % 2;
this.onAttributionFailure = z;
int i4 = i2 + 57;
onPause = i4 % 128;
if (i4 % 2 == 0) {
return;
}
throw null;
}
@Override
public final String getAppsFlyerUID(@NonNull Context context) {
int i = AppsFlyerLib + 1;
onPause = i % 128;
int i2 = i % 2;
valueOf().getLevel().AFKeystoreWrapper("getAppsFlyerUID", new String[0]);
if (context == null) {
return null;
}
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
if (context != null) {
AFc1xSDK aFc1xSDK = aFb1aSDK.AFInAppEventType;
if (context != null) {
aFc1xSDK.AFKeystoreWrapper = context.getApplicationContext();
}
}
String AFInAppEventParameterName2 = AFb1zSDK.AFInAppEventParameterName(new WeakReference(this.onValidateInAppFailure.valueOf().values.AFKeystoreWrapper));
int i3 = onPause + 5;
AppsFlyerLib = i3 % 128;
if (i3 % 2 != 0) {
return AFInAppEventParameterName2;
}
throw null;
}
@Override
public final String getAttributionId(Context context) {
try {
String values2 = new AFa1aSDK(context, valueOf()).values();
int i = onPause + 69;
AppsFlyerLib = i % 128;
if (i % 2 != 0) {
return values2;
}
throw null;
} catch (Throwable th) {
AFLogger.afErrorLog("Could not collect facebook attribution id. ", th);
return null;
}
}
@Override
public final String getHostName() {
int i = onPause + 89;
AppsFlyerLib = i % 128;
int i2 = i % 2;
String values2 = valueOf().AppsFlyer2dXConversionCallback().values();
int i3 = onPause + 27;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
return values2;
}
@Override
public final String getHostPrefix() {
int i = AppsFlyerLib + 49;
onPause = i % 128;
int i2 = i % 2;
String AFInAppEventParameterName2 = valueOf().AppsFlyer2dXConversionCallback().AFInAppEventParameterName();
int i3 = AppsFlyerLib + 115;
onPause = i3 % 128;
if (i3 % 2 == 0) {
return AFInAppEventParameterName2;
}
throw null;
}
@Override
public final String getOutOfStore(Context context) {
String string = AppsFlyerProperties.getInstance().getString("api_store_value");
if (string != null) {
int i = AppsFlyerLib + 3;
onPause = i % 128;
int i2 = i % 2;
return string;
}
String AFInAppEventParameterName2 = AFInAppEventParameterName(context, "AF_STORE");
if (AFInAppEventParameterName2 != null) {
int i3 = onPause + 49;
AppsFlyerLib = i3 % 128;
if (i3 % 2 != 0) {
return AFInAppEventParameterName2;
}
throw null;
}
AFLogger.afInfoLog("No out-of-store value set");
int i4 = AppsFlyerLib + 121;
onPause = i4 % 128;
int i5 = i4 % 2;
return null;
}
@Override
public final String getSdkVersion() {
AFc1zSDK valueOf2;
int i = AppsFlyerLib + 117;
onPause = i % 128;
if (i % 2 != 0) {
valueOf2 = valueOf();
valueOf2.getLevel().AFKeystoreWrapper("getSdkVersion", new String[1]);
} else {
valueOf2 = valueOf();
valueOf2.getLevel().AFKeystoreWrapper("getSdkVersion", new String[0]);
}
valueOf2.valueOf();
return AFb1bSDK.AFKeystoreWrapper();
}
@Override
public final AppsFlyerLib init(@NonNull String str, AppsFlyerConversionListener appsFlyerConversionListener, @NonNull Context context) {
String str2;
if (this.onResponseNative) {
return this;
}
this.onResponseNative = true;
this.onValidateInAppFailure.afWarnLog().AFInAppEventParameterName = str;
AFc1vSDK.AFKeystoreWrapper(str);
if (context != null) {
int i = onPause + 103;
AppsFlyerLib = i % 128;
int i2 = i % 2;
this.onAppOpenAttribution = (Application) context.getApplicationContext();
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
int i3 = AppsFlyerLib + 119;
int i4 = i3 % 128;
onPause = i4;
int i5 = i3 % 2;
AFc1xSDK aFc1xSDK = aFb1aSDK.AFInAppEventType;
int i6 = i4 + 3;
AppsFlyerLib = i6 % 128;
int i7 = i6 % 2;
aFc1xSDK.AFKeystoreWrapper = context.getApplicationContext();
valueOf().afRDLog().AFInAppEventType = System.currentTimeMillis();
valueOf().onInstallConversionDataLoadedNative().AFKeystoreWrapper();
valueOf().afInfoLog().AFKeystoreWrapper(new AFe1zSDK() {
@Override
public final void onRemoteConfigUpdateFinished(AFe1ySDK aFe1ySDK) {
AFb1wSDK.this.AFInAppEventType(aFe1ySDK);
}
});
AFf1lSDK AFLogger$LogLevel2 = valueOf().AFLogger$LogLevel();
final AFf1qSDK aFf1qSDK = new AFf1qSDK(new AnonymousClass2());
Runnable runnable = new Runnable() {
@Override
public final void run() {
SharedPreferences valueOf2 = AFb1wSDK.valueOf(AFb1wSDK.valueOf(AFb1wSDK.this));
boolean z = false;
int AFKeystoreWrapper2 = AFb1wSDK.this.AFKeystoreWrapper(valueOf2, false);
boolean z2 = valueOf2.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false);
if (aFf1qSDK.afRDLog == AFf1oSDK.AFa1zSDK.NOT_STARTED) {
z = true;
}
if (AFKeystoreWrapper2 == 1) {
if (z || z2) {
AFb1wSDK aFb1wSDK = AFb1wSDK.this;
AFe1fSDK aFe1fSDK = new AFe1fSDK();
Application valueOf3 = AFb1wSDK.valueOf(AFb1wSDK.this);
if (valueOf3 != null) {
aFe1fSDK.AFKeystoreWrapper = (Application) valueOf3.getApplicationContext();
}
AFb1wSDK.valueOf(aFb1wSDK, aFe1fSDK);
}
}
}
};
AFLogger$LogLevel2.AFKeystoreWrapper(aFf1qSDK);
AFLogger$LogLevel2.AFKeystoreWrapper(new AFf1mSDK(runnable));
AFLogger$LogLevel2.AFKeystoreWrapper(new AFf1uSDK(runnable, valueOf()));
AFLogger$LogLevel2.AFKeystoreWrapper(new AFf1nSDK(runnable, valueOf()));
if (!afErrorLog()) {
Application application = this.onAppOpenAttribution;
AFc1zSDK valueOf2 = valueOf();
List<ResolveInfo> queryIntentContentProviders = application.getPackageManager().queryIntentContentProviders(new Intent("com.appsflyer.referrer.INSTALL_PROVIDER"), 0);
if (queryIntentContentProviders != null && !queryIntentContentProviders.isEmpty()) {
ArrayList arrayList = new ArrayList();
Iterator<ResolveInfo> it = queryIntentContentProviders.iterator();
while (it.hasNext()) {
int i8 = AppsFlyerLib + 13;
onPause = i8 % 128;
if (i8 % 2 == 0) {
ProviderInfo providerInfo = it.next().providerInfo;
if (providerInfo != null) {
arrayList.add(new AFf1rSDK(providerInfo, runnable, valueOf2));
} else {
AFLogger.afWarnLog("[Preinstall]: com.appsflyer.referrer.INSTALL_PROVIDER Action is set for non ContentProvider component");
}
} else {
ProviderInfo providerInfo2 = it.next().providerInfo;
throw null;
}
}
if (!arrayList.isEmpty()) {
AFLogger$LogLevel2.valueOf.addAll(arrayList);
StringBuilder sb = new StringBuilder("[Preinstall]: Detected ");
sb.append(arrayList.size());
sb.append(" valid preinstall provider(s)");
AFLogger.afDebugLog(sb.toString());
}
}
}
AFf1oSDK[] AFInAppEventParameterName2 = AFLogger$LogLevel2.AFInAppEventParameterName();
int length = AFInAppEventParameterName2.length;
int i9 = 0;
while (i9 < length) {
AFInAppEventParameterName2[i9].valueOf(this.onAppOpenAttribution);
i9++;
int i10 = AppsFlyerLib + 39;
onPause = i10 % 128;
int i11 = i10 % 2;
}
this.onValidateInAppFailure.afWarnLog().values();
AFb1eSDK.AFInAppEventParameterName = this.onAppOpenAttribution;
} else {
AFLogger.afWarnLog("context is null, Google Install Referrer will be not initialized");
}
AFb1rSDK level = valueOf().getLevel();
String[] strArr = new String[2];
strArr[0] = str;
if (appsFlyerConversionListener == null) {
int i12 = AppsFlyerLib + 33;
onPause = i12 % 128;
int i13 = i12 % 2;
str2 = "null";
} else {
str2 = "conversionDataListener";
}
strArr[1] = str2;
level.AFKeystoreWrapper("init", strArr);
AFLogger.valueOf(String.format("Initializing AppsFlyer SDK: (v%s.%s)", "6.10.1", valueOf));
AFInAppEventType = appsFlyerConversionListener;
return this;
}
@Override
public final boolean isPreInstalledApp(Context context) {
int i = onPause + 77;
AppsFlyerLib = i % 128;
int i2 = i % 2;
try {
if ((context.getPackageManager().getApplicationInfo(context.getPackageName(), 0).flags & 1) != 0) {
int i3 = onPause + 5;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
return true;
}
} catch (PackageManager.NameNotFoundException e) {
AFLogger.afErrorLog("Could not check if app is pre installed", e);
}
return false;
}
@Override
@Deprecated
public final boolean isStopped() {
int i = AppsFlyerLib + 71;
onPause = i % 128;
int i2 = i % 2;
boolean AFInAppEventParameterName2 = this.onValidateInAppFailure.afWarnLog().AFInAppEventParameterName();
int i3 = AppsFlyerLib + 119;
onPause = i3 % 128;
int i4 = i3 % 2;
return AFInAppEventParameterName2;
}
@Override
public final void logEvent(Context context, String str, Map<String, Object> map) {
int i = onPause + 81;
AppsFlyerLib = i % 128;
int i2 = i % 2;
logEvent(context, str, map, null);
if (i2 == 0) {
throw null;
}
int i3 = AppsFlyerLib + 63;
onPause = i3 % 128;
int i4 = i3 % 2;
}
@Override
public final void logLocation(Context context, double d, double d2) {
valueOf().getLevel().AFKeystoreWrapper("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));
valueOf(context, AFInAppEventType.LOCATION_COORDINATES, hashMap);
int i = AppsFlyerLib + 5;
onPause = i % 128;
if (i % 2 == 0) {
return;
}
throw null;
}
@Override
public final void logSession(Context context) {
int i = AppsFlyerLib + 1;
onPause = i % 128;
int i2 = i % 2;
valueOf().getLevel().AFKeystoreWrapper("logSession", new String[0]);
valueOf().getLevel().values();
AFInAppEventParameterName(context, AFe1hSDK.logSession);
valueOf(context, null, null);
int i3 = onPause + 39;
AppsFlyerLib = i3 % 128;
if (i3 % 2 != 0) {
return;
}
throw null;
}
@Override
public final void onPause(Context context) {
AFb1xSDK.AFa1ySDK aFa1ySDK = AFb1xSDK.values;
if (aFa1ySDK != null) {
aFa1ySDK.AFInAppEventType(context);
int i = AppsFlyerLib + 71;
onPause = i % 128;
int i2 = i % 2;
}
int i3 = AppsFlyerLib + 67;
onPause = i3 % 128;
int i4 = i3 % 2;
}
@Override
@Deprecated
public final void performOnAppAttribution(@NonNull Context context, @NonNull URI uri) {
int i = onPause + 17;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
int i2 = 14 / 0;
}
StringBuilder sb = new StringBuilder("Link is \"");
sb.append(uri);
sb.append("\"");
AFb1pSDK.AFInAppEventType(sb.toString(), DeepLinkResult.Error.NETWORK);
}
@Override
public final void performOnDeepLinking(@NonNull final Intent intent, @NonNull Context context) {
if (intent == null) {
int i = AppsFlyerLib + 87;
onPause = i % 128;
int i2 = i % 2;
AFb1pSDK.AFInAppEventType("performOnDeepLinking was called with null intent", DeepLinkResult.Error.DEVELOPER_ERROR);
int i3 = AppsFlyerLib + 113;
onPause = i3 % 128;
int i4 = i3 % 2;
} else if (context == null) {
int i5 = onPause + 61;
AppsFlyerLib = i5 % 128;
if (i5 % 2 != 0) {
AFb1pSDK.AFInAppEventType("performOnDeepLinking was called with null context", DeepLinkResult.Error.DEVELOPER_ERROR);
} else {
AFb1pSDK.AFInAppEventType("performOnDeepLinking was called with null context", DeepLinkResult.Error.DEVELOPER_ERROR);
throw null;
}
} else {
final Context applicationContext = context.getApplicationContext();
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
if (applicationContext != null) {
AFc1xSDK aFc1xSDK = aFb1aSDK.AFInAppEventType;
int i6 = onPause + 21;
AppsFlyerLib = i6 % 128;
if (i6 % 2 != 0) {
aFc1xSDK.AFKeystoreWrapper = applicationContext.getApplicationContext();
} else {
aFc1xSDK.AFKeystoreWrapper = applicationContext.getApplicationContext();
throw null;
}
}
this.onValidateInAppFailure.AFInAppEventParameterName().execute(new Runnable() {
@Override
public final void run() {
AFb1wSDK.this.AFKeystoreWrapper(applicationContext, intent);
}
});
}
}
@Override
public final void registerConversionListener(Context context, AppsFlyerConversionListener appsFlyerConversionListener) {
int i = AppsFlyerLib + 95;
onPause = i % 128;
int i2 = i % 2;
valueOf().getLevel().AFKeystoreWrapper("registerConversionListener", new String[0]);
AFKeystoreWrapper(appsFlyerConversionListener);
int i3 = AppsFlyerLib + 65;
onPause = i3 % 128;
if (i3 % 2 != 0) {
int i4 = 85 / 0;
}
}
@Override
public final void registerValidatorListener(Context context, AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener) {
int i = onPause + 77;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
valueOf().getLevel().AFKeystoreWrapper("registerValidatorListener", new String[0]);
AFLogger.afDebugLog("registerValidatorListener called");
} else {
valueOf().getLevel().AFKeystoreWrapper("registerValidatorListener", new String[0]);
AFLogger.afDebugLog("registerValidatorListener called");
}
}
@Override
public final void sendAdRevenue(Context context, Map<String, Object> map) {
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
if (context != null) {
int i = AppsFlyerLib;
int i2 = i + 109;
onPause = i2 % 128;
int i3 = i2 % 2;
AFc1xSDK aFc1xSDK = aFb1aSDK.AFInAppEventType;
if (context != null) {
int i4 = i + 119;
onPause = i4 % 128;
if (i4 % 2 != 0) {
aFc1xSDK.AFKeystoreWrapper = context.getApplicationContext();
int i5 = 97 / 0;
} else {
aFc1xSDK.AFKeystoreWrapper = context.getApplicationContext();
}
}
}
AFe1gSDK aFe1gSDK = new AFe1gSDK();
if (context != null) {
int i6 = AppsFlyerLib + 61;
onPause = i6 % 128;
int i7 = i6 % 2;
aFe1gSDK.AFKeystoreWrapper = (Application) context.getApplicationContext();
}
int valueOf2 = valueOf(valueOf(context));
aFe1gSDK.values().put("ad_network", map);
aFe1gSDK.values().put("adrevenue_counter", Integer.valueOf(valueOf2));
Activity activity = null;
if (context instanceof Activity) {
int i8 = AppsFlyerLib + 59;
onPause = i8 % 128;
if (i8 % 2 == 0) {
activity = (Activity) context;
} else {
Activity activity2 = (Activity) context;
throw null;
}
}
AFKeystoreWrapper(aFe1gSDK, activity);
}
@Override
public final void sendInAppPurchaseData(Context context, Map<String, Object> map, PurchaseHandler.PurchaseValidationCallback purchaseValidationCallback) {
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
Context applicationContext = context.getApplicationContext();
if (applicationContext != null) {
int i = AppsFlyerLib;
int i2 = i + 77;
onPause = i2 % 128;
int i3 = i2 % 2;
AFc1xSDK aFc1xSDK = aFb1aSDK.AFInAppEventType;
if (applicationContext != null) {
int i4 = i + 59;
onPause = i4 % 128;
if (i4 % 2 != 0) {
aFc1xSDK.AFKeystoreWrapper = applicationContext.getApplicationContext();
int i5 = 73 / 0;
} else {
aFc1xSDK.AFKeystoreWrapper = applicationContext.getApplicationContext();
}
}
}
PurchaseHandler afErrorLog2 = valueOf().afErrorLog();
if (afErrorLog2.AFInAppEventParameterName(map, purchaseValidationCallback, "purchases")) {
AFd1lSDK aFd1lSDK = new AFd1lSDK(map, purchaseValidationCallback, afErrorLog2.values);
AFd1vSDK aFd1vSDK = afErrorLog2.AFInAppEventType;
aFd1vSDK.values.execute(new AFd1vSDK.AnonymousClass2(aFd1lSDK));
}
}
@Override
public final void sendPurchaseData(Context context, Map<String, Object> map, PurchaseHandler.PurchaseValidationCallback purchaseValidationCallback) {
int i = onPause + 113;
AppsFlyerLib = i % 128;
if (i % 2 != 0) {
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
Context applicationContext = context.getApplicationContext();
if (applicationContext != null) {
AFc1xSDK aFc1xSDK = aFb1aSDK.AFInAppEventType;
if (applicationContext != null) {
int i2 = onPause + 91;
AppsFlyerLib = i2 % 128;
if (i2 % 2 != 0) {
aFc1xSDK.AFKeystoreWrapper = applicationContext.getApplicationContext();
} else {
aFc1xSDK.AFKeystoreWrapper = applicationContext.getApplicationContext();
throw null;
}
}
}
PurchaseHandler afErrorLog2 = valueOf().afErrorLog();
if (afErrorLog2.AFInAppEventParameterName(map, purchaseValidationCallback, "subscriptions")) {
AFd1oSDK aFd1oSDK = new AFd1oSDK(map, purchaseValidationCallback, afErrorLog2.values);
AFd1vSDK aFd1vSDK = afErrorLog2.AFInAppEventType;
aFd1vSDK.values.execute(new AFd1vSDK.AnonymousClass2(aFd1oSDK));
return;
}
return;
}
context.getApplicationContext();
throw null;
}
@Override
public final void sendPushNotificationData(@NonNull Activity activity) {
long j;
if (activity != null && activity.getIntent() != null) {
AFb1rSDK level = valueOf().getLevel();
String localClassName = activity.getLocalClassName();
StringBuilder sb = new StringBuilder("activity_intent_");
sb.append(activity.getIntent().toString());
level.AFKeystoreWrapper("sendPushNotificationData", localClassName, sb.toString());
int i = AppsFlyerLib + 21;
onPause = i % 128;
int i2 = i % 2;
} else if (activity != null) {
valueOf().getLevel().AFKeystoreWrapper("sendPushNotificationData", activity.getLocalClassName(), "activity_intent_null");
} else {
valueOf().getLevel().AFKeystoreWrapper("sendPushNotificationData", "activity_null");
}
String AFInAppEventType2 = AFInAppEventType(activity);
this.onInstallConversionDataLoadedNative = AFInAppEventType2;
if (AFInAppEventType2 != null) {
long currentTimeMillis = System.currentTimeMillis();
if (this.onConversionDataSuccess == null) {
AFLogger.afInfoLog("pushes: initializing pushes history..");
this.onConversionDataSuccess = new ConcurrentHashMap();
int i3 = onPause + 5;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
j = currentTimeMillis;
} else {
try {
long j2 = AppsFlyerProperties.getInstance().getLong("pushPayloadMaxAging", 1800000L);
int i5 = AppsFlyerLib + 65;
onPause = i5 % 128;
int i6 = i5 % 2;
j = currentTimeMillis;
for (Long l : this.onConversionDataSuccess.keySet()) {
try {
JSONObject jSONObject = new JSONObject(this.onInstallConversionDataLoadedNative);
JSONObject jSONObject2 = new JSONObject(this.onConversionDataSuccess.get(l));
if (jSONObject.opt("pid").equals(jSONObject2.opt("pid")) && jSONObject.opt("c").equals(jSONObject2.opt("c"))) {
StringBuilder sb2 = new StringBuilder("PushNotificationMeasurement: A previous payload with same PID and campaign was already acknowledged! (old: ");
sb2.append(jSONObject2);
sb2.append(", new: ");
sb2.append(jSONObject);
sb2.append(")");
AFLogger.afInfoLog(sb2.toString());
this.onInstallConversionDataLoadedNative = null;
return;
}
if (currentTimeMillis - l.longValue() > j2) {
int i7 = AppsFlyerLib + 71;
onPause = i7 % 128;
int i8 = i7 % 2;
this.onConversionDataSuccess.remove(l);
}
if (l.longValue() <= j) {
int i9 = onPause + 109;
AppsFlyerLib = i9 % 128;
if (i9 % 2 != 0) {
j = l.longValue();
} else {
l.longValue();
throw null;
}
}
} catch (Throwable th) {
th = th;
StringBuilder sb3 = new StringBuilder("Error while handling push notification measurement: ");
sb3.append(th.getClass().getSimpleName());
AFLogger.afErrorLog(sb3.toString(), th);
if (this.onConversionDataSuccess.size() == AppsFlyerProperties.getInstance().getInt("pushPayloadHistorySize", 2)) {
}
this.onConversionDataSuccess.put(Long.valueOf(currentTimeMillis), this.onInstallConversionDataLoadedNative);
start(activity);
}
}
} catch (Throwable th2) {
th = th2;
j = currentTimeMillis;
}
}
if (this.onConversionDataSuccess.size() == AppsFlyerProperties.getInstance().getInt("pushPayloadHistorySize", 2)) {
StringBuilder sb4 = new StringBuilder("pushes: removing oldest overflowing push (oldest push:");
sb4.append(j);
sb4.append(")");
AFLogger.afInfoLog(sb4.toString());
this.onConversionDataSuccess.remove(Long.valueOf(j));
}
this.onConversionDataSuccess.put(Long.valueOf(currentTimeMillis), this.onInstallConversionDataLoadedNative);
start(activity);
}
}
@Override
public final void setAdditionalData(Map<String, Object> map) {
int i = AppsFlyerLib + 43;
onPause = i % 128;
if (i % 2 == 0) {
if (map != null) {
valueOf().getLevel().AFKeystoreWrapper("setAdditionalData", map.toString());
AppsFlyerProperties.getInstance().setCustomData(JSONObjectInstrumentation.toString(new JSONObject(map)));
int i2 = onPause + 75;
AppsFlyerLib = i2 % 128;
int i3 = i2 % 2;
return;
}
return;
}
throw null;
}
@Override
public final void setAndroidIdData(String str) {
int i = onPause + 51;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
AFb1rSDK level = valueOf().getLevel();
String[] strArr = new String[0];
strArr[0] = str;
level.AFKeystoreWrapper("setAndroidIdData", strArr);
} else {
valueOf().getLevel().AFKeystoreWrapper("setAndroidIdData", str);
}
this.AFLogger = str;
int i2 = onPause + 119;
AppsFlyerLib = i2 % 128;
int i3 = i2 % 2;
}
@Override
public final void setAppId(String str) {
int i = onPause + 119;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
AFb1rSDK level = valueOf().getLevel();
String[] strArr = new String[1];
strArr[1] = str;
level.AFKeystoreWrapper("setAppId", strArr);
} else {
valueOf().getLevel().AFKeystoreWrapper("setAppId", str);
}
AFInAppEventType(AppsFlyerProperties.APP_ID, str);
int i2 = AppsFlyerLib + 105;
onPause = i2 % 128;
if (i2 % 2 == 0) {
return;
}
throw null;
}
@Override
public final void setAppInviteOneLink(String str) {
int i = onPause + 41;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
AFb1rSDK level = valueOf().getLevel();
String[] strArr = new String[1];
strArr[1] = str;
level.AFKeystoreWrapper("setAppInviteOneLink", strArr);
AFLogger.afInfoLog("setAppInviteOneLink = ".concat(String.valueOf(str)));
} else {
valueOf().getLevel().AFKeystoreWrapper("setAppInviteOneLink", str);
AFLogger.afInfoLog("setAppInviteOneLink = ".concat(String.valueOf(str)));
}
AFInAppEventType(AppsFlyerProperties.ONELINK_ID, str);
}
@Override
public final void setCollectAndroidID(boolean z) {
int i = AppsFlyerLib + 71;
onPause = i % 128;
int i2 = i % 2;
valueOf().getLevel().AFKeystoreWrapper("setCollectAndroidID", String.valueOf(z));
AFInAppEventType(AppsFlyerProperties.COLLECT_ANDROID_ID, Boolean.toString(z));
AFInAppEventType(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, Boolean.toString(z));
int i3 = onPause + 87;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
}
@Override
public final void setCollectIMEI(boolean z) {
int i = onPause + 17;
AppsFlyerLib = i % 128;
int i2 = i % 2;
valueOf().getLevel().AFKeystoreWrapper("setCollectIMEI", String.valueOf(z));
AFInAppEventType(AppsFlyerProperties.COLLECT_IMEI, Boolean.toString(z));
AFInAppEventType(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, Boolean.toString(z));
int i3 = onPause + 35;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
}
@Override
@Deprecated
public final void setCollectOaid(boolean z) {
int i = onPause + 97;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
AFb1rSDK level = valueOf().getLevel();
String[] strArr = new String[0];
strArr[0] = String.valueOf(z);
level.AFKeystoreWrapper("setCollectOaid", strArr);
} else {
valueOf().getLevel().AFKeystoreWrapper("setCollectOaid", String.valueOf(z));
}
AFInAppEventType(AppsFlyerProperties.COLLECT_OAID, Boolean.toString(z));
int i2 = AppsFlyerLib + 97;
onPause = i2 % 128;
int i3 = i2 % 2;
}
@Override
public final void setCurrencyCode(String str) {
int i = AppsFlyerLib + 99;
onPause = i % 128;
int i2 = i % 2;
valueOf().getLevel().AFKeystoreWrapper("setCurrencyCode", str);
AppsFlyerProperties.getInstance().set(AppsFlyerProperties.CURRENCY_CODE, str);
int i3 = AppsFlyerLib + 89;
onPause = i3 % 128;
if (i3 % 2 == 0) {
return;
}
throw null;
}
@Override
public final void setCustomerIdAndLogSession(String str, @NonNull Context context) {
int i = AppsFlyerLib + 77;
onPause = i % 128;
int i2 = i % 2;
if (context != null) {
if (AFInAppEventParameterName()) {
setCustomerUserId(str);
StringBuilder sb = new StringBuilder("CustomerUserId set: ");
sb.append(str);
sb.append(" - Initializing AppsFlyer Tacking");
AFLogger.afInfoLog(sb.toString(), true);
String referrer = AppsFlyerProperties.getInstance().getReferrer(context);
AFInAppEventParameterName(context, AFe1hSDK.setCustomerIdAndLogSession);
String str2 = this.onValidateInAppFailure.afWarnLog().AFInAppEventParameterName;
if (referrer == null) {
referrer = "";
}
String str3 = referrer;
if (context instanceof Activity) {
((Activity) context).getIntent();
}
values(context, null, null, str3, null);
return;
}
setCustomerUserId(str);
AFLogger.afInfoLog("waitForCustomerUserId is false; setting CustomerUserID: ".concat(String.valueOf(str)), true);
int i3 = AppsFlyerLib + 17;
onPause = i3 % 128;
int i4 = i3 % 2;
}
}
@Override
public final void setCustomerUserId(String str) {
int i = onPause + 5;
AppsFlyerLib = i % 128;
int i2 = i % 2;
valueOf().getLevel().AFKeystoreWrapper("setCustomerUserId", str);
AFLogger.afInfoLog("setCustomerUserId = ".concat(String.valueOf(str)));
AFInAppEventType(AppsFlyerProperties.APP_USER_ID, str);
values(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false);
int i3 = AppsFlyerLib + 73;
onPause = i3 % 128;
int i4 = i3 % 2;
}
@Override
public final void setDebugLog(boolean z) {
AFLogger.LogLevel logLevel;
int i = onPause + 103;
AppsFlyerLib = i % 128;
int i2 = i % 2;
if (!z) {
logLevel = AFLogger.LogLevel.NONE;
} else {
logLevel = AFLogger.LogLevel.DEBUG;
int i3 = onPause + 17;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
}
setLogLevel(logLevel);
int i5 = onPause + 35;
AppsFlyerLib = i5 % 128;
int i6 = i5 % 2;
}
@Override
public final void setDisableAdvertisingIdentifiers(boolean z) {
int i = AppsFlyerLib + 77;
onPause = i % 128;
int i2 = i % 2;
AFLogger.afDebugLog("setDisableAdvertisingIdentifiers: ".concat(String.valueOf(z)));
boolean z2 = true;
if (z) {
int i3 = onPause + 99;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
z2 = false;
}
AFa1eSDK.values = Boolean.valueOf(z2);
AppsFlyerProperties.getInstance().remove("advertiserIdEnabled");
AppsFlyerProperties.getInstance().remove("advertiserId");
}
@Override
public final void setDisableNetworkData(boolean z) {
int i = AppsFlyerLib + 49;
onPause = i % 128;
if (i % 2 == 0) {
AFLogger.afDebugLog("setDisableNetworkData: ".concat(String.valueOf(z)));
values(AppsFlyerProperties.DISABLE_NETWORK_DATA, z);
return;
}
AFLogger.afDebugLog("setDisableNetworkData: ".concat(String.valueOf(z)));
values(AppsFlyerProperties.DISABLE_NETWORK_DATA, z);
throw null;
}
@Override
public final void setExtension(String str) {
int i = onPause + 79;
AppsFlyerLib = i % 128;
int i2 = i % 2;
valueOf().getLevel().AFKeystoreWrapper("setExtension", str);
AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EXTENSION, str);
int i3 = onPause + 85;
AppsFlyerLib = i3 % 128;
if (i3 % 2 != 0) {
return;
}
throw null;
}
@Override
public final void setHost(String str, @NonNull String str2) {
String str3;
if (!AFb1nSDK.AFKeystoreWrapper(str2)) {
int i = onPause;
int i2 = i + 41;
AppsFlyerLib = i2 % 128;
if (i2 % 2 != 0) {
if (str != null) {
str3 = str.trim();
} else {
int i3 = i + 97;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
str3 = "";
}
AFd1ySDK.values(new AFc1bSDK(str3, str2.trim()));
return;
}
throw null;
}
AFLogger.afWarnLog("hostname was empty or null - call for setHost is skipped");
}
@Override
public final void setImeiData(String str) {
int i = AppsFlyerLib + 103;
onPause = i % 128;
if (i % 2 != 0) {
AFb1rSDK level = valueOf().getLevel();
String[] strArr = new String[0];
strArr[0] = str;
level.AFKeystoreWrapper("setImeiData", strArr);
} else {
valueOf().getLevel().AFKeystoreWrapper("setImeiData", str);
}
valueOf().afWarnLog().AFKeystoreWrapper = str;
int i2 = onPause + 71;
AppsFlyerLib = i2 % 128;
if (i2 % 2 == 0) {
int i3 = 66 / 0;
}
}
@Override
public final void setIsUpdate(boolean z) {
int i = onPause + 115;
AppsFlyerLib = i % 128;
int i2 = i % 2;
valueOf().getLevel().AFKeystoreWrapper("setIsUpdate", String.valueOf(z));
AppsFlyerProperties.getInstance().set(AppsFlyerProperties.IS_UPDATE, z);
int i3 = onPause + 123;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
}
@Override
public final void setLogLevel(@NonNull AFLogger.LogLevel logLevel) {
boolean z;
int i = onPause + 85;
AppsFlyerLib = i % 128;
int i2 = i % 2;
if (logLevel.getLevel() > AFLogger.LogLevel.NONE.getLevel()) {
int i3 = onPause + 59;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
z = true;
} else {
z = false;
}
this.onValidateInAppFailure.getLevel().AFKeystoreWrapper("log", String.valueOf(z));
AppsFlyerProperties.getInstance().set("logLevel", logLevel.getLevel());
}
@Override
public final void setMinTimeBetweenSessions(int i) {
int i2 = AppsFlyerLib + 115;
onPause = i2 % 128;
if (i2 % 2 == 0) {
this.onAppOpenAttributionNative = TimeUnit.SECONDS.toMillis(i);
} else {
this.onAppOpenAttributionNative = TimeUnit.SECONDS.toMillis(i);
throw null;
}
}
@Override
public final void setOaidData(String str) {
int i = AppsFlyerLib + 93;
onPause = i % 128;
int i2 = i % 2;
valueOf().getLevel().AFKeystoreWrapper("setOaidData", str);
AFa1eSDK.valueOf = str;
int i3 = AppsFlyerLib + 17;
onPause = i3 % 128;
int i4 = i3 % 2;
}
@Override
public final void setOneLinkCustomDomain(String... strArr) {
int i = AppsFlyerLib + 123;
onPause = i % 128;
int i2 = i % 2;
AFLogger.afDebugLog(String.format("setOneLinkCustomDomain %s", Arrays.toString(strArr)));
AFa1sSDK.AFKeystoreWrapper = strArr;
int i3 = onPause + 47;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
}
@Override
public final void setOutOfStore(String str) {
if (str != null) {
int i = onPause + 13;
AppsFlyerLib = i % 128;
int i2 = i % 2;
String lowerCase = str.toLowerCase();
AppsFlyerProperties.getInstance().set("api_store_value", lowerCase);
AFLogger.afInfoLog("Store API set with value: ".concat(String.valueOf(lowerCase)), true);
int i3 = AppsFlyerLib + 111;
onPause = i3 % 128;
int i4 = i3 % 2;
return;
}
AFLogger.AFKeystoreWrapper("Cannot set setOutOfStore with null");
}
@Override
public final void setPartnerData(@NonNull String str, Map<String, Object> map) {
String concat;
if (this.AppsFlyerConversionListener == null) {
this.AppsFlyerConversionListener = new AFb1dSDK();
}
AFb1dSDK aFb1dSDK = this.AppsFlyerConversionListener;
if (str != null && !str.isEmpty()) {
if (map != null && !map.isEmpty()) {
StringBuilder sb = new StringBuilder("Setting partner data for ");
sb.append(str);
sb.append(": ");
sb.append(map);
AFLogger.afDebugLog(sb.toString());
int length = JSONObjectInstrumentation.toString(new JSONObject(map)).length();
if (length > 1000) {
AFLogger.afWarnLog("Partner data 1000 characters limit exceeded");
HashMap hashMap = new HashMap();
hashMap.put("error", "limit exceeded: ".concat(String.valueOf(length)));
aFb1dSDK.AFKeystoreWrapper.put(str, hashMap);
return;
}
aFb1dSDK.values.put(str, map);
aFb1dSDK.AFKeystoreWrapper.remove(str);
int i = AppsFlyerLib + 67;
onPause = i % 128;
if (i % 2 != 0) {
int i2 = 92 / 0;
return;
}
return;
}
if (aFb1dSDK.values.remove(str) == null) {
concat = "Partner data is missing or `null`";
} else {
concat = "Cleared partner data for ".concat(str);
}
AFLogger.afWarnLog(concat);
int i3 = AppsFlyerLib + 107;
onPause = i3 % 128;
if (i3 % 2 != 0) {
int i4 = 17 / 0;
return;
}
return;
}
AFLogger.afWarnLog("Partner ID is missing or `null`");
}
@Override
public final void setPhoneNumber(String str) {
int i = AppsFlyerLib + 33;
onPause = i % 128;
int i2 = i % 2;
this.onConversionDataFail = AFb1ySDK.AFInAppEventParameterName(str);
int i3 = AppsFlyerLib + 47;
onPause = i3 % 128;
int i4 = i3 % 2;
}
@Override
public final void setPreinstallAttribution(String str, String str2, String str3) {
AFLogger.afDebugLog("setPreinstallAttribution API called");
JSONObject jSONObject = new JSONObject();
if (str != null) {
try {
jSONObject.put("pid", str);
int i = onPause + 71;
AppsFlyerLib = i % 128;
int i2 = i % 2;
} catch (JSONException e) {
AFLogger.afErrorLog(e.getMessage(), e);
}
}
if (str2 != null) {
int i3 = AppsFlyerLib + 35;
onPause = i3 % 128;
if (i3 % 2 == 0) {
jSONObject.put("c", str2);
} else {
jSONObject.put("c", str2);
throw null;
}
}
if (str3 != null) {
int i4 = AppsFlyerLib + 109;
onPause = i4 % 128;
int i5 = i4 % 2;
jSONObject.put("af_siteid", str3);
}
if (jSONObject.has("pid")) {
int i6 = AppsFlyerLib + 73;
onPause = i6 % 128;
if (i6 % 2 == 0) {
AFInAppEventType("preInstallName", JSONObjectInstrumentation.toString(jSONObject));
return;
} else {
AFInAppEventType("preInstallName", JSONObjectInstrumentation.toString(jSONObject));
throw null;
}
}
AFLogger.afWarnLog("Cannot set preinstall attribution data without a media source");
int i7 = AppsFlyerLib + 125;
onPause = i7 % 128;
if (i7 % 2 != 0) {
int i8 = 2 / 0;
}
}
@Override
public final void setResolveDeepLinkURLs(String... strArr) {
int i = onPause + 117;
AppsFlyerLib = i % 128;
int i2 = i % 2;
AFLogger.afDebugLog(String.format("setResolveDeepLinkURLs %s", Arrays.toString(strArr)));
List<String> list = AFa1sSDK.values;
list.clear();
list.addAll(Arrays.asList(strArr));
int i3 = onPause + 69;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
}
@Override
@Deprecated
public final void setSharingFilter(@NonNull String... strArr) {
int i = onPause + 107;
AppsFlyerLib = i % 128;
int i2 = i % 2;
setSharingFilterForPartners(strArr);
if (i2 != 0) {
int i3 = onPause + 33;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
return;
}
throw null;
}
@Override
@Deprecated
public final void setSharingFilterForAllPartners() {
int i = AppsFlyerLib + 117;
onPause = i % 128;
if (i % 2 != 0) {
String[] strArr = new String[0];
strArr[0] = "all";
setSharingFilterForPartners(strArr);
return;
}
setSharingFilterForPartners("all");
}
@Override
public final void setSharingFilterForPartners(String... strArr) {
this.afInfoLog = new AFa1fSDK(strArr);
int i = onPause + 69;
AppsFlyerLib = i % 128;
if (i % 2 != 0) {
return;
}
throw null;
}
@Override
public final void setUserEmails(String... strArr) {
int i = onPause + 87;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
valueOf().getLevel().AFKeystoreWrapper("setUserEmails", strArr);
setUserEmails(AppsFlyerProperties.EmailsCryptType.NONE, strArr);
int i2 = 81 / 0;
return;
}
valueOf().getLevel().AFKeystoreWrapper("setUserEmails", strArr);
setUserEmails(AppsFlyerProperties.EmailsCryptType.NONE, strArr);
}
@Override
public final void start(@NonNull Context context) {
int i = AppsFlyerLib + 81;
onPause = i % 128;
int i2 = i % 2;
start(context, null);
if (i2 != 0) {
throw null;
}
}
@Override
public final void stop(boolean z, Context context) {
AFc1xSDK aFc1xSDK;
int i = onPause + 7;
int i2 = i % 128;
AppsFlyerLib = i2;
int i3 = i % 2;
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
if (context != null) {
int i4 = i2 + 15;
onPause = i4 % 128;
if (i4 % 2 != 0) {
aFc1xSDK = aFb1aSDK.AFInAppEventType;
int i5 = 47 / 0;
} else {
aFc1xSDK = aFb1aSDK.AFInAppEventType;
}
aFc1xSDK.AFKeystoreWrapper = context.getApplicationContext();
}
this.onValidateInAppFailure.afWarnLog().values = z;
try {
File file = new File(this.onValidateInAppFailure.afErrorLogForExcManagerOnly().AFInAppEventType.AFKeystoreWrapper.getFilesDir(), "AFRequestCache");
if (!file.exists()) {
file.mkdir();
} else {
File[] listFiles = file.listFiles();
if (listFiles != null) {
for (File file2 : listFiles) {
StringBuilder sb = new StringBuilder("CACHE: Found cached request");
sb.append(file2.getName());
AFLogger.afInfoLog(sb.toString());
StringBuilder sb2 = new StringBuilder("CACHE: Deleting ");
sb2.append(file2.getName());
sb2.append(" from cache");
AFLogger.afInfoLog(sb2.toString());
file2.delete();
}
}
}
} catch (Exception e) {
AFLogger.afErrorLog("CACHE: Could not cache request", e);
}
if (z) {
AFInAppEventParameterName(context).valueOf("is_stop_tracking_used", true);
int i6 = onPause + 33;
AppsFlyerLib = i6 % 128;
int i7 = i6 % 2;
}
}
@Override
public final void subscribeForDeepLink(@NonNull DeepLinkListener deepLinkListener) {
int i = AppsFlyerLib + 85;
onPause = i % 128;
int i2 = i % 2;
subscribeForDeepLink(deepLinkListener, TimeUnit.SECONDS.toMillis(3L));
int i3 = onPause + 119;
AppsFlyerLib = i3 % 128;
if (i3 % 2 == 0) {
throw null;
}
}
@Override
public final void unregisterConversionListener() {
int i = onPause + 103;
AppsFlyerLib = i % 128;
int i2 = i % 2;
valueOf().getLevel().AFKeystoreWrapper("unregisterConversionListener", new String[0]);
AFInAppEventType = null;
int i3 = AppsFlyerLib + 13;
onPause = i3 % 128;
if (i3 % 2 != 0) {
int i4 = 39 / 0;
}
}
@Override
public final void updateServerUninstallToken(Context context, String str) {
boolean z;
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
if (context != null) {
aFb1aSDK.AFInAppEventType.AFKeystoreWrapper = context.getApplicationContext();
}
AFe1rSDK aFe1rSDK = new AFe1rSDK(context);
if (str != null && !str.trim().isEmpty()) {
AFLogger.afInfoLog("[register] Firebase Refreshed Token = ".concat(str));
AFb1sSDK AFInAppEventType2 = aFe1rSDK.AFInAppEventType();
if (AFInAppEventType2 == null || !str.equals(AFInAppEventType2.valueOf)) {
long currentTimeMillis = System.currentTimeMillis();
if (AFInAppEventType2 != null && currentTimeMillis - AFInAppEventType2.AFInAppEventType <= TimeUnit.SECONDS.toMillis(2L)) {
z = false;
} else {
z = true;
}
AFb1sSDK aFb1sSDK = new AFb1sSDK(str, currentTimeMillis, !z);
aFe1rSDK.AFKeystoreWrapper.AFInAppEventType("afUninstallToken", aFb1sSDK.valueOf);
aFe1rSDK.AFKeystoreWrapper.values("afUninstallToken_received_time", aFb1sSDK.AFInAppEventType);
aFe1rSDK.AFKeystoreWrapper.valueOf("afUninstallToken_queued", aFb1sSDK.AFKeystoreWrapper());
if (z) {
AFe1rSDK.AFInAppEventParameterName(str);
return;
}
return;
}
return;
}
AFLogger.afWarnLog("[register] Firebase Token is either empty or null and was not registered.");
}
@Override
public final void validateAndLogInAppPurchase(Context context, String str, String str2, String str3, String str4, String str5, Map<String, String> map) {
String obj;
Intent intent;
AFb1rSDK level = valueOf().getLevel();
String[] strArr = new String[6];
strArr[0] = str;
strArr[1] = str2;
strArr[2] = str3;
strArr[3] = str4;
strArr[4] = str5;
if (map == null) {
obj = "";
} else {
obj = map.toString();
}
strArr[5] = obj;
level.AFKeystoreWrapper("validateAndTrackInAppPurchase", strArr);
if (!isStopped()) {
StringBuilder sb = new StringBuilder("Validate in app called with parameters: ");
sb.append(str3);
sb.append(" ");
sb.append(str4);
sb.append(" ");
sb.append(str5);
AFLogger.afInfoLog(sb.toString());
}
if (str != null && str4 != null && str2 != null && str5 != null && str3 != null) {
Context applicationContext = context.getApplicationContext();
String str6 = this.onValidateInAppFailure.afWarnLog().AFInAppEventParameterName;
if (context instanceof Activity) {
intent = ((Activity) context).getIntent();
} else {
intent = null;
}
new Thread(new AFa1dSDK(applicationContext, str6, str, str2, str3, str4, str5, map, intent)).start();
return;
}
AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener = values;
if (appsFlyerInAppPurchaseValidatorListener != null) {
appsFlyerInAppPurchaseValidatorListener.onValidateInAppFailure("Please provide purchase parameters");
}
}
@Override
public final void waitForCustomerUserId(boolean z) {
String concat;
boolean z2;
int i = onPause + 57;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
concat = "initAfterCustomerUserID: ".concat(String.valueOf(z));
z2 = false;
} else {
concat = "initAfterCustomerUserID: ".concat(String.valueOf(z));
z2 = true;
}
AFLogger.afInfoLog(concat, z2);
values(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, z);
int i2 = onPause + 21;
AppsFlyerLib = i2 % 128;
int i3 = i2 % 2;
}
private static void AFInAppEventParameterName(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()));
int i = onPause + 101;
AppsFlyerLib = i % 128;
int i2 = i % 2;
for (int i3 = 0; i3 < jSONArray.length(); i3++) {
arrayList.add(Long.valueOf(jSONArray.getLong(i3)));
}
} catch (JSONException e) {
AFLogger.afErrorLogForExcManagerOnly("error at timeStampArr", e);
}
}
Collections.sort(arrayList);
Iterator<String> keys2 = jSONObject.keys();
loop2: while (true) {
str = null;
while (keys2.hasNext() && str == null) {
String next = keys2.next();
try {
JSONArray jSONArray2 = new JSONArray((String) jSONObject.get(next));
int i4 = 0;
while (i4 < jSONArray2.length()) {
int i5 = AppsFlyerLib + 7;
onPause = i5 % 128;
int i6 = i5 % 2;
if (jSONArray2.getLong(i4) != ((Long) arrayList.get(0)).longValue()) {
int i7 = AppsFlyerLib + 3;
onPause = i7 % 128;
int i8 = i7 % 2;
if (jSONArray2.getLong(i4) != ((Long) arrayList.get(1)).longValue()) {
int i9 = onPause + 71;
AppsFlyerLib = i9 % 128;
if (i9 % 2 == 0) {
if (jSONArray2.getLong(i4) == ((Long) arrayList.get(arrayList.size())).longValue()) {
break;
}
i4++;
str = next;
} else if (jSONArray2.getLong(i4) == ((Long) arrayList.get(arrayList.size() - 1)).longValue()) {
break;
} else {
i4++;
str = next;
}
}
}
}
continue;
} catch (JSONException e2) {
AFLogger.afErrorLogForExcManagerOnly("error at manageExtraReferrers", e2);
}
}
}
if (str != null) {
int i10 = AppsFlyerLib + 71;
onPause = i10 % 128;
int i11 = i10 % 2;
jSONObject.remove(str);
}
}
static boolean AFInAppEventType(AFb1wSDK aFb1wSDK, AFa1tSDK aFa1tSDK, SharedPreferences sharedPreferences) {
int i = onPause + 101;
AppsFlyerLib = i % 128;
int i2 = i % 2;
boolean valueOf2 = aFb1wSDK.valueOf(aFa1tSDK, sharedPreferences);
if (i2 == 0) {
int i3 = 31 / 0;
}
return valueOf2;
}
static void AFKeystoreWrapper(AFb1wSDK aFb1wSDK) {
int i = AppsFlyerLib + 31;
onPause = i % 128;
int i2 = i % 2;
aFb1wSDK.afInfoLog();
if (i2 != 0) {
throw null;
}
}
private static boolean afErrorLog(Context context) {
if (!valueOf(context).contains("appsFlyerCount")) {
int i = AppsFlyerLib + 115;
onPause = i % 128;
int i2 = i % 2;
return true;
}
int i3 = AppsFlyerLib + 27;
onPause = i3 % 128;
int i4 = i3 % 2;
return false;
}
static void valueOf(AFb1wSDK aFb1wSDK, AFa1tSDK aFa1tSDK) {
int i = onPause + 17;
AppsFlyerLib = i % 128;
int i2 = i % 2;
aFb1wSDK.AFKeystoreWrapper(aFa1tSDK);
int i3 = onPause + 11;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
}
static Map values(AFb1wSDK aFb1wSDK) {
int i = onPause;
int i2 = i + 111;
AppsFlyerLib = i2 % 128;
int i3 = i2 % 2;
Map<String, Object> map = aFb1wSDK.onResponse;
int i4 = i + 17;
AppsFlyerLib = i4 % 128;
if (i4 % 2 != 0) {
return map;
}
throw null;
}
@Override
public final void logEvent(@NonNull Context context, String str, Map<String, Object> map, AppsFlyerRequestListener appsFlyerRequestListener) {
HashMap hashMap = map == null ? null : new HashMap(map);
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
if (context != null) {
aFb1aSDK.AFInAppEventType.AFKeystoreWrapper = context.getApplicationContext();
}
AFe1cSDK aFe1cSDK = new AFe1cSDK();
if (context != null) {
aFe1cSDK.AFKeystoreWrapper = (Application) context.getApplicationContext();
}
aFe1cSDK.afErrorLog = str;
aFe1cSDK.AFInAppEventType = appsFlyerRequestListener;
if (hashMap != null && hashMap.containsKey(AFInAppEventParameterName.TOUCH_OBJ)) {
HashMap hashMap2 = new HashMap();
Object obj = hashMap.get(AFInAppEventParameterName.TOUCH_OBJ);
if (obj instanceof MotionEvent) {
MotionEvent motionEvent = (MotionEvent) obj;
HashMap hashMap3 = new HashMap();
hashMap3.put("x", Float.valueOf(motionEvent.getX()));
hashMap3.put("y", Float.valueOf(motionEvent.getY()));
hashMap2.put("loc", hashMap3);
hashMap2.put("pf", Float.valueOf(motionEvent.getPressure()));
hashMap2.put("rad", Float.valueOf(motionEvent.getTouchMajor() / 2.0f));
} else {
hashMap2.put("error", "Parsing failed due to invalid input in 'af_touch_obj'.");
AFLogger.AFKeystoreWrapper("Parsing failed due to invalid input in 'af_touch_obj'.");
}
Map<String, ?> singletonMap = Collections.singletonMap("tch_data", hashMap2);
hashMap.remove(AFInAppEventParameterName.TOUCH_OBJ);
aFe1cSDK.AFKeystoreWrapper(singletonMap);
}
aFe1cSDK.values = hashMap;
AFb1rSDK level = valueOf().getLevel();
String[] strArr = new String[2];
strArr[0] = str;
Map map2 = aFe1cSDK.values;
if (map2 == null) {
map2 = new HashMap();
}
strArr[1] = JSONObjectInstrumentation.toString(new JSONObject(map2));
level.AFKeystoreWrapper("logEvent", strArr);
if (str == null) {
AFInAppEventParameterName(context, AFe1hSDK.logEvent);
}
AFKeystoreWrapper(aFe1cSDK, context instanceof Activity ? (Activity) context : null);
}
@Override
public final void start(@NonNull Context context, String str) {
int i = AppsFlyerLib + 55;
onPause = i % 128;
int i2 = i % 2;
start(context, str, null);
int i3 = onPause + 77;
AppsFlyerLib = i3 % 128;
if (i3 % 2 == 0) {
int i4 = 35 / 0;
}
}
@Override
public final void subscribeForDeepLink(@NonNull DeepLinkListener deepLinkListener, long j) {
int i = AppsFlyerLib + 51;
onPause = i % 128;
int i2 = i % 2;
AFa1sSDK.AFInAppEventParameterName().AFInAppEventParameterName = deepLinkListener;
AFb1qSDK.AFLogger$LogLevel = j;
int i3 = AppsFlyerLib + 21;
onPause = i3 % 128;
if (i3 % 2 != 0) {
throw null;
}
}
private static void AFInAppEventType(String str, String str2) {
int i = onPause + 11;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
AppsFlyerProperties.getInstance().set(str, str2);
throw null;
}
AppsFlyerProperties.getInstance().set(str, str2);
int i2 = AppsFlyerLib + 101;
onPause = i2 % 128;
int i3 = i2 % 2;
}
public static AFb1wSDK AFKeystoreWrapper() {
int i = AppsFlyerLib + 19;
onPause = i % 128;
if (i % 2 == 0) {
return AFVersionDeclaration;
}
throw null;
}
static boolean valueOf(AFb1wSDK aFb1wSDK, boolean z) {
int i = onPause;
int i2 = i + 9;
AppsFlyerLib = i2 % 128;
int i3 = i2 % 2;
aFb1wSDK.onDeepLinkingNative = z;
int i4 = i + 121;
AppsFlyerLib = i4 % 128;
if (i4 % 2 == 0) {
int i5 = 82 / 0;
}
return z;
}
@Override
public final void start(@NonNull Context context, String str, final AppsFlyerRequestListener appsFlyerRequestListener) {
int i = AppsFlyerLib + 83;
onPause = i % 128;
int i2 = i % 2;
if (AFb1xSDK.values != null) {
return;
}
if (!this.onResponseNative) {
AFLogger.afWarnLog("ERROR: AppsFlyer SDK is not initialized! The API call 'start()' must be called after the 'init(String, AppsFlyerConversionListener)' API method, which should be called on the Application's onCreate.");
if (str == null) {
if (appsFlyerRequestListener != null) {
int i3 = onPause + 61;
AppsFlyerLib = i3 % 128;
if (i3 % 2 != 0) {
appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1fSDK.AFInAppEventType);
return;
}
appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1fSDK.AFInAppEventType);
int i4 = 21 / 0;
return;
}
return;
}
}
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
if (context != null) {
int i5 = AppsFlyerLib + 55;
onPause = i5 % 128;
if (i5 % 2 == 0) {
aFb1aSDK.AFInAppEventType.AFKeystoreWrapper = context.getApplicationContext();
} else {
AFc1xSDK aFc1xSDK = aFb1aSDK.AFInAppEventType;
throw null;
}
}
final AFe1jSDK afRDLog2 = valueOf().afRDLog();
afRDLog2.AFInAppEventParameterName(AFa1mSDK.AFInAppEventType(context));
this.onAppOpenAttribution = (Application) context.getApplicationContext();
valueOf().getLevel().AFKeystoreWrapper("start", str);
String str2 = valueOf;
AFLogger.afInfoLog(String.format("Starting AppsFlyer: (v%s.%s)", "6.10.1", str2));
StringBuilder sb = new StringBuilder("Build Number: ");
sb.append(str2);
AFLogger.afInfoLog(sb.toString());
AppsFlyerProperties.getInstance().loadProperties(this.onAppOpenAttribution.getApplicationContext());
if (!TextUtils.isEmpty(str)) {
this.onValidateInAppFailure.afWarnLog().AFInAppEventParameterName = str;
AFc1vSDK.AFKeystoreWrapper(str);
} else if (TextUtils.isEmpty(this.onValidateInAppFailure.afWarnLog().AFInAppEventParameterName)) {
AFLogger.afWarnLog("ERROR: AppsFlyer SDK is not initialized! You must provide AppsFlyer Dev-Key either in the 'init' API method (should be called on Application's onCreate),or in the start() API (should be called on Activity's onCreate).");
if (appsFlyerRequestListener != null) {
appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1fSDK.AFInAppEventType);
return;
}
return;
}
valueOf().afInfoLog().AFKeystoreWrapper(null);
afInfoLog();
afInfoLog(this.onAppOpenAttribution.getBaseContext());
if (this.onAttributionFailure) {
AFLogger(this.onAppOpenAttribution.getApplicationContext());
}
AFb1xSDK.AFInAppEventType(context, new AFb1xSDK.AFa1ySDK() {
@Override
public final void AFInAppEventType(Context context2) {
AFLogger.afInfoLog("onBecameBackground");
AFe1jSDK aFe1jSDK = afRDLog2;
long currentTimeMillis = System.currentTimeMillis();
long j = aFe1jSDK.afInfoLog;
if (j != 0) {
long j2 = currentTimeMillis - j;
if (j2 > 0 && j2 < 1000) {
j2 = 1000;
}
long seconds = TimeUnit.MILLISECONDS.toSeconds(j2);
aFe1jSDK.AFVersionDeclaration = seconds;
aFe1jSDK.AFInAppEventParameterName.values("prev_session_dur", seconds);
} else {
AFLogger.afInfoLog("Metrics: fg ts is missing");
}
AFLogger.afInfoLog("callStatsBackground background call");
AFb1wSDK.this.values(new WeakReference<>(context2));
AFb1wSDK.this.valueOf().onInstallConversionDataLoadedNative().AFInAppEventType();
AFb1rSDK level = AFb1wSDK.this.valueOf().getLevel();
if (level.afInfoLog()) {
level.AFInAppEventType();
if (context2 != null && !AppsFlyerLib.getInstance().isStopped()) {
level.AFInAppEventParameterName(context2.getPackageName(), context2.getPackageManager(), AFb1wSDK.AFInAppEventParameterName(AFb1wSDK.this));
}
level.AFInAppEventParameterName();
} else {
AFLogger.afDebugLog("RD status is OFF");
}
AFa1bSDK.values(context2).AFKeystoreWrapper();
}
@Override
public final void valueOf(Activity activity) {
afRDLog2.AFInAppEventParameterName();
AFb1wSDK.this.valueOf().afInfoLog().AFKeystoreWrapper(null);
AFb1wSDK.AFKeystoreWrapper(AFb1wSDK.this);
int AFKeystoreWrapper2 = AFb1wSDK.this.AFKeystoreWrapper(AFb1wSDK.valueOf(activity), false);
AFLogger.afInfoLog("onBecameForeground");
if (AFKeystoreWrapper2 < 2) {
AFa1bSDK values2 = AFa1bSDK.values(activity);
values2.AFKeystoreWrapper.post(values2.afRDLog);
values2.AFKeystoreWrapper.post(values2.AFInAppEventParameterName);
}
AFe1eSDK aFe1eSDK = new AFe1eSDK();
AFa1sSDK.AFInAppEventParameterName().AFInAppEventParameterName(aFe1eSDK.values(), activity.getIntent(), activity.getApplication());
AFb1wSDK aFb1wSDK = AFb1wSDK.this;
aFe1eSDK.AFKeystoreWrapper = (Application) activity.getApplicationContext();
aFe1eSDK.AFInAppEventType = appsFlyerRequestListener;
aFb1wSDK.AFKeystoreWrapper(aFe1eSDK, activity);
}
}, this.onValidateInAppFailure.AFInAppEventType());
}
public final void values(Context context, Intent intent) {
if (intent.getStringExtra("appsflyer_preinstall") != null) {
int i = onPause + 41;
AppsFlyerLib = i % 128;
int i2 = i % 2;
AFInAppEventType(intent.getStringExtra("appsflyer_preinstall"));
}
AFLogger.afInfoLog("****** onReceive called *******");
AppsFlyerProperties.getInstance();
String stringExtra = intent.getStringExtra("referrer");
AFLogger.afInfoLog("Play store referrer: ".concat(String.valueOf(stringExtra)));
if (stringExtra != null) {
int i3 = AppsFlyerLib + 65;
onPause = i3 % 128;
int i4 = i3 % 2;
AFInAppEventParameterName(context).AFInAppEventType("referrer", stringExtra);
AppsFlyerProperties appsFlyerProperties = AppsFlyerProperties.getInstance();
appsFlyerProperties.set("AF_REFERRER", stringExtra);
appsFlyerProperties.valueOf = stringExtra;
if (AppsFlyerProperties.getInstance().valueOf()) {
int i5 = onPause + 83;
AppsFlyerLib = i5 % 128;
if (i5 % 2 != 0) {
AFLogger.afInfoLog("onReceive: isLaunchCalled");
AFInAppEventParameterName(context, AFe1hSDK.onReceive);
AFKeystoreWrapper(context, stringExtra);
return;
}
AFLogger.afInfoLog("onReceive: isLaunchCalled");
AFInAppEventParameterName(context, AFe1hSDK.onReceive);
AFKeystoreWrapper(context, stringExtra);
throw null;
}
}
}
public void AFInAppEventType(AFe1ySDK aFe1ySDK) {
int i = onPause + 1;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
AFe1ySDK aFe1ySDK2 = AFe1ySDK.SUCCESS;
throw null;
} else if (aFe1ySDK == AFe1ySDK.SUCCESS) {
valueOf().onInstallConversionDataLoadedNative().values();
int i2 = AppsFlyerLib + 81;
onPause = i2 % 128;
int i3 = i2 % 2;
}
}
private static boolean AFKeystoreWrapper(String str, boolean z) {
int i = onPause + 41;
AppsFlyerLib = i % 128;
int i2 = i % 2;
boolean z2 = AppsFlyerProperties.getInstance().getBoolean(str, z);
int i3 = AppsFlyerLib + 73;
onPause = i3 % 128;
if (i3 % 2 == 0) {
return z2;
}
throw null;
}
public final AFc1zSDK valueOf() {
int i = onPause + 43;
int i2 = i % 128;
AppsFlyerLib = i2;
if (i % 2 != 0) {
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
int i3 = i2 + 125;
onPause = i3 % 128;
int i4 = i3 % 2;
return aFb1aSDK;
}
throw null;
}
private static String valueOf(String str) {
int i = AppsFlyerLib + 87;
onPause = i % 128;
int i2 = i % 2;
String string = AppsFlyerProperties.getInstance().getString(str);
int i3 = onPause + 19;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
return string;
}
final void AFKeystoreWrapper(@NonNull AFa1tSDK aFa1tSDK, Activity activity) {
Application application;
int i = onPause + 89;
int i2 = i % 128;
AppsFlyerLib = i2;
String str = "";
if (i % 2 == 0) {
application = aFa1tSDK.AFKeystoreWrapper;
int i3 = 5 / 0;
} else {
application = aFa1tSDK.AFKeystoreWrapper;
}
}
private void valueOf(Context context, String str, Map<String, Object> map) {
Activity activity;
AFe1cSDK aFe1cSDK = new AFe1cSDK();
if (context != null) {
int i = onPause + 71;
AppsFlyerLib = i % 128;
int i2 = i % 2;
aFe1cSDK.AFKeystoreWrapper = (Application) context.getApplicationContext();
}
aFe1cSDK.afErrorLog = str;
aFe1cSDK.values = map;
if (context instanceof Activity) {
int i3 = onPause + 75;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
activity = (Activity) context;
} else {
int i5 = AppsFlyerLib + 37;
onPause = i5 % 128;
int i6 = i5 % 2;
activity = null;
}
AFKeystoreWrapper(aFe1cSDK, activity);
int i7 = AppsFlyerLib + 31;
onPause = i7 % 128;
if (i7 % 2 != 0) {
throw null;
}
}
@Override
public final void setUserEmails(AppsFlyerProperties.EmailsCryptType emailsCryptType, String... strArr) {
ArrayList arrayList = new ArrayList(strArr.length + 1);
arrayList.add(emailsCryptType.toString());
arrayList.addAll(Arrays.asList(strArr));
valueOf().getLevel().AFKeystoreWrapper("setUserEmails", (String[]) arrayList.toArray(new String[strArr.length + 1]));
AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EMAIL_CRYPT_TYPE, emailsCryptType.getValue());
HashMap hashMap = new HashMap();
ArrayList arrayList2 = new ArrayList();
int length = strArr.length;
String str = null;
for (int i = 0; i < length; i++) {
int i2 = onPause + 91;
AppsFlyerLib = i2 % 128;
if (i2 % 2 != 0) {
String str2 = strArr[i];
if (AnonymousClass6.AFInAppEventParameterName[emailsCryptType.ordinal()] != 2) {
arrayList2.add(AFb1ySDK.AFInAppEventParameterName(str2));
int i3 = onPause + 27;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
str = "sha256_el_arr";
} else {
arrayList2.add(str2);
int i5 = AppsFlyerLib + 31;
onPause = i5 % 128;
int i6 = i5 % 2;
str = "plain_el_arr";
}
} else {
String str3 = strArr[i];
int i7 = AnonymousClass6.AFInAppEventParameterName[emailsCryptType.ordinal()];
throw null;
}
}
hashMap.put(str, arrayList2);
AppsFlyerProperties.getInstance().setUserEmails(JSONObjectInstrumentation.toString(new JSONObject(hashMap)));
int i8 = AppsFlyerLib + 51;
onPause = i8 % 128;
if (i8 % 2 != 0) {
throw null;
}
}
public static String AFInAppEventType() {
int i = AppsFlyerLib + 21;
onPause = i % 128;
if (i % 2 != 0) {
int i2 = 66 / 0;
return valueOf(AppsFlyerProperties.APP_USER_ID);
}
return valueOf(AppsFlyerProperties.APP_USER_ID);
}
private static void AFInAppEventType(Map<String, Object> map) {
int i = AppsFlyerLib + 35;
onPause = i % 128;
int i2 = i % 2;
String string = AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.ONELINK_ID);
String string2 = AppsFlyerProperties.getInstance().getString("onelinkVersion");
if (string != null) {
map.put("onelink_id", string);
int i3 = AppsFlyerLib + 83;
onPause = i3 % 128;
int i4 = i3 % 2;
}
if (string2 != null) {
int i5 = AppsFlyerLib + 121;
onPause = i5 % 128;
int i6 = i5 % 2;
map.put("onelink_ver", string2);
if (i6 != 0) {
int i7 = 65 / 0;
}
}
}
private static File afInfoLog(String str) {
if (str != null) {
int i = AppsFlyerLib + 69;
onPause = i % 128;
try {
if (i % 2 != 0) {
int i2 = 48 / 0;
if (str.trim().length() > 0) {
}
}
return new File(str.trim());
} catch (Throwable th) {
AFLogger.afErrorLog(th.getMessage(), th);
}
}
int i3 = onPause + 119;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
return null;
}
public static String valueOf(SimpleDateFormat simpleDateFormat, long j) {
simpleDateFormat.setTimeZone(DesugarTimeZone.getTimeZone("UTC"));
String format = simpleDateFormat.format(new Date(j));
int i = onPause + 113;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
int i2 = 22 / 0;
}
return format;
}
private static String AFInAppEventType(Activity activity) {
String str = null;
if (activity != null) {
int i = onPause + 101;
AppsFlyerLib = i % 128;
if (i % 2 != 0) {
Intent intent = activity.getIntent();
if (intent != null) {
try {
Bundle extras = intent.getExtras();
if (extras != null && (str = extras.getString("af")) != null) {
int i2 = AppsFlyerLib + 77;
onPause = i2 % 128;
int i3 = i2 % 2;
AFLogger.afInfoLog("Push Notification received af payload = ".concat(String.valueOf(str)));
extras.remove("af");
activity.setIntent(intent.putExtras(extras));
}
} catch (Throwable th) {
AFLogger.afErrorLog(th.getMessage(), th);
}
}
} else {
activity.getIntent();
throw null;
}
}
int i4 = onPause + 97;
AppsFlyerLib = i4 % 128;
int i5 = i4 % 2;
return str;
}
@NonNull
private AFf1oSDK[] afWarnLog() {
int i = onPause + 27;
AppsFlyerLib = i % 128;
int i2 = i % 2;
AFf1oSDK[] AFInAppEventParameterName2 = valueOf().AFLogger$LogLevel().AFInAppEventParameterName();
int i3 = onPause + 87;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
return AFInAppEventParameterName2;
}
private boolean valueOf(AFa1tSDK aFa1tSDK, SharedPreferences sharedPreferences) {
int AFKeystoreWrapper2 = AFKeystoreWrapper(sharedPreferences, false);
if (AFKeystoreWrapper2 == 1) {
int i = AppsFlyerLib + 101;
onPause = i % 128;
if (i % 2 != 0) {
int i2 = 4 / 0;
}
if (!(sharedPreferences.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false) && AFKeystoreWrapper2 == 1)) {
int i3 = onPause;
int i4 = i3 + 33;
AppsFlyerLib = i4 % 128;
if (i4 % 2 == 0) {
int i5 = 42 / 0;
}
}
int i6 = AppsFlyerLib + 43;
onPause = i6 % 128;
int i7 = i6 % 2;
return true;
}
boolean z = false;
if (!(sharedPreferences.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false) && AFKeystoreWrapper2 == 1)) {
}
int i62 = AppsFlyerLib + 43;
onPause = i62 % 128;
int i72 = i62 % 2;
return true;
}
private void afInfoLog() {
int i = onPause + 81;
AppsFlyerLib = i % 128;
int i2 = i % 2;
if (AFd1mSDK.afErrorLog()) {
int i3 = onPause + 119;
AppsFlyerLib = i3 % 128;
if (i3 % 2 == 0) {
throw null;
}
return;
}
AFc1zSDK valueOf2 = valueOf();
AFd1vSDK AFLogger = valueOf2.AFLogger();
AFLogger.values.execute(new AFd1vSDK.AnonymousClass2(new AFd1mSDK(valueOf2)));
}
private static boolean afRDLog(Context context) {
int i = AppsFlyerLib + 33;
onPause = i % 128;
if (i % 2 == 0 ? !AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false) : !AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, true)) {
if (!AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, false)) {
int i2 = onPause + 61;
AppsFlyerLib = i2 % 128;
int i3 = i2 % 2;
if (AFKeystoreWrapper(context)) {
return false;
}
}
}
return true;
}
private void valueOf(Context context, boolean z, Map<String, Object> map, int i) {
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) {
int i2 = onPause + 21;
AppsFlyerLib = i2 % 128;
int i3 = i2 % 2;
valueOf(context, hashMap);
if (i <= 2) {
int i4 = AppsFlyerLib + 81;
onPause = i4 % 128;
int i5 = i4 % 2;
hashMap.putAll(AFa1bSDK.values(context).AFInAppEventType());
int i6 = AppsFlyerLib + 39;
onPause = i6 % 128;
int i7 = i6 % 2;
}
}
hashMap.put("dim", AFc1qSDK.AFKeystoreWrapper(context));
map.put("deviceData", hashMap);
int i8 = onPause + 85;
AppsFlyerLib = i8 % 128;
if (i8 % 2 == 0) {
throw null;
}
}
private boolean afDebugLog() {
int i = AppsFlyerLib + 59;
onPause = i % 128;
if (i % 2 == 0) {
Map<String, Object> map = this.onResponse;
if (map == null || map.isEmpty()) {
int i2 = AppsFlyerLib + 113;
onPause = i2 % 128;
int i3 = i2 % 2;
return false;
}
int i4 = AppsFlyerLib + 39;
onPause = i4 % 128;
int i5 = i4 % 2;
return true;
}
throw null;
}
public final void values(Context context, String str) {
JSONArray jSONArray;
JSONArray jSONArray2;
JSONObject jSONObject;
int i = AppsFlyerLib + 31;
onPause = i % 128;
int i2 = i % 2;
AFLogger.afDebugLog("received a new (extra) referrer: ".concat(String.valueOf(str)));
try {
try {
long currentTimeMillis = System.currentTimeMillis();
String string = valueOf(context).getString("extraReferrers", null);
if (string == null) {
jSONObject = new JSONObject();
jSONArray2 = new JSONArray();
} else {
JSONObject jSONObject2 = new JSONObject(string);
if (jSONObject2.has(str)) {
jSONArray = new JSONArray((String) jSONObject2.get(str));
} else {
jSONArray = new JSONArray();
}
jSONArray2 = jSONArray;
jSONObject = jSONObject2;
}
if (jSONArray2.length() < 5) {
int i3 = AppsFlyerLib + 41;
onPause = i3 % 128;
if (i3 % 2 != 0) {
jSONArray2.put(currentTimeMillis);
throw null;
}
jSONArray2.put(currentTimeMillis);
}
if (jSONObject.length() >= 4) {
int i4 = AppsFlyerLib + 23;
onPause = i4 % 128;
if (i4 % 2 != 0) {
AFInAppEventParameterName(jSONObject);
int i5 = 26 / 0;
} else {
AFInAppEventParameterName(jSONObject);
}
}
jSONObject.put(str, JSONArrayInstrumentation.toString(jSONArray2));
AFInAppEventParameterName(context).AFInAppEventType("extraReferrers", JSONObjectInstrumentation.toString(jSONObject));
} catch (Throwable th) {
StringBuilder sb = new StringBuilder("Couldn't save referrer - ");
sb.append(str);
sb.append(": ");
AFLogger.afErrorLog(sb.toString(), th);
}
} catch (JSONException e) {
AFLogger.afErrorLogForExcManagerOnly("error at addReferrer", e);
}
}
private static void AFKeystoreWrapper(AppsFlyerConversionListener appsFlyerConversionListener) {
int i = onPause + 53;
int i2 = i % 128;
AppsFlyerLib = i2;
int i3 = i % 2;
if (appsFlyerConversionListener != null) {
AFInAppEventType = appsFlyerConversionListener;
return;
}
int i4 = i2 + 51;
onPause = i4 % 128;
int i5 = i4 % 2;
}
private void AFInAppEventType(Context context, Map<String, Object> map) {
AppsFlyerProperties appsFlyerProperties = AppsFlyerProperties.getInstance();
if (appsFlyerProperties.getBoolean(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, false)) {
map.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
return;
}
Context context2 = this.onValidateInAppFailure.AFInAppEventType.AFKeystoreWrapper;
if (context2 != null) {
AFc1ySDK aFc1ySDK = new AFc1ySDK(valueOf(context2));
String values2 = this.onValidateInAppFailure.afWarnLog().values(aFc1ySDK);
if (!AFb1nSDK.values(values2)) {
map.put("imei", values2);
}
boolean z = appsFlyerProperties.getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID, false);
String str = null;
String AFInAppEventParameterName2 = aFc1ySDK.AFInAppEventParameterName("androidIdCached", (String) null);
if (!z || !AFb1nSDK.values(this.AFLogger)) {
String str2 = this.AFLogger;
if (str2 != null) {
str = str2;
}
} else if (afRDLog(context)) {
try {
String string = Settings.Secure.getString(context.getContentResolver(), "android_id");
if (string != null) {
str = string;
} else if (AFInAppEventParameterName2 != null) {
AFLogger.afDebugLog("use cached AndroidId: ".concat(AFInAppEventParameterName2));
str = AFInAppEventParameterName2;
}
} catch (Exception e) {
if (AFInAppEventParameterName2 != null) {
AFLogger.afDebugLog("use cached AndroidId: ".concat(AFInAppEventParameterName2));
str = AFInAppEventParameterName2;
}
AFLogger.afErrorLog(e.getMessage(), e);
}
}
if (str != null) {
aFc1ySDK.AFInAppEventType("androidIdCached", str);
map.put("android_id", str);
} else {
AFLogger.afInfoLog("Android ID was not collected.");
}
AFc1oSDK.AFa1vSDK AFInAppEventParameterName3 = AFa1eSDK.AFInAppEventParameterName(context);
if (AFInAppEventParameterName3 != null) {
HashMap hashMap = new HashMap();
hashMap.put("isManual", AFInAppEventParameterName3.AFKeystoreWrapper);
hashMap.put("val", AFInAppEventParameterName3.AFInAppEventParameterName);
Boolean bool = AFInAppEventParameterName3.AFInAppEventType;
if (bool != null) {
hashMap.put("isLat", bool);
}
map.put("oaid", hashMap);
return;
}
return;
}
throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
}
private void AFKeystoreWrapper(Context context, String str) {
AFe1bSDK aFe1bSDK = new AFe1bSDK();
if (context != null) {
int i = onPause + 57;
AppsFlyerLib = i % 128;
int i2 = i % 2;
aFe1bSDK.AFKeystoreWrapper = (Application) context.getApplicationContext();
}
AFa1tSDK AFKeystoreWrapper2 = aFe1bSDK.AFKeystoreWrapper(this.onValidateInAppFailure.valueOf().AFInAppEventType.AFKeystoreWrapper("appsFlyerCount", 0));
AFKeystoreWrapper2.AFLogger = str;
if (str != null) {
int i3 = onPause + 113;
AppsFlyerLib = i3 % 128;
if (i3 % 2 == 0) {
if (str.length() <= 2) {
return;
}
} else if (str.length() <= 5) {
return;
}
if (valueOf(AFKeystoreWrapper2, valueOf(context))) {
AFInAppEventParameterName(this.onValidateInAppFailure.AFKeystoreWrapper(), new AFa1vSDK(this, AFKeystoreWrapper2, (byte) 0), 5L, TimeUnit.MILLISECONDS);
}
}
}
public final boolean AFInAppEventParameterName() {
int i = onPause + 123;
AppsFlyerLib = i % 128;
int i2 = i % 2;
if (!AFKeystoreWrapper(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false) || AFInAppEventType() != null) {
int i3 = onPause + 101;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
return false;
}
int i5 = AppsFlyerLib + 121;
onPause = i5 % 128;
if (i5 % 2 == 0) {
return true;
}
throw null;
}
private void AFInAppEventParameterName(Context context, AFe1hSDK aFe1hSDK) {
int i = AppsFlyerLib;
int i2 = i + 43;
onPause = i2 % 128;
int i3 = i2 % 2;
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
if (context != null) {
int i4 = i + 103;
onPause = i4 % 128;
if (i4 % 2 == 0) {
aFb1aSDK.AFInAppEventType.AFKeystoreWrapper = context.getApplicationContext();
int i5 = AppsFlyerLib + 79;
onPause = i5 % 128;
int i6 = i5 % 2;
} else {
AFc1xSDK aFc1xSDK = aFb1aSDK.AFInAppEventType;
throw null;
}
}
AFe1jSDK afRDLog2 = valueOf().afRDLog();
AFe1kSDK AFInAppEventType2 = AFa1mSDK.AFInAppEventType(context);
if (afRDLog2.AFInAppEventType()) {
afRDLog2.AFKeystoreWrapper.put("api_name", aFe1hSDK.toString());
afRDLog2.AFInAppEventParameterName(AFInAppEventType2);
}
afRDLog2.AFInAppEventParameterName();
}
private static String AFLogger() {
int i = onPause + 111;
AppsFlyerLib = i % 128;
int i2 = i % 2;
String valueOf2 = valueOf(AppsFlyerProperties.APP_ID);
int i3 = AppsFlyerLib + 7;
onPause = i3 % 128;
int i4 = i3 % 2;
return valueOf2;
}
private void valueOf(Context context, Map<String, Object> map) {
int i = onPause + 29;
AppsFlyerLib = i % 128;
int i2 = i % 2;
AFb1cSDK.AFa1vSDK valueOf2 = valueOf().init().valueOf(context);
map.put("btl", Float.toString(valueOf2.AFInAppEventParameterName));
String str = valueOf2.AFInAppEventType;
if (str != null) {
int i3 = onPause + 27;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
map.put("btch", str);
if (i4 == 0) {
int i5 = 91 / 0;
}
int i6 = onPause + 79;
AppsFlyerLib = i6 % 128;
int i7 = i6 % 2;
}
}
private int valueOf(SharedPreferences sharedPreferences) {
int i = AppsFlyerLib + 27;
onPause = i % 128;
int AFKeystoreWrapper2 = AFKeystoreWrapper(sharedPreferences, "appsFlyerAdRevenueCount", i % 2 == 0);
int i2 = AppsFlyerLib + 21;
onPause = i2 % 128;
int i3 = i2 % 2;
return AFKeystoreWrapper2;
}
private void AFInAppEventParameterName(AFa1tSDK aFa1tSDK) {
int i = onPause + 3;
AppsFlyerLib = i % 128;
int i2 = i % 2;
boolean z = aFa1tSDK.afErrorLog == null;
if (AFInAppEventParameterName()) {
int i3 = onPause + 5;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
AFLogger.afInfoLog("CustomerUserId not set, reporting is disabled", true);
return;
}
if (z) {
if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.LAUNCH_PROTECT_ENABLED, true)) {
if (afRDLog()) {
AppsFlyerRequestListener appsFlyerRequestListener = aFa1tSDK.AFInAppEventType;
if (appsFlyerRequestListener != null) {
appsFlyerRequestListener.onError(RequestError.EVENT_TIMEOUT, AFb1fSDK.valueOf);
return;
}
return;
}
} else {
AFLogger.afInfoLog("Allowing multiple launches within a 5 second time window.");
}
this.AppsFlyer2dXConversionCallback = System.currentTimeMillis();
}
AFInAppEventParameterName(this.onValidateInAppFailure.AFKeystoreWrapper(), new AFa1vSDK(this, aFa1tSDK, (byte) 0), 0L, TimeUnit.MILLISECONDS);
}
private void AFKeystoreWrapper(Map<String, Object> map) {
if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false)) {
return;
}
int i = onPause + 97;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, true)) {
return;
}
} else if (!(!AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, false))) {
return;
}
int i2 = AppsFlyerLib + 103;
onPause = i2 % 128;
int i3 = i2 % 2;
if (map.get("advertiserId") != null) {
try {
if (AFb1nSDK.values(this.AFLogger) && map.remove("android_id") != null) {
AFLogger.afInfoLog("validateGaidAndIMEI :: removing: android_id");
}
if (!AFb1nSDK.values(this.onValidateInAppFailure.afWarnLog().AFKeystoreWrapper) || map.remove("imei") == null) {
return;
}
AFLogger.afInfoLog("validateGaidAndIMEI :: removing: imei");
} catch (Exception e) {
AFLogger.afErrorLog("failed to remove IMEI or AndroidID key from params; ", e);
}
}
}
private AFd1eSDK.AFa1zSDK valueOf(final Map<String, String> map) {
AFd1eSDK.AFa1zSDK aFa1zSDK = new AFd1eSDK.AFa1zSDK() {
@Override
public final void AFInAppEventParameterName(Map<String, String> map2) {
for (String str : map2.keySet()) {
map.put(str, map2.get(str));
}
AFb1pSDK.AFInAppEventParameterName(map);
}
@Override
public final void values(String str) {
AFb1pSDK.AFInAppEventType(str, DeepLinkResult.Error.NETWORK);
}
};
int i = onPause + 25;
AppsFlyerLib = i % 128;
int i2 = i % 2;
return aFa1zSDK;
}
private static String valueOf(File file, String str) {
FileReader fileReader;
Properties properties;
try {
try {
try {
properties = new Properties();
fileReader = new FileReader(file);
} catch (Throwable th) {
if (fileReader != null) {
try {
fileReader.close();
} catch (Throwable th2) {
AFLogger.afErrorLog(th2.getMessage(), th2);
}
}
throw th;
}
} catch (FileNotFoundException unused) {
fileReader = null;
} catch (Throwable th3) {
th = th3;
fileReader = null;
}
} catch (Throwable th4) {
AFLogger.afErrorLog(th4.getMessage(), th4);
}
try {
properties.load(fileReader);
AFLogger.afInfoLog("Found PreInstall property!");
String property = properties.getProperty(str);
try {
fileReader.close();
int i = onPause + 29;
AppsFlyerLib = i % 128;
int i2 = i % 2;
} catch (Throwable th5) {
AFLogger.afErrorLog(th5.getMessage(), th5);
}
return property;
} catch (FileNotFoundException unused2) {
StringBuilder sb = new StringBuilder("PreInstall file wasn't found: ");
sb.append(file.getAbsolutePath());
AFLogger.afDebugLog(sb.toString());
if (fileReader != null) {
fileReader.close();
}
return null;
} catch (Throwable th6) {
th = th6;
AFLogger.afErrorLog(th.getMessage(), th);
if (fileReader != null) {
fileReader.close();
int i3 = AppsFlyerLib + 43;
onPause = i3 % 128;
int i4 = i3 % 2;
}
return null;
}
}
private static void values(String str, boolean z) {
int i = AppsFlyerLib + 115;
onPause = i % 128;
int i2 = i % 2;
AppsFlyerProperties.getInstance().set(str, z);
int i3 = onPause + 123;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
}
final void values(WeakReference<Context> weakReference) {
if (weakReference.get() == null) {
return;
}
AFLogger.afInfoLog("app went to background");
SharedPreferences valueOf2 = valueOf(weakReference.get());
AppsFlyerProperties.getInstance().saveProperties(valueOf2);
long j = valueOf().afRDLog().AFVersionDeclaration;
HashMap hashMap = new HashMap();
String str = this.onValidateInAppFailure.afWarnLog().AFInAppEventParameterName;
if (str == null) {
int i = AppsFlyerLib + 103;
onPause = i % 128;
int i2 = i % 2;
AFLogger.afWarnLog("[callStats] AppsFlyer's SDK cannot send any event without providing DevKey.");
return;
}
String valueOf3 = valueOf("KSAppsFlyerId");
if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, false)) {
int i3 = AppsFlyerLib + 113;
onPause = i3 % 128;
if (i3 % 2 != 0) {
hashMap.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
int i4 = 51 / 0;
} else {
hashMap.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
}
}
AFc1oSDK.AFa1vSDK valueOf4 = AFa1eSDK.valueOf(weakReference.get().getContentResolver());
if (valueOf4 != null) {
hashMap.put("amazon_aid", valueOf4.AFInAppEventParameterName);
hashMap.put("amazon_aid_limit", String.valueOf(valueOf4.AFInAppEventType));
}
String string = AppsFlyerProperties.getInstance().getString("advertiserId");
if (string != null) {
int i5 = onPause + 45;
AppsFlyerLib = i5 % 128;
if (i5 % 2 == 0) {
hashMap.put("advertiserId", string);
int i6 = 22 / 0;
} else {
hashMap.put("advertiserId", string);
}
}
hashMap.put(Constants.APP_ID, weakReference.get().getPackageName());
hashMap.put("devkey", str);
hashMap.put("uid", AFb1zSDK.AFInAppEventParameterName(weakReference));
hashMap.put("time_in_app", String.valueOf(j));
hashMap.put("statType", "user_closed_app");
hashMap.put("platform", LoggingConstants.THREE_DS_ANDROID);
hashMap.put("launch_counter", Integer.toString(AFKeystoreWrapper(valueOf2, false)));
hashMap.put(AppsFlyerProperties.CHANNEL, values(weakReference.get()));
if (valueOf3 == null) {
valueOf3 = "";
}
hashMap.put("originalAppsflyerId", valueOf3);
if (this.onDeepLinkingNative) {
AFf1xSDK aFf1xSDK = new AFf1xSDK();
((AFe1iSDK) aFf1xSDK).afWarnLog = isStopped();
AFd1hSDK aFd1hSDK = new AFd1hSDK((AFf1xSDK) aFf1xSDK.AFKeystoreWrapper(this.onValidateInAppFailure.valueOf().AFInAppEventType.AFKeystoreWrapper("appsFlyerCount", 0)).AFKeystoreWrapper(hashMap).AFInAppEventParameterName(String.format(afErrorLog, AppsFlyerLib.getInstance().getHostPrefix(), AFKeystoreWrapper().getHostName())), this.onValidateInAppFailure);
AFd1vSDK AFLogger = this.onValidateInAppFailure.AFLogger();
AFLogger.values.execute(new AFd1vSDK.AnonymousClass2(aFd1hSDK));
return;
}
AFLogger.afDebugLog("Stats call is disabled, ignore ...");
}
public static Map<String, Object> AFInAppEventParameterName(Map<String, Object> map) {
Map<String, Object> map2;
int i = AppsFlyerLib + 65;
onPause = i % 128;
if (i % 2 != 0) {
map.containsKey("meta");
throw null;
}
if (map.containsKey("meta")) {
map2 = (Map) map.get("meta");
} else {
HashMap hashMap = new HashMap();
map.put("meta", hashMap);
int i2 = onPause + 121;
AppsFlyerLib = i2 % 128;
int i3 = i2 % 2;
map2 = hashMap;
}
int i4 = onPause + 81;
AppsFlyerLib = i4 % 128;
if (i4 % 2 != 0) {
return map2;
}
throw null;
}
private static boolean valueOf(File file) {
int i = onPause + 107;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
int i2 = 40 / 0;
}
int i3 = AppsFlyerLib + 109;
onPause = i3 % 128;
if (i3 % 2 == 0) {
return true;
}
throw null;
}
private static void AFInAppEventType(String str) {
try {
if (new JSONObject(str).has("pid")) {
int i = AppsFlyerLib + 9;
onPause = i % 128;
int i2 = i % 2;
AFInAppEventType("preInstallName", str);
return;
}
AFLogger.afWarnLog("Cannot set preinstall attribution data without a media source");
int i3 = AppsFlyerLib + 53;
onPause = i3 % 128;
if (i3 % 2 != 0) {
int i4 = 63 / 0;
}
} catch (JSONException e) {
AFLogger.afErrorLog("Error parsing JSON for preinstall", e);
}
}
private static boolean AFKeystoreWrapper(@NonNull SharedPreferences sharedPreferences) {
int i = onPause + 41;
AppsFlyerLib = i % 128;
int i2 = i % 2;
String string = sharedPreferences.getString("sentSuccessfully", null);
if (i2 == 0) {
Boolean.parseBoolean(string);
throw null;
}
boolean parseBoolean = Boolean.parseBoolean(string);
int i3 = AppsFlyerLib + 117;
onPause = i3 % 128;
int i4 = i3 % 2;
return parseBoolean;
}
public static synchronized SharedPreferences valueOf(Context context) {
SharedPreferences sharedPreferences;
synchronized (AFb1wSDK.class) {
try {
int i = AppsFlyerLib + 27;
onPause = i % 128;
int i2 = i % 2;
if (AFKeystoreWrapper().onDeepLinking == null) {
int i3 = onPause + 119;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
AFKeystoreWrapper().onDeepLinking = context.getApplicationContext().getSharedPreferences("appsflyer-data", 0);
}
sharedPreferences = AFKeystoreWrapper().onDeepLinking;
} catch (Throwable th) {
throw th;
}
}
return sharedPreferences;
}
private static void AFInAppEventParameterName(Context context, Map<String, Object> map) {
WindowManager windowManager = (WindowManager) context.getSystemService("window");
if (windowManager != null) {
int i = onPause + 81;
AppsFlyerLib = i % 128;
String str = "";
if (i % 2 == 0) {
int rotation = windowManager.getDefaultDisplay().getRotation();
int i2 = 20 / 0;
if (rotation != 0) {
if (rotation != 1) {
if (rotation != 2) {
}
str = "pr";
}
str = "l";
}
int i3 = onPause + 47;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
str = "p";
} else {
int rotation2 = windowManager.getDefaultDisplay().getRotation();
if (rotation2 != 0) {
if (rotation2 != 1) {
if (rotation2 != 2) {
}
str = "pr";
}
str = "l";
}
int i32 = onPause + 47;
AppsFlyerLib = i32 % 128;
int i42 = i32 % 2;
str = "p";
}
map.put("sc_o", str);
}
}
public static void AFKeystoreWrapper(Context context, Map<String, ? super String> map) {
String str;
boolean AFKeystoreWrapper2 = AFKeystoreWrapper(AppsFlyerProperties.DISABLE_NETWORK_DATA, false);
AFa1kSDK aFa1kSDK = AFa1kSDK.AFa1wSDK.AFInAppEventParameterName;
AFa1kSDK.AFa1zSDK AFInAppEventType2 = AFa1kSDK.AFInAppEventType(context);
map.put(LogSubCategory.ApiCall.NETWORK, AFInAppEventType2.values);
if (!AFKeystoreWrapper2 && (str = AFInAppEventType2.valueOf) != null) {
map.put("operator", str);
}
if (!AFKeystoreWrapper2) {
int i = onPause + 87;
AppsFlyerLib = i % 128;
int i2 = i % 2;
String str2 = AFInAppEventType2.AFInAppEventParameterName;
if (str2 != null) {
map.put(AnalyticsAttribute.CARRIER_ATTRIBUTE, str2);
}
}
int i3 = onPause + 3;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
}
public final void AFInAppEventType(@NonNull Context context) {
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
if (context != null) {
int i = AppsFlyerLib + 95;
int i2 = i % 128;
onPause = i2;
int i3 = i % 2;
AFc1xSDK aFc1xSDK = aFb1aSDK.AFInAppEventType;
if (context != null) {
int i4 = i2 + 11;
AppsFlyerLib = i4 % 128;
int i5 = i4 % 2;
aFc1xSDK.AFKeystoreWrapper = context.getApplicationContext();
if (i5 == 0) {
throw null;
}
}
}
int i6 = onPause + 29;
AppsFlyerLib = i6 % 128;
int i7 = i6 % 2;
}
private static String AFInAppEventParameterName(String str) {
if (str == null) {
int i = AppsFlyerLib + 101;
onPause = i % 128;
if (i % 2 == 0) {
return null;
}
throw null;
} else if (str.matches("fb\\d*?://authorize.*") && str.contains("access_token")) {
int i2 = AppsFlyerLib + 63;
onPause = i2 % 128;
int i3 = i2 % 2;
String values2 = values(str);
if (values2.length() == 0) {
return str;
}
ArrayList arrayList = new ArrayList();
if (values2.contains(KeySeparator.AMP)) {
arrayList = new ArrayList(Arrays.asList(values2.split(KeySeparator.AMP)));
} else {
arrayList.add(values2);
}
StringBuilder sb = new StringBuilder();
Iterator it = arrayList.iterator();
while (it.hasNext()) {
int i4 = AppsFlyerLib + 35;
onPause = i4 % 128;
int i5 = i4 % 2;
String str2 = (String) it.next();
if (!str2.contains("access_token")) {
if (sb.length() != 0) {
int i6 = onPause + 117;
AppsFlyerLib = i6 % 128;
int i7 = i6 % 2;
sb.append(KeySeparator.AMP);
} else if (!str2.startsWith("?")) {
int i8 = AppsFlyerLib + 19;
onPause = i8 % 128;
int i9 = i8 % 2;
sb.append("?");
}
sb.append(str2);
} else {
it.remove();
}
}
return str.replace(values2, sb.toString());
} else {
return str;
}
}
public final Map<String, Object> AFInAppEventType(AFa1tSDK aFa1tSDK) {
String str;
String str2;
String str3;
Map<String, Object> map;
Throwable th;
Map<String, Object> map2;
Map<String, Object> map3;
String str4;
PackageManager.NameNotFoundException nameNotFoundException;
String str5;
SimpleDateFormat simpleDateFormat;
SharedPreferences sharedPreferences;
boolean z;
AFb1hSDK aFb1hSDK;
Map<String, Object> map4;
AppsFlyerProperties appsFlyerProperties;
String str6;
Exception exc;
Map<String, Object> map5;
Map<String, Object> map6;
ConcurrentHashMap concurrentHashMap;
ConcurrentHashMap concurrentHashMap2;
AFa1qSDK.AFa1vSDK aFa1vSDK;
AFa1qSDK.AFa1vSDK aFa1vSDK2;
ConcurrentHashMap concurrentHashMap3;
HashMap hashMap;
HashMap hashMap2;
ArrayList arrayList;
AFc1oSDK.AFa1vSDK valueOf2;
SharedPreferences sharedPreferences2;
boolean z2;
AFa1fSDK aFa1fSDK;
PackageInfo packageInfo;
String AFInAppEventParameterName2;
Map<String, Object> map7 = this;
Application application = aFa1tSDK.AFKeystoreWrapper;
String str7 = map7.onValidateInAppFailure.afWarnLog().AFInAppEventParameterName;
String str8 = aFa1tSDK.afErrorLog;
Map map8 = aFa1tSDK.values;
if (map8 == null) {
map8 = new HashMap();
}
String jSONObjectInstrumentation = JSONObjectInstrumentation.toString(new JSONObject(map8));
String str9 = aFa1tSDK.AFLogger;
SharedPreferences valueOf3 = valueOf(application);
boolean AFInAppEventParameterName3 = aFa1tSDK.AFInAppEventParameterName();
String str10 = aFa1tSDK.valueOf;
Map<String, Object> map9 = aFa1tSDK.AFInAppEventParameterName;
AFa1eSDK.AFKeystoreWrapper(application, map9);
Boolean bool = AFa1eSDK.values;
if (bool == null || bool.booleanValue()) {
str = "Exception while collecting facebook's attribution ID. ";
str2 = AppsFlyerProperties.APP_ID;
str3 = str10;
} else {
str3 = str10;
Map<String, Object> AFInAppEventParameterName4 = AFInAppEventParameterName(map9);
str = "Exception while collecting facebook's attribution ID. ";
str2 = AppsFlyerProperties.APP_ID;
AFInAppEventParameterName4.put("ad_ids_disabled", Boolean.TRUE);
}
long time = new Date().getTime();
Object[] objArr = new Object[1];
AFInAppEventParameterName("藯뢲跉桹옣駻䩨ꊙ‥蛊햄㻭", (ViewConfiguration.getMinimumFlingVelocity() >> 16) + 12, objArr);
map9.put(((String) objArr[0]).intern(), Long.toString(time));
String valueOf4 = AFa1xSDK.valueOf(application, time);
if (valueOf4 != null) {
map9.put("cksm_v1", valueOf4);
}
try {
if (!isStopped()) {
try {
StringBuilder sb = new StringBuilder("******* sendTrackingWithEvent: ");
sb.append(AFInAppEventParameterName3 ? PDActionLaunch.SUB_TYPE : str8);
AFLogger.afInfoLog(sb.toString());
} catch (Throwable th2) {
th = th2;
map2 = map9;
AFLogger.afErrorLog(th.getLocalizedMessage(), th, true);
map3 = map2;
return map3;
}
} else {
AFLogger.afInfoLog("Reporting has been stopped");
}
AFa1mSDK afErrorLogForExcManagerOnly2 = valueOf().afErrorLogForExcManagerOnly();
try {
if (!new File(afErrorLogForExcManagerOnly2.AFInAppEventType.AFKeystoreWrapper.getFilesDir(), "AFRequestCache").exists()) {
new File(afErrorLogForExcManagerOnly2.AFInAppEventType.AFKeystoreWrapper.getFilesDir(), "AFRequestCache").mkdir();
}
} catch (Exception e) {
AFLogger.afErrorLog("CACHE: Could not create cache directory", e);
}
try {
List asList = Arrays.asList(application.getPackageManager().getPackageInfo(application.getPackageName(), 4096).requestedPermissions);
if (!asList.contains("android.permission.INTERNET")) {
AFLogger.afWarnLog("Permission android.permission.INTERNET is missing in the AndroidManifest.xml");
}
if (!asList.contains("android.permission.ACCESS_NETWORK_STATE")) {
AFLogger.afWarnLog("Permission android.permission.ACCESS_NETWORK_STATE is missing in the AndroidManifest.xml");
}
if (Build.VERSION.SDK_INT > 32 && !asList.contains("com.google.android.gms.permission.AD_ID")) {
AFLogger.afWarnLog("Permission com.google.android.gms.permission.AD_ID is missing in the AndroidManifest.xml");
}
} catch (Exception e2) {
AFLogger.afErrorLog("Exception while validation permissions. ", e2);
}
Object[] objArr2 = new Object[1];
AFInAppEventParameterName("Ꮱ\udb1d", 1 - (ViewConfiguration.getLongPressTimeout() >> 16), objArr2);
map9.put("af_events_api", ((String) objArr2[0]).intern());
Object[] objArr3 = new Object[1];
AFInAppEventParameterName("ꆕ北佾⾙繞潪", 5 - ExpandableListView.getPackedPositionGroup(0L), objArr3);
map9.put(((String) objArr3[0]).intern(), Build.BRAND);
map9.put("device", Build.DEVICE);
map9.put("product", Build.PRODUCT);
map9.put(PaymentConstants.Category.SDK, Integer.toString(Build.VERSION.SDK_INT));
map9.put("model", Build.MODEL);
map9.put("deviceType", Build.TYPE);
AFInAppEventParameterName(application, map9);
AppsFlyerProperties appsFlyerProperties2 = AppsFlyerProperties.getInstance();
AFb1hSDK aFb1hSDK2 = new AFb1hSDK(application);
AFe1jSDK afRDLog2 = valueOf().afRDLog();
if (AFInAppEventParameterName3) {
if (afErrorLog(application)) {
if (!appsFlyerProperties2.isOtherSdkStringDisabled()) {
map9.put("batteryLevel", String.valueOf(onInstallConversionDataLoadedNative(application)));
}
afDebugLog(application);
UiModeManager uiModeManager = (UiModeManager) application.getSystemService(UiModeManager.class);
if (uiModeManager != null && uiModeManager.getCurrentModeType() == 4) {
map9.put(PDPrintFieldAttributeObject.ROLE_TV, Boolean.TRUE);
}
if (AFe1nSDK.AFKeystoreWrapper(application)) {
map9.put("inst_app", Boolean.TRUE);
}
}
map9.put("timepassedsincelastlaunch", Long.toString(map7.AFVersionDeclaration(application)));
AFInAppEventType(map9);
values(map9, afRDLog2);
String str11 = map7.onConversionDataFail;
if (str11 != null) {
map9.put("phone", str11);
}
if (!TextUtils.isEmpty(str9)) {
map9.put("referrer", str9);
}
String string = valueOf3.getString("extraReferrers", null);
if (string != null) {
map9.put("extraReferrers", string);
}
String referrer = appsFlyerProperties2.getReferrer(application);
if (!TextUtils.isEmpty(referrer) && map9.get("referrer") == null) {
map9.put("referrer", referrer);
}
long j = afRDLog2.AFVersionDeclaration;
if (j != 0) {
map9.put("prev_session_dur", Long.valueOf(j));
}
Application application2 = AFb1eSDK.AFInAppEventParameterName;
map9.put("exception_number", Long.valueOf(application2 == null ? -1L : valueOf(application2).getLong("exception_number", 0L)));
AFb1dSDK aFb1dSDK = map7.AppsFlyerConversionListener;
if (aFb1dSDK != null) {
if (!aFb1dSDK.values.isEmpty()) {
map9.put("partner_data", aFb1dSDK.values);
}
if (!aFb1dSDK.AFKeystoreWrapper.isEmpty()) {
AFInAppEventParameterName(map9).put("partner_data", aFb1dSDK.AFKeystoreWrapper);
aFb1dSDK.AFKeystoreWrapper = new HashMap();
}
}
} else {
AFInAppEventParameterName(application, map9, str8);
}
String valueOf5 = valueOf("KSAppsFlyerId");
String valueOf6 = valueOf("KSAppsFlyerRICounter");
if (valueOf5 != null && valueOf6 != null && Integer.valueOf(valueOf6).intValue() > 0) {
map9.put("reinstallCounter", valueOf6);
map9.put("originalAppsflyerId", valueOf5);
}
String valueOf7 = valueOf(AppsFlyerProperties.ADDITIONAL_CUSTOM_DATA);
if (valueOf7 != null) {
map9.put("customData", valueOf7);
}
try {
String installerPackageName = application.getPackageManager().getInstallerPackageName(application.getPackageName());
if (installerPackageName != null) {
map9.put("installer_package", installerPackageName);
}
} catch (Exception e3) {
AFLogger.afErrorLog("Exception while getting the app's installer package. ", e3);
}
String string2 = appsFlyerProperties2.getString(AppsFlyerProperties.EXTENSION);
if (string2 != null && string2.length() > 0) {
map9.put(AppsFlyerProperties.EXTENSION, string2);
}
String values2 = map7.values(application);
String AFInAppEventParameterName5 = AFInAppEventParameterName(map7.AFInAppEventParameterName(application), values2);
if ((AFInAppEventParameterName5 != null && !AFInAppEventParameterName5.equals(values2)) || (AFInAppEventParameterName5 == null && values2 != null)) {
map9.put("af_latestchannel", values2);
}
String level = map7.getLevel(application);
if (level != null) {
map9.put("af_installstore", level.toLowerCase());
}
String afWarnLog2 = map7.afWarnLog(application);
if (afWarnLog2 != null) {
map9.put("af_preinstall_name", afWarnLog2.toLowerCase());
}
String afErrorLogForExcManagerOnly3 = map7.afErrorLogForExcManagerOnly(application);
if (afErrorLogForExcManagerOnly3 != null) {
map9.put("af_currentstore", afErrorLogForExcManagerOnly3.toLowerCase());
}
try {
if (str7 != null && str7.length() > 0) {
map9.put("appsflyerKey", str7);
} else {
String str12 = map7.onValidateInAppFailure.afWarnLog().AFInAppEventParameterName;
if (str12 != null && str12.length() > 0) {
map9.put("appsflyerKey", str12);
} else {
AFLogger.afInfoLog("AppsFlyer dev key is missing!!! Please use AppsFlyerLib.getInstance().setAppsFlyerKey(...) to set it. ");
AFLogger.afInfoLog("AppsFlyer will not track this event.");
return null;
}
}
String AFInAppEventType2 = AFInAppEventType();
if (AFInAppEventType2 != null) {
map9.put("appUserId", AFInAppEventType2);
}
String string3 = appsFlyerProperties2.getString(AppsFlyerProperties.USER_EMAILS);
if (string3 != null) {
map9.put("user_emails", string3);
} else {
String valueOf8 = valueOf(AppsFlyerProperties.USER_EMAIL);
if (valueOf8 != null) {
map9.put("sha1_el", AFb1ySDK.valueOf(valueOf8));
}
}
if (str8 != null) {
map9.put("eventName", str8);
map9.put("eventValue", jSONObjectInstrumentation);
}
if (AFLogger() != null) {
map9.put(str2, valueOf(str2));
}
String valueOf9 = valueOf(AppsFlyerProperties.CURRENCY_CODE);
if (valueOf9 != null) {
if (valueOf9.length() != 3) {
StringBuilder sb2 = new StringBuilder("WARNING: currency code should be 3 characters!!! '");
sb2.append(valueOf9);
sb2.append("' is not a legal value.");
AFLogger.afWarnLog(sb2.toString());
}
map9.put(ECommerceParamNames.CURRENCY, valueOf9);
}
String valueOf10 = valueOf(AppsFlyerProperties.IS_UPDATE);
if (valueOf10 != null) {
map9.put("isUpdate", valueOf10);
}
map9.put("af_preinstalled", Boolean.toString(map7.isPreInstalledApp(application)));
if (appsFlyerProperties2.getBoolean(AppsFlyerProperties.COLLECT_FACEBOOK_ATTR_ID, true)) {
try {
try {
application.getPackageManager().getApplicationInfo("com.facebook.katana", 0);
str5 = map7.getAttributionId(application);
} catch (PackageManager.NameNotFoundException e4) {
nameNotFoundException = e4;
str4 = str;
AFLogger.afErrorLogForExcManagerOnly("com.facebook.katana not found", nameNotFoundException, true);
AFLogger.afWarnLog(str4);
str5 = null;
if (str5 != null) {
}
map7.AFInAppEventType(application, map9);
AFInAppEventParameterName2 = AFb1zSDK.AFInAppEventParameterName(new WeakReference(application));
if (AFInAppEventParameterName2 != null) {
}
map9.put("lang", Locale.getDefault().getDisplayLanguage());
map9.put("lang_code", Locale.getDefault().getLanguage());
map9.put("country", Locale.getDefault().getCountry());
map9.put("platformextension", map7.onResponseErrorNative.values());
AFKeystoreWrapper(application, map9);
simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
map9.put("installDate", valueOf(simpleDateFormat, application.getPackageManager().getPackageInfo(application.getPackageName(), 0).firstInstallTime));
packageInfo = application.getPackageManager().getPackageInfo(application.getPackageName(), 0);
if (packageInfo.versionCode > valueOf3.getInt("versionCode", 0)) {
}
map9.put(Constants.EXTRA_KEY_APP_VERSION_CODE, Integer.toString(packageInfo.versionCode));
map9.put("app_version_name", packageInfo.versionName);
long j2 = packageInfo.firstInstallTime;
long j3 = packageInfo.lastUpdateTime;
Locale locale = Locale.US;
aFb1hSDK = aFb1hSDK2;
try {
sharedPreferences = valueOf3;
z = AFInAppEventParameterName3;
try {
map9.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", locale).format(new Date(j2)));
map9.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", locale).format(new Date(j3)));
String AFInAppEventParameterName6 = map7.AFInAppEventParameterName(simpleDateFormat, application);
Object[] objArr4 = new Object[1];
AFInAppEventParameterName("䴽붤פֿ\ue3c4⺿㴕ᔮ਼ľ⦿\u1cab삋쿸뢥\uf63c㿱", TextUtils.indexOf("", "", 0, 0) + 15, objArr4);
map9.put(((String) objArr4[0]).intern(), AFInAppEventParameterName6);
} catch (Throwable th3) {
th = th3;
AFLogger.afErrorLog("Exception while collecting app version data ", th, true);
map7.onAttributionFailureNative = AFe1rSDK.AFInAppEventType(application);
StringBuilder sb3 = new StringBuilder("didConfigureTokenRefreshService=");
sb3.append(map7.onAttributionFailureNative);
AFLogger.afDebugLog(sb3.toString());
if (!map7.onAttributionFailureNative) {
}
if (z) {
}
if (z) {
}
if (valueOf("advertiserId") == null) {
}
valueOf2 = AFa1eSDK.valueOf(application.getContentResolver());
if (valueOf2 != null) {
}
map7.put("registeredUninstall", Boolean.valueOf(AFe1rSDK.AFInAppEventType(sharedPreferences)));
sharedPreferences2 = sharedPreferences;
z2 = z;
int AFKeystoreWrapper2 = AFKeystoreWrapper(sharedPreferences2, z2);
map7.put("counter", Integer.toString(AFKeystoreWrapper2));
map7.put("iaecounter", Integer.toString(values(sharedPreferences2, str6 == null)));
if (z2) {
appsFlyerProperties.AFKeystoreWrapper = true;
}
map7.put("isFirstCall", Boolean.toString(!AFKeystoreWrapper(sharedPreferences2)));
valueOf(application, z2, map7, AFKeystoreWrapper2);
new AFb1ySDK();
map7.put("af_v", AFb1ySDK.AFInAppEventParameterName((Map<String, Object>) map7));
new AFb1ySDK();
map7.put("af_v2", AFb1ySDK.valueOf((Map<String, Object>) map7));
map7.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(application)));
if (sharedPreferences2.contains("is_stop_tracking_used")) {
}
HashMap hashMap3 = new HashMap();
hashMap3.put(PaymentConstants.MCC, Integer.valueOf(application.getResources().getConfiguration().mcc));
hashMap3.put("mnc", Integer.valueOf(application.getResources().getConfiguration().mnc));
map7.put("cell", hashMap3);
AFb1hSDK aFb1hSDK3 = aFb1hSDK;
map7.put("sig", AFa1cSDK.AFInAppEventParameterName(aFb1hSDK3.AFKeystoreWrapper.getPackageManager(), aFb1hSDK3.AFKeystoreWrapper.getPackageName()));
map7.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
StatFs statFs = new StatFs(Environment.getDataDirectory().getAbsolutePath());
long blockSizeLong = statFs.getBlockSizeLong();
double pow = Math.pow(2.0d, 20.0d);
long blockCountLong = (long) ((statFs.getBlockCountLong() * blockSizeLong) / pow);
StringBuilder sb4 = new StringBuilder();
sb4.append((long) ((statFs.getAvailableBlocksLong() * blockSizeLong) / pow));
sb4.append("/");
sb4.append(blockCountLong);
map7.put("disk", sb4.toString());
aFa1fSDK = this.afInfoLog;
map3 = map7;
if (aFa1fSDK != null) {
}
return map3;
}
} catch (Throwable th4) {
th = th4;
sharedPreferences = valueOf3;
z = AFInAppEventParameterName3;
}
map7.onAttributionFailureNative = AFe1rSDK.AFInAppEventType(application);
StringBuilder sb32 = new StringBuilder("didConfigureTokenRefreshService=");
sb32.append(map7.onAttributionFailureNative);
AFLogger.afDebugLog(sb32.toString());
if (!map7.onAttributionFailureNative) {
}
if (z) {
}
if (z) {
}
if (valueOf("advertiserId") == null) {
}
valueOf2 = AFa1eSDK.valueOf(application.getContentResolver());
if (valueOf2 != null) {
}
map7.put("registeredUninstall", Boolean.valueOf(AFe1rSDK.AFInAppEventType(sharedPreferences)));
sharedPreferences2 = sharedPreferences;
z2 = z;
int AFKeystoreWrapper22 = AFKeystoreWrapper(sharedPreferences2, z2);
map7.put("counter", Integer.toString(AFKeystoreWrapper22));
map7.put("iaecounter", Integer.toString(values(sharedPreferences2, str6 == null)));
if (z2) {
}
map7.put("isFirstCall", Boolean.toString(!AFKeystoreWrapper(sharedPreferences2)));
valueOf(application, z2, map7, AFKeystoreWrapper22);
new AFb1ySDK();
map7.put("af_v", AFb1ySDK.AFInAppEventParameterName((Map<String, Object>) map7));
new AFb1ySDK();
map7.put("af_v2", AFb1ySDK.valueOf((Map<String, Object>) map7));
map7.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(application)));
if (sharedPreferences2.contains("is_stop_tracking_used")) {
}
HashMap hashMap32 = new HashMap();
hashMap32.put(PaymentConstants.MCC, Integer.valueOf(application.getResources().getConfiguration().mcc));
hashMap32.put("mnc", Integer.valueOf(application.getResources().getConfiguration().mnc));
map7.put("cell", hashMap32);
AFb1hSDK aFb1hSDK32 = aFb1hSDK;
map7.put("sig", AFa1cSDK.AFInAppEventParameterName(aFb1hSDK32.AFKeystoreWrapper.getPackageManager(), aFb1hSDK32.AFKeystoreWrapper.getPackageName()));
map7.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
StatFs statFs2 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
long blockSizeLong2 = statFs2.getBlockSizeLong();
double pow2 = Math.pow(2.0d, 20.0d);
long blockCountLong2 = (long) ((statFs2.getBlockCountLong() * blockSizeLong2) / pow2);
StringBuilder sb42 = new StringBuilder();
sb42.append((long) ((statFs2.getAvailableBlocksLong() * blockSizeLong2) / pow2));
sb42.append("/");
sb42.append(blockCountLong2);
map7.put("disk", sb42.toString());
aFa1fSDK = this.afInfoLog;
map3 = map7;
if (aFa1fSDK != null) {
}
return map3;
}
} catch (PackageManager.NameNotFoundException e5) {
str4 = str;
nameNotFoundException = e5;
}
if (str5 != null) {
map9.put("fb", str5);
}
}
map7.AFInAppEventType(application, map9);
try {
AFInAppEventParameterName2 = AFb1zSDK.AFInAppEventParameterName(new WeakReference(application));
if (AFInAppEventParameterName2 != null) {
map9.put("uid", AFInAppEventParameterName2);
}
} catch (Exception e6) {
StringBuilder sb5 = new StringBuilder("ERROR: could not get uid ");
sb5.append(e6.getMessage());
AFLogger.afErrorLog(sb5.toString(), e6);
}
try {
map9.put("lang", Locale.getDefault().getDisplayLanguage());
} catch (Exception e7) {
AFLogger.afErrorLog("Exception while collecting display language name. ", e7);
}
try {
map9.put("lang_code", Locale.getDefault().getLanguage());
} catch (Exception e8) {
AFLogger.afErrorLog("Exception while collecting display language code. ", e8);
}
try {
map9.put("country", Locale.getDefault().getCountry());
} catch (Exception e9) {
AFLogger.afErrorLog("Exception while collecting country name. ", e9);
}
map9.put("platformextension", map7.onResponseErrorNative.values());
AFKeystoreWrapper(application, map9);
simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
try {
map9.put("installDate", valueOf(simpleDateFormat, application.getPackageManager().getPackageInfo(application.getPackageName(), 0).firstInstallTime));
} catch (Exception e10) {
AFLogger.afErrorLog("Exception while collecting install date. ", e10);
}
try {
packageInfo = application.getPackageManager().getPackageInfo(application.getPackageName(), 0);
if (packageInfo.versionCode > valueOf3.getInt("versionCode", 0)) {
map7.AFInAppEventParameterName(application).AFInAppEventParameterName("versionCode", packageInfo.versionCode);
}
map9.put(Constants.EXTRA_KEY_APP_VERSION_CODE, Integer.toString(packageInfo.versionCode));
map9.put("app_version_name", packageInfo.versionName);
long j22 = packageInfo.firstInstallTime;
long j32 = packageInfo.lastUpdateTime;
Locale locale2 = Locale.US;
aFb1hSDK = aFb1hSDK2;
sharedPreferences = valueOf3;
z = AFInAppEventParameterName3;
map9.put("date1", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", locale2).format(new Date(j22)));
map9.put("date2", new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", locale2).format(new Date(j32)));
String AFInAppEventParameterName62 = map7.AFInAppEventParameterName(simpleDateFormat, application);
Object[] objArr42 = new Object[1];
AFInAppEventParameterName("䴽붤פֿ\ue3c4⺿㴕ᔮ਼ľ⦿\u1cab삋쿸뢥\uf63c㿱", TextUtils.indexOf("", "", 0, 0) + 15, objArr42);
map9.put(((String) objArr42[0]).intern(), AFInAppEventParameterName62);
} catch (Throwable th5) {
th = th5;
sharedPreferences = valueOf3;
z = AFInAppEventParameterName3;
aFb1hSDK = aFb1hSDK2;
}
map7.onAttributionFailureNative = AFe1rSDK.AFInAppEventType(application);
StringBuilder sb322 = new StringBuilder("didConfigureTokenRefreshService=");
sb322.append(map7.onAttributionFailureNative);
AFLogger.afDebugLog(sb322.toString());
if (!map7.onAttributionFailureNative) {
map9.put("tokenRefreshConfigured", Boolean.FALSE);
}
if (z) {
if (map7.onInstallConversionDataLoadedNative != null) {
if (map9.get("af_deeplink") != null) {
AFLogger.afDebugLog("Skip 'af' payload as deeplink was found by path");
} else {
JSONObject jSONObject = new JSONObject(map7.onInstallConversionDataLoadedNative);
jSONObject.put("isPush", "true");
map9.put("af_deeplink", JSONObjectInstrumentation.toString(jSONObject));
}
}
map7.onInstallConversionDataLoadedNative = null;
map9.put("open_referrer", str3);
}
try {
if (z) {
map7 = map9;
appsFlyerProperties = appsFlyerProperties2;
str6 = str8;
} else {
try {
try {
AFa1bSDK values3 = AFa1bSDK.values(application);
ConcurrentHashMap concurrentHashMap4 = new ConcurrentHashMap();
List<Map<String, Object>> AFInAppEventParameterName7 = values3.AFInAppEventParameterName();
if (!AFInAppEventParameterName7.isEmpty()) {
try {
try {
new AFa1qSDK();
String str13 = "n";
String str14 = "uk";
HashMap hashMap4 = new HashMap();
Iterator<Map<String, Object>> it = AFInAppEventParameterName7.iterator();
map7 = map7;
while (true) {
if (!it.hasNext()) {
map6 = map9;
concurrentHashMap = concurrentHashMap4;
appsFlyerProperties = appsFlyerProperties2;
str6 = str8;
break;
}
Map<String, Object> next = it.next();
HashMap hashMap5 = new HashMap();
Iterator<Map<String, Object>> it2 = it;
boolean z3 = next.get("sVS") != null;
boolean z4 = next.get("sVE") != null;
if (z3 && z4) {
aFa1vSDK = AFa1qSDK.AFa1vSDK.ALL;
} else if (z3) {
aFa1vSDK = AFa1qSDK.AFa1vSDK.FIRST;
} else {
aFa1vSDK = AFa1qSDK.AFa1vSDK.NONE;
}
if (aFa1vSDK != AFa1qSDK.AFa1vSDK.NONE) {
Integer num = (Integer) next.get("sT");
appsFlyerProperties = appsFlyerProperties2;
try {
String str15 = (String) next.get("sN");
if (str15 != null) {
try {
hashMap5.put(str13, str15);
} catch (Exception e11) {
e = e11;
map4 = map9;
str6 = str8;
exc = e;
map5 = map4;
AFLogger.afErrorLogForExcManagerOnly("error while getting sensors data", exc);
StringBuilder sb6 = new StringBuilder("Unexpected exception from AFSensorManager: ");
sb6.append(exc.getMessage());
AFLogger.afRDLog(sb6.toString());
map7 = map5;
if (valueOf("advertiserId") == null) {
}
valueOf2 = AFa1eSDK.valueOf(application.getContentResolver());
if (valueOf2 != null) {
}
map7.put("registeredUninstall", Boolean.valueOf(AFe1rSDK.AFInAppEventType(sharedPreferences)));
sharedPreferences2 = sharedPreferences;
z2 = z;
int AFKeystoreWrapper222 = AFKeystoreWrapper(sharedPreferences2, z2);
map7.put("counter", Integer.toString(AFKeystoreWrapper222));
map7.put("iaecounter", Integer.toString(values(sharedPreferences2, str6 == null)));
if (z2) {
}
map7.put("isFirstCall", Boolean.toString(!AFKeystoreWrapper(sharedPreferences2)));
valueOf(application, z2, map7, AFKeystoreWrapper222);
new AFb1ySDK();
map7.put("af_v", AFb1ySDK.AFInAppEventParameterName((Map<String, Object>) map7));
new AFb1ySDK();
map7.put("af_v2", AFb1ySDK.valueOf((Map<String, Object>) map7));
map7.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(application)));
if (sharedPreferences2.contains("is_stop_tracking_used")) {
}
HashMap hashMap322 = new HashMap();
hashMap322.put(PaymentConstants.MCC, Integer.valueOf(application.getResources().getConfiguration().mcc));
hashMap322.put("mnc", Integer.valueOf(application.getResources().getConfiguration().mnc));
map7.put("cell", hashMap322);
AFb1hSDK aFb1hSDK322 = aFb1hSDK;
map7.put("sig", AFa1cSDK.AFInAppEventParameterName(aFb1hSDK322.AFKeystoreWrapper.getPackageManager(), aFb1hSDK322.AFKeystoreWrapper.getPackageName()));
map7.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
StatFs statFs22 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
long blockSizeLong22 = statFs22.getBlockSizeLong();
double pow22 = Math.pow(2.0d, 20.0d);
long blockCountLong22 = (long) ((statFs22.getBlockCountLong() * blockSizeLong22) / pow22);
StringBuilder sb422 = new StringBuilder();
sb422.append((long) ((statFs22.getAvailableBlocksLong() * blockSizeLong22) / pow22));
sb422.append("/");
sb422.append(blockCountLong22);
map7.put("disk", sb422.toString());
aFa1fSDK = this.afInfoLog;
map3 = map7;
if (aFa1fSDK != null) {
}
return map3;
}
} else {
hashMap5.put(str13, str14);
}
AFa1qSDK.AFa1xSDK aFa1xSDK = AFa1qSDK.AFa1xSDK.values()[num.intValue()];
String str16 = str13;
String str17 = str14;
ArrayList arrayList2 = new ArrayList(AFa1qSDK.AFInAppEventParameterName(next.get("sVS")));
if (aFa1vSDK == AFa1qSDK.AFa1vSDK.ALL) {
arrayList2.addAll(AFa1qSDK.AFInAppEventParameterName(next.get("sVE")));
}
if (aFa1xSDK == AFa1qSDK.AFa1xSDK.MAGNETOMETER) {
ArrayList arrayList3 = new ArrayList();
BigDecimal bigDecimal = (BigDecimal) arrayList2.get(0);
BigDecimal bigDecimal2 = (BigDecimal) arrayList2.get(1);
map6 = map9;
try {
try {
double doubleValue = bigDecimal.doubleValue();
aFa1vSDK2 = aFa1vSDK;
concurrentHashMap3 = concurrentHashMap4;
BigDecimal valueOf11 = BigDecimal.valueOf(Math.atan2(bigDecimal2.doubleValue(), doubleValue) * 57.29577951308232d);
DecimalFormat decimalFormat = new DecimalFormat("##.#");
RoundingMode roundingMode = RoundingMode.DOWN;
decimalFormat.setRoundingMode(roundingMode);
arrayList3.add(Double.valueOf(Double.parseDouble(decimalFormat.format(valueOf11))));
DecimalFormat decimalFormat2 = new DecimalFormat("##.#");
decimalFormat2.setRoundingMode(roundingMode);
arrayList3.add(Double.valueOf(Double.parseDouble(decimalFormat2.format((BigDecimal) arrayList2.get(2)))));
ArrayList arrayList4 = new ArrayList();
if (arrayList2.size() > 5) {
hashMap2 = hashMap5;
str6 = str8;
hashMap = hashMap4;
try {
BigDecimal subtract = BigDecimal.valueOf(Math.atan2(((BigDecimal) arrayList2.get(4)).doubleValue(), ((BigDecimal) arrayList2.get(3)).doubleValue()) * 57.29577951308232d).subtract(valueOf11);
DecimalFormat decimalFormat3 = new DecimalFormat("##.#");
decimalFormat3.setRoundingMode(roundingMode);
arrayList4.add(Double.valueOf(Double.parseDouble(decimalFormat3.format(subtract))));
BigDecimal subtract2 = ((BigDecimal) arrayList2.get(5)).subtract((BigDecimal) arrayList2.get(2));
DecimalFormat decimalFormat4 = new DecimalFormat("##.#");
decimalFormat4.setRoundingMode(roundingMode);
arrayList4.add(Double.valueOf(Double.parseDouble(decimalFormat4.format(subtract2))));
} catch (Exception e12) {
e = e12;
exc = e;
map5 = map6;
AFLogger.afErrorLogForExcManagerOnly("error while getting sensors data", exc);
StringBuilder sb62 = new StringBuilder("Unexpected exception from AFSensorManager: ");
sb62.append(exc.getMessage());
AFLogger.afRDLog(sb62.toString());
map7 = map5;
if (valueOf("advertiserId") == null) {
}
valueOf2 = AFa1eSDK.valueOf(application.getContentResolver());
if (valueOf2 != null) {
}
map7.put("registeredUninstall", Boolean.valueOf(AFe1rSDK.AFInAppEventType(sharedPreferences)));
sharedPreferences2 = sharedPreferences;
z2 = z;
int AFKeystoreWrapper2222 = AFKeystoreWrapper(sharedPreferences2, z2);
map7.put("counter", Integer.toString(AFKeystoreWrapper2222));
map7.put("iaecounter", Integer.toString(values(sharedPreferences2, str6 == null)));
if (z2) {
}
map7.put("isFirstCall", Boolean.toString(!AFKeystoreWrapper(sharedPreferences2)));
valueOf(application, z2, map7, AFKeystoreWrapper2222);
new AFb1ySDK();
map7.put("af_v", AFb1ySDK.AFInAppEventParameterName((Map<String, Object>) map7));
new AFb1ySDK();
map7.put("af_v2", AFb1ySDK.valueOf((Map<String, Object>) map7));
map7.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(application)));
if (sharedPreferences2.contains("is_stop_tracking_used")) {
}
HashMap hashMap3222 = new HashMap();
hashMap3222.put(PaymentConstants.MCC, Integer.valueOf(application.getResources().getConfiguration().mcc));
hashMap3222.put("mnc", Integer.valueOf(application.getResources().getConfiguration().mnc));
map7.put("cell", hashMap3222);
AFb1hSDK aFb1hSDK3222 = aFb1hSDK;
map7.put("sig", AFa1cSDK.AFInAppEventParameterName(aFb1hSDK3222.AFKeystoreWrapper.getPackageManager(), aFb1hSDK3222.AFKeystoreWrapper.getPackageName()));
map7.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
StatFs statFs222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
long blockSizeLong222 = statFs222.getBlockSizeLong();
double pow222 = Math.pow(2.0d, 20.0d);
long blockCountLong222 = (long) ((statFs222.getBlockCountLong() * blockSizeLong222) / pow222);
StringBuilder sb4222 = new StringBuilder();
sb4222.append((long) ((statFs222.getAvailableBlocksLong() * blockSizeLong222) / pow222));
sb4222.append("/");
sb4222.append(blockCountLong222);
map7.put("disk", sb4222.toString());
aFa1fSDK = this.afInfoLog;
map3 = map7;
if (aFa1fSDK != null) {
}
return map3;
}
} else {
str6 = str8;
hashMap = hashMap4;
hashMap2 = hashMap5;
}
arrayList = new ArrayList();
arrayList.add(arrayList3);
arrayList.add(arrayList4);
} catch (Throwable th6) {
th = th6;
th = th;
map2 = map6;
AFLogger.afErrorLog(th.getLocalizedMessage(), th, true);
map3 = map2;
return map3;
}
} catch (Exception e13) {
e = e13;
str6 = str8;
exc = e;
map5 = map6;
AFLogger.afErrorLogForExcManagerOnly("error while getting sensors data", exc);
StringBuilder sb622 = new StringBuilder("Unexpected exception from AFSensorManager: ");
sb622.append(exc.getMessage());
AFLogger.afRDLog(sb622.toString());
map7 = map5;
if (valueOf("advertiserId") == null) {
}
valueOf2 = AFa1eSDK.valueOf(application.getContentResolver());
if (valueOf2 != null) {
}
map7.put("registeredUninstall", Boolean.valueOf(AFe1rSDK.AFInAppEventType(sharedPreferences)));
sharedPreferences2 = sharedPreferences;
z2 = z;
int AFKeystoreWrapper22222 = AFKeystoreWrapper(sharedPreferences2, z2);
map7.put("counter", Integer.toString(AFKeystoreWrapper22222));
map7.put("iaecounter", Integer.toString(values(sharedPreferences2, str6 == null)));
if (z2) {
}
map7.put("isFirstCall", Boolean.toString(!AFKeystoreWrapper(sharedPreferences2)));
valueOf(application, z2, map7, AFKeystoreWrapper22222);
new AFb1ySDK();
map7.put("af_v", AFb1ySDK.AFInAppEventParameterName((Map<String, Object>) map7));
new AFb1ySDK();
map7.put("af_v2", AFb1ySDK.valueOf((Map<String, Object>) map7));
map7.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(application)));
if (sharedPreferences2.contains("is_stop_tracking_used")) {
}
HashMap hashMap32222 = new HashMap();
hashMap32222.put(PaymentConstants.MCC, Integer.valueOf(application.getResources().getConfiguration().mcc));
hashMap32222.put("mnc", Integer.valueOf(application.getResources().getConfiguration().mnc));
map7.put("cell", hashMap32222);
AFb1hSDK aFb1hSDK32222 = aFb1hSDK;
map7.put("sig", AFa1cSDK.AFInAppEventParameterName(aFb1hSDK32222.AFKeystoreWrapper.getPackageManager(), aFb1hSDK32222.AFKeystoreWrapper.getPackageName()));
map7.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
StatFs statFs2222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
long blockSizeLong2222 = statFs2222.getBlockSizeLong();
double pow2222 = Math.pow(2.0d, 20.0d);
long blockCountLong2222 = (long) ((statFs2222.getBlockCountLong() * blockSizeLong2222) / pow2222);
StringBuilder sb42222 = new StringBuilder();
sb42222.append((long) ((statFs2222.getAvailableBlocksLong() * blockSizeLong2222) / pow2222));
sb42222.append("/");
sb42222.append(blockCountLong2222);
map7.put("disk", sb42222.toString());
aFa1fSDK = this.afInfoLog;
map3 = map7;
if (aFa1fSDK != null) {
}
return map3;
}
} else {
map6 = map9;
aFa1vSDK2 = aFa1vSDK;
concurrentHashMap3 = concurrentHashMap4;
str6 = str8;
hashMap = hashMap4;
hashMap2 = hashMap5;
ArrayList arrayList5 = new ArrayList();
if (arrayList2.size() > 5) {
BigDecimal subtract3 = ((BigDecimal) arrayList2.get(3)).subtract((BigDecimal) arrayList2.get(0));
DecimalFormat decimalFormat5 = new DecimalFormat("##.#");
RoundingMode roundingMode2 = RoundingMode.DOWN;
decimalFormat5.setRoundingMode(roundingMode2);
arrayList5.add(Double.valueOf(Double.parseDouble(decimalFormat5.format(subtract3))));
BigDecimal subtract4 = ((BigDecimal) arrayList2.get(4)).subtract((BigDecimal) arrayList2.get(1));
DecimalFormat decimalFormat6 = new DecimalFormat("##.#");
decimalFormat6.setRoundingMode(roundingMode2);
arrayList5.add(Double.valueOf(Double.parseDouble(decimalFormat6.format(subtract4))));
BigDecimal subtract5 = ((BigDecimal) arrayList2.get(5)).subtract((BigDecimal) arrayList2.get(2));
DecimalFormat decimalFormat7 = new DecimalFormat("##.#");
decimalFormat7.setRoundingMode(roundingMode2);
arrayList5.add(Double.valueOf(Double.parseDouble(decimalFormat7.format(subtract5))));
}
ArrayList arrayList6 = new ArrayList();
DecimalFormat decimalFormat8 = new DecimalFormat("##.#");
RoundingMode roundingMode3 = RoundingMode.DOWN;
decimalFormat8.setRoundingMode(roundingMode3);
arrayList6.add(Double.valueOf(Double.parseDouble(decimalFormat8.format((BigDecimal) arrayList2.get(0)))));
DecimalFormat decimalFormat9 = new DecimalFormat("##.#");
decimalFormat9.setRoundingMode(roundingMode3);
arrayList6.add(Double.valueOf(Double.parseDouble(decimalFormat9.format((BigDecimal) arrayList2.get(1)))));
DecimalFormat decimalFormat10 = new DecimalFormat("##.#");
decimalFormat10.setRoundingMode(roundingMode3);
arrayList6.add(Double.valueOf(Double.parseDouble(decimalFormat10.format((BigDecimal) arrayList2.get(2)))));
ArrayList arrayList7 = new ArrayList();
arrayList7.add(arrayList6);
arrayList7.add(arrayList5);
arrayList = arrayList7;
}
hashMap2.put("v", arrayList);
HashMap hashMap6 = hashMap;
hashMap6.put(AFa1qSDK.AFa1wSDK.values()[num.intValue()].AFKeystoreWrapper, hashMap2);
if (aFa1vSDK2 == AFa1qSDK.AFa1vSDK.FIRST) {
hashMap6.put("er", "no_svs");
}
map7 = this;
hashMap4 = hashMap6;
it = it2;
str8 = str6;
appsFlyerProperties2 = appsFlyerProperties;
str13 = str16;
str14 = str17;
concurrentHashMap4 = concurrentHashMap3;
map9 = map6;
} catch (Exception e14) {
e = e14;
map6 = map9;
}
} else {
map6 = map9;
concurrentHashMap = concurrentHashMap4;
appsFlyerProperties = appsFlyerProperties2;
str6 = str8;
hashMap4 = new HashMap();
hashMap4.put("er", "na");
break;
}
}
concurrentHashMap2 = concurrentHashMap;
concurrentHashMap2.put("sensors", hashMap4);
} catch (Exception e15) {
e = e15;
map6 = map9;
appsFlyerProperties = appsFlyerProperties2;
}
} catch (Throwable th7) {
th = th7;
map6 = map9;
}
} else {
map6 = map9;
concurrentHashMap2 = concurrentHashMap4;
appsFlyerProperties = appsFlyerProperties2;
str6 = str8;
try {
concurrentHashMap2.put("sensors", "na");
} catch (Exception e16) {
e = e16;
map4 = map6;
exc = e;
map5 = map4;
AFLogger.afErrorLogForExcManagerOnly("error while getting sensors data", exc);
StringBuilder sb6222 = new StringBuilder("Unexpected exception from AFSensorManager: ");
sb6222.append(exc.getMessage());
AFLogger.afRDLog(sb6222.toString());
map7 = map5;
if (valueOf("advertiserId") == null) {
}
valueOf2 = AFa1eSDK.valueOf(application.getContentResolver());
if (valueOf2 != null) {
}
map7.put("registeredUninstall", Boolean.valueOf(AFe1rSDK.AFInAppEventType(sharedPreferences)));
sharedPreferences2 = sharedPreferences;
z2 = z;
int AFKeystoreWrapper222222 = AFKeystoreWrapper(sharedPreferences2, z2);
map7.put("counter", Integer.toString(AFKeystoreWrapper222222));
map7.put("iaecounter", Integer.toString(values(sharedPreferences2, str6 == null)));
if (z2) {
}
map7.put("isFirstCall", Boolean.toString(!AFKeystoreWrapper(sharedPreferences2)));
valueOf(application, z2, map7, AFKeystoreWrapper222222);
new AFb1ySDK();
map7.put("af_v", AFb1ySDK.AFInAppEventParameterName((Map<String, Object>) map7));
new AFb1ySDK();
map7.put("af_v2", AFb1ySDK.valueOf((Map<String, Object>) map7));
map7.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(application)));
if (sharedPreferences2.contains("is_stop_tracking_used")) {
}
HashMap hashMap322222 = new HashMap();
hashMap322222.put(PaymentConstants.MCC, Integer.valueOf(application.getResources().getConfiguration().mcc));
hashMap322222.put("mnc", Integer.valueOf(application.getResources().getConfiguration().mnc));
map7.put("cell", hashMap322222);
AFb1hSDK aFb1hSDK322222 = aFb1hSDK;
map7.put("sig", AFa1cSDK.AFInAppEventParameterName(aFb1hSDK322222.AFKeystoreWrapper.getPackageManager(), aFb1hSDK322222.AFKeystoreWrapper.getPackageName()));
map7.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
StatFs statFs22222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
long blockSizeLong22222 = statFs22222.getBlockSizeLong();
double pow22222 = Math.pow(2.0d, 20.0d);
long blockCountLong22222 = (long) ((statFs22222.getBlockCountLong() * blockSizeLong22222) / pow22222);
StringBuilder sb422222 = new StringBuilder();
sb422222.append((long) ((statFs22222.getAvailableBlocksLong() * blockSizeLong22222) / pow22222));
sb422222.append("/");
sb422222.append(blockCountLong22222);
map7.put("disk", sb422222.toString());
aFa1fSDK = this.afInfoLog;
map3 = map7;
if (aFa1fSDK != null) {
}
return map3;
} catch (Throwable th8) {
th = th8;
map7 = map6;
map = map7;
th = th;
map2 = map;
AFLogger.afErrorLog(th.getLocalizedMessage(), th, true);
map3 = map2;
return map3;
}
}
map4 = map6;
} catch (Exception e17) {
e = e17;
map4 = map9;
appsFlyerProperties = appsFlyerProperties2;
}
} catch (Throwable th9) {
th = th9;
map7 = map9;
}
try {
map4.putAll(concurrentHashMap2);
map7 = map4;
} catch (Exception e18) {
e = e18;
exc = e;
map5 = map4;
AFLogger.afErrorLogForExcManagerOnly("error while getting sensors data", exc);
StringBuilder sb62222 = new StringBuilder("Unexpected exception from AFSensorManager: ");
sb62222.append(exc.getMessage());
AFLogger.afRDLog(sb62222.toString());
map7 = map5;
if (valueOf("advertiserId") == null) {
}
valueOf2 = AFa1eSDK.valueOf(application.getContentResolver());
if (valueOf2 != null) {
}
map7.put("registeredUninstall", Boolean.valueOf(AFe1rSDK.AFInAppEventType(sharedPreferences)));
sharedPreferences2 = sharedPreferences;
z2 = z;
int AFKeystoreWrapper2222222 = AFKeystoreWrapper(sharedPreferences2, z2);
map7.put("counter", Integer.toString(AFKeystoreWrapper2222222));
map7.put("iaecounter", Integer.toString(values(sharedPreferences2, str6 == null)));
if (z2) {
}
map7.put("isFirstCall", Boolean.toString(!AFKeystoreWrapper(sharedPreferences2)));
valueOf(application, z2, map7, AFKeystoreWrapper2222222);
new AFb1ySDK();
map7.put("af_v", AFb1ySDK.AFInAppEventParameterName((Map<String, Object>) map7));
new AFb1ySDK();
map7.put("af_v2", AFb1ySDK.valueOf((Map<String, Object>) map7));
map7.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(application)));
if (sharedPreferences2.contains("is_stop_tracking_used")) {
}
HashMap hashMap3222222 = new HashMap();
hashMap3222222.put(PaymentConstants.MCC, Integer.valueOf(application.getResources().getConfiguration().mcc));
hashMap3222222.put("mnc", Integer.valueOf(application.getResources().getConfiguration().mnc));
map7.put("cell", hashMap3222222);
AFb1hSDK aFb1hSDK3222222 = aFb1hSDK;
map7.put("sig", AFa1cSDK.AFInAppEventParameterName(aFb1hSDK3222222.AFKeystoreWrapper.getPackageManager(), aFb1hSDK3222222.AFKeystoreWrapper.getPackageName()));
map7.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
StatFs statFs222222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
long blockSizeLong222222 = statFs222222.getBlockSizeLong();
double pow222222 = Math.pow(2.0d, 20.0d);
long blockCountLong222222 = (long) ((statFs222222.getBlockCountLong() * blockSizeLong222222) / pow222222);
StringBuilder sb4222222 = new StringBuilder();
sb4222222.append((long) ((statFs222222.getAvailableBlocksLong() * blockSizeLong222222) / pow222222));
sb4222222.append("/");
sb4222222.append(blockCountLong222222);
map7.put("disk", sb4222222.toString());
aFa1fSDK = this.afInfoLog;
map3 = map7;
if (aFa1fSDK != null) {
}
return map3;
}
}
if (valueOf("advertiserId") == null) {
AFa1eSDK.AFKeystoreWrapper(application, map7);
map7.put("GAID_retry", String.valueOf(valueOf("advertiserId") != null));
}
valueOf2 = AFa1eSDK.valueOf(application.getContentResolver());
if (valueOf2 != null) {
map7.put("amazon_aid", valueOf2.AFInAppEventParameterName);
map7.put("amazon_aid_limit", String.valueOf(valueOf2.AFInAppEventType));
}
map7.put("registeredUninstall", Boolean.valueOf(AFe1rSDK.AFInAppEventType(sharedPreferences)));
sharedPreferences2 = sharedPreferences;
z2 = z;
int AFKeystoreWrapper22222222 = AFKeystoreWrapper(sharedPreferences2, z2);
map7.put("counter", Integer.toString(AFKeystoreWrapper22222222));
map7.put("iaecounter", Integer.toString(values(sharedPreferences2, str6 == null)));
if (z2 && AFKeystoreWrapper22222222 == 1) {
appsFlyerProperties.AFKeystoreWrapper = true;
}
map7.put("isFirstCall", Boolean.toString(!AFKeystoreWrapper(sharedPreferences2)));
valueOf(application, z2, map7, AFKeystoreWrapper22222222);
new AFb1ySDK();
map7.put("af_v", AFb1ySDK.AFInAppEventParameterName((Map<String, Object>) map7));
new AFb1ySDK();
map7.put("af_v2", AFb1ySDK.valueOf((Map<String, Object>) map7));
map7.put("ivc", Boolean.valueOf(onAppOpenAttributionNative(application)));
if (sharedPreferences2.contains("is_stop_tracking_used")) {
map7.put("istu", String.valueOf(sharedPreferences2.getBoolean("is_stop_tracking_used", false)));
}
HashMap hashMap32222222 = new HashMap();
hashMap32222222.put(PaymentConstants.MCC, Integer.valueOf(application.getResources().getConfiguration().mcc));
hashMap32222222.put("mnc", Integer.valueOf(application.getResources().getConfiguration().mnc));
map7.put("cell", hashMap32222222);
AFb1hSDK aFb1hSDK32222222 = aFb1hSDK;
map7.put("sig", AFa1cSDK.AFInAppEventParameterName(aFb1hSDK32222222.AFKeystoreWrapper.getPackageManager(), aFb1hSDK32222222.AFKeystoreWrapper.getPackageName()));
map7.put("last_boot_time", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
StatFs statFs2222222 = new StatFs(Environment.getDataDirectory().getAbsolutePath());
long blockSizeLong2222222 = statFs2222222.getBlockSizeLong();
double pow2222222 = Math.pow(2.0d, 20.0d);
long blockCountLong2222222 = (long) ((statFs2222222.getBlockCountLong() * blockSizeLong2222222) / pow2222222);
StringBuilder sb42222222 = new StringBuilder();
sb42222222.append((long) ((statFs2222222.getAvailableBlocksLong() * blockSizeLong2222222) / pow2222222));
sb42222222.append("/");
sb42222222.append(blockCountLong2222222);
map7.put("disk", sb42222222.toString());
aFa1fSDK = this.afInfoLog;
map3 = map7;
if (aFa1fSDK != null) {
String[] strArr = aFa1fSDK.values;
map3 = map7;
if (strArr != null) {
map7.put("sharing_filter", strArr);
map3 = map7;
}
}
} catch (Throwable th10) {
th = th10;
}
} catch (Throwable th11) {
th = th11;
map = map7;
}
} catch (Throwable th12) {
th = th12;
map = map9;
th = th;
map2 = map;
AFLogger.afErrorLog(th.getLocalizedMessage(), th, true);
map3 = map2;
return map3;
}
return map3;
}
public static boolean AFKeystoreWrapper(Context context) {
int i = onPause + 43;
AppsFlyerLib = i % 128;
int i2 = i % 2;
try {
} catch (Throwable th) {
AFLogger.afErrorLog("WARNING: Google play services is unavailable. ", th);
}
if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) == 0) {
return true;
}
int i3 = AppsFlyerLib + 105;
onPause = i3 % 128;
int i4 = i3 % 2;
try {
context.getPackageManager().getPackageInfo("com.google.android.gms", 0);
return true;
} catch (PackageManager.NameNotFoundException e) {
AFLogger.afErrorLog("WARNING: Google Play Services is unavailable. ", e);
return false;
}
}
private static String AFKeystoreWrapper(String str) {
Object invoke;
int i = onPause + 11;
AppsFlyerLib = i % 128;
String str2 = null;
try {
if (i % 2 == 0) {
Class<?> cls = Class.forName("android.os.SystemProperties");
Class<?>[] clsArr = new Class[0];
clsArr[0] = String.class;
Method method = cls.getMethod("get", clsArr);
Object[] objArr = new Object[1];
objArr[1] = str;
invoke = method.invoke(null, objArr);
} else {
invoke = Class.forName("android.os.SystemProperties").getMethod("get", String.class).invoke(null, str);
}
str2 = (String) invoke;
return str2;
} catch (Throwable th) {
AFLogger.afErrorLog(th.getMessage(), th);
return str2;
}
}
public final int AFKeystoreWrapper(SharedPreferences sharedPreferences, boolean z) {
int i = AppsFlyerLib + 111;
onPause = i % 128;
int i2 = i % 2;
int AFKeystoreWrapper2 = AFKeystoreWrapper(sharedPreferences, "appsFlyerCount", z);
int i3 = onPause + 107;
AppsFlyerLib = i3 % 128;
if (i3 % 2 == 0) {
int i4 = 63 / 0;
}
return AFKeystoreWrapper2;
}
private int AFKeystoreWrapper(SharedPreferences sharedPreferences, String str, boolean z) {
int i;
int i2 = onPause + 97;
AppsFlyerLib = i2 % 128;
if (i2 % 2 == 0) {
i = sharedPreferences.getInt(str, 0);
} else {
i = sharedPreferences.getInt(str, 0);
}
if (valueOf().getLevel().afInfoLog()) {
int i3 = onPause + 3;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
valueOf().getLevel().AFKeystoreWrapper(String.valueOf(i));
}
return i;
}
private static void AFInAppEventParameterName(Context context, Map<String, Object> map, String str) {
int i = onPause + 107;
AppsFlyerLib = i % 128;
try {
if (i % 2 != 0) {
SharedPreferences valueOf2 = valueOf(context);
SharedPreferences.Editor edit = valueOf2.edit();
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);
int i2 = AppsFlyerLib + 115;
onPause = i2 % 128;
int i3 = i2 % 2;
}
edit.putString("prev_event_name", str).putLong("prev_event_timestamp", System.currentTimeMillis()).apply();
return;
}
SharedPreferences valueOf3 = valueOf(context);
valueOf3.edit();
valueOf3.getString("prev_event_name", null);
throw null;
} catch (Exception e) {
AFLogger.afErrorLog("Error while processing previous event.", e);
}
}
private void values(Context context, String str, Map<String, Object> map, String str2, String str3) {
AFa1tSDK aFe1eSDK;
int i = onPause + 93;
int i2 = i % 128;
AppsFlyerLib = i2;
if (i % 2 != 0) {
if (str != null) {
int i3 = i2 + 97;
onPause = i3 % 128;
int i4 = i3 % 2;
if (!str.trim().isEmpty()) {
aFe1eSDK = new AFe1cSDK();
if (context != null) {
int i5 = onPause + 101;
AppsFlyerLib = i5 % 128;
if (i5 % 2 != 0) {
aFe1eSDK.AFKeystoreWrapper = (Application) context.getApplicationContext();
} else {
aFe1eSDK.AFKeystoreWrapper = (Application) context.getApplicationContext();
throw null;
}
}
aFe1eSDK.afErrorLog = str;
aFe1eSDK.values = map;
aFe1eSDK.AFLogger = str2;
aFe1eSDK.valueOf = str3;
AFInAppEventParameterName(aFe1eSDK);
int i6 = AppsFlyerLib + 57;
onPause = i6 % 128;
int i7 = i6 % 2;
return;
}
}
aFe1eSDK = new AFe1eSDK();
if (context != null) {
}
aFe1eSDK.afErrorLog = str;
aFe1eSDK.values = map;
aFe1eSDK.AFLogger = str2;
aFe1eSDK.valueOf = str3;
AFInAppEventParameterName(aFe1eSDK);
int i62 = AppsFlyerLib + 57;
onPause = i62 % 128;
int i72 = i62 % 2;
return;
}
throw null;
}
private void AFKeystoreWrapper(AFa1tSDK aFa1tSDK) {
String format;
String values2;
long j;
AFf1oSDK[] afWarnLog2;
Application application = aFa1tSDK.AFKeystoreWrapper;
if (application == null) {
int i = onPause + 27;
AppsFlyerLib = i % 128;
int i2 = i % 2;
AFLogger.afDebugLog("sendWithEvent - got null context. skipping event/launch.");
return;
}
SharedPreferences valueOf2 = valueOf(application);
AppsFlyerProperties.getInstance().saveProperties(valueOf2);
if (!this.onValidateInAppFailure.afWarnLog().AFInAppEventParameterName()) {
StringBuilder sb = new StringBuilder("sendWithEvent from activity: ");
sb.append(application.getClass().getName());
AFLogger.afInfoLog(sb.toString());
}
boolean AFInAppEventParameterName2 = aFa1tSDK.AFInAppEventParameterName();
boolean z = aFa1tSDK instanceof AFe1gSDK;
boolean z2 = aFa1tSDK instanceof AFe1bSDK;
boolean z3 = aFa1tSDK instanceof AFe1fSDK;
Map<String, ?> AFInAppEventType2 = AFInAppEventType(aFa1tSDK);
String str = (String) AFInAppEventType2.get("appsflyerKey");
if (str != null && str.length() != 0) {
if (!isStopped()) {
AFLogger.afInfoLog("AppsFlyerLib.sendWithEvent");
}
boolean z4 = false;
int AFKeystoreWrapper2 = AFKeystoreWrapper(valueOf2, false);
if (!z3) {
int i3 = onPause;
int i4 = i3 + 17;
AppsFlyerLib = i4 % 128;
int i5 = i4 % 2;
if (!z2) {
if (z) {
int i6 = i3 + 49;
AppsFlyerLib = i6 % 128;
int i7 = i6 % 2;
format = String.format(afDebugLog, AppsFlyerLib.getInstance().getHostPrefix(), AFKeystoreWrapper().getHostName());
} else if (AFInAppEventParameterName2) {
int i8 = i3 + 15;
AppsFlyerLib = i8 % 128;
int i9 = i8 % 2;
format = AFKeystoreWrapper2 < 2 ? String.format(afWarnLog, AppsFlyerLib.getInstance().getHostPrefix(), AFKeystoreWrapper().getHostName()) : String.format(getLevel, AppsFlyerLib.getInstance().getHostPrefix(), AFKeystoreWrapper().getHostName());
} else {
format = String.format(afErrorLogForExcManagerOnly, AppsFlyerLib.getInstance().getHostPrefix(), AFKeystoreWrapper().getHostName());
}
StringBuilder sb2 = new StringBuilder();
sb2.append(format);
sb2.append(application.getPackageName());
String obj = sb2.toString();
values2 = values(application);
if (!z) {
StringBuilder sb3 = new StringBuilder();
sb3.append(obj);
sb3.append("&buildnumber=6.10.1");
obj = sb3.toString();
}
if (values2 != null) {
StringBuilder sb4 = new StringBuilder();
sb4.append(obj);
sb4.append("&channel=");
sb4.append(values2);
obj = sb4.toString();
}
AFKeystoreWrapper(AFInAppEventType2);
AFa1zSDK aFa1zSDK = new AFa1zSDK(this, aFa1tSDK.AFInAppEventParameterName(obj).AFKeystoreWrapper(AFInAppEventType2).AFKeystoreWrapper(AFKeystoreWrapper2), (byte) 0);
if (AFInAppEventParameterName2) {
boolean z5 = false;
for (AFf1oSDK aFf1oSDK : afWarnLog()) {
int i10 = AppsFlyerLib + 1;
onPause = i10 % 128;
int i11 = i10 % 2;
if (aFf1oSDK.afRDLog == AFf1oSDK.AFa1zSDK.STARTED) {
StringBuilder sb5 = new StringBuilder("Failed to get ");
sb5.append(aFf1oSDK.AFKeystoreWrapper);
sb5.append(" referrer, wait ...");
AFLogger.afDebugLog(sb5.toString());
z5 = true;
}
}
if (this.onAttributionFailure && !afDebugLog()) {
int i12 = onPause + 17;
AppsFlyerLib = i12 % 128;
if (i12 % 2 == 0) {
AFLogger.afDebugLog("fetching Facebook deferred AppLink data, wait ...");
} else {
AFLogger.afDebugLog("fetching Facebook deferred AppLink data, wait ...");
z4 = true;
}
} else {
z4 = z5;
}
if (this.onValidateInAppFailure.afWarnLog().valueOf()) {
int i13 = onPause + 125;
AppsFlyerLib = i13 % 128;
int i14 = i13 % 2;
z4 = true;
}
}
ScheduledExecutorService AFKeystoreWrapper3 = this.onValidateInAppFailure.AFKeystoreWrapper();
if (z4) {
j = 0;
} else {
int i15 = onPause + 29;
AppsFlyerLib = i15 % 128;
if (i15 % 2 == 0) {
throw null;
}
j = 500;
}
AFInAppEventParameterName(AFKeystoreWrapper3, aFa1zSDK, j, TimeUnit.MILLISECONDS);
return;
}
}
format = String.format(AFLogger$LogLevel, AppsFlyerLib.getInstance().getHostPrefix(), AFKeystoreWrapper().getHostName());
StringBuilder sb22 = new StringBuilder();
sb22.append(format);
sb22.append(application.getPackageName());
String obj2 = sb22.toString();
values2 = values(application);
if (!z) {
}
if (values2 != null) {
}
AFKeystoreWrapper(AFInAppEventType2);
AFa1zSDK aFa1zSDK2 = new AFa1zSDK(this, aFa1tSDK.AFInAppEventParameterName(obj2).AFKeystoreWrapper(AFInAppEventType2).AFKeystoreWrapper(AFKeystoreWrapper2), (byte) 0);
if (AFInAppEventParameterName2) {
}
ScheduledExecutorService AFKeystoreWrapper32 = this.onValidateInAppFailure.AFKeystoreWrapper();
if (z4) {
}
AFInAppEventParameterName(AFKeystoreWrapper32, aFa1zSDK2, j, TimeUnit.MILLISECONDS);
return;
}
AFLogger.afDebugLog("Not sending data yet, waiting for dev key");
AppsFlyerRequestListener appsFlyerRequestListener = aFa1tSDK.AFInAppEventType;
if (appsFlyerRequestListener != null) {
int i16 = AppsFlyerLib + 111;
onPause = i16 % 128;
if (i16 % 2 != 0) {
appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1fSDK.AFInAppEventType);
throw null;
}
appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, AFb1fSDK.AFInAppEventType);
}
}
private static String values(String str) {
int i = AppsFlyerLib + 59;
onPause = i % 128;
int i2 = i % 2;
int indexOf = str.indexOf(63);
if (indexOf == -1) {
return "";
}
String substring = str.substring(indexOf);
int i3 = onPause + 57;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
return substring;
}
private int values(SharedPreferences sharedPreferences, boolean z) {
int i = onPause + 15;
AppsFlyerLib = i % 128;
if (i % 2 == 0) {
AFKeystoreWrapper(sharedPreferences, "appsFlyerInAppEventCount", z);
throw null;
}
int AFKeystoreWrapper2 = AFKeystoreWrapper(sharedPreferences, "appsFlyerInAppEventCount", z);
int i2 = onPause + 45;
AppsFlyerLib = i2 % 128;
int i3 = i2 % 2;
return AFKeystoreWrapper2;
}
private static void values(Map<String, Object> map, AFe1jSDK aFe1jSDK) {
HashMap hashMap = new HashMap(aFe1jSDK.values);
aFe1jSDK.values.clear();
aFe1jSDK.AFInAppEventParameterName.AFInAppEventType("gcd");
if (hashMap.isEmpty()) {
return;
}
int i = onPause + 45;
AppsFlyerLib = i % 128;
if (i % 2 != 0) {
AFInAppEventParameterName(map).put("gcd", hashMap);
int i2 = AppsFlyerLib + 121;
onPause = i2 % 128;
int i3 = i2 % 2;
return;
}
AFInAppEventParameterName(map).put("gcd", hashMap);
throw null;
}
public static String AFInAppEventParameterName(AFb1gSDK aFb1gSDK, String str) {
int i = AppsFlyerLib + 15;
onPause = i % 128;
if (i % 2 == 0) {
String AFInAppEventParameterName2 = aFb1gSDK.AFInAppEventParameterName("CACHED_CHANNEL", (String) null);
if (AFInAppEventParameterName2 != null) {
int i2 = AppsFlyerLib + 41;
onPause = i2 % 128;
if (i2 % 2 != 0) {
int i3 = 53 / 0;
}
return AFInAppEventParameterName2;
}
aFb1gSDK.AFInAppEventType("CACHED_CHANNEL", str);
return str;
}
aFb1gSDK.AFInAppEventParameterName("CACHED_CHANNEL", (String) null);
throw null;
}
@Deprecated
public final String values(Context context) {
int i = onPause + 53;
int i2 = i % 128;
AppsFlyerLib = i2;
int i3 = i % 2;
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
if (context != null) {
int i4 = i2 + 49;
onPause = i4 % 128;
if (i4 % 2 == 0) {
AFc1xSDK aFc1xSDK = aFb1aSDK.AFInAppEventType;
if (context != null) {
aFc1xSDK.AFKeystoreWrapper = context.getApplicationContext();
}
} else {
AFc1xSDK aFc1xSDK2 = aFb1aSDK.AFInAppEventType;
throw null;
}
}
return this.onValidateInAppFailure.valueOf().values();
}
private String AFInAppEventParameterName(SimpleDateFormat simpleDateFormat, Context context) {
String format;
String string = valueOf(context).getString("appsFlyerFirstInstall", null);
if (string == null) {
int i = AppsFlyerLib + 31;
onPause = i % 128;
if (i % 2 != 0) {
int i2 = 14 / 0;
}
string = format;
AFInAppEventParameterName(context).AFInAppEventType("appsFlyerFirstInstall", string);
}
AFLogger.afInfoLog("AppsFlyer: first launch date: ".concat(String.valueOf(string)));
return string;
}
private static void AFInAppEventParameterName(@NonNull ScheduledExecutorService scheduledExecutorService, Runnable runnable, long j, TimeUnit timeUnit) {
int i = AppsFlyerLib + 47;
onPause = i % 128;
int i2 = i % 2;
try {
scheduledExecutorService.schedule(runnable, j, timeUnit);
int i3 = AppsFlyerLib + 11;
onPause = i3 % 128;
if (i3 % 2 != 0) {
throw null;
}
} catch (RejectedExecutionException e) {
AFLogger.afErrorLog("scheduleJob failed with RejectedExecutionException Exception", e);
} catch (Throwable th) {
AFLogger.afErrorLog("scheduleJob failed with Exception", th);
}
}
@NonNull
@Deprecated
public static String AFInAppEventParameterName(HttpURLConnection httpURLConnection) {
String obj;
BufferedReader bufferedReader;
InputStreamReader inputStreamReader;
char c;
StringBuilder sb = new StringBuilder();
try {
try {
InputStream errorStream = httpURLConnection.getErrorStream();
if (errorStream == null) {
errorStream = httpURLConnection.getInputStream();
}
InputStreamReader inputStreamReader2 = new InputStreamReader(errorStream);
try {
BufferedReader bufferedReader2 = new BufferedReader(inputStreamReader2);
boolean z = false;
while (true) {
try {
String readLine = bufferedReader2.readLine();
if (readLine == null) {
break;
}
int i = AppsFlyerLib + 27;
int i2 = i % 128;
onPause = i2;
int i3 = i % 2;
if (z) {
int i4 = i2 + 113;
AppsFlyerLib = i4 % 128;
int i5 = i4 % 2;
c = '\n';
} else {
c = "";
}
sb.append(c);
sb.append(readLine);
z = true;
} catch (Throwable th) {
bufferedReader = bufferedReader2;
th = th;
inputStreamReader = inputStreamReader2;
try {
StringBuilder sb2 = new StringBuilder("Could not read connection response from: ");
sb2.append(httpURLConnection.getURL().toString());
AFLogger.afErrorLog(sb2.toString(), th);
if (bufferedReader != null) {
bufferedReader.close();
}
if (inputStreamReader != null) {
int i6 = AppsFlyerLib + 59;
onPause = i6 % 128;
if (i6 % 2 != 0) {
inputStreamReader.close();
throw null;
}
inputStreamReader.close();
}
obj = sb.toString();
new JSONObject(obj);
return obj;
} catch (Throwable th2) {
if (bufferedReader != null) {
try {
bufferedReader.close();
} catch (Throwable th3) {
AFLogger.afErrorLogForExcManagerOnly("readServerResponse error", th3);
throw th2;
}
}
if (inputStreamReader != null) {
inputStreamReader.close();
}
throw th2;
}
}
}
bufferedReader2.close();
inputStreamReader2.close();
} catch (Throwable th4) {
th = th4;
inputStreamReader = inputStreamReader2;
bufferedReader = null;
}
} catch (Throwable th5) {
th = th5;
bufferedReader = null;
inputStreamReader = null;
}
} catch (Throwable th6) {
AFLogger.afErrorLogForExcManagerOnly("readServerResponse error", th6);
}
obj = sb.toString();
try {
new JSONObject(obj);
return obj;
} catch (JSONException e) {
AFLogger.afErrorLogForExcManagerOnly("error while parsing readServerResponse", e);
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("string_response", obj);
return JSONObjectInstrumentation.toString(jSONObject);
} catch (JSONException e2) {
AFLogger.afErrorLogForExcManagerOnly("RESPONSE_NOT_JSON error", e2);
return JSONObjectInstrumentation.toString(new JSONObject());
}
}
}
public void AFKeystoreWrapper(Context context, Intent intent) {
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
if (context != null) {
aFb1aSDK.AFInAppEventType.AFKeystoreWrapper = context.getApplicationContext();
}
AFa1sSDK.AFInAppEventParameterName();
Context context2 = this.onValidateInAppFailure.AFInAppEventType.AFKeystoreWrapper;
if (context2 != null) {
AFc1ySDK aFc1ySDK = new AFc1ySDK(valueOf(context2));
Uri valueOf2 = AFa1sSDK.valueOf(intent);
boolean z = (valueOf2 == null || valueOf2.toString().isEmpty()) ? false : true;
if (aFc1ySDK.AFKeystoreWrapper("ddl_sent") && !z) {
AFb1pSDK.AFInAppEventType("No direct deep link", null);
return;
} else {
AFa1sSDK.AFInAppEventParameterName().AFInAppEventParameterName(new HashMap(), intent, context);
return;
}
}
throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
}
private String AFInAppEventParameterName(Context context, String str) {
int i = AppsFlyerLib + 23;
int i2 = i % 128;
onPause = i2;
int i3 = i % 2;
if (context == null) {
return null;
}
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
int i4 = i2 + 117;
AppsFlyerLib = i4 % 128;
if (i4 % 2 != 0) {
aFb1aSDK.AFInAppEventType.AFKeystoreWrapper = context.getApplicationContext();
return valueOf().valueOf().AFInAppEventParameterName(str);
}
AFc1xSDK aFc1xSDK = aFb1aSDK.AFInAppEventType;
throw null;
}
public final AFb1gSDK AFInAppEventParameterName(Context context) {
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
if (context != null) {
aFb1aSDK.AFInAppEventType.AFKeystoreWrapper = context.getApplicationContext();
}
Context context2 = this.onValidateInAppFailure.AFInAppEventType.AFKeystoreWrapper;
if (context2 != null) {
return new AFc1ySDK(valueOf(context2));
}
throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
}
private static void AFInAppEventParameterName(String str, int i, Object[] objArr) {
char[] cArr;
String str2;
if (str != null) {
cArr = str.toCharArray();
}
char[] cArr2 = cArr;
synchronized (AFf1aSDK.AFInAppEventType) {
try {
char[] cArr3 = new char[cArr2.length];
AFf1aSDK.valueOf = 0;
char[] cArr4 = new char[2];
while (true) {
int i2 = AFf1aSDK.valueOf;
if (i2 < cArr2.length) {
cArr4[0] = cArr2[i2];
cArr4[1] = cArr2[i2 + 1];
int i3 = 58224;
for (int i4 = 0; i4 < 16; i4++) {
char c = cArr4[1];
char c2 = cArr4[0];
char c3 = (char) (c - (((c2 + i3) ^ ((c2 << 4) + stop)) ^ ((c2 >>> 5) + getInstance)));
cArr4[1] = c3;
cArr4[0] = (char) (c2 - (((c3 >>> 5) + onResponseError) ^ ((c3 + i3) ^ ((c3 << 4) + onValidateInApp))));
i3 -= 40503;
}
int i5 = AFf1aSDK.valueOf;
cArr3[i5] = cArr4[0];
cArr3[i5 + 1] = cArr4[1];
AFf1aSDK.valueOf = i5 + 2;
} else {
str2 = new String(cArr3, 0, i);
}
}
} catch (Throwable th) {
throw th;
}
}
objArr[0] = str2;
}
public final void AFInAppEventType(Context context, Map<String, Object> map, Uri uri) {
AFb1aSDK aFb1aSDK = this.onValidateInAppFailure;
if (context != null) {
AFc1xSDK aFc1xSDK = aFb1aSDK.AFInAppEventType;
if (context != null) {
int i = AppsFlyerLib + 79;
onPause = i % 128;
int i2 = i % 2;
aFc1xSDK.AFKeystoreWrapper = context.getApplicationContext();
}
}
if (!map.containsKey("af_deeplink")) {
String AFInAppEventParameterName2 = AFInAppEventParameterName(uri.toString());
AFa1sSDK AFInAppEventParameterName3 = AFa1sSDK.AFInAppEventParameterName();
String str = AFInAppEventParameterName3.valueOf;
if (str != null && AFInAppEventParameterName3.afInfoLog != null && AFInAppEventParameterName2.contains(str)) {
int i3 = onPause + 97;
AppsFlyerLib = i3 % 128;
int i4 = i3 % 2;
Uri.Builder buildUpon = Uri.parse(AFInAppEventParameterName2).buildUpon();
Uri.Builder buildUpon2 = Uri.EMPTY.buildUpon();
for (Map.Entry<String, String> entry : AFInAppEventParameterName3.afInfoLog.entrySet()) {
int i5 = onPause + 117;
AppsFlyerLib = i5 % 128;
int i6 = i5 % 2;
buildUpon.appendQueryParameter(entry.getKey(), entry.getValue());
buildUpon2.appendQueryParameter(entry.getKey(), entry.getValue());
}
AFInAppEventParameterName2 = buildUpon.build().toString();
map.put("appended_query_params", buildUpon2.build().getEncodedQuery());
}
map.put("af_deeplink", AFInAppEventParameterName2);
}
HashMap hashMap = new HashMap();
hashMap.put(NbaMetaDataType.LINK, uri.toString());
AFd1eSDK aFd1eSDK = new AFd1eSDK(valueOf(), UUID.randomUUID(), uri);
if (aFd1eSDK.afWarnLog()) {
map.put("isBrandedDomain", Boolean.TRUE);
}
AFa1cSDK.AFInAppEventParameterName(context, hashMap, uri);
if (aFd1eSDK.AFVersionDeclaration()) {
aFd1eSDK.afRDLog = valueOf(hashMap);
AFd1vSDK AFLogger = this.onValidateInAppFailure.AFLogger();
AFLogger.values.execute(new AFd1vSDK.AnonymousClass2(aFd1eSDK));
return;
}
AFb1pSDK.AFInAppEventParameterName(hashMap);
}
}