Roblox v2.616.655版本的 MD5 值为:0bc7d8a921fe7f043454ac7c31685936
以下内容为反编译后的 bb.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.os.Build;
import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerProperties;
import com.appsflyer.FirebaseMessagingServiceListener;
import com.appsflyer.internal.d;
import java.lang.ref.WeakReference;
import java.net.HttpURLConnection;
import java.text.SimpleDateFormat;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
public final class bb extends bf {
private static String onDeepLinkingNative;
private final SharedPreferences onInstallConversionDataLoadedNative;
static {
StringBuilder sb2 = new StringBuilder("https://%sregister.%s/api/v");
sb2.append(ae.AFKeystoreWrapper);
onDeepLinkingNative = sb2.toString();
}
public bb(Context context) {
super(null, r0.toString(), null, null, null, context);
StringBuilder sb2 = new StringBuilder();
sb2.append(String.format(onDeepLinkingNative, AppsFlyerLib.getInstance().getHostPrefix(), ae.values().getHostName()));
sb2.append(context.getPackageName());
this.onInstallConversionDataLoadedNative = ae.values(context);
}
public static boolean AFInAppEventParameterName(SharedPreferences sharedPreferences) {
return sharedPreferences.getBoolean("sentRegisterRequestToAF", false);
}
public static boolean values(Context context) {
if (AppsFlyerLib.getInstance().isStopped()) {
return false;
}
try {
Class.forName("com.google.firebase.messaging.FirebaseMessagingService");
} catch (ClassNotFoundException unused) {
} catch (Throwable th) {
AFLogger.AFInAppEventType("An error occurred while trying to verify manifest declarations: ", th);
}
return aa.AFInAppEventParameterName(context, new Intent("com.google.firebase.MESSAGING_EVENT", null, context, FirebaseMessagingServiceListener.class));
}
public void AFInAppEventType(String str) {
Application application = this.valueOf;
final ae values = ae.values();
if (ae.valueOf()) {
AFLogger.AFInAppEventType("CustomerUserId not set, Tracking is disabled", true);
return;
}
String AFKeystoreWrapper = ae.AFKeystoreWrapper(AppsFlyerProperties.AF_KEY);
if (AFKeystoreWrapper == null) {
AFLogger.init("[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 j10 = packageInfo.firstInstallTime;
this.AFInAppEventType.put("installDate", ae.AFInAppEventParameterName(new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US), j10));
} catch (Throwable th) {
AFLogger.AFInAppEventType("Exception while collecting application version info.", th);
}
ae.valueOf(application, this.AFInAppEventType);
String string = AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.APP_USER_ID);
if (string != null) {
this.AFInAppEventType.put("appUserId", string);
}
try {
this.AFInAppEventType.put("model", Build.MODEL);
this.AFInAppEventType.put("brand", Build.BRAND);
} catch (Throwable th2) {
AFLogger.AFInAppEventType("Exception while collecting device brand and model.", th2);
}
if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, false)) {
this.AFInAppEventType.put(AppsFlyerProperties.DEVICE_TRACKING_DISABLED, "true");
}
d.e.C0080d AFInAppEventParameterName = ab.AFInAppEventParameterName(application.getContentResolver());
if (AFInAppEventParameterName != null) {
this.AFInAppEventType.put("amazon_aid", AFInAppEventParameterName.values);
this.AFInAppEventType.put("amazon_aid_limit", String.valueOf(AFInAppEventParameterName.valueOf));
}
String string2 = AppsFlyerProperties.getInstance().getString("advertiserId");
if (string2 != null) {
this.AFInAppEventType.put("advertiserId", string2);
}
this.AFInAppEventType.put("devkey", AFKeystoreWrapper);
this.AFInAppEventType.put("uid", an.AFKeystoreWrapper(new WeakReference(application)));
this.AFInAppEventType.put("af_gcm_token", str);
this.AFInAppEventType.put("launch_counter", Integer.toString(ae.valueOf(this.onInstallConversionDataLoadedNative, "appsFlyerCount", false)));
this.AFInAppEventType.put("sdk", Integer.toString(Build.VERSION.SDK_INT));
String valueOf = values.valueOf(application);
if (valueOf != null) {
this.AFInAppEventType.put(AppsFlyerProperties.CHANNEL, valueOf);
}
new Thread(new Runnable() {
@Override
public final void run() {
try {
bb bbVar = bb.this;
bbVar.onConversionDataFail = values.isStopped();
HttpURLConnection AFInAppEventType = new m(bbVar).AFInAppEventType();
if (AFInAppEventType != null) {
if (AFInAppEventType.getResponseCode() == 200) {
bb.AFInAppEventType(bb.this);
}
AFInAppEventType.disconnect();
}
} catch (Throwable th3) {
AFLogger.AFInAppEventType(th3.getMessage(), th3);
}
}
}).start();
}
public final void valueOf(String str) {
if (str != null) {
AFLogger.AFKeystoreWrapper("Firebase Refreshed Token = ".concat(str));
l valueOf = valueOf();
if (valueOf == null || !str.equals(valueOf.values)) {
long currentTimeMillis = System.currentTimeMillis();
boolean z10 = ae.values(this.onInstallConversionDataLoadedNative) && (valueOf == null || currentTimeMillis - valueOf.valueOf > TimeUnit.SECONDS.toMillis(2L));
AFInAppEventParameterName(new l(str, currentTimeMillis, !z10));
if (z10) {
AFInAppEventType(str);
}
}
}
}
private void AFInAppEventParameterName(l lVar) {
this.onInstallConversionDataLoadedNative.edit().putString("afUninstallToken", lVar.values).putLong("afUninstallToken_received_time", lVar.valueOf).putBoolean("afUninstallToken_queued", lVar.AFInAppEventParameterName()).apply();
}
public l valueOf() {
String string;
String string2;
String string3 = this.onInstallConversionDataLoadedNative.getString("afUninstallToken", null);
long j10 = this.onInstallConversionDataLoadedNative.getLong("afUninstallToken_received_time", 0L);
boolean z10 = this.onInstallConversionDataLoadedNative.getBoolean("afUninstallToken_queued", false);
this.onInstallConversionDataLoadedNative.edit().putBoolean("afUninstallToken_queued", false).apply();
if (string3 == null && (string2 = AppsFlyerProperties.getInstance().getString("afUninstallToken")) != null) {
String[] split = string2.split(",");
string3 = split[split.length - 1];
}
if (j10 == 0 && (string = AppsFlyerProperties.getInstance().getString("afUninstallToken")) != null) {
String[] split2 = string.split(",");
if (split2.length >= 2) {
try {
j10 = Long.parseLong(split2[split2.length - 2]);
} catch (NumberFormatException unused) {
}
}
}
if (string3 != null) {
return new l(string3, j10, z10);
}
return null;
}
static void AFInAppEventType(bb bbVar) {
bbVar.onInstallConversionDataLoadedNative.edit().putBoolean("sentRegisterRequestToAF", true).apply();
AFLogger.values("Successfully registered for Uninstall Tracking");
}
}