360 Wi-Fi v1.0.1版本的 MD5 值为:53dc85b63eb655b13344ce30ddaccae2
以下内容为反编译后的 a.java 源代码,内容仅作参考
package sg.bigo.ads.controller.h;
import android.os.SystemClock;
import android.text.TextUtils;
import androidx.annotation.CallSuper;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.anythink.core.common.c.e;
import com.anythink.expressad.atsignalcommon.mraid.CallMraidJS;
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.api.AdError;
import sg.bigo.ads.api.core.o;
import sg.bigo.ads.common.o.a;
import sg.bigo.ads.common.utils.l;
import sg.bigo.ads.common.utils.m;
import sg.bigo.ads.common.utils.q;
public abstract class a<T extends sg.bigo.ads.common.o.a> {
protected final int a;
protected final sg.bigo.ads.common.f b;
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;
public final o h;
private final sg.bigo.ads.common.o.b<sg.bigo.ads.common.o.b.b, sg.bigo.ads.common.o.c.d> f5531i;
public static class C0353a extends sg.bigo.ads.common.o.b.b<sg.bigo.ads.controller.a.e> {
private final long n;
public C0353a(int i2, @NonNull sg.bigo.ads.controller.a.e eVar, long j) {
super(i2, eVar);
this.n = j;
}
@Override
public final void h() {
super.h();
sg.bigo.ads.controller.a.e eVar = (sg.bigo.ads.controller.a.e) this.f5481i;
HashMap hashMap = new HashMap();
hashMap.put("pre_host", eVar.e());
hashMap.put("host_cfg_clear", Integer.valueOf(eVar.b ? 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.n;
if (j <= 0 || !eVar.e.compareAndSet(false, true)) {
return;
}
sg.bigo.ads.common.i.c.a(3, eVar.f, j);
}
}
public interface b {
void a(String str, Object obj);
}
public a(@NonNull sg.bigo.ads.common.f fVar, @Nullable sg.bigo.ads.controller.a.b bVar) {
this(fVar, bVar, 15000L);
}
public final int a() {
return this.a;
}
public abstract void a(int i2, int i3, String str);
public abstract void a(@NonNull String str, @NonNull Map<String, Object> map);
public abstract void a(@NonNull b bVar);
public final void b() {
final JSONObject jSONObject;
T f = f();
sg.bigo.ads.common.o.b.b c0353a = f instanceof sg.bigo.ads.controller.a.e ? new C0353a(this.a, (sg.bigo.ads.controller.a.e) f, e()) : new sg.bigo.ads.common.o.b.b(this.a, f);
if (sg.bigo.ads.common.r.a.n()) {
this.f5531i.a((sg.bigo.ads.common.o.b<sg.bigo.ads.common.o.b.b, sg.bigo.ads.common.o.c.d>) c0353a, new sg.bigo.ads.common.o.h(800, "Missing user consent."));
return;
}
try {
jSONObject = new JSONObject();
jSONObject.putOpt("app_key", q.a(this.b.a()));
jSONObject.putOpt(e.a.g, q.a(this.b.b()));
jSONObject.putOpt("pkg_ver", q.a(this.b.c()));
jSONObject.putOpt("pkg_vc", Integer.valueOf(this.b.d()));
jSONObject.putOpt("pkg_ch", this.b.e());
jSONObject.putOpt("os", q.a(this.b.i()));
jSONObject.putOpt("os_ver", q.a(this.b.j()));
jSONObject.putOpt("os_lang", this.b.k());
jSONObject.putOpt("vendor", this.b.l());
jSONObject.putOpt("model", this.b.m());
jSONObject.putOpt("isp", this.b.n());
jSONObject.putOpt("resolution", this.b.o());
jSONObject.putOpt("dpi", Integer.valueOf(this.b.p()));
jSONObject.putOpt("net", this.b.q());
jSONObject.putOpt("timezone", this.b.r());
if (this.b.s()) {
jSONObject.putOpt("ewd", String.valueOf(this.b.t() ^ 3023727));
jSONObject.putOpt("ejd", String.valueOf(this.b.u() ^ 3023727));
}
jSONObject.putOpt("country", this.b.v());
jSONObject.putOpt(CallMraidJS.b, this.b.y());
jSONObject.putOpt("city", this.b.z());
jSONObject.putOpt("sdk_ver", q.a(this.b.A()));
jSONObject.putOpt("sdk_vc", 40500);
jSONObject.putOpt("gaid", q.a(this.b.C()));
jSONObject.putOpt("af_id", q.a(this.b.D()));
jSONObject.putOpt("uid", q.a(this.b.E()));
long F = this.b.F();
jSONObject.putOpt("timestamp", Long.valueOf(F));
jSONObject.putOpt("abflags", this.b.G());
jSONObject.putOpt("hw_id", q.a(this.b.I()));
jSONObject.putOpt("gg_service_ver", this.b.J());
jSONObject.putOpt("webkit_ver", this.b.K());
jSONObject.putOpt("cpu_core_num", Integer.valueOf(this.b.L()));
jSONObject.putOpt("cpu_clock_speed", Long.valueOf(this.b.M()));
jSONObject.putOpt("total_memory", Long.valueOf(this.b.N()));
jSONObject.putOpt("free_memory", Long.valueOf(this.b.O()));
jSONObject.putOpt("rom_free_in", Long.valueOf(this.b.P()));
jSONObject.putOpt("rom_free_ext", Long.valueOf(this.b.Q()));
String uuid = UUID.randomUUID().toString();
jSONObject.putOpt("request_id", q.a(uuid));
jSONObject.putOpt("sdk_channel", this.b.ac());
jSONObject.putOpt("simulator_file", Integer.valueOf(this.b.ad()));
jSONObject.putOpt("gps_country", this.e);
jSONObject.putOpt("sim_country", this.f);
jSONObject.putOpt("system_country", this.g);
jSONObject.putOpt("inst_src", this.b.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 unused) {
}
}
});
jSONObject.putOpt("sign", m.a(a(F, uuid).toString()));
} catch (JSONException unused) {
jSONObject = null;
}
boolean z = sg.bigo.ads.common.r.a.q() && j();
sg.bigo.ads.common.o.f d = d();
c0353a.b = jSONObject;
c0353a.c = null;
c0353a.d = d;
c0353a.e = z;
c0353a.k = this.d;
c0353a.a("SDK-Version-Code", BigoAdSdk.getSDKVersion());
c0353a.j = c();
sg.bigo.ads.common.o.b bVar = this.f5531i;
if (bVar == null) {
bVar = sg.bigo.ads.common.o.b.c;
}
sg.bigo.ads.common.o.g.a.a(c0353a, bVar);
}
@Nullable
public abstract ExecutorService c();
public sg.bigo.ads.common.o.f d() {
return sg.bigo.ads.common.o.b.b.a;
}
public long e() {
return 0L;
}
@NonNull
public abstract T f();
public boolean g() {
return true;
}
public boolean h() {
return true;
}
public abstract void i();
public abstract boolean j();
public a(@NonNull sg.bigo.ads.common.f fVar, @Nullable sg.bigo.ads.controller.a.b bVar, long j) {
this.h = new o();
this.f5531i = new sg.bigo.ads.common.o.b<sg.bigo.ads.common.o.b.b, sg.bigo.ads.common.o.c.d>() {
private long b = -1;
private boolean d = false;
@Override
public final sg.bigo.ads.common.o.c.d a(@NonNull sg.bigo.ads.common.o.c.a aVar) {
return new sg.bigo.ads.common.o.c.d(aVar);
}
@Override
public final void a(@NonNull sg.bigo.ads.common.o.b.b bVar2) {
super.a((AnonymousClass1) bVar2);
this.b = SystemClock.elapsedRealtime();
this.d = sg.bigo.ads.common.d.c.c();
}
@Override
public final void a(@NonNull sg.bigo.ads.common.o.b.b bVar2, @NonNull sg.bigo.ads.common.o.c.d dVar) {
sg.bigo.ads.controller.i.a aVar;
boolean z;
boolean z2;
sg.bigo.ads.common.o.b.b bVar3 = bVar2;
sg.bigo.ads.common.o.c.d dVar2 = dVar;
String a = dVar2.a();
if (bVar3.f) {
try {
String a2 = sg.bigo.ads.common.g.a.a(a, "FEFFFFFFFFFAFFFDCBFFFFFFFFFFFF4F", null);
if (TextUtils.isEmpty(a2)) {
bVar3.g = false;
} else {
try {
bVar3.g = true;
a = a2;
} catch (Exception unused) {
a = a2;
bVar3.g = false;
aVar = new sg.bigo.ads.controller.i.a(a);
if (!aVar.a()) {
}
a.a(a.this, l.a(aVar.d, "host_cfg"), bVar3.g(), this.b);
a aVar2 = a.this;
o oVar = aVar2.h;
z = bVar3.e;
z2 = bVar3.f;
boolean z3 = bVar3.g;
oVar.a = z;
oVar.b = z2;
oVar.c = z3;
if (z) {
if (z2) {
}
}
if (a.this.g()) {
}
}
}
} catch (Exception unused2) {
}
}
aVar = new sg.bigo.ads.controller.i.a(a);
if (!aVar.a()) {
a.this.a(bVar3.g(), aVar.c, aVar.d);
} else {
a.this.a(bVar3.g(), AdError.ERROR_CODE_INTERNAL_ERROR, aVar.a, aVar.b, aVar.d);
}
a.a(a.this, l.a(aVar.d, "host_cfg"), bVar3.g(), this.b);
a aVar22 = a.this;
o oVar2 = aVar22.h;
z = bVar3.e;
z2 = bVar3.f;
boolean z32 = bVar3.g;
oVar2.a = z;
oVar2.b = z2;
oVar2.c = z32;
if (z && (!z2 || !z32)) {
if (z2) {
sg.bigo.ads.common.r.a.r();
} else {
aVar22.i();
}
}
if (a.this.g()) {
return;
}
long elapsedRealtime = this.b > 0 ? SystemClock.elapsedRealtime() - this.b : 0L;
String g = bVar3.g();
int i2 = dVar2.a.a;
boolean z4 = this.d;
int e = bVar3.e();
a aVar3 = a.this;
String str = aVar3.e;
String str2 = aVar3.f;
String str3 = aVar3.g;
sg.bigo.ads.common.f fVar2 = aVar3.b;
sg.bigo.ads.core.c.a.a(g, true, elapsedRealtime, i2, "", z4, e, str, str2, str3, fVar2 != null ? fVar2.Z() : null, bVar3.e, bVar3.f, bVar3.g);
}
@Override
public final void a(@NonNull sg.bigo.ads.common.o.b.b bVar2, @NonNull sg.bigo.ads.common.o.h hVar) {
String str;
sg.bigo.ads.common.o.b.b bVar3 = bVar2;
if (a.this.g()) {
long elapsedRealtime = this.b > 0 ? SystemClock.elapsedRealtime() - this.b : 0L;
String g = bVar3.g();
int i2 = hVar.a;
if (i2 == 900) {
g = "https://invalid.url";
}
String str2 = g;
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.f fVar2 = aVar.b;
sg.bigo.ads.core.c.a.a(str2, false, elapsedRealtime, i2, message, z, e, str3, str4, str5, fVar2 == null ? null : fVar2.Z(), bVar3.e, bVar3.f, bVar3.g);
}
int i3 = hVar.a;
if (i3 == 701 || i3 == 702) {
str = "Request timeout.";
} else {
str = "(" + hVar.a + ") " + hVar.getMessage();
}
a.this.a(bVar3.g(), 1003, hVar.a, str, null);
a.this.a(bVar3.g());
}
};
this.a = sg.bigo.ads.common.s.a.a();
this.b = fVar;
this.c = bVar;
this.d = j;
this.e = fVar.S();
this.f = fVar.T();
this.g = fVar.U();
}
@NonNull
@CallSuper
public StringBuilder a(long j, String str) {
StringBuilder sb = new StringBuilder();
sb.append(q.a(this.b.a()));
sb.append(",");
sb.append(q.a(this.b.b()));
sb.append(",");
sb.append(q.a(this.b.c()));
sb.append(",");
sb.append(this.b.d());
sb.append(",");
sb.append(q.a(this.b.i()));
sb.append(",");
sb.append(q.a(this.b.j()));
sb.append(",");
sb.append(q.a(this.b.A()));
sb.append(",40500,");
sb.append(j);
sb.append(",");
sb.append(q.a(this.b.C()));
sb.append(",");
sb.append(q.a(this.b.D()));
sb.append(",");
sb.append(q.a(this.b.E()));
sb.append(",");
sb.append(q.a(this.b.I()));
sb.append(",");
sb.append(q.a(str));
return sb;
}
public void a(String str) {
if (this.c == null || !h()) {
return;
}
this.c.a(100L, str);
}
@CallSuper
public void a(String str, int i2, int i3, String str2, @Nullable Map<String, Object> map) {
a(i2, i3, str2);
}
@CallSuper
public void a(String str, @NonNull String str2, @NonNull Map<String, Object> map) {
a(str2, map);
}
public 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.i.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);
}
});
}
}
}
}