Apk Done v1.0版本的 MD5 值为:44cfb8e1ce639995aa7f0de6a3a6388b
以下内容为反编译后的 ApmHelper.java 源代码,内容仅作参考
package com.bytedance.sdk.openadsdk;
import android.content.Context;
import android.os.Build;
import android.text.TextUtils;
import com.amazon.aps.shared.APSAnalytics;
import com.apm.insight.MonitorCrash;
import com.bytedance.sdk.component.utils.l;
import com.bytedance.sdk.openadsdk.core.j;
import com.bytedance.sdk.openadsdk.core.j.e;
import com.bytedance.sdk.openadsdk.core.o;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class ApmHelper {
private static boolean a = false;
private static String b;
private static boolean c;
public static void initApm(Context context, TTAdConfig tTAdConfig) {
if (a) {
return;
}
e h = o.h();
boolean y = h.y();
c = y;
if (!y || TextUtils.isEmpty(h.p())) {
return;
}
b = tTAdConfig.getAppId();
String[] strArr = {"com.bytedance.sdk", "com.com.bytedance.overseas.sdk", "com.pgl.sys.ces", "com.bykv.vk"};
String a2 = j.a(context);
String p = h.p();
try {
MonitorCrash initSDK = MonitorCrash.initSDK(context, "10000001", 4252L, "4.2.5.2", strArr);
initSDK.config().setDeviceId(a2);
initSDK.setReportUrl(p);
initSDK.addTags("host_appid", b);
initSDK.addTags("sdk_version", "4.2.5.2");
a = true;
b(a2, p);
} catch (Throwable unused) {
l.d("ApmHelper", "init Apm fail or not include Apm module");
a = false;
}
}
private static void a(String str, String str2) {
if (TextUtils.isEmpty(str2)) {
return;
}
o.f().a(a(str), "https://" + str2 + "/monitor/collect/c/session?version_code=" + BuildConfig.VERSION_CODE + "&device_platform=android&aid=10000001");
}
private static void b(String str, String str2) {
a(str, str2);
}
public static void reportPvFromBackGround() {
if (c) {
a(j.a(o.a()), o.h().p());
}
}
private static JSONObject a(String str) {
JSONObject jSONObject = new JSONObject();
JSONObject jSONObject2 = new JSONObject();
JSONObject jSONObject3 = new JSONObject();
try {
jSONObject3.put("sdk_version", "4.2.5.2");
jSONObject3.put("host_app_id", b);
jSONObject2.putOpt("custom", jSONObject3);
jSONObject2.put("os", APSAnalytics.OS_NAME);
jSONObject2.put("os_version", Build.VERSION.RELEASE);
jSONObject2.put("device_model", Build.MODEL);
jSONObject2.put("device_brand", Build.BRAND);
jSONObject2.put("sdk_version_name", "0.0.5");
jSONObject2.put("channel", "release");
jSONObject2.put("aid", "10000001");
jSONObject2.put("update_version_code", BuildConfig.VERSION_CODE);
jSONObject2.put("bd_did", str);
jSONObject.putOpt("header", jSONObject2);
jSONObject.putOpt("local_time", Long.valueOf(System.currentTimeMillis()));
JSONArray jSONArray = new JSONArray();
jSONArray.put(new JSONObject().put("local_time_ms", System.currentTimeMillis()));
jSONObject.putOpt("launch", jSONArray);
} catch (JSONException e) {
l.e("ApmHelper", e.getMessage());
}
return jSONObject;
}
public static boolean isIsInit() {
return a;
}
}