正在查看: Mint v5.7.3 应用的 bb.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mint v5.7.3 应用的 bb.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.os.Build;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerProperties;
import com.appsflyer.FirebaseMessagingServiceListener;
import com.appsflyer.internal.d;
import com.google.firebase.messaging.FirebaseMessagingService;
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 bb extends bf {
@VisibleForTesting
private static String onDeepLinkingNative;
private final SharedPreferences onInstallConversionDataLoadedNative;
static {
StringBuilder sb = new StringBuilder("https://%sregister.%s/api/v");
sb.append(ae.AFKeystoreWrapper);
onDeepLinkingNative = sb.toString();
}
public bb(@androidx.annotation.NonNull android.content.Context r8) {
throw new UnsupportedOperationException("Method not decompiled: com.appsflyer.internal.bb.<init>(android.content.Context):void");
}
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 static boolean AFInAppEventParameterName(@NonNull SharedPreferences sharedPreferences) {
return sharedPreferences.getBoolean("sentRegisterRequestToAF", false);
}
static void AFInAppEventType(bb bbVar) {
bbVar.onInstallConversionDataLoadedNative.edit().putBoolean("sentRegisterRequestToAF", true).apply();
AFLogger.values("Successfully registered for Uninstall Tracking");
}
public static boolean values(Context context) {
if (AppsFlyerLib.getInstance().isStopped()) {
return false;
}
try {
String str = FirebaseMessagingService.ACTION_DIRECT_BOOT_REMOTE_INTENT;
} 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 j2 = packageInfo.firstInstallTime;
this.AFInAppEventType.put("installDate", ae.AFInAppEventParameterName(new SimpleDateFormat("yyyy-MM-dd_HHmmssZ", Locale.US), j2));
} catch (Throwable th) {
AFLogger.AFInAppEventType("Exception while collecting application version info.", th);
}
ae.valueOf(application, (Map<String, ? super String>) 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.C0036d 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();
}
@Nullable
public l valueOf() {
String string;
String string2;
String string3 = this.onInstallConversionDataLoadedNative.getString("afUninstallToken", null);
long j2 = this.onInstallConversionDataLoadedNative.getLong("afUninstallToken_received_time", 0L);
boolean z2 = this.onInstallConversionDataLoadedNative.getBoolean("afUninstallToken_queued", false);
this.onInstallConversionDataLoadedNative.edit().putBoolean("afUninstallToken_queued", false).apply();
if (string3 == null && (string2 = AppsFlyerProperties.getInstance().getString("afUninstallToken")) != null) {
string3 = string2.split(",")[r0.length - 1];
}
if (j2 == 0 && (string = AppsFlyerProperties.getInstance().getString("afUninstallToken")) != null) {
String[] split = string.split(",");
if (split.length >= 2) {
try {
j2 = Long.parseLong(split[split.length - 2]);
} catch (NumberFormatException unused) {
}
}
}
if (string3 != null) {
return new l(string3, j2, z2);
}
return null;
}
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 z2 = ae.values(this.onInstallConversionDataLoadedNative) && (valueOf == null || currentTimeMillis - valueOf.valueOf > TimeUnit.SECONDS.toMillis(2L));
AFInAppEventParameterName(new l(str, currentTimeMillis, !z2));
if (z2) {
AFInAppEventType(str);
}
}
}
}
}