正在查看: Brevistay v5.8.2 应用的 cd.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Brevistay v5.8.2 应用的 cd.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.appsflyer.internal;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.PointF;
import android.os.Build;
import android.text.TextUtils;
import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerProperties;
import com.appsflyer.FirebaseMessagingServiceListener;
import com.appsflyer.internal.an;
import java.lang.ref.WeakReference;
import java.net.HttpURLConnection;
import java.text.SimpleDateFormat;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.TimeUnit;
public final class cd extends cm {
private static int onAppOpenAttribution = 0;
private static String onAttributionFailureNative = null;
private static char onConversionDataFail = 0;
private static char[] onResponseErrorNative = null;
private static int onResponseNative = 1;
private final bv onAppOpenAttributionNative;
private final SharedPreferences onInstallConversionDataLoadedNative;
static void AFVersionDeclaration() {
onResponseErrorNative = new char[]{'b', 'r', 'a', 'n', 'd', 'c', 'e', 'f', 'g'};
onConversionDataFail = (char) 3;
}
static void valueOf(cd cdVar) {
int i = 2 % 2;
int i2 = onResponseNative + 47;
onAppOpenAttribution = i2 % 128;
int i3 = i2 % 2;
cdVar.init();
if (i3 == 0) {
return;
}
Object obj = null;
super.hashCode();
throw null;
}
static {
AFVersionDeclaration();
StringBuilder sb = new StringBuilder("https://%sregister.%s/api/v");
sb.append(ac.values);
onAttributionFailureNative = sb.toString();
int i = onAppOpenAttribution + 3;
onResponseNative = i % 128;
if (i % 2 != 0) {
return;
}
Object obj = null;
super.hashCode();
throw null;
}
public cd(android.content.Context r10) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.cd.<init>(android.content.Context):void");
}
public static boolean AFKeystoreWrapper(Context context) {
int i = 2 % 2;
if (!AppsFlyerLib.getInstance().isStopped()) {
try {
Class.forName("com.google.firebase.messaging.FirebaseMessagingService");
if (z.AFKeystoreWrapper(context, new Intent("com.google.firebase.MESSAGING_EVENT", null, context, FirebaseMessagingServiceListener.class))) {
int i2 = onAppOpenAttribution + 81;
onResponseNative = i2 % 128;
int i3 = i2 % 2;
return true;
}
} catch (ClassNotFoundException unused) {
} catch (Throwable th) {
AFLogger.valueOf("An error occurred while trying to verify manifest declarations: ", th);
}
return false;
}
int i4 = onResponseNative;
int i5 = i4 + 53;
onAppOpenAttribution = i5 % 128;
int i6 = i5 % 2;
int i7 = i4 + 15;
onAppOpenAttribution = i7 % 128;
int i8 = i7 % 2;
return false;
}
public static boolean AFInAppEventType(SharedPreferences sharedPreferences) {
int i = 2 % 2;
int i2 = onAppOpenAttribution + 9;
onResponseNative = i2 % 128;
int i3 = i2 % 2;
return sharedPreferences.getBoolean("sentRegisterRequestToAF", false);
}
public final void AFInAppEventParameterName(String str) {
if (str != null) {
AFLogger.values("Firebase Refreshed Token = ".concat(String.valueOf(str)));
am onInstallConversionDataLoadedNative = onInstallConversionDataLoadedNative();
if (onInstallConversionDataLoadedNative == null || !str.equals(onInstallConversionDataLoadedNative.AFInAppEventType)) {
long currentTimeMillis = System.currentTimeMillis();
boolean z = ac.AFInAppEventType(this.onInstallConversionDataLoadedNative) && (onInstallConversionDataLoadedNative == null || currentTimeMillis - onInstallConversionDataLoadedNative.AFKeystoreWrapper > TimeUnit.SECONDS.toMillis(2L));
values(new am(str, currentTimeMillis, !z));
if (z) {
AFKeystoreWrapper(str);
}
}
}
}
public final void AFKeystoreWrapper() {
int i = 2 % 2;
am onInstallConversionDataLoadedNative = onInstallConversionDataLoadedNative();
Object obj = null;
if (onInstallConversionDataLoadedNative != null) {
int i2 = onAppOpenAttribution + 83;
onResponseNative = i2 % 128;
int i3 = i2 % 2;
if (onInstallConversionDataLoadedNative.values()) {
int i4 = onAppOpenAttribution + 15;
onResponseNative = i4 % 128;
if (i4 % 2 == 0) {
String str = onInstallConversionDataLoadedNative.AFInAppEventType;
AFLogger.AFInAppEventParameterName("Resending Uninstall token to AF servers: ".concat(String.valueOf(str)));
AFKeystoreWrapper(str);
super.hashCode();
throw null;
}
String str2 = onInstallConversionDataLoadedNative.AFInAppEventType;
AFLogger.AFInAppEventParameterName("Resending Uninstall token to AF servers: ".concat(String.valueOf(str2)));
AFKeystoreWrapper(str2);
}
}
int i5 = onResponseNative + 79;
onAppOpenAttribution = i5 % 128;
if (i5 % 2 == 0) {
return;
}
super.hashCode();
throw null;
}
private void init() {
bv bvVar;
boolean z;
int i = 2 % 2;
int i2 = onAppOpenAttribution + 89;
onResponseNative = i2 % 128;
if (i2 % 2 == 0) {
bvVar = this.onAppOpenAttributionNative;
z = false;
} else {
bvVar = this.onAppOpenAttributionNative;
z = true;
}
bvVar.AFInAppEventType("sentRegisterRequestToAF", z);
AFLogger.AFInAppEventParameterName("Successfully registered for Uninstall Tracking");
int i3 = onAppOpenAttribution + 79;
onResponseNative = i3 % 128;
int i4 = i3 % 2;
}
private am onInstallConversionDataLoadedNative() {
String string;
String string2;
int i = 2 % 2;
Object obj = null;
String string3 = this.onInstallConversionDataLoadedNative.getString("afUninstallToken", null);
long j = this.onInstallConversionDataLoadedNative.getLong("afUninstallToken_received_time", 0L);
boolean z = this.onInstallConversionDataLoadedNative.getBoolean("afUninstallToken_queued", false);
this.onAppOpenAttributionNative.AFInAppEventType("afUninstallToken_queued", false);
if (string3 == null && (string2 = AppsFlyerProperties.getInstance().getString("afUninstallToken")) != null) {
string3 = string2.split(",")[r1.length - 1];
}
if (j == 0 && (string = AppsFlyerProperties.getInstance().getString("afUninstallToken")) != null) {
int i2 = onResponseNative + 125;
onAppOpenAttribution = i2 % 128;
int i3 = i2 % 2;
String[] split = string.split(",");
if (split.length >= 2) {
int i4 = onAppOpenAttribution + 81;
onResponseNative = i4 % 128;
int i5 = i4 % 2;
try {
j = Long.parseLong(split[split.length - 2]);
} catch (NumberFormatException unused) {
}
}
}
if (string3 == null) {
return null;
}
am amVar = new am(string3, j, z);
int i6 = onAppOpenAttribution + 35;
onResponseNative = i6 % 128;
if (i6 % 2 != 0) {
return amVar;
}
super.hashCode();
throw null;
}
private void values(am amVar) {
int i = 2 % 2;
int i2 = onResponseNative + 115;
onAppOpenAttribution = i2 % 128;
int i3 = i2 % 2;
this.onInstallConversionDataLoadedNative.edit().putString("afUninstallToken", amVar.AFInAppEventType).putLong("afUninstallToken_received_time", amVar.AFKeystoreWrapper).putBoolean("afUninstallToken_queued", amVar.values()).apply();
int i4 = onAppOpenAttribution + 63;
onResponseNative = i4 % 128;
if (i4 % 2 == 0) {
throw null;
}
}
private void AFKeystoreWrapper(String str) {
int i = 2 % 2;
int i2 = onAppOpenAttribution + 101;
onResponseNative = i2 % 128;
int i3 = i2 % 2;
Application application = this.AFKeystoreWrapper;
final ac AFInAppEventParameterName = ac.AFInAppEventParameterName();
if (AFInAppEventParameterName.AFKeystoreWrapper()) {
AFLogger.values("CustomerUserId not set, Tracking is disabled", true);
return;
}
String devKey = AppsFlyerProperties.getInstance().getDevKey();
if (devKey == null) {
AFLogger.AppsFlyer2dXConversionCallback("[registerUninstall] AppsFlyer's SDK cannot send any event without providing DevKey.");
return;
}
PackageManager packageManager = application.getPackageManager();
try {
PackageInfo packageInfo = packageManager.getPackageInfo(application.getPackageName(), 0);
this.AFInAppEventType.put("app_version_code", Integer.toString(packageInfo.versionCode));
this.AFInAppEventType.put("app_version_name", packageInfo.versionName);
this.AFInAppEventType.put("app_name", packageManager.getApplicationLabel(packageInfo.applicationInfo).toString());
long j = packageInfo.firstInstallTime;
this.AFInAppEventType.put("installDate", ac.valueOf(new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US), j));
} catch (Throwable th) {
AFLogger.valueOf("Exception while collecting application version info.", th);
}
ac.AFInAppEventType(application, (Map<String, ? super String>) this.AFInAppEventType);
String AFInAppEventType = ac.AFInAppEventType();
if (AFInAppEventType != null) {
this.AFInAppEventType.put("appUserId", AFInAppEventType);
}
try {
this.AFInAppEventType.put("model", Build.MODEL);
this.AFInAppEventType.put(AFKeystoreWrapper((PointF.length(0.0f, 0.0f) > 0.0f ? 1 : (PointF.length(0.0f, 0.0f) == 0.0f ? 0 : -1)) + 5, (byte) (95 - TextUtils.lastIndexOf("", '0')), "\u0001\u0002\u0000\u0005Ä").intern(), Build.BRAND);
} catch (Throwable th2) {
AFLogger.valueOf("Exception while collecting device brand and model.", th2);
}
if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, false)) {
int i4 = onResponseNative + 77;
onAppOpenAttribution = i4 % 128;
if (i4 % 2 != 0) {
this.AFInAppEventType.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
int i5 = 93 / 0;
} else {
this.AFInAppEventType.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
}
}
g AFInAppEventType2 = ab.AFInAppEventType(application.getContentResolver());
if (AFInAppEventType2 != null) {
this.AFInAppEventType.put("amazon_aid", AFInAppEventType2.values);
this.AFInAppEventType.put("amazon_aid_limit", String.valueOf(AFInAppEventType2.AFKeystoreWrapper));
}
String string = AppsFlyerProperties.getInstance().getString("advertiserId");
if (string != null) {
int i6 = onAppOpenAttribution + 1;
onResponseNative = i6 % 128;
if (i6 % 2 == 0) {
this.AFInAppEventType.put("advertiserId", string);
int i7 = 55 / 0;
} else {
this.AFInAppEventType.put("advertiserId", string);
}
}
this.AFInAppEventType.put("devkey", devKey);
this.AFInAppEventType.put("uid", af.valueOf(new WeakReference(application)));
this.AFInAppEventType.put("af_gcm_token", str);
this.AFInAppEventType.put("launch_counter", Integer.toString(AFInAppEventParameterName.valueOf(this.onInstallConversionDataLoadedNative, false)));
this.AFInAppEventType.put("sdk", Integer.toString(Build.VERSION.SDK_INT));
String AFInAppEventParameterName2 = AFInAppEventParameterName.AFInAppEventParameterName(application);
if (AFInAppEventParameterName2 != null) {
this.AFInAppEventType.put(AppsFlyerProperties.CHANNEL, AFInAppEventParameterName2);
}
new Thread(new Runnable() {
@Override
public final void run() {
try {
cd cdVar = cd.this;
cdVar.onConversionDataSuccess = AFInAppEventParameterName.isStopped();
HttpURLConnection values = new an.c(cdVar).values();
if (values != null) {
if (values.getResponseCode() == 200) {
cd.valueOf(cd.this);
}
values.disconnect();
}
} catch (Throwable th3) {
AFLogger.valueOf(th3.getMessage(), th3);
}
}
}).start();
}
private static String AFKeystoreWrapper(int i, byte b, String str) {
String str2;
char[] cArr = str;
if (str != null) {
cArr = str.toCharArray();
}
char[] cArr2 = cArr;
synchronized (Cdo.AFVersionDeclaration) {
char[] cArr3 = onResponseErrorNative;
char c = onConversionDataFail;
char[] cArr4 = new char[i];
if (i % 2 != 0) {
i--;
cArr4[i] = (char) (cArr2[i] - b);
}
if (i > 1) {
Cdo.values = 0;
while (Cdo.values < i) {
Cdo.AFInAppEventType = cArr2[Cdo.values];
Cdo.valueOf = cArr2[Cdo.values + 1];
if (Cdo.AFInAppEventType == Cdo.valueOf) {
cArr4[Cdo.values] = (char) (Cdo.AFInAppEventType - b);
cArr4[Cdo.values + 1] = (char) (Cdo.valueOf - b);
} else {
Cdo.AFKeystoreWrapper = Cdo.AFInAppEventType / c;
Cdo.init = Cdo.AFInAppEventType % c;
Cdo.AFInAppEventParameterName = Cdo.valueOf / c;
Cdo.getLevel = Cdo.valueOf % c;
if (Cdo.init == Cdo.getLevel) {
Cdo.AFKeystoreWrapper = ((Cdo.AFKeystoreWrapper + c) - 1) % c;
Cdo.AFInAppEventParameterName = ((Cdo.AFInAppEventParameterName + c) - 1) % c;
int i2 = (Cdo.AFKeystoreWrapper * c) + Cdo.init;
int i3 = (Cdo.AFInAppEventParameterName * c) + Cdo.getLevel;
cArr4[Cdo.values] = cArr3[i2];
cArr4[Cdo.values + 1] = cArr3[i3];
} else if (Cdo.AFKeystoreWrapper == Cdo.AFInAppEventParameterName) {
Cdo.init = ((Cdo.init + c) - 1) % c;
Cdo.getLevel = ((Cdo.getLevel + c) - 1) % c;
int i4 = (Cdo.AFKeystoreWrapper * c) + Cdo.init;
int i5 = (Cdo.AFInAppEventParameterName * c) + Cdo.getLevel;
cArr4[Cdo.values] = cArr3[i4];
cArr4[Cdo.values + 1] = cArr3[i5];
} else {
int i6 = (Cdo.AFKeystoreWrapper * c) + Cdo.getLevel;
int i7 = (Cdo.AFInAppEventParameterName * c) + Cdo.init;
cArr4[Cdo.values] = cArr3[i6];
cArr4[Cdo.values + 1] = cArr3[i7];
}
}
Cdo.values += 2;
}
}
str2 = new String(cArr4);
}
return str2;
}
}