Weather Tracker v1.0.0版本的 MD5 值为:3edef27647e42a8ea0e7c0d2dbf56f97
以下内容为反编译后的 c.java 源代码,内容仅作参考
package com.bytedance.sdk.openadsdk.d.p;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Build;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import androidx.core.app.NotificationCompat;
import com.adjust.sdk.Constants;
import com.bytedance.JProtect;
import com.bytedance.sdk.component.utils.m;
import com.bytedance.sdk.component.utils.t;
import com.bytedance.sdk.openadsdk.core.f0.q;
import com.bytedance.sdk.openadsdk.core.o;
import com.bytedance.sdk.openadsdk.utils.DeviceUtils;
import com.bytedance.sdk.openadsdk.utils.a0;
import com.bytedance.sdk.openadsdk.utils.b0;
import com.bytedance.sdk.openadsdk.utils.p;
import com.bytedance.sdk.openadsdk.utils.r;
import com.bytedance.sdk.openadsdk.utils.s;
import com.tradplus.ads.base.Const;
import com.unity3d.services.core.request.metrics.MetricCommonTags;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class c {
private long a;
private int f2091b;
private final boolean d = e();
private final Context c = o.a();
private final String e = c();
private String a(int i) {
return i != 120 ? i != 240 ? i != 320 ? i != 480 ? i != 640 ? "mdpi" : "xxxhdpi" : "xxhdpi" : "xhdpi" : "hdpi" : "ldpi";
}
private String c() {
return DeviceUtils.m(this.c) ? "tv" : DeviceUtils.l(this.c) ? "android_pad" : MetricCommonTags.METRIC_COMMON_TAG_PLATFORM_ANDROID;
}
private boolean e() {
try {
if (!new File("/system/bin/su").exists()) {
if (!new File("/system/xbin/su").exists()) {
return false;
}
}
return true;
} catch (Exception unused) {
return false;
}
}
public String a(List<com.bytedance.sdk.openadsdk.d.a> list) {
return a0.e((list.size() <= 0 || list.get(0) == null || list.get(0).e() == null) ? "" : list.get(0).e().optString("app_log_url"));
}
public List<com.bytedance.sdk.openadsdk.d.a> b(List<com.bytedance.sdk.openadsdk.d.a> list) {
ArrayList arrayList = new ArrayList();
for (com.bytedance.sdk.openadsdk.d.a aVar : list) {
try {
JSONObject e = aVar.e();
e.putOpt("_ad_staging_flag", 1);
arrayList.add(new com.bytedance.sdk.openadsdk.d.a(aVar.a, e));
} catch (Exception e2) {
m.b("AdLogParamsGenerate", e2.getMessage());
}
}
return arrayList;
}
@SuppressLint({"HardwareIds"})
@JProtect
public JSONObject d() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("ua", a0.t());
jSONObject.put("ad_sdk_version", "5.4.1.1");
jSONObject.put("app_version", a0.s());
jSONObject.put("sim_op", a(this.c));
jSONObject.put("root", this.d ? 1 : 0);
jSONObject.put("timezone", b());
jSONObject.put("access", p.a(this.c));
jSONObject.put("os", "Android");
jSONObject.put("os_version", Build.VERSION.RELEASE);
jSONObject.put("os_api", Build.VERSION.SDK_INT);
jSONObject.put("device_type", this.e);
jSONObject.put("device_model", Build.MODEL);
jSONObject.put("device_brand", Build.BRAND);
jSONObject.put("device_manufacturer", Build.MANUFACTURER);
jSONObject.put("language", Locale.getDefault().getLanguage());
jSONObject.put("resolution", b0.g(this.c) + "x" + b0.i(this.c));
jSONObject.put("display_density", a(b0.b(this.c)));
jSONObject.put("density_dpi", b0.b(this.c));
jSONObject.put("aid", "1371");
jSONObject.put("device_id", com.bytedance.sdk.openadsdk.core.j.c(this.c));
jSONObject.put("rom", a());
jSONObject.put("cpu_abi", Build.CPU_ABI);
jSONObject.put("ut", this.f2091b);
jSONObject.put(Const.SPUKEY.KEY_UID, this.a);
jSONObject.put("google_aid", QY.g8().gt65QHUX());
jSONObject.put("locale_language", DeviceUtils.h());
jSONObject.put("screen_bright", Math.ceil(DeviceUtils.j() * 10.0f) / 10.0d);
jSONObject.put("is_screen_off", !DeviceUtils.k() ? 1 : 0);
com.bytedance.sdk.openadsdk.core.settings.d d = o.d();
jSONObject.put("force_language", t.k(this.c, "tt_choose_language"));
if (d.A("mnc")) {
jSONObject.put("mnc", s.d());
}
if (d.A("mcc")) {
jSONObject.put("mcc", s.c());
}
} catch (Exception unused) {
}
return jSONObject;
}
private void a(com.bytedance.sdk.openadsdk.d.a aVar, boolean z) {
String optString;
if (aVar == null) {
return;
}
try {
if (z) {
optString = aVar.e().optJSONObject("params").optString("log_extra", "");
} else {
optString = aVar.e().optString("log_extra", "");
}
long d = q.d(optString);
int e = q.e(optString);
if (d == 0) {
d = this.a;
}
this.a = d;
if (e == 0) {
e = this.f2091b;
}
this.f2091b = e;
} catch (Exception e2) {
m.b("AdLogParamsGenerate", "getInfoFromLogExtra exception", e2.getMessage());
}
}
private int b() {
int rawOffset = TimeZone.getDefault().getRawOffset() / Constants.ONE_HOUR;
if (rawOffset < -12) {
rawOffset = -12;
}
if (rawOffset > 12) {
return 12;
}
return rawOffset;
}
public JSONObject a(List<com.bytedance.sdk.openadsdk.d.a> list, long j, JSONObject jSONObject, boolean z) {
JSONObject jSONObject2 = new JSONObject();
try {
a(list.get(0), z);
jSONObject2.put("header", jSONObject);
JSONArray jSONArray = new JSONArray();
for (com.bytedance.sdk.openadsdk.d.a aVar : list) {
jSONArray.put(aVar.a(z));
}
if (z) {
jSONObject2.put("event_v3", jSONArray);
jSONObject2.put("magic_tag", "ss_app_log");
} else {
jSONObject2.put(NotificationCompat.CATEGORY_EVENT, jSONArray);
}
jSONObject2.put("_gen_time", j);
jSONObject2.put("local_time", j / 1000);
} catch (JSONException unused) {
}
return jSONObject2;
}
public List<com.bytedance.sdk.openadsdk.d.a> a(List<com.bytedance.sdk.openadsdk.d.a> list, boolean z) {
ArrayList arrayList = new ArrayList();
for (com.bytedance.sdk.openadsdk.d.a aVar : list) {
try {
JSONObject jSONObject = new JSONObject();
JSONObject e = aVar.e();
jSONObject.putOpt(NotificationCompat.CATEGORY_EVENT, e.optString("label"));
long optLong = e.optLong("event_ts", System.currentTimeMillis());
jSONObject.putOpt("local_time_ms", Long.valueOf(optLong));
jSONObject.putOpt("datetime", com.bytedance.sdk.openadsdk.d.f.r.format(new Date(optLong)));
JSONObject jSONObject2 = new JSONObject();
Iterator<String> keys = e.keys();
while (keys.hasNext()) {
String next = keys.next();
if (!TextUtils.equals(next, "label")) {
jSONObject2.putOpt(next, e.opt(next));
}
}
if (z) {
jSONObject2.putOpt("_ad_staging_flag", 3);
}
jSONObject.putOpt("params", jSONObject2);
arrayList.add(new com.bytedance.sdk.openadsdk.d.f(aVar.a, jSONObject));
} catch (Exception e2) {
m.b("AdLogParamsGenerate", e2.getMessage());
}
}
return arrayList;
}
private String a(Context context) {
try {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService("phone");
return telephonyManager == null ? "" : telephonyManager.getSimOperator();
} catch (Throwable unused) {
return "";
}
}
@JProtect
private String a() {
StringBuilder sb = new StringBuilder();
try {
if (r.w()) {
sb.append("MIUI-");
} else if (r.s()) {
sb.append("FLYME-");
} else {
String h = r.h();
if (r.d(h)) {
sb.append("EMUI-");
}
if (!TextUtils.isEmpty(h)) {
sb.append(h);
sb.append("-");
}
}
sb.append(Build.VERSION.INCREMENTAL);
} catch (Throwable unused) {
}
return sb.toString();
}
}