我要上王者 v1.1版本的 MD5 值为:b7d3566522def961cabeb92cb17f5db9
以下内容为反编译后的 x.java 源代码,内容仅作参考
package com.bytedance.sdk.openadsdk.api.plugin;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Pair;
import com.anythink.expressad.advanced.js.NativeAdvancedJsUtils;
import com.anythink.expressad.foundation.d.c;
import com.bytedance.sdk.openadsdk.AdConfig;
import com.bytedance.sdk.openadsdk.TTAdManager;
import com.bytedance.sdk.openadsdk.TTAdSdk;
import com.bytedance.sdk.openadsdk.TTAppContextHolder;
import com.bytedance.sdk.openadsdk.TTCustomController;
import com.bytedance.sdk.openadsdk.tc.Cif;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
final class x {
private static SharedPreferences x;
private static final List<Pair<String, JSONObject>> z = new CopyOnWriteArrayList();
static final Map<String, String> f60if = new HashMap();
public static void m98if(int i, String str, long j) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.putOpt("duration", Long.valueOf(j));
jSONObject.putOpt("code", Integer.valueOf(i));
jSONObject.putOpt("message", str);
} catch (JSONException e) {
e.printStackTrace();
}
tc("plugin_load_failed", jSONObject);
}
public static void m100if(String str, JSONObject jSONObject) {
j("zeus_".concat(String.valueOf(str)), jSONObject);
}
public static void m97if() {
List<Pair<String, JSONObject>> list = z;
if (list.size() <= 0) {
return;
}
try {
for (Pair<String, JSONObject> pair : list) {
if (pair != null) {
j((String) pair.first, (JSONObject) pair.second);
}
}
z.clear();
} catch (Exception unused) {
}
}
private static void j(String str, JSONObject jSONObject) {
if (jSONObject == null) {
return;
}
TTAdManager adManager = TTAdSdk.getAdManager();
if (adManager != null) {
Bundle bundle = new Bundle();
bundle.putInt(NativeAdvancedJsUtils.p, 1);
bundle.putString("event_name", str);
bundle.putString("event_extra", jSONObject.toString());
adManager.getExtra(Bundle.class, bundle);
return;
}
tc(str, jSONObject);
}
private static void tc(final String str, final JSONObject jSONObject) {
Cif.m250if().x(new Runnable() {
@Override
public void run() {
ArrayList arrayList = new ArrayList();
arrayList.add(x.r(str, jSONObject));
x.x(arrayList);
}
});
}
public static JSONObject r(String str, JSONObject jSONObject) {
String str2 = "5.6.1.6";
JSONObject jSONObject2 = new JSONObject();
try {
jSONObject.put("os_api", Build.VERSION.SDK_INT);
jSONObject.put("support_abi", Arrays.toString(Build.VERSION.SDK_INT >= 21 ? Build.SUPPORTED_ABIS : new String[]{Build.CPU_ABI, Build.CPU_ABI2}));
jSONObject2.put("ad_sdk_version", "5.6.1.6");
String m79if = j.m79if("com.byted.pangle.m");
if (!TextUtils.isEmpty(m79if)) {
str2 = m79if;
}
jSONObject2.put(PluginConstants.KEY_PLUGIN_VERSION, str2);
jSONObject2.put(c.o, System.currentTimeMillis() / 1000);
jSONObject2.put("is_plugin", true);
Map<String, String> map = f60if;
jSONObject.put("appid", map.get("appid"));
jSONObject2.put("event_extra", jSONObject != null ? jSONObject.toString() : "");
jSONObject2.put("type", str);
JSONObject jSONObject3 = new JSONObject();
jSONObject3.put("model", Build.MODEL);
jSONObject3.put("vendor", Build.MANUFACTURER);
jSONObject3.put("imei", map.get("imei"));
jSONObject3.put("oaid", map.get("oaid"));
jSONObject2.put("device_info", jSONObject3);
} catch (JSONException unused) {
}
return jSONObject2;
}
public static void x(String str, JSONObject jSONObject) {
z.add(new Pair<>(str, jSONObject));
}
public static void x(List<JSONObject> list) {
if (list == null) {
return;
}
if (x == null) {
x = TTAppContextHolder.getContext().getSharedPreferences("tt_sdk_settings_other", 0);
}
String format = String.format("https://%s%s", x.getString("url_alog", "api-access.pangolin-sdk-toutiao.com"), "/api/ad/union/sdk/stats/batch/");
JSONObject jSONObject = new JSONObject();
try {
List<Pair<String, JSONObject>> list2 = z;
if (list2.size() > 0) {
for (Pair<String, JSONObject> pair : list2) {
list.add(r((String) pair.first, (JSONObject) pair.second));
}
z.clear();
}
jSONObject.put("stats_list", new JSONArray((Collection) list));
} catch (Exception unused) {
}
com.bytedance.sdk.openadsdk.api.plugin.x.z.m109if().m113if(true, format, com.bytedance.sdk.openadsdk.api.plugin.z.x.m123if(jSONObject).toString().getBytes());
}
public static void m99if(AdConfig adConfig) {
if (adConfig == null) {
return;
}
Map<String, String> map = f60if;
map.put("appid", adConfig.getAppId());
int pluginUpdateConfig = adConfig.getPluginUpdateConfig();
map.put("plugin_update_conf", pluginUpdateConfig != 0 ? String.valueOf(pluginUpdateConfig) : "2");
TTCustomController customController = adConfig.getCustomController();
if (customController != null) {
try {
map.put("oaid", customController.getDevOaid());
map.put("imei", customController.getDevImei());
} catch (Exception unused) {
}
}
}
}