正在查看: Brevistay v5.8.2 应用的 ac.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Brevistay v5.8.2 应用的 ac.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.appsflyer.internal;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.location.Location;
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.SystemClock;
import android.text.TextUtils;
import android.util.Base64;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.WindowManager;
import android.widget.ExpandableListView;
import com.appsflyer.AFInAppEventParameterName;
import com.appsflyer.AFInAppEventType;
import com.appsflyer.AFKeystoreWrapper;
import com.appsflyer.AFLogger;
import com.appsflyer.AFVersionDeclaration;
import com.appsflyer.AppsFlyerConversionListener;
import com.appsflyer.AppsFlyerInAppPurchaseValidatorListener;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerProperties;
import com.appsflyer.attribution.AppsFlyerRequestListener;
import com.appsflyer.attribution.RequestError;
import com.appsflyer.deeplink.DeepLinkListener;
import com.appsflyer.deeplink.DeepLinkResult;
import com.appsflyer.internal.a;
import com.appsflyer.internal.ah;
import com.appsflyer.internal.an;
import com.appsflyer.internal.aq;
import com.appsflyer.internal.d;
import com.appsflyer.internal.dd;
import com.appsflyer.internal.l;
import com.appsflyer.internal.u;
import com.appsflyer.internal.v;
import com.google.firebase.perf.network.FirebasePerfUrlConnection;
import j$.util.DesugarTimeZone;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URL;
import java.net.URLConnection;
import java.security.KeyStoreException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class ac extends AppsFlyerLib {
static AppsFlyerInAppPurchaseValidatorListener AFInAppEventParameterName = null;
public static final String AFInAppEventType;
public static AppsFlyerConversionListener AFKeystoreWrapper = null;
private static String AFLogger$LogLevel = null;
private static long enableLocationCollection = 0;
private static String onAppOpenAttributionNative = null;
private static String onAttributionFailureNative = null;
private static ac onConversionDataFail = null;
private static String onDeepLinkingNative = null;
private static final String onInstallConversionDataLoadedNative;
private static String onInstallConversionFailureNative = null;
private static String onResponseErrorNative = null;
private static int setCustomerIdAndLogSession = 1;
static final String valueOf;
public static final String values;
private static int waitForCustomerUserId;
long AFVersionDeclaration;
String AppsFlyer2dXConversionCallback;
private boolean AppsFlyerInAppPurchaseValidatorListener;
private boolean AppsFlyerLib;
public y getLevel;
private SharedPreferences getSdkVersion;
String init;
private String onDeepLinking;
private String onPause;
private Map<Long, String> onResponse;
private dc setAndroidIdData;
private final bf setCustomerUserId;
private az setImeiData;
private Application stop;
private Map<String, Object> updateServerUninstallToken;
private long onAppOpenAttribution = -1;
private long onResponseNative = -1;
private long onConversionDataSuccess = TimeUnit.SECONDS.toMillis(5);
private boolean onResponseError = false;
@Deprecated
private ScheduledExecutorService onAttributionFailure = null;
private boolean AppsFlyerConversionListener = false;
private final al onValidateInAppFailure = new al();
private boolean onValidateInApp = false;
private boolean getInstance = false;
private boolean setDebugLog = false;
private final Executor setOaidData = Executors.newSingleThreadExecutor();
static void AFVersionDeclaration() {
enableLocationCollection = -8666534478441341805L;
}
static Application AFInAppEventParameterName(ac acVar) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 39;
int i3 = i2 % 128;
waitForCustomerUserId = i3;
int i4 = i2 % 2;
Application application = acVar.stop;
int i5 = i3 + 27;
setCustomerIdAndLogSession = i5 % 128;
if (i5 % 2 == 0) {
int i6 = 86 / 0;
}
return application;
}
static ScheduledExecutorService AFInAppEventParameterName(ac acVar, ScheduledExecutorService scheduledExecutorService) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 117;
int i3 = i2 % 128;
waitForCustomerUserId = i3;
int i4 = i2 % 2;
acVar.onAttributionFailure = scheduledExecutorService;
int i5 = i3 + 77;
setCustomerIdAndLogSession = i5 % 128;
int i6 = i5 % 2;
return scheduledExecutorService;
}
static void AFInAppEventParameterName(ac acVar, i iVar) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 93;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
acVar.valueOf(iVar);
int i4 = setCustomerIdAndLogSession + 99;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 != 0) {
throw null;
}
}
static boolean AFInAppEventParameterName(ac acVar, i iVar, SharedPreferences sharedPreferences) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 67;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 != 0) {
return acVar.valueOf(iVar, sharedPreferences);
}
acVar.valueOf(iVar, sharedPreferences);
Object obj = null;
super.hashCode();
throw null;
}
static void AFInAppEventType(ac acVar, i iVar) throws IOException {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 35;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
acVar.AFInAppEventParameterName(iVar);
if (i3 != 0) {
throw null;
}
}
static boolean AFInAppEventType(ac acVar) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 65;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
boolean z = acVar.onResponseError;
if (i3 != 0) {
return z;
}
Object obj = null;
super.hashCode();
throw null;
}
static Map AFKeystoreWrapper(ac acVar) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 113;
int i3 = i2 % 128;
setCustomerIdAndLogSession = i3;
int i4 = i2 % 2;
Map<String, Object> map = acVar.updateServerUninstallToken;
int i5 = i3 + 87;
waitForCustomerUserId = i5 % 128;
if (i5 % 2 == 0) {
return map;
}
Object obj = null;
super.hashCode();
throw null;
}
static ScheduledExecutorService getLevel(ac acVar) {
int i = 2 % 2;
int i2 = waitForCustomerUserId;
int i3 = i2 + 47;
setCustomerIdAndLogSession = i3 % 128;
int i4 = i3 % 2;
ScheduledExecutorService scheduledExecutorService = acVar.onAttributionFailure;
int i5 = i2 + 69;
setCustomerIdAndLogSession = i5 % 128;
int i6 = i5 % 2;
return scheduledExecutorService;
}
static dc valueOf(ac acVar) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 13;
int i3 = i2 % 128;
waitForCustomerUserId = i3;
int i4 = i2 % 2;
dc dcVar = acVar.setAndroidIdData;
int i5 = i3 + 121;
setCustomerIdAndLogSession = i5 % 128;
if (i5 % 2 == 0) {
int i6 = 28 / 0;
}
return dcVar;
}
static bf values(ac acVar) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession;
int i3 = i2 + 103;
waitForCustomerUserId = i3 % 128;
int i4 = i3 % 2;
bf bfVar = acVar.setCustomerUserId;
int i5 = i2 + 45;
waitForCustomerUserId = i5 % 128;
if (i5 % 2 == 0) {
return bfVar;
}
Object obj = null;
super.hashCode();
throw null;
}
static boolean values(ac acVar, boolean z) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 29;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
acVar.onResponseError = z;
if (i3 == 0) {
return z;
}
throw null;
}
static {
AFVersionDeclaration();
valueOf = "170";
String substring = "6.5.4".substring(0, "6.5.4".lastIndexOf(values("Ჽ", View.MeasureSpec.makeMeasureSpec(0, 0) + 28643).intern()));
AFInAppEventType = substring;
AFLogger$LogLevel = "https://%sstats.%s/stats";
StringBuilder sb = new StringBuilder();
sb.append(substring);
sb.append("/androidevent?buildnumber=6.5.4&app_id=");
values = sb.toString();
StringBuilder sb2 = new StringBuilder("https://%sadrevenue.%s/api/v");
sb2.append(substring);
sb2.append("/android?buildnumber=6.5.4&app_id=");
onInstallConversionFailureNative = sb2.toString();
StringBuilder sb3 = new StringBuilder();
sb3.append(substring);
sb3.append("/androidevent?app_id=");
String obj = sb3.toString();
onInstallConversionDataLoadedNative = obj;
StringBuilder sb4 = new StringBuilder("https://%sconversions.%s/api/v");
sb4.append(obj);
onDeepLinkingNative = sb4.toString();
StringBuilder sb5 = new StringBuilder("https://%slaunches.%s/api/v");
sb5.append(obj);
onAppOpenAttributionNative = sb5.toString();
StringBuilder sb6 = new StringBuilder("https://%sinapps.%s/api/v");
sb6.append(obj);
onAttributionFailureNative = sb6.toString();
StringBuilder sb7 = new StringBuilder("https://%sattr.%s/api/v");
sb7.append(obj);
onResponseErrorNative = sb7.toString();
AFInAppEventParameterName = null;
AFKeystoreWrapper = null;
onConversionDataFail = new ac();
int i = setCustomerIdAndLogSession + 29;
waitForCustomerUserId = i % 128;
int i2 = i % 2;
}
public final bg values() {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession;
int i3 = i2 + 11;
waitForCustomerUserId = i3 % 128;
int i4 = i3 % 2;
bf bfVar = this.setCustomerUserId;
int i5 = i2 + 15;
waitForCustomerUserId = i5 % 128;
int i6 = i5 % 2;
return bfVar;
}
public ac() {
AFVersionDeclaration.init();
this.setCustomerUserId = new bf();
}
public static ac AFInAppEventParameterName() {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 103;
int i3 = i2 % 128;
waitForCustomerUserId = i3;
int i4 = i2 % 2;
ac acVar = onConversionDataFail;
int i5 = i3 + 47;
setCustomerIdAndLogSession = i5 % 128;
int i6 = i5 % 2;
return acVar;
}
@Override
@Deprecated
public final void performOnAppAttribution(Context context, URI uri) {
int i = 2 % 2;
if (uri != null) {
int i2 = setCustomerIdAndLogSession + 49;
waitForCustomerUserId = i2 % 128;
Object obj = null;
if (i2 % 2 != 0) {
uri.toString().isEmpty();
super.hashCode();
throw null;
}
if (!uri.toString().isEmpty()) {
if (context == null) {
StringBuilder sb = new StringBuilder("Context is \"");
sb.append(context);
sb.append("\"");
ao.AFInAppEventType(sb.toString(), DeepLinkResult.Error.NETWORK);
return;
}
f.valueOf().AFInAppEventType(context, new HashMap(), Uri.parse(uri.toString()));
int i3 = waitForCustomerUserId + 121;
setCustomerIdAndLogSession = i3 % 128;
if (i3 % 2 == 0) {
throw null;
}
return;
}
}
StringBuilder sb2 = new StringBuilder("Link is \"");
sb2.append(uri);
sb2.append("\"");
ao.AFInAppEventType(sb2.toString(), DeepLinkResult.Error.NETWORK);
}
@Override
@Deprecated
public final void setSharingFilter(String... strArr) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 1;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
setSharingFilterForPartners(strArr);
int i4 = waitForCustomerUserId + 47;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
}
@Override
@Deprecated
public final void setSharingFilterForAllPartners() {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 107;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 != 0) {
String[] strArr = new String[0];
strArr[0] = "all";
setSharingFilterForPartners(strArr);
} else {
setSharingFilterForPartners("all");
}
int i3 = waitForCustomerUserId + 5;
setCustomerIdAndLogSession = i3 % 128;
if (i3 % 2 == 0) {
int i4 = 32 / 0;
}
}
@Override
public final void setSharingFilterForPartners(String... strArr) {
int i = 2 % 2;
this.getLevel = new y(strArr);
int i2 = setCustomerIdAndLogSession + 3;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
}
@Override
public final void appendParametersToDeepLinkingURL(String str, Map<String, String> map) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 75;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
f valueOf2 = f.valueOf();
valueOf2.AFVersionDeclaration = str;
valueOf2.getLevel = map;
int i3 = 9 / 0;
return;
}
f valueOf3 = f.valueOf();
valueOf3.AFVersionDeclaration = str;
valueOf3.getLevel = map;
}
@Override
public final void subscribeForDeepLink(DeepLinkListener deepLinkListener) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 61;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
subscribeForDeepLink(deepLinkListener, TimeUnit.SECONDS.toMillis(3L));
int i3 = 88 / 0;
} else {
subscribeForDeepLink(deepLinkListener, TimeUnit.SECONDS.toMillis(3L));
}
int i4 = waitForCustomerUserId + 91;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
}
@Override
public final void subscribeForDeepLink(DeepLinkListener deepLinkListener, long j) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 17;
waitForCustomerUserId = i2 % 128;
Object obj = null;
if (i2 % 2 == 0) {
f.valueOf().values = deepLinkListener;
ar.onInstallConversionDataLoadedNative = j;
int i3 = setCustomerIdAndLogSession + 21;
waitForCustomerUserId = i3 % 128;
if (i3 % 2 != 0) {
throw null;
}
return;
}
f.valueOf().values = deepLinkListener;
ar.onInstallConversionDataLoadedNative = j;
super.hashCode();
throw null;
}
@Override
public final void performOnDeepLinking(final Intent intent, Context context) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession;
int i3 = i2 + 33;
waitForCustomerUserId = i3 % 128;
int i4 = i3 % 2;
if (intent == null) {
int i5 = i2 + 65;
waitForCustomerUserId = i5 % 128;
int i6 = i5 % 2;
ao.AFInAppEventType("performOnDeepLinking was called with null intent", DeepLinkResult.Error.DEVELOPER_ERROR);
return;
}
if (context == null) {
int i7 = i2 + 95;
waitForCustomerUserId = i7 % 128;
int i8 = i7 % 2;
ao.AFInAppEventType("performOnDeepLinking was called with null context", DeepLinkResult.Error.DEVELOPER_ERROR);
return;
}
final Context applicationContext = context.getApplicationContext();
bf bfVar = this.setCustomerUserId;
if (applicationContext != null) {
int i9 = waitForCustomerUserId + 113;
setCustomerIdAndLogSession = i9 % 128;
int i10 = i9 % 2;
be beVar = bfVar.AFKeystoreWrapper;
if (applicationContext != null) {
int i11 = setCustomerIdAndLogSession + 67;
waitForCustomerUserId = i11 % 128;
if (i11 % 2 != 0) {
beVar.values = applicationContext.getApplicationContext();
int i12 = 59 / 0;
} else {
beVar.values = applicationContext.getApplicationContext();
}
int i13 = waitForCustomerUserId + 5;
setCustomerIdAndLogSession = i13 % 128;
int i14 = i13 % 2;
}
}
final cl level = values().getLevel();
this.setOaidData.execute(new Runnable() {
@Override
public final void run() {
f.valueOf();
Intent intent2 = intent;
Context context2 = applicationContext;
cl clVar = level;
Context context3 = ac.values(ac.this).AFKeystoreWrapper.values;
if (context3 != null) {
bc bcVar = new bc(ac.AFInAppEventType(context3));
Uri AFKeystoreWrapper2 = f.AFKeystoreWrapper(intent2);
boolean z = (AFKeystoreWrapper2 == null || AFKeystoreWrapper2.toString().isEmpty()) ? false : true;
if (ac.AFInAppEventType(context2).getBoolean("ddl_sent", false) && !z) {
ao.AFInAppEventType("No direct deep link", null);
return;
} else {
f.valueOf().valueOf(new HashMap(), clVar, intent2, bcVar, context2);
return;
}
}
throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
}
});
int i15 = waitForCustomerUserId + 1;
setCustomerIdAndLogSession = i15 % 128;
int i16 = i15 % 2;
}
@Override
public final void addPushNotificationDeepLinkPath(String... strArr) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 57;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
List<String> asList = Arrays.asList(strArr);
List<List<String>> list = f.valueOf().init;
if (!list.contains(asList)) {
list.add(asList);
}
int i4 = waitForCustomerUserId + 111;
setCustomerIdAndLogSession = i4 % 128;
if (i4 % 2 == 0) {
int i5 = 53 / 0;
}
}
@Override
public final void setDisableAdvertisingIdentifiers(boolean z) {
boolean z2;
int i = 2 % 2;
AFLogger.AFInAppEventParameterName("setDisableAdvertisingIdentifiers: ".concat(String.valueOf(z)));
if (z) {
int i2 = setCustomerIdAndLogSession + 101;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
z2 = false;
} else {
int i4 = setCustomerIdAndLogSession + 103;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
z2 = true;
}
ab.AFInAppEventType = Boolean.valueOf(z2);
AppsFlyerProperties.getInstance().remove("advertiserIdEnabled");
AppsFlyerProperties.getInstance().remove("advertiserId");
}
public final void AFKeystoreWrapper(Context context, Intent intent) {
int i = 2 % 2;
if (intent.getStringExtra("appsflyer_preinstall") != null) {
AFInAppEventType(intent.getStringExtra("appsflyer_preinstall"));
}
AFLogger.values("****** onReceive called *******");
AppsFlyerProperties.getInstance();
String stringExtra = intent.getStringExtra("referrer");
AFLogger.values("Play store referrer: ".concat(String.valueOf(stringExtra)));
Object obj = null;
if (stringExtra != null) {
valueOf(context, "referrer", stringExtra);
AppsFlyerProperties appsFlyerProperties = AppsFlyerProperties.getInstance();
appsFlyerProperties.set("AF_REFERRER", stringExtra);
appsFlyerProperties.valueOf = stringExtra;
if (AppsFlyerProperties.getInstance().values()) {
int i2 = waitForCustomerUserId + 79;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
AFLogger.values("onReceive: isLaunchCalled");
AFInAppEventParameterName(context, ch.onReceive);
AFInAppEventType(context, stringExtra);
super.hashCode();
throw null;
}
AFLogger.values("onReceive: isLaunchCalled");
AFInAppEventParameterName(context, ch.onReceive);
AFInAppEventType(context, stringExtra);
}
}
int i3 = setCustomerIdAndLogSession + 9;
waitForCustomerUserId = i3 % 128;
if (i3 % 2 != 0) {
throw null;
}
}
private static void valueOf(org.json.JSONObject r15) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.valueOf(org.json.JSONObject):void");
}
public final void valueOf(Context context, String str) {
JSONArray jSONArray;
JSONArray jSONArray2;
JSONObject jSONObject;
int i = 2 % 2;
AFLogger.AFInAppEventParameterName("received a new (extra) referrer: ".concat(String.valueOf(str)));
try {
long currentTimeMillis = System.currentTimeMillis();
String string = AFInAppEventType(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) {
jSONArray2.put(currentTimeMillis);
}
if (jSONObject.length() >= 4) {
int i2 = waitForCustomerUserId + 61;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
valueOf(jSONObject);
throw null;
}
valueOf(jSONObject);
}
jSONObject.put(str, jSONArray2.toString());
valueOf(context, "extraReferrers", jSONObject.toString());
int i3 = waitForCustomerUserId + 105;
setCustomerIdAndLogSession = i3 % 128;
if (i3 % 2 == 0) {
int i4 = 47 / 0;
}
} catch (JSONException unused) {
} catch (Throwable th) {
StringBuilder sb = new StringBuilder("Couldn't save referrer - ");
sb.append(str);
sb.append(": ");
AFLogger.valueOf(sb.toString(), th);
}
}
private static void AFInAppEventType(SharedPreferences.Editor editor) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 123;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
editor.apply();
if (i3 != 0) {
Object obj = null;
super.hashCode();
throw null;
}
int i4 = setCustomerIdAndLogSession + 31;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 != 0) {
int i5 = 17 / 0;
}
}
@Override
public final void stop(boolean z, Context context) {
int i = 2 % 2;
this.getInstance = z;
try {
File file = new File(values().AFVersionDeclaration().AFKeystoreWrapper.values.getFilesDir(), "AFRequestCache");
int i2 = 0;
if (!file.exists()) {
int i3 = waitForCustomerUserId + 7;
setCustomerIdAndLogSession = i3 % 128;
if (i3 % 2 == 0) {
file.mkdir();
int i4 = 36 / 0;
} else {
file.mkdir();
}
} else {
File[] listFiles = file.listFiles();
if (listFiles != null) {
int length = listFiles.length;
while (i2 < length) {
File file2 = listFiles[i2];
StringBuilder sb = new StringBuilder("CACHE: Found cached request");
sb.append(file2.getName());
AFLogger.values(sb.toString());
StringBuilder sb2 = new StringBuilder("CACHE: Deleting ");
sb2.append(file2.getName());
sb2.append(" from cache");
AFLogger.values(sb2.toString());
file2.delete();
i2++;
int i5 = waitForCustomerUserId + 23;
setCustomerIdAndLogSession = i5 % 128;
int i6 = i5 % 2;
}
}
}
} catch (Exception e2) {
AFLogger.valueOf("CACHE: Could not cache request", e2);
}
if (this.getInstance) {
int i7 = waitForCustomerUserId + 21;
setCustomerIdAndLogSession = i7 % 128;
int i8 = i7 % 2;
values(context, "is_stop_tracking_used");
int i9 = waitForCustomerUserId + 69;
setCustomerIdAndLogSession = i9 % 128;
int i10 = i9 % 2;
}
}
@Override
public final String getSdkVersion() {
int i = 2 % 2;
ak.AFInAppEventType().AFKeystoreWrapper("getSdkVersion", new String[0]);
StringBuilder sb = new StringBuilder("version: 6.5.4 (build ");
sb.append(valueOf);
sb.append(")");
String obj = sb.toString();
int i2 = waitForCustomerUserId + 9;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
return obj;
}
@Override
public final void onPause(Context context) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 65;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
if (ah.AFInAppEventParameterName != null) {
int i4 = setCustomerIdAndLogSession + 109;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
ah.AFInAppEventParameterName.valueOf(context);
if (i5 != 0) {
int i6 = 13 / 0;
}
}
}
@Override
public final void updateServerUninstallToken(Context context, String str) {
int i = 2 % 2;
new cd(context).AFInAppEventParameterName(str);
int i2 = setCustomerIdAndLogSession + 27;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 == 0) {
return;
}
Object obj = null;
super.hashCode();
throw null;
}
@Override
public final void setDebugLog(boolean z) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 105;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
Object obj = null;
super.hashCode();
throw null;
}
setLogLevel(z ? AFLogger.LogLevel.DEBUG : AFLogger.LogLevel.NONE);
int i3 = waitForCustomerUserId + 31;
setCustomerIdAndLogSession = i3 % 128;
int i4 = i3 % 2;
}
@Override
public final void setImeiData(String str) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 107;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
ak.AFInAppEventType().AFKeystoreWrapper("setImeiData", str);
this.AppsFlyer2dXConversionCallback = str;
int i4 = setCustomerIdAndLogSession + 39;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 == 0) {
return;
}
Object obj = null;
super.hashCode();
throw null;
}
@Override
public final void setOaidData(String str) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 11;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
ak AFInAppEventType2 = ak.AFInAppEventType();
String[] strArr = new String[1];
strArr[1] = str;
AFInAppEventType2.AFKeystoreWrapper("setOaidData", strArr);
} else {
ak.AFInAppEventType().AFKeystoreWrapper("setOaidData", str);
}
ab.AFInAppEventParameterName = str;
}
@Override
public final void setAndroidIdData(String str) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 107;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 != 0) {
ak AFInAppEventType2 = ak.AFInAppEventType();
String[] strArr = new String[1];
strArr[1] = str;
AFInAppEventType2.AFKeystoreWrapper("setAndroidIdData", strArr);
} else {
ak.AFInAppEventType().AFKeystoreWrapper("setAndroidIdData", str);
}
this.init = str;
}
@Override
public final AppsFlyerLib enableLocationCollection(boolean z) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 19;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
this.AppsFlyerConversionListener = z;
int i3 = 73 / 0;
return this;
}
this.AppsFlyerConversionListener = z;
return this;
}
public static void valueOf(Context context, String str, String str2) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 65;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
SharedPreferences.Editor edit = AFInAppEventType(context).edit();
edit.putString(str, str2);
AFInAppEventType(edit);
int i4 = waitForCustomerUserId + 125;
setCustomerIdAndLogSession = i4 % 128;
if (i4 % 2 == 0) {
throw null;
}
}
public static void values(Context context, String str) {
SharedPreferences.Editor edit;
boolean z;
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 7;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 != 0) {
edit = AFInAppEventType(context).edit();
z = false;
} else {
edit = AFInAppEventType(context).edit();
z = true;
}
edit.putBoolean(str, z);
AFInAppEventType(edit);
int i3 = setCustomerIdAndLogSession + 93;
waitForCustomerUserId = i3 % 128;
int i4 = i3 % 2;
}
private static void valueOf(Context context, String str, int i) {
int i2 = 2 % 2;
int i3 = setCustomerIdAndLogSession + 45;
waitForCustomerUserId = i3 % 128;
if (i3 % 2 != 0) {
SharedPreferences.Editor edit = AFInAppEventType(context).edit();
edit.putInt(str, i);
AFInAppEventType(edit);
int i4 = 41 / 0;
return;
}
SharedPreferences.Editor edit2 = AFInAppEventType(context).edit();
edit2.putInt(str, i);
AFInAppEventType(edit2);
}
public final void AFInAppEventType(Context context, String str, long j) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 97;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
AFInAppEventParameterName(AFInAppEventType(context), str, j);
int i4 = setCustomerIdAndLogSession + 75;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
}
private static void AFInAppEventParameterName(SharedPreferences sharedPreferences, String str, long j) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 121;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
SharedPreferences.Editor edit = sharedPreferences.edit();
edit.putLong(str, j);
AFInAppEventType(edit);
int i4 = setCustomerIdAndLogSession + 45;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
}
private static void values(String str, String str2) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 35;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
AppsFlyerProperties.getInstance().set(str, str2);
int i4 = waitForCustomerUserId + 15;
setCustomerIdAndLogSession = i4 % 128;
if (i4 % 2 != 0) {
return;
}
Object obj = null;
super.hashCode();
throw null;
}
private static void values(String str, boolean z) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 3;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
AppsFlyerProperties.getInstance().set(str, z);
if (i3 != 0) {
throw null;
}
}
private static String AFInAppEventParameterName(String str) {
String string;
int i = 2 % 2;
int i2 = waitForCustomerUserId + 61;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
string = AppsFlyerProperties.getInstance().getString(str);
int i3 = 31 / 0;
} else {
string = AppsFlyerProperties.getInstance().getString(str);
}
int i4 = setCustomerIdAndLogSession + 43;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
return string;
}
private static boolean AFKeystoreWrapper(String str, boolean z) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 11;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
boolean z2 = AppsFlyerProperties.getInstance().getBoolean(str, z);
int i4 = waitForCustomerUserId + 39;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
return z2;
}
public final boolean AFKeystoreWrapper() {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 101;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 == 0 ? AFKeystoreWrapper(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false) : AFKeystoreWrapper(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, true)) {
if (AFInAppEventType() == null) {
int i3 = setCustomerIdAndLogSession;
int i4 = i3 + 11;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
int i6 = i3 + 63;
waitForCustomerUserId = i6 % 128;
if (i6 % 2 == 0) {
return true;
}
throw null;
}
}
return false;
}
@Override
public final void waitForCustomerUserId(boolean z) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 1;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
AFLogger.values("initAfterCustomerUserID: ".concat(String.valueOf(z)), true);
values(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, z);
int i4 = setCustomerIdAndLogSession + 119;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
}
@Override
public final void setCustomerIdAndLogSession(String str, Context context) {
int i = 2 % 2;
if (context != null) {
int i2 = waitForCustomerUserId + 95;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
AFKeystoreWrapper();
throw null;
}
if (!AFKeystoreWrapper()) {
setCustomerUserId(str);
AFLogger.values("waitForCustomerUserId is false; setting CustomerUserID: ".concat(String.valueOf(str)), true);
return;
}
setCustomerUserId(str);
StringBuilder sb = new StringBuilder("CustomerUserId set: ");
sb.append(str);
sb.append(" - Initializing AppsFlyer Tacking");
AFLogger.values(sb.toString(), true);
String referrer = AppsFlyerProperties.getInstance().getReferrer(context);
AFInAppEventParameterName(context, ch.setCustomerIdAndLogSession);
String devKey = AppsFlyerProperties.getInstance().getDevKey();
if (referrer == null) {
int i3 = waitForCustomerUserId + 23;
setCustomerIdAndLogSession = i3 % 128;
int i4 = i3 % 2;
referrer = "";
} else {
int i5 = waitForCustomerUserId + 79;
setCustomerIdAndLogSession = i5 % 128;
int i6 = i5 % 2;
}
String str2 = referrer;
if (context instanceof Activity) {
int i7 = waitForCustomerUserId + 5;
setCustomerIdAndLogSession = i7 % 128;
int i8 = i7 % 2;
((Activity) context).getIntent();
}
AFInAppEventParameterName(context, devKey, null, null, str2, null);
}
}
@Override
public final String getOutOfStore(Context context) {
int i = 2 % 2;
String string = AppsFlyerProperties.getInstance().getString("api_store_value");
if (string == null) {
String AFKeystoreWrapper2 = AFKeystoreWrapper(context, "AF_STORE");
if (AFKeystoreWrapper2 == null) {
AFLogger.values("No out-of-store value set");
return null;
}
int i2 = setCustomerIdAndLogSession + 121;
int i3 = i2 % 128;
waitForCustomerUserId = i3;
int i4 = i2 % 2;
int i5 = i3 + 27;
setCustomerIdAndLogSession = i5 % 128;
int i6 = i5 % 2;
return AFKeystoreWrapper2;
}
int i7 = setCustomerIdAndLogSession + 49;
waitForCustomerUserId = i7 % 128;
if (i7 % 2 != 0) {
int i8 = 46 / 0;
}
return string;
}
@Override
public final void setOutOfStore(String str) {
int i = 2 % 2;
if (str == null) {
AFLogger.valueOf("Cannot set setOutOfStore with null");
return;
}
int i2 = waitForCustomerUserId + 71;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
String lowerCase = str.toLowerCase();
AppsFlyerProperties.getInstance().set("api_store_value", lowerCase);
AFLogger.values("Store API set with value: ".concat(String.valueOf(lowerCase)), true);
int i4 = setCustomerIdAndLogSession + 103;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 != 0) {
int i5 = 60 / 0;
}
}
@Override
public final void setAppInviteOneLink(java.lang.String r7) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.setAppInviteOneLink(java.lang.String):void");
}
@Override
public final void setAdditionalData(Map<String, Object> map) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 31;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
if (map != null) {
ak.AFInAppEventType().AFKeystoreWrapper("setAdditionalData", map.toString());
AppsFlyerProperties.getInstance().setCustomData(new JSONObject(map).toString());
int i4 = setCustomerIdAndLogSession + 3;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
}
}
@Override
public final void sendPushNotificationData(android.app.Activity r20) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.sendPushNotificationData(android.app.Activity):void");
}
@Override
public final void setUserEmails(String... strArr) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 35;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 != 0) {
ak.AFInAppEventType().AFKeystoreWrapper("setUserEmails", strArr);
setUserEmails(AppsFlyerProperties.EmailsCryptType.NONE, strArr);
int i3 = 55 / 0;
} else {
ak.AFInAppEventType().AFKeystoreWrapper("setUserEmails", strArr);
setUserEmails(AppsFlyerProperties.EmailsCryptType.NONE, strArr);
}
int i4 = setCustomerIdAndLogSession + 77;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 == 0) {
return;
}
Object obj = null;
super.hashCode();
throw null;
}
@Override
public final void setUserEmails(AppsFlyerProperties.EmailsCryptType emailsCryptType, String... strArr) {
int i = 2 % 2;
ArrayList arrayList = new ArrayList(strArr.length + 1);
arrayList.add(emailsCryptType.toString());
arrayList.addAll(Arrays.asList(strArr));
ak.AFInAppEventType().AFKeystoreWrapper("setUserEmails", (String[]) arrayList.toArray(new String[strArr.length + 1]));
AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EMAIL_CRYPT_TYPE, emailsCryptType.getValue());
HashMap hashMap = new HashMap();
ArrayList arrayList2 = new ArrayList();
int length = strArr.length;
String str = null;
int i2 = 0;
while (i2 < length) {
int i3 = setCustomerIdAndLogSession + 57;
waitForCustomerUserId = i3 % 128;
int i4 = i3 % 2;
String str2 = strArr[i2];
if (AnonymousClass9.values[emailsCryptType.ordinal()] != 2) {
arrayList2.add(ag.AFInAppEventParameterName(str2));
str = "sha256_el_arr";
} else {
arrayList2.add(str2);
str = "plain_el_arr";
}
i2++;
int i5 = waitForCustomerUserId + 85;
setCustomerIdAndLogSession = i5 % 128;
int i6 = i5 % 2;
}
hashMap.put(str, arrayList2);
AppsFlyerProperties.getInstance().setUserEmails(new JSONObject(hashMap).toString());
}
@Override
public final void setCollectAndroidID(boolean z) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 67;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
ak AFInAppEventType2 = ak.AFInAppEventType();
String[] strArr = new String[1];
strArr[1] = String.valueOf(z);
AFInAppEventType2.AFKeystoreWrapper("setCollectAndroidID", strArr);
} else {
ak.AFInAppEventType().AFKeystoreWrapper("setCollectAndroidID", String.valueOf(z));
}
values(AppsFlyerProperties.COLLECT_ANDROID_ID, Boolean.toString(z));
values(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, Boolean.toString(z));
int i3 = setCustomerIdAndLogSession + 11;
waitForCustomerUserId = i3 % 128;
if (i3 % 2 != 0) {
throw null;
}
}
@Override
public final void setCollectIMEI(boolean z) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 109;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
ak.AFInAppEventType().AFKeystoreWrapper("setCollectIMEI", String.valueOf(z));
values(AppsFlyerProperties.COLLECT_IMEI, Boolean.toString(z));
values(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, Boolean.toString(z));
int i4 = setCustomerIdAndLogSession + 91;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
}
@Override
@Deprecated
public final void setCollectOaid(boolean z) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 65;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
ak.AFInAppEventType().AFKeystoreWrapper("setCollectOaid", String.valueOf(z));
} else {
ak.AFInAppEventType().AFKeystoreWrapper("setCollectOaid", String.valueOf(z));
}
values(AppsFlyerProperties.COLLECT_OAID, Boolean.toString(z));
int i3 = setCustomerIdAndLogSession + 21;
waitForCustomerUserId = i3 % 128;
if (i3 % 2 != 0) {
int i4 = 91 / 0;
}
}
@Override
public final void setResolveDeepLinkURLs(String... strArr) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 55;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
AFLogger.AFInAppEventParameterName(String.format("setResolveDeepLinkURLs %s", Arrays.toString(strArr)));
f.AFKeystoreWrapper = strArr;
int i4 = waitForCustomerUserId + 33;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
}
@Override
public final void setOneLinkCustomDomain(String... strArr) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 5;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
AFLogger.AFInAppEventParameterName(String.format("setOneLinkCustomDomain %s", Arrays.toString(strArr)));
f.AFLogger$LogLevel = strArr;
int i4 = setCustomerIdAndLogSession + 89;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
}
@Override
public final AppsFlyerLib init(String str, AppsFlyerConversionListener appsFlyerConversionListener, Context context) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 13;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
if (this.AppsFlyerInAppPurchaseValidatorListener) {
return this;
}
this.AppsFlyerInAppPurchaseValidatorListener = true;
AppsFlyerProperties.getInstance().setDevKey(str);
ai.AFInAppEventType(str);
Object obj = null;
if (context != null) {
int i4 = waitForCustomerUserId + 113;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
this.stop = (Application) context.getApplicationContext();
bf bfVar = this.setCustomerUserId;
if (context != null) {
be beVar = bfVar.AFKeystoreWrapper;
if (context != null) {
beVar.values = context.getApplicationContext();
int i6 = setCustomerIdAndLogSession + 87;
waitForCustomerUserId = i6 % 128;
int i7 = i6 % 2;
}
}
values().getLevel().AFInAppEventType = System.currentTimeMillis();
values().values().values(null);
de AFLogger$LogLevel2 = values().AFLogger$LogLevel();
final cx cxVar = new cx(new Runnable() {
@Override
public final void run() {
if (k.values == null) {
k.values = new k();
}
ac.valueOf(k.values.AFKeystoreWrapper(), new Runnable() {
@Override
public final void run() {
try {
ci ciVar = new ci();
Application AFInAppEventParameterName2 = ac.AFInAppEventParameterName(ac.this);
if (AFInAppEventParameterName2 != null) {
ciVar.AFKeystoreWrapper = (Application) AFInAppEventParameterName2.getApplicationContext();
}
if (ac.AFInAppEventParameterName(ac.this, ciVar, ac.AFInAppEventType(ac.AFInAppEventParameterName(ac.this)))) {
ac.AFInAppEventParameterName(ac.this, ciVar);
}
} catch (Throwable th) {
AFLogger.valueOf(th.getMessage(), th);
}
}
}, 0L, TimeUnit.MILLISECONDS);
}
});
Runnable runnable = new Runnable() {
@Override
public final void run() {
SharedPreferences AFInAppEventType2 = ac.AFInAppEventType(ac.AFInAppEventParameterName(ac.this));
int valueOf2 = ac.this.valueOf(AFInAppEventType2, false);
boolean z = AFInAppEventType2.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false);
boolean z2 = cxVar.AFInAppEventParameterName == dd.d.NOT_STARTED;
if (valueOf2 == 1) {
if (z2 || z) {
ac acVar = ac.this;
ci ciVar = new ci();
Application AFInAppEventParameterName2 = ac.AFInAppEventParameterName(ac.this);
if (AFInAppEventParameterName2 != null) {
ciVar.AFKeystoreWrapper = (Application) AFInAppEventParameterName2.getApplicationContext();
}
ac.AFInAppEventParameterName(acVar, ciVar);
}
}
}
};
AFLogger$LogLevel2.AFKeystoreWrapper(cxVar);
AFLogger$LogLevel2.AFKeystoreWrapper(new cy(runnable));
AFLogger$LogLevel2.AFKeystoreWrapper(new df(runnable));
dd[] AFInAppEventType2 = AFLogger$LogLevel2.AFInAppEventType();
int length = AFInAppEventType2.length;
int i8 = 0;
while (i8 < length) {
int i9 = setCustomerIdAndLogSession + 19;
waitForCustomerUserId = i9 % 128;
if (i9 % 2 != 0) {
AFInAppEventType2[i8].AFInAppEventParameterName(this.stop);
i8 += 46;
} else {
AFInAppEventType2[i8].AFInAppEventParameterName(this.stop);
i8++;
}
}
this.setCustomerUserId.init().values();
ay.AFInAppEventParameterName = this.stop;
if (valueOf(AFInAppEventType(context), false) == 0 && Build.VERSION.SDK_INT >= 29) {
dc dcVar = new dc(context);
this.setAndroidIdData = dcVar;
new Thread(dcVar.AFInAppEventParameterName).start();
}
} else {
AFLogger.AppsFlyer2dXConversionCallback("context is null, Google Install Referrer will be not initialized");
}
ak.AFInAppEventType().AFKeystoreWrapper("init", str, appsFlyerConversionListener == null ? "null" : "conversionDataListener");
AFLogger.AFInAppEventType(String.format("Initializing AppsFlyer SDK: (v%s.%s)", "6.5.4", valueOf));
AFKeystoreWrapper = appsFlyerConversionListener;
int i10 = waitForCustomerUserId + 7;
setCustomerIdAndLogSession = i10 % 128;
if (i10 % 2 != 0) {
return this;
}
super.hashCode();
throw null;
}
@Override
public final void enableFacebookDeferredApplinks(boolean z) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession;
int i3 = i2 + 85;
waitForCustomerUserId = i3 % 128;
int i4 = i3 % 2;
this.setDebugLog = z;
int i5 = i2 + 111;
waitForCustomerUserId = i5 % 128;
if (i5 % 2 != 0) {
int i6 = 73 / 0;
}
}
@Override
public final void start(Context context) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 117;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
Object obj = null;
start(context, null);
if (i3 == 0) {
super.hashCode();
throw null;
}
int i4 = setCustomerIdAndLogSession + 35;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 == 0) {
return;
}
super.hashCode();
throw null;
}
@Override
public final void start(Context context, String str) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 75;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
start(context, str, null);
if (i3 == 0) {
int i4 = 95 / 0;
}
int i5 = setCustomerIdAndLogSession + 79;
waitForCustomerUserId = i5 % 128;
int i6 = i5 % 2;
}
@Override
public final void start(Context context, final String str, final AppsFlyerRequestListener appsFlyerRequestListener) {
int i = 2 % 2;
if (ah.AFInAppEventParameterName != null) {
return;
}
if (!this.AppsFlyerInAppPurchaseValidatorListener) {
AFLogger.AppsFlyer2dXConversionCallback("ERROR: AppsFlyer SDK is not initialized! The API call 'start()' must be called after the 'init(String, AppsFlyerConversionListener)' API method, which should be called on the Application's onCreate.");
if (str == null) {
if (appsFlyerRequestListener != null) {
appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, ba.AFInAppEventParameterName);
return;
}
return;
}
}
bf bfVar = this.setCustomerUserId;
if (context != null) {
be beVar = bfVar.AFKeystoreWrapper;
if (context != null) {
int i2 = waitForCustomerUserId + 125;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
beVar.values = context.getApplicationContext();
}
}
final cl level = values().getLevel();
level.valueOf(n.AFInAppEventParameterName(context));
this.stop = (Application) context.getApplicationContext();
ak.AFInAppEventType().AFKeystoreWrapper("start", str);
String str2 = valueOf;
AFLogger.values(String.format("Starting AppsFlyer: (v%s.%s)", "6.5.4", str2));
StringBuilder sb = new StringBuilder("Build Number: ");
sb.append(str2);
AFLogger.values(sb.toString());
AppsFlyerProperties.getInstance().loadProperties(this.stop.getApplicationContext());
Object obj = null;
if (!TextUtils.isEmpty(str)) {
AppsFlyerProperties.getInstance().setDevKey(str);
ai.AFInAppEventType(str);
} else if (TextUtils.isEmpty(AppsFlyerProperties.getInstance().getDevKey())) {
int i4 = setCustomerIdAndLogSession + 33;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
AFLogger.AppsFlyer2dXConversionCallback("ERROR: AppsFlyer SDK is not initialized! You must provide AppsFlyer Dev-Key either in the 'init' API method (should be called on Application's onCreate),or in the start() API (should be called on Activity's onCreate).");
if (appsFlyerRequestListener != null) {
int i6 = waitForCustomerUserId + 35;
setCustomerIdAndLogSession = i6 % 128;
if (i6 % 2 != 0) {
appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, ba.AFInAppEventParameterName);
return;
} else {
appsFlyerRequestListener.onError(RequestError.NO_DEV_KEY, ba.AFInAppEventParameterName);
super.hashCode();
throw null;
}
}
return;
}
values().values().values(null);
AppsFlyer2dXConversionCallback(this.stop.getBaseContext());
if (this.setDebugLog) {
valueOf(this.stop.getApplicationContext());
}
ah.AFKeystoreWrapper(context, new ah.e() {
@Override
public final void valueOf(Activity activity) {
level.AFKeystoreWrapper();
ac.this.values().values().values(null);
int valueOf2 = ac.this.valueOf(ac.AFInAppEventType(activity), false);
AFLogger.values("onBecameForeground");
if (valueOf2 < 2) {
w AFKeystoreWrapper2 = w.AFKeystoreWrapper(activity);
AFKeystoreWrapper2.AFKeystoreWrapper.post(AFKeystoreWrapper2.getLevel);
AFKeystoreWrapper2.AFKeystoreWrapper.post(AFKeystoreWrapper2.AFInAppEventParameterName);
}
cp cpVar = new cp();
f.valueOf().valueOf(cpVar.values(), level, activity.getIntent(), ac.this.values().AFInAppEventParameterName(), activity.getApplication());
ac acVar = ac.this;
if (activity != null) {
cpVar.AFKeystoreWrapper = (Application) activity.getApplicationContext();
}
cpVar.AFVersionDeclaration = str;
cpVar.AFInAppEventParameterName = appsFlyerRequestListener;
acVar.AFKeystoreWrapper(cpVar, activity);
}
@Override
public final void valueOf(Context context2) {
AFLogger.values("onBecameBackground");
cl clVar = level;
long currentTimeMillis = System.currentTimeMillis();
if (clVar.AppsFlyer2dXConversionCallback != 0) {
long j = currentTimeMillis - clVar.AppsFlyer2dXConversionCallback;
if (j > 0 && j < 1000) {
j = 1000;
}
clVar.onDeepLinkingNative = TimeUnit.MILLISECONDS.toSeconds(j);
clVar.valueOf.AFKeystoreWrapper("prev_session_dur", clVar.onDeepLinkingNative);
} else {
AFLogger.values("Metrics: fg ts is missing");
}
AFLogger.values("callStatsBackground background call");
ac.this.AFInAppEventParameterName(new WeakReference<>(context2));
ak AFInAppEventType2 = ak.AFInAppEventType();
if (AFInAppEventType2.AFVersionDeclaration()) {
AFInAppEventType2.AFInAppEventParameterName();
if (context2 != null && !AppsFlyerLib.getInstance().isStopped()) {
AFInAppEventType2.AFInAppEventType(context2.getPackageName(), context2.getPackageManager());
}
AFInAppEventType2.values();
} else {
AFLogger.AFInAppEventParameterName("RD status is OFF");
}
if (k.values == null) {
k.values = new k();
}
k kVar = k.values;
try {
k.valueOf(kVar.AFKeystoreWrapper);
if (kVar.AFInAppEventParameterName instanceof ThreadPoolExecutor) {
k.valueOf((ThreadPoolExecutor) kVar.AFInAppEventParameterName);
}
} catch (Throwable th) {
AFLogger.valueOf("failed to stop Executors", th);
}
w AFKeystoreWrapper2 = w.AFKeystoreWrapper(context2);
AFKeystoreWrapper2.AFKeystoreWrapper.post(AFKeystoreWrapper2.getLevel);
}
}, this.setOaidData);
int i7 = waitForCustomerUserId + 115;
setCustomerIdAndLogSession = i7 % 128;
if (i7 % 2 == 0) {
int i8 = 6 / 0;
}
}
private static void AppsFlyer2dXConversionCallback(android.content.Context r5) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.AppsFlyer2dXConversionCallback(android.content.Context):void");
}
private static void getLevel(Context context) {
int i;
if (z.valueOf()) {
AFLogger.AFKeystoreWrapper("OPPO device found");
i = 23;
} else {
i = 18;
}
if (Build.VERSION.SDK_INT >= i && !AFKeystoreWrapper(AppsFlyerProperties.DISABLE_KEYSTORE, true)) {
StringBuilder sb = new StringBuilder("OS SDK is=");
sb.append(Build.VERSION.SDK_INT);
sb.append("; use KeyStore");
AFLogger.AFKeystoreWrapper(sb.toString());
AFKeystoreWrapper aFKeystoreWrapper = new AFKeystoreWrapper(context);
if (!aFKeystoreWrapper.AFKeystoreWrapper()) {
aFKeystoreWrapper.values = af.valueOf(new WeakReference(context));
aFKeystoreWrapper.AFInAppEventType = 0;
aFKeystoreWrapper.AFKeystoreWrapper(aFKeystoreWrapper.valueOf());
} else {
String valueOf2 = aFKeystoreWrapper.valueOf();
synchronized (aFKeystoreWrapper.AFInAppEventParameterName) {
aFKeystoreWrapper.AFInAppEventType++;
AFLogger.values("Deleting key with alias: ".concat(String.valueOf(valueOf2)));
try {
synchronized (aFKeystoreWrapper.AFInAppEventParameterName) {
aFKeystoreWrapper.valueOf.deleteEntry(valueOf2);
}
} catch (KeyStoreException e2) {
StringBuilder sb2 = new StringBuilder("Exception ");
sb2.append(e2.getMessage());
sb2.append(" occurred");
AFLogger.valueOf(sb2.toString(), e2);
}
}
aFKeystoreWrapper.AFKeystoreWrapper(aFKeystoreWrapper.valueOf());
}
values("KSAppsFlyerId", aFKeystoreWrapper.values());
values("KSAppsFlyerRICounter", String.valueOf(aFKeystoreWrapper.AFInAppEventType()));
return;
}
StringBuilder sb3 = new StringBuilder("OS SDK is=");
sb3.append(Build.VERSION.SDK_INT);
sb3.append("; no KeyStore usage");
AFLogger.AFKeystoreWrapper(sb3.toString());
}
public static String AFInAppEventType() {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 15;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
String AFInAppEventParameterName2 = AFInAppEventParameterName(AppsFlyerProperties.APP_USER_ID);
if (i3 == 0) {
int i4 = 55 / 0;
}
return AFInAppEventParameterName2;
}
@Override
public final void setCustomerUserId(String str) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 51;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
ak.AFInAppEventType().AFKeystoreWrapper("setCustomerUserId", str);
AFLogger.values("setCustomerUserId = ".concat(String.valueOf(str)));
values(AppsFlyerProperties.APP_USER_ID, str);
values(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false);
int i4 = setCustomerIdAndLogSession + 77;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
}
@Override
public final void setPhoneNumber(String str) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 107;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
this.onPause = ag.AFInAppEventParameterName(str);
if (i3 == 0) {
Object obj = null;
super.hashCode();
throw null;
}
int i4 = waitForCustomerUserId + 107;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
}
private static String init() {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 71;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
String AFInAppEventParameterName2 = AFInAppEventParameterName(AppsFlyerProperties.APP_ID);
int i4 = setCustomerIdAndLogSession + 107;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 == 0) {
return AFInAppEventParameterName2;
}
throw null;
}
@Override
public final void setAppId(String str) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 49;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
ak.AFInAppEventType().AFKeystoreWrapper("setAppId", str);
} else {
ak.AFInAppEventType().AFKeystoreWrapper("setAppId", str);
}
values(AppsFlyerProperties.APP_ID, str);
int i3 = setCustomerIdAndLogSession + 31;
waitForCustomerUserId = i3 % 128;
if (i3 % 2 != 0) {
int i4 = 82 / 0;
}
}
@Override
public final void setExtension(String str) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 87;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
ak.AFInAppEventType().AFKeystoreWrapper("setExtension", str);
} else {
ak.AFInAppEventType().AFKeystoreWrapper("setExtension", str);
}
AppsFlyerProperties.getInstance().set(AppsFlyerProperties.EXTENSION, str);
}
@Override
public final void setIsUpdate(boolean z) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 77;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
ak.AFInAppEventType().AFKeystoreWrapper("setIsUpdate", String.valueOf(z));
AppsFlyerProperties.getInstance().set(AppsFlyerProperties.IS_UPDATE, z);
int i4 = setCustomerIdAndLogSession + 3;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 != 0) {
int i5 = 85 / 0;
}
}
@Override
public final void setCurrencyCode(String str) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 29;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
ak.AFInAppEventType().AFKeystoreWrapper("setCurrencyCode", str);
AppsFlyerProperties.getInstance().set(AppsFlyerProperties.CURRENCY_CODE, str);
int i4 = setCustomerIdAndLogSession + 35;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 != 0) {
throw null;
}
}
@Override
public final void logLocation(Context context, double d2, double d3) {
int i = 2 % 2;
ak.AFInAppEventType().AFKeystoreWrapper("logLocation", String.valueOf(d2), String.valueOf(d3));
HashMap hashMap = new HashMap();
hashMap.put(AFInAppEventParameterName.LONGTITUDE, Double.toString(d3));
hashMap.put(AFInAppEventParameterName.LATITUDE, Double.toString(d2));
AFInAppEventParameterName(context, AFInAppEventType.LOCATION_COORDINATES, hashMap);
int i2 = setCustomerIdAndLogSession + 65;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 == 0) {
return;
}
Object obj = null;
super.hashCode();
throw null;
}
final void AFInAppEventParameterName(WeakReference<Context> weakReference) {
int i = 2 % 2;
if (weakReference.get() == null) {
return;
}
AFLogger.values("app went to background");
SharedPreferences AFInAppEventType2 = AFInAppEventType(weakReference.get());
AppsFlyerProperties.getInstance().saveProperties(AFInAppEventType2);
long j = values().getLevel().onDeepLinkingNative;
HashMap hashMap = new HashMap();
String devKey = AppsFlyerProperties.getInstance().getDevKey();
if (devKey == null) {
AFLogger.AppsFlyer2dXConversionCallback("[callStats] AppsFlyer's SDK cannot send any event without providing DevKey.");
return;
}
String AFInAppEventParameterName2 = AFInAppEventParameterName("KSAppsFlyerId");
if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, false)) {
hashMap.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
}
g AFInAppEventType3 = ab.AFInAppEventType(weakReference.get().getContentResolver());
if (AFInAppEventType3 != null) {
int i2 = setCustomerIdAndLogSession + 5;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
hashMap.put("amazon_aid", AFInAppEventType3.values);
hashMap.put("amazon_aid_limit", String.valueOf(AFInAppEventType3.AFKeystoreWrapper));
int i4 = setCustomerIdAndLogSession + 51;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
}
String string = AppsFlyerProperties.getInstance().getString("advertiserId");
if (string != null) {
int i6 = waitForCustomerUserId + 41;
setCustomerIdAndLogSession = i6 % 128;
if (i6 % 2 == 0) {
hashMap.put("advertiserId", string);
Object obj = null;
super.hashCode();
throw null;
}
hashMap.put("advertiserId", string);
int i7 = setCustomerIdAndLogSession + 1;
waitForCustomerUserId = i7 % 128;
int i8 = i7 % 2;
}
hashMap.put("app_id", weakReference.get().getPackageName());
hashMap.put("devkey", devKey);
hashMap.put("uid", af.valueOf(weakReference));
hashMap.put("time_in_app", String.valueOf(j));
hashMap.put("statType", "user_closed_app");
hashMap.put("platform", "Android");
hashMap.put("launch_counter", Integer.toString(valueOf(AFInAppEventType2, false)));
hashMap.put(AppsFlyerProperties.CHANNEL, AFInAppEventParameterName(weakReference.get()));
if (AFInAppEventParameterName2 == null) {
AFInAppEventParameterName2 = "";
}
hashMap.put("originalAppsflyerId", AFInAppEventParameterName2);
if (!this.onValidateInApp) {
AFLogger.AFInAppEventParameterName("Stats call is disabled, ignore ...");
return;
}
try {
AFLogger.AFInAppEventParameterName("Running callStats task");
cv cvVar = new cv();
cvVar.onConversionDataSuccess = isStopped();
new Thread(new an.c((cm) cvVar.AFInAppEventParameterName(hashMap).AFInAppEventType(String.format(AFLogger$LogLevel, AppsFlyerLib.getInstance().getHostPrefix(), AFInAppEventParameterName().getHostName())))).start();
} catch (Throwable th) {
AFLogger.valueOf("Could not send callStats request", th);
}
}
@Override
public final void logSession(Context context) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 51;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
ak.AFInAppEventType().AFKeystoreWrapper("logSession", new String[1]);
} else {
ak.AFInAppEventType().AFKeystoreWrapper("logSession", new String[0]);
}
ak.AFInAppEventType().getLevel();
AFInAppEventParameterName(context, ch.logSession);
AFInAppEventParameterName(context, (String) null, (Map<String, Object>) null);
}
private void AFInAppEventParameterName(Context context, ch chVar) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 95;
int i3 = i2 % 128;
waitForCustomerUserId = i3;
int i4 = i2 % 2;
bf bfVar = this.setCustomerUserId;
if (context != null) {
int i5 = i3 + 19;
setCustomerIdAndLogSession = i5 % 128;
int i6 = i5 % 2;
be beVar = bfVar.AFKeystoreWrapper;
if (context != null) {
beVar.values = context.getApplicationContext();
}
}
cl level = values().getLevel();
cj AFInAppEventParameterName2 = n.AFInAppEventParameterName(context);
if (level.AFInAppEventType()) {
level.AFInAppEventParameterName.put("api_name", chVar.toString());
level.valueOf(AFInAppEventParameterName2);
int i7 = waitForCustomerUserId + 123;
setCustomerIdAndLogSession = i7 % 128;
int i8 = i7 % 2;
}
level.AFKeystoreWrapper();
}
@Override
public final void sendAdRevenue(android.content.Context r5, java.util.Map<java.lang.String, java.lang.Object> r6) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.sendAdRevenue(android.content.Context, java.util.Map):void");
}
private void AFKeystoreWrapper(i iVar) {
int i = 2 % 2;
Application application = iVar.AFKeystoreWrapper;
String format = String.format(onInstallConversionFailureNative, AppsFlyerLib.getInstance().getHostPrefix(), AFInAppEventParameterName().getHostName());
StringBuilder sb = new StringBuilder();
sb.append(format);
sb.append(application.getPackageName());
String obj = sb.toString();
SharedPreferences AFInAppEventType2 = AFInAppEventType(application);
byte b2 = 0;
int valueOf2 = valueOf(AFInAppEventType2, false);
int valueOf3 = valueOf(AFInAppEventType2);
HashMap hashMap = new HashMap();
hashMap.put("ad_network", iVar.values);
hashMap.put("adrevenue_counter", Integer.valueOf(valueOf3));
String devKey = AppsFlyerProperties.getInstance().getDevKey();
hashMap.put("af_key", devKey);
hashMap.put("launch_counter", Integer.valueOf(valueOf2));
hashMap.put(values("ᳲ洀F䤸\udb2e┷띈œ鍏ᵯ潬磻", 29172 - (ExpandableListView.getPackedPositionForChild(0, 0) > 0L ? 1 : (ExpandableListView.getPackedPositionForChild(0, 0) == 0L ? 0 : -1))).intern(), Long.toString(new Date().getTime()));
hashMap.put("uid", af.valueOf(new WeakReference(application)));
String string = AppsFlyerProperties.getInstance().getString("advertiserId");
String string2 = AppsFlyerProperties.getInstance().getString("advertiserIdEnabled");
if (string2 != null) {
int i2 = waitForCustomerUserId + 115;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
hashMap.put("advertiserIdEnabled", string2);
}
if (string != null) {
hashMap.put("advertiserId", string);
}
valueOf(application, hashMap);
hashMap.put("device", Build.DEVICE);
values(application, hashMap);
try {
PackageInfo packageInfo = application.getPackageManager().getPackageInfo(application.getPackageName(), 0);
hashMap.put("app_version_code", Integer.toString(packageInfo.versionCode));
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US);
hashMap.put("install_date", valueOf(simpleDateFormat, packageInfo.firstInstallTime));
String string3 = AFInAppEventType2.getString("appsFlyerFirstInstall", null);
if (string3 == null) {
int i4 = setCustomerIdAndLogSession + 119;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
string3 = AFInAppEventType(simpleDateFormat, application);
}
hashMap.put("first_launch_date", string3);
} catch (Throwable th) {
AFLogger.valueOf("AdRevenue - Exception while collecting app version data ", th);
}
i valueOf4 = iVar.AFInAppEventType(obj).AFInAppEventParameterName(hashMap).valueOf(valueOf2);
valueOf4.AFVersionDeclaration = devKey;
d dVar = new d(this, valueOf4, b2);
if (k.values == null) {
k.values = new k();
}
valueOf(k.values.AFKeystoreWrapper(), dVar, 1L, TimeUnit.MILLISECONDS);
}
@Override
public final void logEvent(Context context, String str, Map<String, Object> map) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 69;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
logEvent(context, str, map, null);
if (i3 != 0) {
int i4 = 16 / 0;
}
int i5 = setCustomerIdAndLogSession + 61;
waitForCustomerUserId = i5 % 128;
if (i5 % 2 != 0) {
throw null;
}
}
private void AFInAppEventParameterName(Context context, String str, Map<String, Object> map) {
int i = 2 % 2;
co coVar = new co();
Activity activity = null;
if (context != null) {
int i2 = waitForCustomerUserId + 119;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
coVar.AFKeystoreWrapper = (Application) context.getApplicationContext();
super.hashCode();
throw null;
}
coVar.AFKeystoreWrapper = (Application) context.getApplicationContext();
}
coVar.getLevel = str;
coVar.values = map;
if (context instanceof Activity) {
int i3 = setCustomerIdAndLogSession + 73;
waitForCustomerUserId = i3 % 128;
if (i3 % 2 != 0) {
super.hashCode();
throw null;
}
activity = (Activity) context;
} else {
int i4 = waitForCustomerUserId + 35;
setCustomerIdAndLogSession = i4 % 128;
if (i4 % 2 == 0) {
int i5 = 2 / 4;
}
}
AFKeystoreWrapper(coVar, activity);
}
final void AFKeystoreWrapper(com.appsflyer.internal.i r6, android.app.Activity r7) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.AFKeystoreWrapper(com.appsflyer.internal.i, android.app.Activity):void");
}
@Override
public final void anonymizeUser(boolean z) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 117;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 != 0) {
ak AFInAppEventType2 = ak.AFInAppEventType();
String[] strArr = new String[1];
strArr[1] = String.valueOf(z);
AFInAppEventType2.AFKeystoreWrapper("anonymizeUser", strArr);
} else {
ak.AFInAppEventType().AFKeystoreWrapper("anonymizeUser", String.valueOf(z));
}
AppsFlyerProperties.getInstance().set(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, z);
int i3 = waitForCustomerUserId + 75;
setCustomerIdAndLogSession = i3 % 128;
if (i3 % 2 == 0) {
throw null;
}
}
@Override
public final void registerConversionListener(Context context, AppsFlyerConversionListener appsFlyerConversionListener) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 39;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 != 0) {
ak.AFInAppEventType().AFKeystoreWrapper("registerConversionListener", new String[0]);
} else {
ak.AFInAppEventType().AFKeystoreWrapper("registerConversionListener", new String[0]);
}
values(appsFlyerConversionListener);
int i3 = waitForCustomerUserId + 73;
setCustomerIdAndLogSession = i3 % 128;
int i4 = i3 % 2;
}
private static void values(AppsFlyerConversionListener appsFlyerConversionListener) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession;
int i3 = i2 + 61;
waitForCustomerUserId = i3 % 128;
Object obj = null;
if (i3 % 2 != 0) {
throw null;
}
if (appsFlyerConversionListener == null) {
int i4 = i2 + 91;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 == 0) {
return;
}
super.hashCode();
throw null;
}
AFKeystoreWrapper = appsFlyerConversionListener;
}
@Override
public final void unregisterConversionListener() {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 105;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
ak.AFInAppEventType().AFKeystoreWrapper("unregisterConversionListener", new String[0]);
AFKeystoreWrapper = null;
int i4 = waitForCustomerUserId + 111;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
}
@Override
public final void registerValidatorListener(Context context, AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 97;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
ak.AFInAppEventType().AFKeystoreWrapper("registerValidatorListener", new String[0]);
AFLogger.AFInAppEventParameterName("registerValidatorListener called");
if (appsFlyerInAppPurchaseValidatorListener == null) {
int i4 = waitForCustomerUserId + 67;
setCustomerIdAndLogSession = i4 % 128;
if (i4 % 2 != 0) {
AFLogger.AFInAppEventParameterName("registerValidatorListener null listener");
return;
} else {
AFLogger.AFInAppEventParameterName("registerValidatorListener null listener");
int i5 = 69 / 0;
return;
}
}
AFInAppEventParameterName = appsFlyerInAppPurchaseValidatorListener;
}
public static String valueOf(SimpleDateFormat simpleDateFormat, long j) {
int i = 2 % 2;
simpleDateFormat.setTimeZone(DesugarTimeZone.getTimeZone("UTC"));
String format = simpleDateFormat.format(new Date(j));
int i2 = setCustomerIdAndLogSession + 19;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
return format;
}
private void AFInAppEventParameterName(android.content.Context r5, java.lang.String r6, java.lang.String r7, java.util.Map<java.lang.String, java.lang.Object> r8, java.lang.String r9, java.lang.String r10) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.AFInAppEventParameterName(android.content.Context, java.lang.String, java.lang.String, java.util.Map, java.lang.String, java.lang.String):void");
}
private void values(i iVar) {
int i = 2 % 2;
byte b2 = 0;
boolean z = iVar.getLevel == null;
if (AFKeystoreWrapper()) {
AFLogger.values("CustomerUserId not set, reporting is disabled", true);
return;
}
if (z) {
int i2 = setCustomerIdAndLogSession + 43;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 == 0 ? !AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.LAUNCH_PROTECT_ENABLED, true) : !AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.LAUNCH_PROTECT_ENABLED, true)) {
AFLogger.values("Allowing multiple launches within a 5 second time window.");
} else if (getLevel()) {
int i3 = setCustomerIdAndLogSession + 79;
waitForCustomerUserId = i3 % 128;
int i4 = i3 % 2;
AppsFlyerRequestListener appsFlyerRequestListener = iVar.AFInAppEventParameterName;
if (appsFlyerRequestListener != null) {
appsFlyerRequestListener.onError(RequestError.EVENT_TIMEOUT, ba.valueOf);
return;
}
return;
}
this.onAppOpenAttribution = System.currentTimeMillis();
int i5 = waitForCustomerUserId + 101;
setCustomerIdAndLogSession = i5 % 128;
if (i5 % 2 == 0) {
int i6 = 3 / 3;
}
}
if (k.values == null) {
k.values = new k();
}
valueOf(k.values.AFKeystoreWrapper(), new b(this, iVar, b2), 0L, TimeUnit.MILLISECONDS);
}
private boolean getLevel() {
String format;
int i = 2 % 2;
if (this.onAppOpenAttribution > 0) {
long currentTimeMillis = System.currentTimeMillis() - this.onAppOpenAttribution;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss.SSS Z", Locale.US);
String valueOf2 = valueOf(simpleDateFormat, this.onAppOpenAttribution);
String valueOf3 = valueOf(simpleDateFormat, this.onResponseNative);
if (currentTimeMillis < this.onConversionDataSuccess) {
int i2 = setCustomerIdAndLogSession + 115;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
if (!isStopped()) {
AFLogger.values(String.format(Locale.US, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nThis launch is blocked: %s ms < %s ms", valueOf2, valueOf3, Long.valueOf(currentTimeMillis), Long.valueOf(this.onConversionDataSuccess)));
return true;
}
}
if (!isStopped()) {
int i4 = setCustomerIdAndLogSession + 21;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 != 0) {
Locale locale = Locale.US;
Object[] objArr = new Object[2];
objArr[1] = valueOf2;
objArr[0] = valueOf3;
objArr[5] = Long.valueOf(currentTimeMillis);
format = String.format(locale, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nSending launch (+%s ms)", objArr);
} else {
format = String.format(Locale.US, "Last Launch attempt: %s;\nLast successful Launch event: %s;\nSending launch (+%s ms)", valueOf2, valueOf3, Long.valueOf(currentTimeMillis));
}
AFLogger.values(format);
}
} else if (!isStopped()) {
int i5 = waitForCustomerUserId + 125;
setCustomerIdAndLogSession = i5 % 128;
if (i5 % 2 == 0) {
AFLogger.values("Sending first launch for this session!");
throw null;
}
AFLogger.values("Sending first launch for this session!");
}
return false;
}
private void AFInAppEventType(Context context, String str) {
int i = 2 % 2;
cq cqVar = new cq();
if (context != null) {
int i2 = waitForCustomerUserId + 109;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
cqVar.AFKeystoreWrapper = (Application) context.getApplicationContext();
}
cqVar.AppsFlyer2dXConversionCallback = str;
if (str == null || str.length() <= 5) {
return;
}
int i4 = waitForCustomerUserId + 23;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
if (valueOf(cqVar, AFInAppEventType(context))) {
if (k.values == null) {
k.values = new k();
}
valueOf(k.values.AFKeystoreWrapper(), new b(this, cqVar, (byte) 0), 5L, TimeUnit.MILLISECONDS);
int i6 = waitForCustomerUserId + 63;
setCustomerIdAndLogSession = i6 % 128;
int i7 = i6 % 2;
}
}
private void valueOf(com.appsflyer.internal.i r11) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.valueOf(com.appsflyer.internal.i):void");
}
private boolean valueOf(i iVar, SharedPreferences sharedPreferences) {
boolean z;
boolean z2;
int i = 2 % 2;
int valueOf2 = valueOf(sharedPreferences, false);
if (valueOf2 != 1 || (iVar instanceof ci)) {
z = false;
} else {
int i2 = setCustomerIdAndLogSession + 17;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
z = true;
}
if (sharedPreferences.getBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, false) || valueOf2 != 1) {
z2 = false;
} else {
int i4 = setCustomerIdAndLogSession + 115;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
z2 = true;
}
Object obj = null;
if (!z2) {
int i6 = waitForCustomerUserId + 15;
setCustomerIdAndLogSession = i6 % 128;
if (i6 % 2 == 0) {
throw null;
}
if (!z) {
return false;
}
}
int i7 = waitForCustomerUserId + 45;
setCustomerIdAndLogSession = i7 % 128;
if (i7 % 2 != 0) {
return true;
}
super.hashCode();
throw null;
}
private void AFInAppEventParameterName(Map<String, Object> map) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 79;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false)) {
return;
}
} else if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false)) {
return;
}
if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, false)) {
return;
}
int i3 = waitForCustomerUserId + 85;
setCustomerIdAndLogSession = i3 % 128;
int i4 = i3 % 2;
if (map.get("advertiserId") != null) {
try {
if (TextUtils.isEmpty(this.init)) {
int i5 = setCustomerIdAndLogSession + 21;
waitForCustomerUserId = i5 % 128;
int i6 = i5 % 2;
if (map.remove("android_id") != null) {
AFLogger.values("validateGaidAndIMEI :: removing: android_id");
}
}
if (TextUtils.isEmpty(this.AppsFlyer2dXConversionCallback)) {
int i7 = waitForCustomerUserId + 29;
setCustomerIdAndLogSession = i7 % 128;
if (i7 % 2 != 0) {
if (map.remove("imei") != null) {
AFLogger.values("validateGaidAndIMEI :: removing: imei");
}
} else {
map.remove("imei");
Object obj = null;
super.hashCode();
throw null;
}
}
} catch (Exception e2) {
AFLogger.valueOf("failed to remove IMEI or AndroidID key from params; ", e2);
}
}
}
private boolean AFLogger$LogLevel() {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 25;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
Map<String, Object> map = this.updateServerUninstallToken;
if (map == null || map.isEmpty()) {
int i4 = waitForCustomerUserId + 85;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
return false;
}
int i6 = setCustomerIdAndLogSession + 1;
waitForCustomerUserId = i6 % 128;
int i7 = i6 % 2;
return true;
}
final java.util.Map<java.lang.String, java.lang.Object> AFInAppEventType(com.appsflyer.internal.i r31) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.AFInAppEventType(com.appsflyer.internal.i):java.util.Map");
}
private void valueOf(Map<String, Object> map) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 85;
waitForCustomerUserId = i2 % 128;
Object obj = null;
if (i2 % 2 == 0) {
ap AFKeystoreWrapper2 = values().values().AFKeystoreWrapper();
if (AFKeystoreWrapper2 != null) {
map.put("rc", AFKeystoreWrapper2.AFKeystoreWrapper());
}
int i3 = waitForCustomerUserId + 79;
setCustomerIdAndLogSession = i3 % 128;
if (i3 % 2 != 0) {
return;
}
super.hashCode();
throw null;
}
values().values().AFKeystoreWrapper();
throw null;
}
public static Map<String, Object> AFInAppEventType(Map<String, Object> map) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 23;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 != 0) {
if (!map.containsKey("meta")) {
HashMap hashMap = new HashMap();
map.put("meta", hashMap);
return hashMap;
}
Map<String, Object> map2 = (Map) map.get("meta");
int i3 = waitForCustomerUserId + 29;
setCustomerIdAndLogSession = i3 % 128;
int i4 = i3 % 2;
return map2;
}
map.containsKey("meta");
throw null;
}
public static boolean AFInAppEventType(SharedPreferences sharedPreferences) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 89;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
Object obj = null;
String string = sharedPreferences.getString("sentSuccessfully", null);
if (i3 == 0) {
Boolean.parseBoolean(string);
super.hashCode();
throw null;
}
boolean parseBoolean = Boolean.parseBoolean(string);
int i4 = waitForCustomerUserId + 3;
setCustomerIdAndLogSession = i4 % 128;
if (i4 % 2 == 0) {
int i5 = 42 / 0;
}
return parseBoolean;
}
private static void values(Context context, Map<String, Object> map) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 71;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
WindowManager windowManager = (WindowManager) context.getSystemService("window");
if (windowManager != null) {
int i4 = waitForCustomerUserId + 63;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
int rotation = windowManager.getDefaultDisplay().getRotation();
map.put("sc_o", rotation != 0 ? rotation != 1 ? rotation != 2 ? rotation != 3 ? "" : "lr" : "pr" : "l" : "p");
}
}
private void AFInAppEventParameterName(Context context, boolean z, Map<String, Object> map, int i) {
int i2 = 2 % 2;
HashMap hashMap = new HashMap();
hashMap.put("cpu_abi", values("ro.product.cpu.abi"));
hashMap.put("cpu_abi2", values("ro.product.cpu.abi2"));
hashMap.put("arch", values("os.arch"));
hashMap.put("build_display_id", values("ro.build.display.id"));
if (z) {
int i3 = waitForCustomerUserId + 79;
setCustomerIdAndLogSession = i3 % 128;
Object obj = null;
if (i3 % 2 != 0) {
if (this.AppsFlyerConversionListener) {
Map<String, Object> AFLogger$LogLevel2 = AFLogger$LogLevel(context);
if (!AFLogger$LogLevel2.isEmpty()) {
int i4 = setCustomerIdAndLogSession + 45;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 != 0) {
hashMap.put("loc", AFLogger$LogLevel2);
super.hashCode();
throw null;
}
hashMap.put("loc", AFLogger$LogLevel2);
}
}
AFKeystoreWrapper(context, hashMap);
if (i <= 2) {
hashMap.putAll(w.AFKeystoreWrapper(context).AFKeystoreWrapper());
}
} else {
throw null;
}
}
hashMap.put("dim", y.AFInAppEventType(context));
map.put("deviceData", hashMap);
}
public static void AFInAppEventType(Context context, Map<String, ? super String> map) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 15;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
u uVar = u.d.valueOf;
u.a AFInAppEventType2 = u.AFInAppEventType(context);
map.put("network", AFInAppEventType2.AFKeystoreWrapper);
if (AFInAppEventType2.values != null) {
int i4 = waitForCustomerUserId + 103;
setCustomerIdAndLogSession = i4 % 128;
if (i4 % 2 == 0) {
map.put("operator", AFInAppEventType2.values);
int i5 = 66 / 0;
} else {
map.put("operator", AFInAppEventType2.values);
}
}
if (AFInAppEventType2.AFInAppEventType != null) {
int i6 = setCustomerIdAndLogSession + 1;
waitForCustomerUserId = i6 % 128;
if (i6 % 2 != 0) {
map.put("carrier", AFInAppEventType2.AFInAppEventType);
Object obj = null;
super.hashCode();
throw null;
}
map.put("carrier", AFInAppEventType2.AFInAppEventType);
int i7 = waitForCustomerUserId + 43;
setCustomerIdAndLogSession = i7 % 128;
int i8 = i7 % 2;
}
}
private static void AFKeystoreWrapper(Context context, Map<String, Object> map) {
int i = 2 % 2;
a.d values2 = a.C0012a.valueOf.values(context);
map.put("btl", Float.toString(values2.AFInAppEventType));
Object obj = null;
if (values2.AFKeystoreWrapper != null) {
int i2 = setCustomerIdAndLogSession + 9;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 != 0) {
map.put("btch", values2.AFKeystoreWrapper);
super.hashCode();
throw null;
}
map.put("btch", values2.AFKeystoreWrapper);
}
int i3 = waitForCustomerUserId + 109;
setCustomerIdAndLogSession = i3 % 128;
if (i3 % 2 == 0) {
throw null;
}
}
private static Map<String, Object> AFLogger$LogLevel(Context context) {
int i = 2 % 2;
Location valueOf2 = v.b.AFKeystoreWrapper.valueOf(context);
HashMap hashMap = new HashMap(3);
if (valueOf2 != null) {
int i2 = waitForCustomerUserId + 83;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
hashMap.put("lat", String.valueOf(valueOf2.getLatitude()));
hashMap.put("lon", String.valueOf(valueOf2.getLongitude()));
hashMap.put("ts", String.valueOf(valueOf2.getTime()));
int i4 = setCustomerIdAndLogSession + 9;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
}
return hashMap;
}
private static void values(java.util.Map<java.lang.String, java.lang.Object> r4) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.values(java.util.Map):void");
}
private static void AFInAppEventType(Map<String, Object> map, cl clVar) {
int i = 2 % 2;
HashMap hashMap = new HashMap(clVar.values);
clVar.values.clear();
clVar.valueOf.AFInAppEventType("gcd");
if (!hashMap.isEmpty()) {
int i2 = setCustomerIdAndLogSession + 43;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 != 0) {
AFInAppEventType(map).put("gcd", hashMap);
Object obj = null;
super.hashCode();
throw null;
}
AFInAppEventType(map).put("gcd", hashMap);
}
int i3 = waitForCustomerUserId + 9;
setCustomerIdAndLogSession = i3 % 128;
int i4 = i3 % 2;
}
private static String AFInAppEventParameterName(Activity activity) {
int i = 2 % 2;
String str = null;
if (activity != null) {
int i2 = setCustomerIdAndLogSession + 119;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
Intent intent = activity.getIntent();
if (intent != null) {
try {
Bundle extras = intent.getExtras();
if (extras != null && (str = extras.getString("af")) != null) {
int i4 = setCustomerIdAndLogSession + 119;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
AFLogger.values("Push Notification received af payload = ".concat(String.valueOf(str)));
extras.remove("af");
activity.setIntent(intent.putExtras(extras));
}
return str;
} catch (Throwable th) {
AFLogger.valueOf(th.getMessage(), th);
}
}
}
return null;
}
protected final void AFInAppEventType(Context context, Map<String, Object> map, Uri uri) {
int i = 2 % 2;
if (!map.containsKey("af_deeplink")) {
String valueOf2 = valueOf(uri.toString());
f valueOf3 = f.valueOf();
if (valueOf3.AFVersionDeclaration != null && valueOf3.getLevel != null) {
int i2 = setCustomerIdAndLogSession + 25;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
if (valueOf2.contains(valueOf3.AFVersionDeclaration)) {
Uri.Builder buildUpon = Uri.parse(valueOf2).buildUpon();
Uri.Builder buildUpon2 = Uri.EMPTY.buildUpon();
for (Map.Entry<String, String> entry : valueOf3.getLevel.entrySet()) {
int i4 = setCustomerIdAndLogSession + 3;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
buildUpon.appendQueryParameter(entry.getKey(), entry.getValue());
buildUpon2.appendQueryParameter(entry.getKey(), entry.getValue());
}
valueOf2 = buildUpon.build().toString();
map.put("appended_query_params", buildUpon2.build().getEncodedQuery());
}
}
map.put("af_deeplink", valueOf2);
}
HashMap hashMap = new HashMap();
hashMap.put("link", uri.toString());
aq aqVar = new aq(uri, this, context);
if (aqVar.values) {
int i6 = waitForCustomerUserId + 21;
setCustomerIdAndLogSession = i6 % 128;
if (i6 % 2 == 0) {
map.put("isBrandedDomain", Boolean.TRUE);
int i7 = 4 / 0;
} else {
map.put("isBrandedDomain", Boolean.TRUE);
}
}
z.AFInAppEventType(context, hashMap, uri);
if (!aqVar.AFInAppEventType()) {
ao.AFInAppEventType(hashMap);
return;
}
int i8 = setCustomerIdAndLogSession + 1;
waitForCustomerUserId = i8 % 128;
if (i8 % 2 != 0) {
aqVar.AFKeystoreWrapper = AFKeystoreWrapper(hashMap);
k kVar = k.values;
Object obj = null;
super.hashCode();
throw null;
}
aqVar.AFKeystoreWrapper = AFKeystoreWrapper(hashMap);
if (k.values == null) {
k.values = new k();
}
k.values.AFInAppEventType().execute(aqVar);
int i9 = waitForCustomerUserId + 97;
setCustomerIdAndLogSession = i9 % 128;
int i10 = i9 % 2;
}
private static java.lang.String valueOf(java.lang.String r10) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.valueOf(java.lang.String):java.lang.String");
}
private static String AFKeystoreWrapper(String str) {
int indexOf;
int i = 2 % 2;
int i2 = waitForCustomerUserId + 101;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 != 0 ? (indexOf = str.indexOf(63)) != -1 : (indexOf = str.indexOf(31)) != -1) {
String substring = str.substring(indexOf);
int i3 = waitForCustomerUserId + 59;
setCustomerIdAndLogSession = i3 % 128;
int i4 = i3 % 2;
return substring;
}
int i5 = waitForCustomerUserId + 19;
setCustomerIdAndLogSession = i5 % 128;
if (i5 % 2 != 0) {
return "";
}
throw null;
}
private aq.a AFKeystoreWrapper(final Map<String, String> map) {
int i = 2 % 2;
aq.a aVar = new aq.a() {
@Override
public final void valueOf(Map<String, String> map2) {
for (String str : map2.keySet()) {
map.put(str, map2.get(str));
}
ao.AFInAppEventType((Map<String, String>) map);
}
@Override
public final void AFKeystoreWrapper(String str) {
ao.AFInAppEventType(str, DeepLinkResult.Error.NETWORK);
}
};
int i2 = setCustomerIdAndLogSession + 31;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 == 0) {
return aVar;
}
Object obj = null;
super.hashCode();
throw null;
}
private static void valueOf(Context context, Map<String, Object> map, String str) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 61;
setCustomerIdAndLogSession = i2 % 128;
try {
if (i2 % 2 != 0) {
SharedPreferences AFInAppEventType2 = AFInAppEventType(context);
SharedPreferences.Editor edit = AFInAppEventType2.edit();
String string = AFInAppEventType2.getString("prev_event_name", null);
if (string != null) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("prev_event_timestamp", AFInAppEventType2.getLong("prev_event_timestamp", -1L));
jSONObject.put("prev_event_name", string);
map.put("prev_event", jSONObject);
}
edit.putString("prev_event_name", str);
edit.putLong("prev_event_timestamp", System.currentTimeMillis());
AFInAppEventType(edit);
int i3 = setCustomerIdAndLogSession + 113;
waitForCustomerUserId = i3 % 128;
if (i3 % 2 != 0) {
int i4 = 88 / 0;
return;
}
return;
}
SharedPreferences AFInAppEventType3 = AFInAppEventType(context);
AFInAppEventType3.edit();
AFInAppEventType3.getString("prev_event_name", null);
throw null;
} catch (Exception e2) {
AFLogger.valueOf("Error while processing previous event.", e2);
}
}
private static boolean init(android.content.Context r5) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.init(android.content.Context):boolean");
}
private void valueOf(android.content.Context r13, java.util.Map<java.lang.String, java.lang.Object> r14) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.valueOf(android.content.Context, java.util.Map):void");
}
private static boolean AFVersionDeclaration(Context context) {
int i = 2 % 2;
if (!AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_ANDROID_ID_FORCE_BY_USER, false)) {
int i2 = waitForCustomerUserId + 41;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 != 0 ? !AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, false) : !AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.COLLECT_IMEI_FORCE_BY_USER, true)) {
return !init(context);
}
}
int i3 = setCustomerIdAndLogSession + 5;
waitForCustomerUserId = i3 % 128;
int i4 = i3 % 2;
}
public static boolean AFKeystoreWrapper(Context context) {
int i = 2 % 2;
if (AFInAppEventType(context).contains("appsFlyerCount")) {
int i2 = setCustomerIdAndLogSession + 73;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
return false;
}
int i4 = setCustomerIdAndLogSession + 13;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
return true;
}
private String onInstallConversionDataLoadedNative(Context context) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 85;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
SharedPreferences AFInAppEventType2 = AFInAppEventType(context);
String str = null;
if (AFInAppEventType2.contains("INSTALL_STORE")) {
String string = AFInAppEventType2.getString("INSTALL_STORE", null);
int i4 = waitForCustomerUserId + 5;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
return string;
}
if (AFKeystoreWrapper(context)) {
str = onDeepLinkingNative(context);
} else {
int i6 = waitForCustomerUserId + 93;
setCustomerIdAndLogSession = i6 % 128;
int i7 = i6 % 2;
}
valueOf(context, "INSTALL_STORE", str);
return str;
}
private String onDeepLinkingNative(Context context) {
int i = 2 % 2;
String string = AppsFlyerProperties.getInstance().getString("api_store_value");
if (string != null) {
int i2 = waitForCustomerUserId + 35;
int i3 = i2 % 128;
setCustomerIdAndLogSession = i3;
if (i2 % 2 == 0) {
throw null;
}
int i4 = i3 + 91;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 == 0) {
return string;
}
throw null;
}
String AFKeystoreWrapper2 = AFKeystoreWrapper(context, "AF_STORE");
int i5 = waitForCustomerUserId + 121;
setCustomerIdAndLogSession = i5 % 128;
int i6 = i5 % 2;
return AFKeystoreWrapper2;
}
private static String values(String str) {
Object invoke;
int i = 2 % 2;
int i2 = waitForCustomerUserId + 93;
setCustomerIdAndLogSession = i2 % 128;
String str2 = null;
try {
if (i2 % 2 == 0) {
Class<?> cls = Class.forName("android.os.SystemProperties");
Class<?>[] clsArr = new Class[1];
clsArr[1] = String.class;
Method method = cls.getMethod("get", clsArr);
new Object[0][1] = str;
invoke = method.invoke(null, null);
} else {
invoke = Class.forName("android.os.SystemProperties").getMethod("get", String.class).invoke(null, str);
}
str2 = (String) invoke;
} catch (Throwable th) {
AFLogger.valueOf(th.getMessage(), th);
}
int i3 = waitForCustomerUserId + 35;
setCustomerIdAndLogSession = i3 % 128;
int i4 = i3 % 2;
return str2;
}
private String AFKeystoreWrapper(Context context, String str) {
int i = 2 % 2;
int i2 = waitForCustomerUserId;
int i3 = i2 + 115;
int i4 = i3 % 128;
setCustomerIdAndLogSession = i4;
int i5 = i3 % 2;
if (context == null) {
int i6 = i4 + 91;
int i7 = i6 % 128;
waitForCustomerUserId = i7;
int i8 = i6 % 2;
int i9 = i7 + 7;
setCustomerIdAndLogSession = i9 % 128;
if (i9 % 2 != 0) {
return null;
}
throw null;
}
bf bfVar = this.setCustomerUserId;
if (context != null) {
int i10 = i2 + 29;
setCustomerIdAndLogSession = i10 % 128;
int i11 = i10 % 2;
be beVar = bfVar.AFKeystoreWrapper;
if (context != null) {
beVar.values = context.getApplicationContext();
}
}
return values().AFInAppEventType().AFInAppEventParameterName(str);
}
@Override
public final void setPreinstallAttribution(String str, String str2, String str3) {
int i = 2 % 2;
AFLogger.AFInAppEventParameterName("setPreinstallAttribution API called");
JSONObject jSONObject = new JSONObject();
try {
if (str != null) {
int i2 = setCustomerIdAndLogSession + 23;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 != 0) {
jSONObject.put("pid", str);
throw null;
}
jSONObject.put("pid", str);
}
if (str2 != null) {
int i3 = waitForCustomerUserId + 73;
setCustomerIdAndLogSession = i3 % 128;
if (i3 % 2 == 0) {
jSONObject.put("c", str2);
throw null;
}
jSONObject.put("c", str2);
}
if (str3 != null) {
int i4 = setCustomerIdAndLogSession + 71;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 != 0) {
jSONObject.put("af_siteid", str3);
throw null;
}
jSONObject.put("af_siteid", str3);
}
} catch (JSONException e2) {
AFLogger.valueOf(e2.getMessage(), e2);
}
if (!jSONObject.has("pid")) {
AFLogger.AppsFlyer2dXConversionCallback("Cannot set preinstall attribution data without a media source");
return;
}
int i5 = setCustomerIdAndLogSession + 25;
waitForCustomerUserId = i5 % 128;
int i6 = i5 % 2;
values("preInstallName", jSONObject.toString());
}
private static void AFInAppEventType(String str) {
int i = 2 % 2;
try {
if (!new JSONObject(str).has("pid")) {
AFLogger.AppsFlyer2dXConversionCallback("Cannot set preinstall attribution data without a media source");
int i2 = setCustomerIdAndLogSession + 87;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
return;
}
int i4 = waitForCustomerUserId + 103;
setCustomerIdAndLogSession = i4 % 128;
if (i4 % 2 == 0) {
values("preInstallName", str);
Object obj = null;
super.hashCode();
throw null;
}
values("preInstallName", str);
int i5 = waitForCustomerUserId + 55;
setCustomerIdAndLogSession = i5 % 128;
int i6 = i5 % 2;
} catch (JSONException e2) {
AFLogger.valueOf("Error parsing JSON for preinstall", e2);
}
}
private String onInstallConversionFailureNative(Context context) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 17;
setCustomerIdAndLogSession = i2 % 128;
Object obj = null;
if (i2 % 2 != 0) {
File AFLogger$LogLevel2 = AFLogger$LogLevel(values("ro.appsflyer.preinstall.path"));
if (AFInAppEventType(AFLogger$LogLevel2)) {
AFLogger$LogLevel2 = AFLogger$LogLevel(AFKeystoreWrapper(context, "AF_PRE_INSTALL_PATH"));
}
if (AFInAppEventType(AFLogger$LogLevel2)) {
int i3 = setCustomerIdAndLogSession + 51;
waitForCustomerUserId = i3 % 128;
if (i3 % 2 == 0) {
AFLogger$LogLevel2 = AFLogger$LogLevel("/data/local/tmp/pre_install.appsflyer");
} else {
AFLogger$LogLevel("/data/local/tmp/pre_install.appsflyer");
super.hashCode();
throw null;
}
}
if (AFInAppEventType(AFLogger$LogLevel2)) {
AFLogger$LogLevel2 = AFLogger$LogLevel("/etc/pre_install.appsflyer");
}
if (AFInAppEventType(AFLogger$LogLevel2)) {
int i4 = waitForCustomerUserId + 47;
setCustomerIdAndLogSession = i4 % 128;
if (i4 % 2 != 0) {
return null;
}
super.hashCode();
throw null;
}
return values(AFLogger$LogLevel2, context.getPackageName());
}
AFInAppEventType(AFLogger$LogLevel(values("ro.appsflyer.preinstall.path")));
super.hashCode();
throw null;
}
private static String values(File file, String str) {
FileReader fileReader;
Properties properties;
int i = 2 % 2;
try {
try {
try {
properties = new Properties();
fileReader = new FileReader(file);
} catch (Throwable th) {
AFLogger.valueOf(th.getMessage(), th);
return null;
}
} catch (FileNotFoundException unused) {
fileReader = null;
} catch (Throwable th2) {
th = th2;
fileReader = null;
}
try {
properties.load(fileReader);
AFLogger.values("Found PreInstall property!");
String property = properties.getProperty(str);
try {
fileReader.close();
int i2 = waitForCustomerUserId + 95;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
} catch (Throwable th3) {
AFLogger.valueOf(th3.getMessage(), th3);
}
int i4 = setCustomerIdAndLogSession + 61;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 != 0) {
int i5 = 89 / 0;
}
return property;
} catch (FileNotFoundException unused2) {
StringBuilder sb = new StringBuilder("PreInstall file wasn't found: ");
sb.append(file.getAbsolutePath());
AFLogger.AFInAppEventParameterName(sb.toString());
if (fileReader != null) {
fileReader.close();
int i6 = waitForCustomerUserId + 113;
setCustomerIdAndLogSession = i6 % 128;
if (i6 % 2 == 0) {
int i7 = 4 / 4;
}
}
return null;
} catch (Throwable th4) {
th = th4;
AFLogger.valueOf(th.getMessage(), th);
if (fileReader != null) {
fileReader.close();
}
return null;
}
} catch (Throwable th5) {
if (fileReader != null) {
try {
fileReader.close();
} catch (Throwable th6) {
AFLogger.valueOf(th6.getMessage(), th6);
}
}
throw th5;
}
}
private static boolean AFInAppEventType(File file) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 73;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 == 0) {
throw null;
}
if (file == null || !file.exists()) {
return true;
}
int i3 = setCustomerIdAndLogSession + 53;
waitForCustomerUserId = i3 % 128;
if (i3 % 2 != 0) {
int i4 = 49 / 0;
}
return false;
}
private static java.io.File AFLogger$LogLevel(java.lang.String r3) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.AFLogger$LogLevel(java.lang.String):java.io.File");
}
private String onAttributionFailureNative(Context context) {
String str;
int i = 2 % 2;
SharedPreferences AFInAppEventType2 = AFInAppEventType(context);
String AFInAppEventParameterName2 = AFInAppEventParameterName("preInstallName");
if (AFInAppEventParameterName2 == null) {
if (AFInAppEventType2.contains("preInstallName")) {
str = AFInAppEventType2.getString("preInstallName", null);
} else {
if (AFKeystoreWrapper(context) && (AFInAppEventParameterName2 = onInstallConversionFailureNative(context)) == null) {
AFInAppEventParameterName2 = AFKeystoreWrapper(context, "AF_PRE_INSTALL_NAME");
int i2 = waitForCustomerUserId + 57;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
}
if (AFInAppEventParameterName2 != null) {
int i4 = waitForCustomerUserId + 3;
setCustomerIdAndLogSession = i4 % 128;
if (i4 % 2 == 0) {
valueOf(context, "preInstallName", AFInAppEventParameterName2);
throw null;
}
valueOf(context, "preInstallName", AFInAppEventParameterName2);
}
str = AFInAppEventParameterName2;
}
if (str != null) {
values("preInstallName", str);
}
return str;
}
int i5 = setCustomerIdAndLogSession + 65;
waitForCustomerUserId = i5 % 128;
int i6 = i5 % 2;
return AFInAppEventParameterName2;
}
private void onAppOpenAttributionNative(android.content.Context r6) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.onAppOpenAttributionNative(android.content.Context):void");
}
public final java.lang.String AFInAppEventParameterName(android.content.Context r4) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.AFInAppEventParameterName(android.content.Context):java.lang.String");
}
@Override
public final boolean isPreInstalledApp(Context context) {
int i = 2 % 2;
try {
if ((context.getPackageManager().getApplicationInfo(context.getPackageName(), 0).flags & 1) != 0) {
int i2 = setCustomerIdAndLogSession + 97;
waitForCustomerUserId = i2 % 128;
return i2 % 2 == 0;
}
} catch (PackageManager.NameNotFoundException e2) {
AFLogger.valueOf("Could not check if app is pre installed", e2);
}
int i3 = waitForCustomerUserId + 109;
setCustomerIdAndLogSession = i3 % 128;
int i4 = i3 % 2;
return false;
}
public final String AFInAppEventParameterName(Context context, String str) {
int i = 2 % 2;
SharedPreferences AFInAppEventType2 = AFInAppEventType(context);
if (!AFInAppEventType2.contains("CACHED_CHANNEL")) {
valueOf(context, "CACHED_CHANNEL", str);
return str;
}
int i2 = waitForCustomerUserId + 101;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
String string = AFInAppEventType2.getString("CACHED_CHANNEL", null);
int i4 = waitForCustomerUserId + 15;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
return string;
}
private String AFInAppEventType(SimpleDateFormat simpleDateFormat, Context context) {
String str;
int i = 2 % 2;
String string = AFInAppEventType(context).getString("appsFlyerFirstInstall", null);
if (string == null) {
if (AFKeystoreWrapper(context)) {
AFLogger.AFInAppEventParameterName("AppsFlyer: first launch detected");
str = simpleDateFormat.format(new Date());
int i2 = setCustomerIdAndLogSession + 25;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
} else {
str = "";
}
string = str;
valueOf(context, "appsFlyerFirstInstall", string);
int i4 = waitForCustomerUserId + 113;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
}
AFLogger.values("AppsFlyer: first launch date: ".concat(String.valueOf(string)));
return string;
}
@Override
public final String getAttributionId(Context context) {
int i = 2 % 2;
try {
String AFInAppEventParameterName2 = new ae(context).AFInAppEventParameterName();
int i2 = waitForCustomerUserId + 19;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
return AFInAppEventParameterName2;
} catch (Throwable th) {
AFLogger.valueOf("Could not collect facebook attribution id. ", th);
return null;
}
}
public static synchronized SharedPreferences AFInAppEventType(Context context) {
SharedPreferences sharedPreferences;
synchronized (ac.class) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 79;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
if (AFInAppEventParameterName().getSdkVersion == null) {
int i4 = waitForCustomerUserId + 25;
setCustomerIdAndLogSession = i4 % 128;
int i5 = i4 % 2;
AFInAppEventParameterName().getSdkVersion = context.getApplicationContext().getSharedPreferences("appsflyer-data", 0);
int i6 = setCustomerIdAndLogSession + 7;
waitForCustomerUserId = i6 % 128;
if (i6 % 2 != 0) {
int i7 = 4 / 3;
} else {
int i8 = 2 % 2;
}
}
sharedPreferences = AFInAppEventParameterName().getSdkVersion;
}
return sharedPreferences;
}
public final bv values(Context context) {
bf bfVar = this.setCustomerUserId;
if (context != null) {
be beVar = bfVar.AFKeystoreWrapper;
if (context != null) {
beVar.values = context.getApplicationContext();
}
}
Context context2 = this.setCustomerUserId.AFKeystoreWrapper.values;
if (context2 != null) {
return new bc(AFInAppEventType(context2));
}
throw new IllegalStateException("Context must be set via setContext method before calling this dependency.");
}
public final int valueOf(SharedPreferences sharedPreferences, boolean z) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 3;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
int valueOf2 = valueOf(sharedPreferences, "appsFlyerCount", z);
int i4 = waitForCustomerUserId + 119;
setCustomerIdAndLogSession = i4 % 128;
if (i4 % 2 == 0) {
int i5 = 84 / 0;
}
return valueOf2;
}
private int AFKeystoreWrapper(SharedPreferences sharedPreferences, boolean z) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 117;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
int valueOf2 = valueOf(sharedPreferences, "appsFlyerInAppEventCount", z);
int i4 = setCustomerIdAndLogSession + 5;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
return valueOf2;
}
private int valueOf(SharedPreferences sharedPreferences) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 3;
waitForCustomerUserId = i2 % 128;
int valueOf2 = i2 % 2 != 0 ? valueOf(sharedPreferences, "appsFlyerAdRevenueCount", false) : valueOf(sharedPreferences, "appsFlyerAdRevenueCount", true);
int i3 = setCustomerIdAndLogSession + 117;
waitForCustomerUserId = i3 % 128;
if (i3 % 2 != 0) {
int i4 = 85 / 0;
}
return valueOf2;
}
private static int valueOf(SharedPreferences sharedPreferences, String str, boolean z) {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 87;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
int i4 = sharedPreferences.getInt(str, 0);
if (z) {
i4++;
SharedPreferences.Editor edit = sharedPreferences.edit();
edit.putInt(str, i4);
AFInAppEventType(edit);
int i5 = setCustomerIdAndLogSession + 43;
waitForCustomerUserId = i5 % 128;
int i6 = i5 % 2;
}
if (ak.AFInAppEventType().AFVersionDeclaration()) {
ak.AFInAppEventType().values(String.valueOf(i4));
}
return i4;
}
private long onAppOpenAttribution(Context context) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 51;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
long j = AFInAppEventType(context).getLong("AppsFlyerTimePassedSincePrevLaunch", 0L);
long currentTimeMillis = System.currentTimeMillis();
AFInAppEventType(context, "AppsFlyerTimePassedSincePrevLaunch", currentTimeMillis);
if (j <= 0) {
return -1L;
}
long j2 = currentTimeMillis - j;
int i4 = waitForCustomerUserId + 33;
setCustomerIdAndLogSession = i4 % 128;
return i4 % 2 == 0 ? j2 - 1000 : j2 / 1000;
}
private void AFInAppEventParameterName(i iVar) throws IOException {
String str;
int i = 2 % 2;
StringBuilder sb = new StringBuilder("url: ");
sb.append(iVar.onDeepLinkingNative);
AFLogger.values(sb.toString());
if (iVar.init != null) {
str = Base64.encodeToString(iVar.AFInAppEventParameterName(), 2);
AFLogger.values("cached data: ".concat(String.valueOf(str)));
} else {
String jSONObject = new JSONObject(iVar.values()).toString();
String replaceAll = jSONObject.replaceAll("\\p{C}", "*Non-printing character*");
if (!replaceAll.equals(jSONObject)) {
int i2 = waitForCustomerUserId + 65;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
AFLogger.AppsFlyer2dXConversionCallback("Payload contains non-printing characters");
jSONObject = replaceAll;
}
ai.AFKeystoreWrapper("data: ".concat(String.valueOf(jSONObject)));
int i4 = setCustomerIdAndLogSession + 47;
waitForCustomerUserId = i4 % 128;
if (i4 % 2 != 0) {
int i5 = 5 % 4;
}
str = jSONObject;
}
ak.AFInAppEventType().AFInAppEventType(iVar.onDeepLinkingNative, str);
try {
init(iVar);
} catch (IOException e2) {
AFLogger.valueOf("Exception in sendRequestToServer. ", e2);
if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.USE_HTTP_FALLBACK, false)) {
init(iVar.AFInAppEventType(iVar.onDeepLinkingNative.replace("https:", "http:")));
return;
}
StringBuilder sb2 = new StringBuilder("failed to send request to server. ");
sb2.append(e2.getLocalizedMessage());
AFLogger.values(sb2.toString());
throw e2;
}
}
private void init(i iVar) throws IOException {
int i = 2 % 2;
URL url = new URL(iVar.onDeepLinkingNative);
byte[] AFInAppEventParameterName2 = iVar.AFInAppEventParameterName();
String str = iVar.AFVersionDeclaration;
String str2 = iVar.init;
boolean valueOf2 = iVar.valueOf();
Application application = iVar.AFKeystoreWrapper;
AppsFlyerRequestListener appsFlyerRequestListener = iVar.AFInAppEventParameterName;
cl level = values().getLevel();
if (valueOf2) {
level.valueOf(iVar.onInstallConversionFailureNative);
}
HttpURLConnection httpURLConnection = null;
DataOutputStream dataOutputStream = null;
try {
HttpURLConnection httpURLConnection2 = (HttpURLConnection) ((URLConnection) FirebasePerfUrlConnection.instrument(url.openConnection()));
try {
httpURLConnection2.setRequestMethod("POST");
httpURLConnection2.setRequestProperty("Content-Length", String.valueOf(AFInAppEventParameterName2.length));
httpURLConnection2.setRequestProperty("Content-Type", !iVar.AFInAppEventType() ? "application/json" : "application/octet-stream");
httpURLConnection2.setConnectTimeout(10000);
httpURLConnection2.setDoOutput(true);
if (!AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.HTTP_CACHE, true)) {
httpURLConnection2.setUseCaches(false);
}
try {
DataOutputStream dataOutputStream2 = new DataOutputStream(httpURLConnection2.getOutputStream());
try {
dataOutputStream2.write(AFInAppEventParameterName2);
dataOutputStream2.close();
int i2 = setCustomerIdAndLogSession + 97;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 != 0) {
httpURLConnection2.getResponseCode();
throw null;
}
int responseCode = httpURLConnection2.getResponseCode();
if (valueOf2) {
level.AFInAppEventType(iVar.onInstallConversionFailureNative);
}
String AFInAppEventParameterName3 = AFInAppEventParameterName(httpURLConnection2);
ak.AFInAppEventType().values(url.toString(), responseCode, AFInAppEventParameterName3);
AFLogger.values("response code: ".concat(String.valueOf(responseCode)));
SharedPreferences AFInAppEventType2 = AFInAppEventType(application);
if (responseCode == 200) {
if (application != null && valueOf2) {
this.onResponseNative = System.currentTimeMillis();
values().AFKeystoreWrapper();
int i3 = setCustomerIdAndLogSession + 17;
waitForCustomerUserId = i3 % 128;
int i4 = i3 % 2;
}
if (appsFlyerRequestListener != null) {
int i5 = waitForCustomerUserId + 1;
setCustomerIdAndLogSession = i5 % 128;
int i6 = i5 % 2;
appsFlyerRequestListener.onSuccess();
int i7 = setCustomerIdAndLogSession + 37;
waitForCustomerUserId = i7 % 128;
int i8 = i7 % 2;
}
if (str2 != null) {
values().AFVersionDeclaration().valueOf(str2);
} else {
valueOf(application, "sentSuccessfully", "true");
onAppOpenAttributionNative(application);
}
new cd(application).AFKeystoreWrapper();
this.onValidateInApp = as.AFInAppEventParameterName(AFInAppEventParameterName3).optBoolean("send_background", false);
} else if (appsFlyerRequestListener != null) {
int i9 = RequestError.RESPONSE_CODE_FAILURE;
StringBuilder sb = new StringBuilder();
sb.append(ba.AFInAppEventType);
sb.append(" ");
sb.append(responseCode);
appsFlyerRequestListener.onError(i9, sb.toString());
int i10 = waitForCustomerUserId + 53;
setCustomerIdAndLogSession = i10 % 128;
int i11 = i10 % 2;
}
cg.AFInAppEventType(this, iVar, str, application, AFInAppEventType2, Integer.valueOf(responseCode), null);
if (httpURLConnection2 != null) {
httpURLConnection2.disconnect();
}
} catch (Throwable th) {
th = th;
dataOutputStream = dataOutputStream2;
if (dataOutputStream != null) {
dataOutputStream.close();
}
throw th;
}
} catch (Throwable th2) {
th = th2;
}
} catch (Throwable th3) {
th = th3;
httpURLConnection = httpURLConnection2;
if (httpURLConnection != null) {
httpURLConnection.disconnect();
}
throw th;
}
} catch (Throwable th4) {
th = th4;
}
}
@Override
public final void validateAndLogInAppPurchase(Context context, String str, String str2, String str3, String str4, String str5, Map<String, String> map) {
ak.AFInAppEventType().AFKeystoreWrapper("validateAndTrackInAppPurchase", str, str2, str3, str4, str5, map == null ? "" : map.toString());
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.values(sb.toString());
}
if (str == null || str4 == null || str2 == null || str5 == null || str3 == null) {
AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener = AFInAppEventParameterName;
if (appsFlyerInAppPurchaseValidatorListener != null) {
appsFlyerInAppPurchaseValidatorListener.onValidateInAppFailure("Please provide purchase parameters");
return;
}
return;
}
Context applicationContext = context.getApplicationContext();
String devKey = AppsFlyerProperties.getInstance().getDevKey();
if (context instanceof Activity) {
((Activity) context).getIntent();
}
new Thread(new ad(applicationContext, devKey, str, str2, str3, str4, str5, map)).start();
}
public static void valueOf(ScheduledExecutorService scheduledExecutorService, Runnable runnable, long j, TimeUnit timeUnit) {
int i = 2 % 2;
if (scheduledExecutorService != null) {
try {
if (!scheduledExecutorService.isShutdown()) {
int i2 = setCustomerIdAndLogSession + 87;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
if (!scheduledExecutorService.isTerminated()) {
int i4 = setCustomerIdAndLogSession + 25;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
scheduledExecutorService.schedule(runnable, j, timeUnit);
return;
}
}
} catch (RejectedExecutionException e2) {
AFLogger.valueOf("scheduleJob failed with RejectedExecutionException Exception", e2);
return;
} catch (Throwable th) {
AFLogger.valueOf("scheduleJob failed with Exception", th);
return;
}
}
AFLogger.AppsFlyer2dXConversionCallback("scheduler is null, shut downed or terminated");
int i6 = setCustomerIdAndLogSession + 45;
waitForCustomerUserId = i6 % 128;
int i7 = i6 % 2;
}
@Override
public final boolean isStopped() {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 59;
int i3 = i2 % 128;
setCustomerIdAndLogSession = i3;
int i4 = i2 % 2;
boolean z = this.getInstance;
int i5 = i3 + 123;
waitForCustomerUserId = i5 % 128;
if (i5 % 2 == 0) {
return z;
}
throw null;
}
public static String AFInAppEventParameterName(HttpURLConnection httpURLConnection) {
String obj;
InputStreamReader inputStreamReader;
Object obj2;
int i = 2 % 2;
StringBuilder sb = new StringBuilder();
BufferedReader bufferedReader = null;
try {
try {
InputStream errorStream = httpURLConnection.getErrorStream();
if (errorStream == null) {
errorStream = httpURLConnection.getInputStream();
}
inputStreamReader = new InputStreamReader(errorStream);
try {
BufferedReader bufferedReader2 = new BufferedReader(inputStreamReader);
boolean z = false;
while (true) {
try {
String readLine = bufferedReader2.readLine();
if (readLine == null) {
break;
}
int i2 = waitForCustomerUserId;
int i3 = i2 + 27;
setCustomerIdAndLogSession = i3 % 128;
int i4 = i3 % 2;
if (z) {
int i5 = i2 + 115;
setCustomerIdAndLogSession = i5 % 128;
int i6 = i5 % 2;
obj2 = '\n';
} else {
obj2 = "";
}
sb.append(obj2);
sb.append(readLine);
z = true;
} catch (Throwable th) {
th = th;
bufferedReader = bufferedReader2;
try {
StringBuilder sb2 = new StringBuilder("Could not read connection response from: ");
sb2.append(httpURLConnection.getURL().toString());
AFLogger.valueOf(sb2.toString(), th);
if (bufferedReader != null) {
bufferedReader.close();
}
if (inputStreamReader != null) {
inputStreamReader.close();
int i7 = setCustomerIdAndLogSession + 23;
waitForCustomerUserId = i7 % 128;
int i8 = i7 % 2;
}
obj = sb.toString();
new JSONObject(obj);
return obj;
} catch (Throwable th2) {
if (bufferedReader != null) {
try {
bufferedReader.close();
} catch (Throwable th3) {
AFLogger.values(th3);
throw th2;
}
}
if (inputStreamReader != null) {
inputStreamReader.close();
}
int i9 = setCustomerIdAndLogSession + 111;
waitForCustomerUserId = i9 % 128;
int i10 = i9 % 2;
throw th2;
}
}
}
bufferedReader2.close();
inputStreamReader.close();
} catch (Throwable th4) {
th = th4;
}
} catch (Throwable th5) {
th = th5;
inputStreamReader = null;
}
} catch (Throwable th6) {
AFLogger.values(th6);
}
obj = sb.toString();
try {
new JSONObject(obj);
return obj;
} catch (JSONException unused) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("string_response", obj);
return jSONObject.toString();
} catch (JSONException unused2) {
return new JSONObject().toString();
}
}
}
private static float onResponseNative(Context context) {
float f;
int intExtra;
int intExtra2;
int i = 2 % 2;
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.valueOf(th.getMessage(), th);
f = 1.0f;
}
if (intExtra == -1) {
return 50.0f;
}
int i2 = waitForCustomerUserId + 83;
int i3 = i2 % 128;
setCustomerIdAndLogSession = i3;
int i4 = i2 % 2;
if (intExtra2 == -1) {
return 50.0f;
}
f = (intExtra / intExtra2) * 100.0f;
int i5 = i3 + 93;
waitForCustomerUserId = i5 % 128;
int i6 = i5 % 2;
int i7 = setCustomerIdAndLogSession + 117;
waitForCustomerUserId = i7 % 128;
int i8 = i7 % 2;
return f;
}
private static boolean onConversionDataSuccess(Context context) {
int i = 2 % 2;
if (context != null) {
try {
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
for (Network network : connectivityManager.getAllNetworks()) {
NetworkCapabilities networkCapabilities = connectivityManager.getNetworkCapabilities(network);
if (networkCapabilities.hasTransport(4)) {
int i2 = waitForCustomerUserId + 19;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
if (!networkCapabilities.hasCapability(15)) {
int i4 = waitForCustomerUserId + 87;
setCustomerIdAndLogSession = i4 % 128;
if (i4 % 2 != 0) {
return true;
}
Object obj = null;
super.hashCode();
throw null;
}
}
}
int i5 = waitForCustomerUserId + 59;
setCustomerIdAndLogSession = i5 % 128;
int i6 = i5 % 2;
return false;
} catch (Exception e2) {
AFLogger.valueOf("Failed collecting ivc data", e2);
}
}
return false;
}
@Override
public final void setHost(String str, String str2) {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 43;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
if (str != null) {
values("custom_host_prefix", str);
}
if (str2 != null) {
int i4 = setCustomerIdAndLogSession + 3;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
if (!str2.isEmpty()) {
values("custom_host", str2);
return;
}
}
AFLogger.AppsFlyer2dXConversionCallback("hostName cannot be null or empty");
}
@Override
public final String getHostName() {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 93;
setCustomerIdAndLogSession = i2 % 128;
int i3 = i2 % 2;
String AFInAppEventParameterName2 = AFInAppEventParameterName("custom_host");
if (AFInAppEventParameterName2 == null) {
return "appsflyer.com";
}
int i4 = waitForCustomerUserId + 3;
int i5 = i4 % 128;
setCustomerIdAndLogSession = i5;
int i6 = i4 % 2;
int i7 = i5 + 41;
waitForCustomerUserId = i7 % 128;
if (i7 % 2 != 0) {
int i8 = 76 / 0;
}
return AFInAppEventParameterName2;
}
@Override
public final String getHostPrefix() {
int i = 2 % 2;
int i2 = waitForCustomerUserId + 95;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 != 0) {
String AFInAppEventParameterName2 = AFInAppEventParameterName("custom_host_prefix");
if (AFInAppEventParameterName2 == null) {
return "";
}
int i3 = setCustomerIdAndLogSession + 119;
waitForCustomerUserId = i3 % 128;
int i4 = i3 % 2;
return AFInAppEventParameterName2;
}
AFInAppEventParameterName("custom_host_prefix");
throw null;
}
@Override
public final void setMinTimeBetweenSessions(int i) {
int i2 = 2 % 2;
int i3 = setCustomerIdAndLogSession + 19;
waitForCustomerUserId = i3 % 128;
if (i3 % 2 != 0) {
this.onConversionDataSuccess = TimeUnit.SECONDS.toMillis(i);
int i4 = 88 / 0;
} else {
this.onConversionDataSuccess = TimeUnit.SECONDS.toMillis(i);
}
int i5 = setCustomerIdAndLogSession + 83;
waitForCustomerUserId = i5 % 128;
if (i5 % 2 != 0) {
throw null;
}
}
public final dd[] valueOf() {
int i = 2 % 2;
int i2 = setCustomerIdAndLogSession + 45;
waitForCustomerUserId = i2 % 128;
if (i2 % 2 != 0) {
values().AFLogger$LogLevel().AFInAppEventType();
throw null;
}
dd[] AFInAppEventType2 = values().AFLogger$LogLevel().AFInAppEventType();
int i3 = waitForCustomerUserId + 27;
setCustomerIdAndLogSession = i3 % 128;
int i4 = i3 % 2;
return AFInAppEventType2;
}
class b implements Runnable {
private final i values;
b(ac acVar, i iVar, byte b) {
this(iVar);
}
private b(i iVar) {
this.values = iVar;
}
@Override
public final void run() {
ac.AFInAppEventParameterName(ac.this, this.values);
}
}
class d implements Runnable {
private final i AFInAppEventType;
d(ac acVar, i iVar, byte b) {
this(iVar);
}
private d(i iVar) {
this.AFInAppEventType = iVar;
}
@Override
public final void run() {
int i;
IOException iOException;
String str;
boolean valueOf = this.AFInAppEventType.valueOf();
if (!ac.this.isStopped()) {
Map<String, Object> values = this.AFInAppEventType.values();
String str2 = this.AFInAppEventType.onDeepLinkingNative;
int i2 = this.AFInAppEventType.onInstallConversionFailureNative;
Application application = this.AFInAppEventType.AFKeystoreWrapper;
int i3 = 0;
byte[] bArr = new byte[0];
if (!valueOf || i2 > 2) {
i = 0;
} else {
ArrayList arrayList = new ArrayList();
dd[] valueOf2 = ac.this.valueOf();
int length = valueOf2.length;
int i4 = 0;
while (i4 < length) {
dd ddVar = valueOf2[i4];
boolean z = ddVar instanceof cx;
int i5 = i3;
int i6 = AnonymousClass9.AFKeystoreWrapper[ddVar.AFInAppEventParameterName.ordinal()];
if (i6 == 1) {
if (z) {
values.put("rfr", ((cx) ddVar).valueOf);
ac.AFInAppEventType(application).edit().putBoolean(AppsFlyerProperties.NEW_REFERRER_SENT, true).apply();
}
arrayList.add(ddVar.AFInAppEventType);
} else if (i6 == 2 && i2 == 2 && !z) {
HashMap hashMap = new HashMap();
hashMap.put("source", ddVar.AFKeystoreWrapper);
hashMap.put("response", "TIMEOUT");
hashMap.putAll(new da());
arrayList.add(hashMap);
}
i4++;
i3 = i5;
}
i = i3;
if (!arrayList.isEmpty()) {
values.put("referrers", arrayList);
}
if (ac.AFKeystoreWrapper(ac.this) != null) {
values.put("fb_ddl", ac.AFKeystoreWrapper(ac.this));
}
if (ac.valueOf(ac.this) != null) {
if (ac.valueOf(ac.this).AFKeystoreWrapper()) {
List<String> values2 = ac.valueOf(ac.this).values();
if (values2 != null && !values2.isEmpty()) {
values.put("preload_id", values2);
}
} else {
values.put("preload_id", Collections.singletonList("timeout"));
}
}
}
if (!(this.AFInAppEventType instanceof ck)) {
ca init = ac.values(ac.this).init();
values.putAll(new d.C0014d(values, init.AFInAppEventType.values));
values.putAll(init.AFInAppEventParameterName());
}
try {
try {
if (this.AFInAppEventType instanceof ck) {
str = (String) values.get("af_key");
} else {
str = (String) values.get("appsflyerKey");
}
this.AFInAppEventType.AFVersionDeclaration = str;
synchronized (values) {
try {
i iVar = this.AFInAppEventType;
try {
Object[] objArr = new Object[2];
objArr[1] = str;
objArr[i] = iVar;
int i7 = i;
byte[] bArr2 = (byte[]) ((Class) com.appsflyer.internal.e.AFInAppEventParameterName((ViewConfiguration.getDoubleTapTimeout() >> 16) + 24, KeyEvent.getDeadChar(i7, i7) + 48, (char) ((SystemClock.uptimeMillis() > 0L ? 1 : (SystemClock.uptimeMillis() == 0L ? 0 : -1)) + 14196))).getMethod("AFInAppEventType", i.class, String.class).invoke(null, objArr);
try {
try {
ac acVar = ac.this;
i iVar2 = this.AFInAppEventType;
iVar2.AFLogger$LogLevel = bArr2;
ac.AFInAppEventType(acVar, iVar2);
return;
} catch (IOException e) {
iOException = e;
bArr = bArr2;
AFLogger.valueOf("Exception while sending request to server. ", iOException);
if (bArr != null && application != null && !str2.contains("&isCachedRequest=true&timeincache=")) {
ac.this.values().AFVersionDeclaration().AFInAppEventParameterName(new n(str2, bArr, "6.5.4"));
AFLogger.valueOf(iOException.getMessage(), iOException);
}
AppsFlyerRequestListener appsFlyerRequestListener = this.AFInAppEventType.AFInAppEventParameterName;
if (appsFlyerRequestListener != null) {
appsFlyerRequestListener.onError(RequestError.NETWORK_FAILURE, iOException.getMessage());
}
ac acVar2 = ac.this;
i iVar3 = this.AFInAppEventType;
cg.AFInAppEventType(acVar2, iVar3, iVar3.AFVersionDeclaration, application, ac.AFInAppEventType(application), null, iOException);
return;
}
} catch (Throwable th) {
th = th;
bArr = bArr2;
}
} catch (Throwable th2) {
Throwable cause = th2.getCause();
if (cause == null) {
throw th2;
}
throw cause;
}
} catch (Throwable th3) {
th = th3;
}
}
throw th;
} catch (IOException e2) {
iOException = e2;
}
} catch (Throwable th4) {
AFLogger.AFInAppEventParameterName(th4.getMessage(), th4);
AppsFlyerRequestListener appsFlyerRequestListener2 = this.AFInAppEventType.AFInAppEventParameterName;
if (appsFlyerRequestListener2 != null) {
appsFlyerRequestListener2.onError(RequestError.NETWORK_FAILURE, th4.getMessage());
}
}
} else {
AppsFlyerRequestListener appsFlyerRequestListener3 = this.AFInAppEventType.AFInAppEventParameterName;
if (appsFlyerRequestListener3 != null) {
appsFlyerRequestListener3.onError(RequestError.STOP_TRACKING, ba.values);
}
}
}
}
static class AnonymousClass9 {
static final int[] AFKeystoreWrapper;
static final int[] values;
static {
int[] iArr = new int[dd.d.values().length];
AFKeystoreWrapper = iArr;
try {
iArr[dd.d.FINISHED.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
AFKeystoreWrapper[dd.d.STARTED.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
int[] iArr2 = new int[AppsFlyerProperties.EmailsCryptType.values().length];
values = iArr2;
try {
iArr2[AppsFlyerProperties.EmailsCryptType.SHA256.ordinal()] = 1;
} catch (NoSuchFieldError unused3) {
}
try {
values[AppsFlyerProperties.EmailsCryptType.NONE.ordinal()] = 2;
} catch (NoSuchFieldError unused4) {
}
}
}
class e implements Runnable {
private final Application AFKeystoreWrapper;
public e(Context context) {
this.AFKeystoreWrapper = (Application) context.getApplicationContext();
}
@Override
public final void run() {
if (ac.AFInAppEventType(ac.this)) {
return;
}
ac.this.AFVersionDeclaration = System.currentTimeMillis();
ac.values(ac.this, true);
try {
try {
String devKey = AppsFlyerProperties.getInstance().getDevKey();
for (n nVar : ac.this.values().AFVersionDeclaration().AFInAppEventType()) {
StringBuilder sb = new StringBuilder("resending request: ");
sb.append(nVar.valueOf);
AFLogger.values(sb.toString());
try {
long currentTimeMillis = System.currentTimeMillis();
long parseLong = Long.parseLong(nVar.AFInAppEventParameterName, 10);
ac acVar = ac.this;
cn cnVar = new cn();
StringBuilder sb2 = new StringBuilder();
sb2.append(nVar.valueOf);
sb2.append("&isCachedRequest=true&timeincache=");
sb2.append((currentTimeMillis - parseLong) / 1000);
i AFInAppEventType = cnVar.AFInAppEventType(sb2.toString());
AFInAppEventType.AFLogger$LogLevel = nVar.AFInAppEventParameterName();
AFInAppEventType.AFVersionDeclaration = devKey;
Application application = this.AFKeystoreWrapper;
if (application != null) {
AFInAppEventType.AFKeystoreWrapper = (Application) application.getApplicationContext();
}
AFInAppEventType.init = nVar.AFInAppEventParameterName;
ac.AFInAppEventType(acVar, AFInAppEventType);
} catch (Exception e) {
AFLogger.valueOf("Failed to resend cached request", e);
}
}
} catch (Exception e2) {
AFLogger.valueOf("failed to check cache. ", e2);
}
ac.values(ac.this, false);
ac.getLevel(ac.this).shutdown();
ac.AFInAppEventParameterName(ac.this, (ScheduledExecutorService) null);
} catch (Throwable th) {
ac.values(ac.this, false);
throw th;
}
}
}
@Override
public final void setPartnerData(String str, Map<String, Object> map) {
String concat;
int i = 2 % 2;
if (this.setImeiData == null) {
this.setImeiData = new az();
}
az azVar = this.setImeiData;
if (str == null || str.isEmpty()) {
AFLogger.AppsFlyer2dXConversionCallback("Partner ID is missing or `null`");
return;
}
if (map == null || map.isEmpty()) {
if (azVar.values.remove(str) == null) {
int i2 = setCustomerIdAndLogSession + 5;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
concat = "Partner data is missing or `null`";
} else {
concat = "Cleared partner data for ".concat(String.valueOf(str));
int i4 = setCustomerIdAndLogSession + 35;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
}
AFLogger.AppsFlyer2dXConversionCallback(concat);
return;
}
StringBuilder sb = new StringBuilder("Setting partner data for ");
sb.append(str);
sb.append(": ");
sb.append(map);
AFLogger.AFInAppEventParameterName(sb.toString());
int length = new JSONObject(map).toString().length();
if (length <= 1000) {
azVar.values.put(str, map);
azVar.valueOf.remove(str);
} else {
AFLogger.AppsFlyer2dXConversionCallback("Partner data 1000 characters limit exceeded");
HashMap hashMap = new HashMap();
hashMap.put("error", "limit exceeded: ".concat(String.valueOf(length)));
azVar.valueOf.put(str, hashMap);
}
}
private void valueOf(Context context) {
int i = 2 % 2;
this.updateServerUninstallToken = new HashMap();
final long currentTimeMillis = System.currentTimeMillis();
final l.d dVar = new l.d() {
@Override
public final void valueOf(String str, String str2, String str3) {
if (str == null) {
ac.AFKeystoreWrapper(ac.this).put("link", "");
} else {
AFLogger.values("Facebook Deferred AppLink data received: ".concat(String.valueOf(str)));
ac.AFKeystoreWrapper(ac.this).put("link", str);
if (str2 != null) {
ac.AFKeystoreWrapper(ac.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);
ac.AFKeystoreWrapper(ac.this).put("extras", hashMap);
}
}
ac.AFKeystoreWrapper(ac.this).put("ttr", String.valueOf(System.currentTimeMillis() - currentTimeMillis));
}
@Override
public final void values(String str) {
ac.AFKeystoreWrapper(ac.this).put("error", str);
}
};
try {
Class.forName("com.facebook.FacebookSdk").getMethod("sdkInitialize", Context.class).invoke(null, context);
final Class<?> cls = Class.forName("com.facebook.applinks.AppLinkData");
Class<?> cls2 = Class.forName("com.facebook.applinks.AppLinkData$CompletionHandler");
Method method = cls.getMethod("fetchDeferredAppLinkData", Context.class, String.class, cls2);
Object newProxyInstance = Proxy.newProxyInstance(cls2.getClassLoader(), new Class[]{cls2}, new InvocationHandler() {
private Class valueOf;
private d values;
AnonymousClass5(final Class cls3, final d dVar2) {
r1 = cls3;
r2 = dVar2;
}
@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(r1.getMethod("getArgumentBundle", null).invoke(r1.cast(obj2), null));
if (bundle2 != null) {
str2 = bundle2.getString("com.facebook.platform.APPLINK_NATIVE_URL");
str3 = bundle2.getString("target_url");
Bundle bundle3 = bundle2.getBundle("extras");
str = (bundle3 == null || (bundle = bundle3.getBundle("deeplink_context")) == null) ? null : bundle.getString("promo_code");
} else {
str = null;
str2 = null;
str3 = null;
}
d dVar2 = r2;
if (dVar2 != null) {
dVar2.valueOf(str2, str3, str);
}
} else {
d dVar3 = r2;
if (dVar3 != null) {
dVar3.valueOf(null, null, null);
}
}
return null;
}
d dVar4 = r2;
if (dVar4 != null) {
dVar4.values("onDeferredAppLinkDataFetched invocation failed");
}
return null;
}
});
String string = context.getString(context.getResources().getIdentifier("facebook_app_id", "string", context.getPackageName()));
if (!TextUtils.isEmpty(string)) {
method.invoke(null, context, string, newProxyInstance);
return;
}
int i2 = setCustomerIdAndLogSession + 119;
waitForCustomerUserId = i2 % 128;
int i3 = i2 % 2;
dVar2.values("Facebook app id not defined in resources");
int i4 = setCustomerIdAndLogSession + 87;
waitForCustomerUserId = i4 % 128;
int i5 = i4 % 2;
} catch (ClassNotFoundException e2) {
dVar2.values(e2.toString());
} catch (IllegalAccessException e3) {
dVar2.values(e3.toString());
} catch (NoSuchMethodException e4) {
dVar2.values(e4.toString());
} catch (InvocationTargetException e5) {
dVar2.values(e5.toString());
}
}
@Override
public final void logEvent(Context context, String str, Map<String, Object> map, AppsFlyerRequestListener appsFlyerRequestListener) {
HashMap hashMap = map == null ? null : new HashMap(map);
bf bfVar = this.setCustomerUserId;
if (context != null) {
be beVar = bfVar.AFKeystoreWrapper;
if (context != null) {
beVar.values = context.getApplicationContext();
}
}
co coVar = new co();
if (context != null) {
coVar.AFKeystoreWrapper = (Application) context.getApplicationContext();
}
coVar.getLevel = str;
coVar.AFInAppEventParameterName = 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.valueOf("Parsing failed due to invalid input in 'af_touch_obj'.");
}
Map<String, ?> singletonMap = Collections.singletonMap("tch_data", hashMap2);
hashMap.remove(AFInAppEventParameterName.TOUCH_OBJ);
coVar.AFInAppEventParameterName(singletonMap);
}
coVar.values = hashMap;
values().AppsFlyer2dXConversionCallback().AFKeystoreWrapper("logEvent", str, new JSONObject(coVar.values == null ? new HashMap() : coVar.values).toString());
if (str != null) {
w.AFKeystoreWrapper(context).AFInAppEventType();
} else {
AFInAppEventParameterName(context, ch.logEvent);
}
AFKeystoreWrapper(coVar, context instanceof Activity ? (Activity) context : null);
}
@Override
public final java.lang.String getAppsFlyerUID(android.content.Context r5) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.ac.getAppsFlyerUID(android.content.Context):java.lang.String");
}
@Override
public final void setLogLevel(AFLogger.LogLevel logLevel) {
boolean z;
int i = 2 % 2;
int i2 = waitForCustomerUserId + 23;
setCustomerIdAndLogSession = i2 % 128;
if (i2 % 2 != 0) {
if (logLevel.getLevel() > AFLogger.LogLevel.NONE.getLevel()) {
int i3 = setCustomerIdAndLogSession + 29;
waitForCustomerUserId = i3 % 128;
int i4 = i3 % 2;
z = true;
} else {
z = false;
}
ak.AFInAppEventType().AFKeystoreWrapper("log", String.valueOf(z));
AppsFlyerProperties.getInstance().set("logLevel", logLevel.getLevel());
return;
}
logLevel.getLevel();
AFLogger.LogLevel.NONE.getLevel();
throw null;
}
private static String values(String str, int i) {
String str2;
char[] cArr = str;
if (str != null) {
cArr = str.toCharArray();
}
char[] cArr2 = cArr;
synchronized (dn.valueOf) {
dn.AFInAppEventType = i;
char[] cArr3 = new char[cArr2.length];
dn.values = 0;
while (dn.values < cArr2.length) {
cArr3[dn.values] = (char) ((cArr2[dn.values] ^ (dn.values * dn.AFInAppEventType)) ^ enableLocationCollection);
dn.values++;
}
str2 = new String(cArr3);
}
return str2;
}
}