Cyber Surfer v5.2.5版本的 MD5 值为:db13c5fce988de393e52d2679f934b22
以下内容为反编译后的 ac.java 源代码,内容仅作参考
package com.appsflyer.internal;
import android.content.pm.PackageManager;
import android.os.Build;
import android.text.TextUtils;
import com.amazon.aps.shared.APSAnalytics;
import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerLibCore;
import com.appsflyer.AppsFlyerProperties;
import com.appsflyer.BackgroundHttpTask;
import com.appsflyer.ServerConfigHandler;
import com.appsflyer.ServerParameters;
import com.appsflyer.internal.model.event.BackgroundEvent;
import com.appsflyer.internal.model.event.ProxyEvent;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class ac {
private static ac AFDateFormat = null;
private static String values = "https://%smonitorsdk.%s/remote-debug?app_id=";
public boolean $$a;
private int AFDeepLinkManager;
private boolean collectIntentsFromActivities;
private boolean getDataFormatter;
private JSONObject valueOf;
private boolean $$b = true;
private final List<String> dateFormatUTC = new ArrayList();
private String getInstance = "-1";
private synchronized void $$b(String str, String str2, String str3, String str4) {
try {
this.valueOf.put("sdk_version", str);
if (str2 != null && str2.length() > 0) {
this.valueOf.put(ServerParameters.DEV_KEY, str2);
}
if (str3 != null && str3.length() > 0) {
this.valueOf.put("originalAppsFlyerId", str3);
}
if (str4 != null && str4.length() > 0) {
this.valueOf.put(ServerParameters.AF_USER_ID, str4);
}
} catch (Throwable unused) {
}
}
private ac() {
this.AFDeepLinkManager = 0;
boolean z = AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.DPM, false);
this.getDataFormatter = z;
this.$$a = true ^ z;
this.AFDeepLinkManager = 0;
this.collectIntentsFromActivities = false;
}
public static ac AFDateFormat() {
if (AFDateFormat == null) {
AFDateFormat = new ac();
}
return AFDateFormat;
}
private synchronized void AFDateFormat(String str, PackageManager packageManager) {
AppsFlyerProperties appsFlyerProperties = AppsFlyerProperties.getInstance();
AppsFlyerLibCore appsFlyerLibCore = AppsFlyerLibCore.getInstance();
String string = appsFlyerProperties.getString("remote_debug_static_data");
if (string != null) {
try {
this.valueOf = new JSONObject(string);
} catch (Throwable unused) {
}
} else {
this.valueOf = new JSONObject();
values(Build.BRAND, Build.MODEL, Build.VERSION.RELEASE, appsFlyerProperties.getString(ServerParameters.ADVERTISING_ID_PARAM), appsFlyerLibCore.values, appsFlyerLibCore.$$a);
StringBuilder sb = new StringBuilder("6.2.0.");
sb.append(AppsFlyerLibCore.$$b);
$$b(sb.toString(), appsFlyerProperties.getString(AppsFlyerProperties.AF_KEY), appsFlyerProperties.getString("KSAppsFlyerId"), appsFlyerProperties.getString(ServerParameters.AF_USER_ID));
try {
int i = packageManager.getPackageInfo(str, 0).versionCode;
AFDateFormat(str, String.valueOf(i), appsFlyerProperties.getString("channel"), appsFlyerProperties.getString("preInstallName"));
} catch (Throwable unused2) {
}
appsFlyerProperties.set("remote_debug_static_data", this.valueOf.toString());
}
try {
this.valueOf.put(ServerParameters.LAUNCH_COUNTER, this.getInstance);
} catch (JSONException e) {
e.printStackTrace();
}
}
private synchronized void AFDateFormat(String str, String str2, String str3, String str4) {
if (str != null) {
try {
if (str.length() > 0) {
this.valueOf.put("app_id", str);
}
} catch (Throwable unused) {
return;
}
}
if (str2 != null && str2.length() > 0) {
this.valueOf.put("app_version", str2);
}
if (str3 != null && str3.length() > 0) {
this.valueOf.put("channel", str3);
}
if (str4 != null && str4.length() > 0) {
this.valueOf.put("preInstall", str4);
}
}
private synchronized String dateFormatUTC() {
String str;
try {
this.valueOf.put("data", new JSONArray((Collection) this.dateFormatUTC));
str = this.valueOf.toString();
try {
getInstance();
} catch (JSONException unused) {
}
} catch (JSONException unused2) {
str = null;
}
return str;
}
private boolean getDataFormatter() {
if (this.$$a) {
return this.$$b || this.collectIntentsFromActivities;
}
return false;
}
private synchronized void getInstance() {
this.dateFormatUTC.clear();
this.AFDeepLinkManager = 0;
}
public static void values(String str, PackageManager packageManager) {
try {
if (AFDateFormat == null) {
AFDateFormat = new ac();
}
AFDateFormat.AFDateFormat(str, packageManager);
if (AFDateFormat == null) {
AFDateFormat = new ac();
}
BackgroundEvent trackingStopped = new ProxyEvent().body(AFDateFormat.dateFormatUTC()).trackingStopped(AppsFlyerLib.getInstance().isStopped());
StringBuilder sb = new StringBuilder();
sb.append(ServerConfigHandler.getUrl(values));
sb.append(str);
new BackgroundHttpTask((BackgroundEvent) trackingStopped.urlString(sb.toString())).execute();
} catch (Throwable th) {
AFLogger.afErrorLog(th);
}
}
private synchronized void values(String str, String str2, String str3, String str4, String str5, String str6) {
try {
this.valueOf.put(ServerParameters.BRAND, str);
this.valueOf.put(ServerParameters.MODEL, str2);
this.valueOf.put("platform", APSAnalytics.OS_NAME);
this.valueOf.put("platform_version", str3);
if (str4 != null && str4.length() > 0) {
this.valueOf.put(ServerParameters.ADVERTISING_ID_PARAM, str4);
}
if (str5 != null && str5.length() > 0) {
this.valueOf.put(ServerParameters.IMEI, str5);
}
if (str6 != null && str6.length() > 0) {
this.valueOf.put("android_id", str6);
}
} catch (Throwable unused) {
}
}
public static String[] values(String str, StackTraceElement[] stackTraceElementArr) {
if (stackTraceElementArr == null) {
return new String[]{str};
}
String[] strArr = new String[stackTraceElementArr.length + 1];
strArr[0] = str;
for (int i = 1; i < stackTraceElementArr.length; i++) {
strArr[i] = stackTraceElementArr[i].toString();
}
return strArr;
}
public final synchronized void $$a() {
AFDateFormat("r_debugging_off", new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ", Locale.ENGLISH).format(Long.valueOf(System.currentTimeMillis())), new String[0]);
this.collectIntentsFromActivities = false;
this.$$b = false;
}
public final synchronized void $$a(String str) {
this.getInstance = str;
}
public final synchronized void $$b() {
this.collectIntentsFromActivities = true;
AFDateFormat("r_debugging_on", new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ", Locale.ENGLISH).format(Long.valueOf(System.currentTimeMillis())), new String[0]);
}
public final synchronized void AFDateFormat(String str, String str2, String... strArr) {
String obj;
if (getDataFormatter()) {
if (this.AFDeepLinkManager < 98304) {
try {
long currentTimeMillis = System.currentTimeMillis();
String join = TextUtils.join(", ", strArr);
if (str != null) {
StringBuilder sb = new StringBuilder();
sb.append(currentTimeMillis);
sb.append(" ");
sb.append(Thread.currentThread().getId());
sb.append(" _/AppsFlyer_6.2.0 [");
sb.append(str);
sb.append("] ");
sb.append(str2);
sb.append(" ");
sb.append(join);
obj = sb.toString();
} else {
StringBuilder sb2 = new StringBuilder();
sb2.append(currentTimeMillis);
sb2.append(" ");
sb2.append(Thread.currentThread().getId());
sb2.append(" ");
sb2.append(str2);
sb2.append("/AppsFlyer_6.2.0 ");
sb2.append(join);
obj = sb2.toString();
}
this.dateFormatUTC.add(obj);
this.AFDeepLinkManager += obj.length() << 1;
} catch (Throwable unused) {
}
}
}
}
public final boolean collectIntentsFromActivities() {
return this.collectIntentsFromActivities;
}
public final synchronized void valueOf() {
this.$$b = false;
getInstance();
}
public final synchronized void values() {
this.valueOf = null;
AFDateFormat = null;
}
}