Weather Tracker v1.0.0版本的 MD5 值为:3edef27647e42a8ea0e7c0d2dbf56f97
以下内容为反编译后的 a.java 源代码,内容仅作参考
package sg.bigo.ads.controller.i;
import android.os.SystemClock;
import android.text.TextUtils;
import androidx.annotation.CallSuper;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.exoplayer2.C;
import com.ironsource.mediationsdk.impressionData.ImpressionData;
import com.mbridge.msdk.MBridgeConstans;
import com.tradplus.ads.base.Const;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import org.json.JSONException;
import org.json.JSONObject;
import sg.bigo.ads.BigoAdSdk;
import sg.bigo.ads.common.l.a;
import sg.bigo.ads.common.utils.q;
public abstract class a<T extends sg.bigo.ads.common.l.a> {
protected final int a;
protected final sg.bigo.ads.common.e f7790b;
protected final sg.bigo.ads.controller.a.b c;
protected final long d;
@Nullable
protected final String e;
@Nullable
protected final String f;
@Nullable
protected final String g;
private final sg.bigo.ads.common.l.b<sg.bigo.ads.common.l.b.b, sg.bigo.ads.common.l.c.d> h;
static class C0591a extends sg.bigo.ads.common.l.b.b<sg.bigo.ads.controller.a.e> {
private final long k;
public C0591a(int i, @NonNull sg.bigo.ads.controller.a.e eVar, long j) {
super(i, eVar);
this.k = j;
}
@Override
public final void g() {
super.g();
sg.bigo.ads.controller.a.e eVar = (sg.bigo.ads.controller.a.e) this.f;
HashMap hashMap = new HashMap();
hashMap.put("pre_host", eVar.e());
hashMap.put("host_cfg_clear", Integer.valueOf(eVar.f7732b ? 1 : 0));
hashMap.put("host_src", eVar.c);
sg.bigo.ads.controller.a.i iVar = eVar.a;
if (iVar != null) {
hashMap.put("host_type", Integer.valueOf(iVar.b()));
}
a(hashMap);
long j = this.k;
if (j <= 0 || !eVar.e.compareAndSet(false, true)) {
return;
}
sg.bigo.ads.common.f.c.a(3, eVar.f, j);
}
}
public interface b {
void a(String str, Object obj);
}
public a(@NonNull sg.bigo.ads.common.e eVar, @Nullable sg.bigo.ads.controller.a.b bVar) {
this(eVar, bVar, C.DEFAULT_SEEK_FORWARD_INCREMENT_MS);
}
public a(@NonNull sg.bigo.ads.common.e eVar, @Nullable sg.bigo.ads.controller.a.b bVar, long j) {
this.h = new sg.bigo.ads.common.l.b<sg.bigo.ads.common.l.b.b, sg.bigo.ads.common.l.c.d>() {
private long f7791b = -1;
private boolean d = false;
@Override
public final sg.bigo.ads.common.l.c.d a(@NonNull sg.bigo.ads.common.l.c.a aVar) {
return new sg.bigo.ads.common.l.c.d(aVar);
}
@Override
public final void a(@NonNull sg.bigo.ads.common.l.b.b bVar2) {
super.a((AnonymousClass1) bVar2);
this.f7791b = SystemClock.elapsedRealtime();
this.d = sg.bigo.ads.common.b.c.c();
}
@Override
public final void a(@NonNull sg.bigo.ads.common.l.b.b bVar2, @NonNull sg.bigo.ads.common.l.c.d dVar) {
sg.bigo.ads.common.l.b.b bVar3 = bVar2;
sg.bigo.ads.common.l.c.d dVar2 = dVar;
if (a.this.g()) {
long elapsedRealtime = this.f7791b > 0 ? SystemClock.elapsedRealtime() - this.f7791b : 0L;
String f = bVar3.f();
int i = dVar2.a.a;
boolean z = this.d;
int e = bVar3.e();
a aVar = a.this;
String str = aVar.e;
String str2 = aVar.f;
String str3 = aVar.g;
sg.bigo.ads.common.e eVar2 = aVar.f7790b;
sg.bigo.ads.core.d.a.a(f, true, elapsedRealtime, i, "", z, e, str, str2, str3, eVar2 == null ? null : eVar2.Z());
}
sg.bigo.ads.controller.j.a aVar2 = new sg.bigo.ads.controller.j.a(dVar2.a());
if (aVar2.a()) {
a.this.a(bVar3.f(), aVar2.c, aVar2.d);
} else {
a.this.a(bVar3.f(), 1005, aVar2.a, aVar2.f7795b, aVar2.d);
}
a.a(a.this, sg.bigo.ads.common.utils.l.a(aVar2.d, "host_cfg"), bVar3.f(), this.f7791b);
}
@Override
public final void a(@NonNull sg.bigo.ads.common.l.b.b bVar2, @NonNull sg.bigo.ads.common.l.h hVar) {
String str;
sg.bigo.ads.common.l.b.b bVar3 = bVar2;
if (a.this.g()) {
long elapsedRealtime = this.f7791b > 0 ? SystemClock.elapsedRealtime() - this.f7791b : 0L;
String f = bVar3.f();
int i = hVar.a;
if (i == 900) {
f = "https://invalid.url";
}
String str2 = f;
String message = hVar.getMessage();
boolean z = this.d;
int e = bVar3.e();
a aVar = a.this;
String str3 = aVar.e;
String str4 = aVar.f;
String str5 = aVar.g;
sg.bigo.ads.common.e eVar2 = aVar.f7790b;
sg.bigo.ads.core.d.a.a(str2, false, elapsedRealtime, i, message, z, e, str3, str4, str5, eVar2 == null ? null : eVar2.Z());
}
int i2 = hVar.a;
if (i2 == 701 || i2 == 702) {
str = "Request timeout.";
} else {
str = "(" + hVar.a + ") " + hVar.getMessage();
}
a.this.a(bVar3.f(), 1003, hVar.a, str, null);
a.this.a(bVar3.f());
}
};
this.a = sg.bigo.ads.common.p.a.a();
this.f7790b = eVar;
this.c = bVar;
this.d = j;
this.e = eVar.S();
this.f = eVar.T();
this.g = eVar.U();
}
public void a(String str) {
if (this.c == null || !h()) {
return;
}
this.c.a(100L, str);
}
static void a(a aVar, final String str, final String str2, final long j) {
if (aVar.c != null) {
if (TextUtils.isEmpty(str)) {
aVar.a(str2);
} else {
sg.bigo.ads.common.f.c.a(3, new Runnable() {
@Override
public final void run() {
a aVar2 = a.this;
sg.bigo.ads.controller.a.b bVar = aVar2.c;
if (bVar == null || bVar.a(str, str2, j, aVar2.g()).d == 0) {
return;
}
a.this.a(str2);
}
});
}
}
}
public final int a() {
return this.a;
}
@NonNull
@CallSuper
public StringBuilder a(long j, String str) {
StringBuilder sb = new StringBuilder();
sb.append(q.a(this.f7790b.a()));
sb.append(",");
sb.append(q.a(this.f7790b.b()));
sb.append(",");
sb.append(q.a(this.f7790b.c()));
sb.append(",");
sb.append(this.f7790b.d());
sb.append(",");
sb.append(q.a(this.f7790b.i()));
sb.append(",");
sb.append(q.a(this.f7790b.j()));
sb.append(",");
sb.append(q.a(this.f7790b.A()));
sb.append(",40002");
sb.append(",");
sb.append(j);
sb.append(",");
sb.append(q.a(this.f7790b.C()));
sb.append(",");
sb.append(q.a(this.f7790b.D()));
sb.append(",");
sb.append(q.a(this.f7790b.E()));
sb.append(",");
sb.append(q.a(this.f7790b.I()));
sb.append(",");
sb.append(q.a(str));
return sb;
}
protected abstract void a(int i, int i2, String str);
@CallSuper
public void a(String str, int i, int i2, String str2, @Nullable Map<String, Object> map) {
a(i, i2, str2);
}
@CallSuper
public void a(String str, @NonNull String str2, @NonNull Map<String, Object> map) {
a(str2, map);
}
protected abstract void a(@NonNull String str, @NonNull Map<String, Object> map);
protected abstract void a(@NonNull b bVar);
public final void b() {
final JSONObject jSONObject;
T f = f();
sg.bigo.ads.common.l.b.b c0591a = f instanceof sg.bigo.ads.controller.a.e ? new C0591a(this.a, (sg.bigo.ads.controller.a.e) f, e()) : new sg.bigo.ads.common.l.b.b(this.a, f);
if (sg.bigo.ads.common.o.a.p()) {
this.h.a((sg.bigo.ads.common.l.b<sg.bigo.ads.common.l.b.b, sg.bigo.ads.common.l.c.d>) c0591a, new sg.bigo.ads.common.l.h(800, "Missing user consent."));
return;
}
try {
jSONObject = new JSONObject();
jSONObject.putOpt(MBridgeConstans.APP_KEY, q.a(this.f7790b.a()));
jSONObject.putOpt("pkg_name", q.a(this.f7790b.b()));
jSONObject.putOpt("pkg_ver", q.a(this.f7790b.c()));
jSONObject.putOpt("pkg_vc", Integer.valueOf(this.f7790b.d()));
jSONObject.putOpt("pkg_ch", this.f7790b.e());
jSONObject.putOpt("os", q.a(this.f7790b.i()));
jSONObject.putOpt("os_ver", q.a(this.f7790b.j()));
jSONObject.putOpt("os_lang", this.f7790b.k());
jSONObject.putOpt("vendor", this.f7790b.l());
jSONObject.putOpt("model", this.f7790b.m());
jSONObject.putOpt("isp", this.f7790b.n());
jSONObject.putOpt("resolution", this.f7790b.o());
jSONObject.putOpt("dpi", Integer.valueOf(this.f7790b.p()));
jSONObject.putOpt("net", this.f7790b.q());
jSONObject.putOpt("timezone", this.f7790b.r());
if (this.f7790b.s()) {
jSONObject.putOpt("ewd", String.valueOf(this.f7790b.t() ^ 3023727));
jSONObject.putOpt("ejd", String.valueOf(this.f7790b.u() ^ 3023727));
}
jSONObject.putOpt(ImpressionData.IMPRESSION_DATA_KEY_COUNTRY, this.f7790b.v());
jSONObject.putOpt("state", this.f7790b.y());
jSONObject.putOpt("city", this.f7790b.z());
jSONObject.putOpt("sdk_ver", q.a(this.f7790b.A()));
jSONObject.putOpt("sdk_vc", 40002);
jSONObject.putOpt("gaid", q.a(this.f7790b.C()));
jSONObject.putOpt("af_id", q.a(this.f7790b.D()));
jSONObject.putOpt(Const.SPUKEY.KEY_UID, q.a(this.f7790b.E()));
long F = this.f7790b.F();
jSONObject.putOpt("timestamp", Long.valueOf(F));
jSONObject.putOpt("abflags", this.f7790b.G());
jSONObject.putOpt("hw_id", q.a(this.f7790b.I()));
jSONObject.putOpt("gg_service_ver", this.f7790b.J());
jSONObject.putOpt("webkit_ver", this.f7790b.K());
jSONObject.putOpt("cpu_core_num", Integer.valueOf(this.f7790b.L()));
jSONObject.putOpt("cpu_clock_speed", Long.valueOf(this.f7790b.M()));
jSONObject.putOpt("total_memory", Long.valueOf(this.f7790b.N()));
jSONObject.putOpt("free_memory", Long.valueOf(this.f7790b.O()));
jSONObject.putOpt("rom_free_in", Long.valueOf(this.f7790b.P()));
jSONObject.putOpt("rom_free_ext", Long.valueOf(this.f7790b.Q()));
String uuid = UUID.randomUUID().toString();
jSONObject.putOpt("request_id", q.a(uuid));
jSONObject.putOpt("sdk_channel", this.f7790b.ac());
jSONObject.putOpt("gps_country", this.e);
jSONObject.putOpt("sim_country", this.f);
jSONObject.putOpt("system_country", this.g);
jSONObject.putOpt("inst_src", this.f7790b.V());
a(new b() {
@Override
public final void a(String str, Object obj) {
if (TextUtils.isEmpty(str)) {
return;
}
try {
jSONObject.putOpt(str, obj);
} catch (JSONException e) {
e.printStackTrace();
}
}
});
jSONObject.putOpt("sign", sg.bigo.ads.common.utils.m.a(a(F, uuid).toString()));
} catch (JSONException e) {
e.printStackTrace();
jSONObject = null;
}
sg.bigo.ads.common.l.f d = d();
c0591a.f7688b = jSONObject;
c0591a.c = null;
c0591a.d = d;
c0591a.h = this.d;
c0591a.a("SDK-Version-Code", BigoAdSdk.getSDKVersion());
c0591a.g = c();
sg.bigo.ads.common.l.b bVar = this.h;
if (bVar == null) {
bVar = sg.bigo.ads.common.l.b.c;
}
sg.bigo.ads.common.l.g.a.a(c0591a, bVar);
}
@Nullable
protected abstract ExecutorService c();
protected sg.bigo.ads.common.l.f d() {
return sg.bigo.ads.common.l.b.b.a;
}
public long e() {
return 0L;
}
@NonNull
protected abstract T f();
protected boolean g() {
return true;
}
protected boolean h() {
return true;
}
}