Cyber Surfer v5.2.5版本的 MD5 值为:db13c5fce988de393e52d2679f934b22
以下内容为反编译后的 a.java 源代码,内容仅作参考
package sg.bigo.ads.controller.h;
import android.os.SystemClock;
import android.text.TextUtils;
import android.webkit.URLUtil;
import com.appsflyer.ServerParameters;
import com.mbridge.msdk.MBridgeConstans;
import com.vungle.warren.VungleApiClient;
import java.io.UnsupportedEncodingException;
import java.util.Map;
import java.util.UUID;
import org.json.JSONException;
import org.json.JSONObject;
import sg.bigo.ads.BigoAdSdk;
import sg.bigo.ads.common.utils.k;
import sg.bigo.ads.common.utils.o;
public abstract class a {
protected final int f16122a;
protected final sg.bigo.ads.common.e f16123b;
protected final long c;
protected final String d;
protected final String e;
protected final String f;
private final sg.bigo.ads.common.l.b<sg.bigo.ads.common.l.b.b, sg.bigo.ads.common.l.c.d> g;
public interface InterfaceC0490a {
void a(String str, Object obj);
}
public a(sg.bigo.ads.common.e eVar) {
this(eVar, 15000L);
}
public a(sg.bigo.ads.common.e eVar, long j) {
this.g = new sg.bigo.ads.common.l.b<sg.bigo.ads.common.l.b.b, sg.bigo.ads.common.l.c.d>() {
private long f16125b = -1;
private int d = -1;
@Override
public final sg.bigo.ads.common.l.c.d a(sg.bigo.ads.common.l.c.a aVar) {
return new sg.bigo.ads.controller.i.a(aVar);
}
@Override
public final void a(sg.bigo.ads.common.l.b.b bVar) {
super.a((AnonymousClass1) bVar);
this.f16125b = SystemClock.elapsedRealtime();
this.d = sg.bigo.ads.common.b.b.b();
}
@Override
public final void a(sg.bigo.ads.common.l.b.b bVar, sg.bigo.ads.common.l.c.d dVar) {
sg.bigo.ads.common.l.b.b bVar2 = bVar;
sg.bigo.ads.common.l.c.d dVar2 = dVar;
if (a.this.d()) {
sg.bigo.ads.core.d.a.a(bVar2.f(), true, this.f16125b > 0 ? SystemClock.elapsedRealtime() - this.f16125b : 0L, dVar2.f15967a.f15963a, "", this.d, bVar2.e(), a.this.d, a.this.e, a.this.f);
}
if (!(dVar2 instanceof sg.bigo.ads.controller.i.a)) {
a.this.a(1005, 0, "Invalid response.");
return;
}
sg.bigo.ads.controller.i.a aVar = (sg.bigo.ads.controller.i.a) dVar2;
if (aVar.c == 1) {
a.this.a(dVar2.a(), aVar.e);
} else {
a.this.a(1005, aVar.c, aVar.d);
}
}
@Override
public final void a(sg.bigo.ads.common.l.b.b bVar, sg.bigo.ads.common.l.h hVar) {
String str;
sg.bigo.ads.common.l.b.b bVar2 = bVar;
if (a.this.d()) {
long elapsedRealtime = this.f16125b > 0 ? SystemClock.elapsedRealtime() - this.f16125b : 0L;
String f = bVar2.f();
if (hVar.f15972a == 3000) {
f = "https://invalid.url";
}
sg.bigo.ads.core.d.a.a(f, false, elapsedRealtime, hVar.f15972a, hVar.getMessage(), this.d, bVar2.e(), a.this.d, a.this.e, a.this.f);
}
if (hVar.f15972a == 1001 || hVar.f15972a == 1002) {
str = "Request timeout.";
} else {
str = "(" + hVar.f15972a + ") " + hVar.getMessage();
}
a.this.a(1003, hVar.f15972a, str);
}
};
this.f16122a = sg.bigo.ads.common.o.a.a();
this.f16123b = eVar;
this.c = j;
this.d = eVar.P();
this.e = eVar.Q();
this.f = eVar.R();
}
public final int a() {
return this.f16122a;
}
public StringBuilder a(long j, String str) {
StringBuilder sb = new StringBuilder();
sb.append(o.a(this.f16123b.a()));
sb.append(",");
sb.append(o.a(this.f16123b.b()));
sb.append(",");
sb.append(o.a(this.f16123b.c()));
sb.append(",");
sb.append(this.f16123b.d());
sb.append(",");
sb.append(o.a(this.f16123b.f()));
sb.append(",");
sb.append(o.a(this.f16123b.g()));
sb.append(",");
sb.append(o.a(this.f16123b.w()));
sb.append(",20101,");
sb.append(j);
sb.append(",");
sb.append(o.a(this.f16123b.y()));
sb.append(",");
sb.append(o.a(this.f16123b.z()));
sb.append(",");
sb.append(o.a(this.f16123b.A()));
sb.append(",");
sb.append(o.a(this.f16123b.F()));
sb.append(",");
sb.append(o.a(str));
return sb;
}
protected abstract void a(int i, int i2, String str);
protected abstract void a(String str, Map<String, Object> map);
protected abstract void a(InterfaceC0490a interfaceC0490a);
public final void b() {
final JSONObject jSONObject;
String c = c();
sg.bigo.ads.common.l.b.b bVar = new sg.bigo.ads.common.l.b.b(this.f16122a, c);
if (sg.bigo.ads.common.n.a.c()) {
this.g.a((sg.bigo.ads.common.l.b<sg.bigo.ads.common.l.b.b, sg.bigo.ads.common.l.c.d>) bVar, new sg.bigo.ads.common.l.h(2000, "Missing user consent."));
} else if (!URLUtil.isNetworkUrl(c)) {
this.g.a((sg.bigo.ads.common.l.b<sg.bigo.ads.common.l.b.b, sg.bigo.ads.common.l.c.d>) bVar, new sg.bigo.ads.common.l.h(3000, "Invalid url(" + c + ") ."));
} else {
try {
jSONObject = new JSONObject();
jSONObject.putOpt(MBridgeConstans.APP_KEY, o.a(this.f16123b.a()));
jSONObject.putOpt("pkg_name", o.a(this.f16123b.b()));
jSONObject.putOpt("pkg_ver", o.a(this.f16123b.c()));
jSONObject.putOpt("pkg_vc", Integer.valueOf(this.f16123b.d()));
jSONObject.putOpt("pkg_ch", this.f16123b.e());
jSONObject.putOpt("os", o.a(this.f16123b.f()));
jSONObject.putOpt("os_ver", o.a(this.f16123b.g()));
jSONObject.putOpt("os_lang", this.f16123b.h());
jSONObject.putOpt("vendor", this.f16123b.i());
jSONObject.putOpt(ServerParameters.MODEL, this.f16123b.j());
jSONObject.putOpt("isp", this.f16123b.k());
jSONObject.putOpt("resolution", this.f16123b.l());
jSONObject.putOpt("dpi", Integer.valueOf(this.f16123b.m()));
jSONObject.putOpt(ServerParameters.NET, this.f16123b.n());
jSONObject.putOpt("timezone", this.f16123b.o());
jSONObject.putOpt(ServerParameters.LAT_KEY, Integer.valueOf(this.f16123b.p()));
jSONObject.putOpt("lng", Integer.valueOf(this.f16123b.q()));
jSONObject.putOpt("country", this.f16123b.r());
jSONObject.putOpt("state", this.f16123b.u());
jSONObject.putOpt("city", this.f16123b.v());
jSONObject.putOpt("sdk_ver", o.a(this.f16123b.w()));
jSONObject.putOpt("sdk_vc", 20101);
jSONObject.putOpt(VungleApiClient.GAID, o.a(this.f16123b.y()));
jSONObject.putOpt("af_id", o.a(this.f16123b.z()));
jSONObject.putOpt(ServerParameters.AF_USER_ID, o.a(this.f16123b.A()));
long B = this.f16123b.B();
jSONObject.putOpt("timestamp", Long.valueOf(B));
jSONObject.putOpt("pre_host", this.f16123b.C());
jSONObject.putOpt("abflags", this.f16123b.D());
jSONObject.putOpt("hw_id", o.a(this.f16123b.F()));
jSONObject.putOpt("gg_service_ver", this.f16123b.G());
jSONObject.putOpt("webkit_ver", this.f16123b.H());
jSONObject.putOpt("cpu_core_num", Integer.valueOf(this.f16123b.I()));
jSONObject.putOpt("cpu_clock_speed", Long.valueOf(this.f16123b.J()));
jSONObject.putOpt("total_memory", Long.valueOf(this.f16123b.K()));
jSONObject.putOpt("free_memory", Long.valueOf(this.f16123b.L()));
jSONObject.putOpt("rom_free_in", Long.valueOf(this.f16123b.M()));
jSONObject.putOpt("rom_free_ext", Long.valueOf(this.f16123b.N()));
String uuid = UUID.randomUUID().toString();
jSONObject.putOpt("request_id", o.a(uuid));
jSONObject.putOpt("gps_country", this.d);
jSONObject.putOpt("sim_country", this.e);
jSONObject.putOpt("system_country", this.f);
a(new InterfaceC0490a() {
@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", k.a(a(B, uuid).toString()));
} catch (JSONException e) {
e.printStackTrace();
jSONObject = null;
}
bVar.f15959a = null;
if (jSONObject != null) {
bVar.f15960b = jSONObject.toString();
try {
bVar.f15959a = bVar.f15960b.getBytes("utf-8");
} catch (UnsupportedEncodingException e2) {
e2.printStackTrace();
}
}
bVar.f = this.c;
bVar.a("SDK-Version-Code", BigoAdSdk.getSDKVersion());
sg.bigo.ads.common.l.b bVar2 = this.g;
if (bVar2 == null) {
bVar2 = sg.bigo.ads.common.l.b.c;
}
sg.bigo.ads.common.l.g.f15971a.a(bVar, bVar2);
}
}
protected abstract String c();
protected boolean d() {
return true;
}
}