GoooBet v1.0版本的 MD5 值为:ff9748f16167bfd7735b669c0a9931c5
以下内容为反编译后的 z.java 源代码,内容仅作参考
package com.appodeal.ads;
import android.os.Build;
import android.util.Pair;
import android.util.SparseArray;
import com.appodeal.ads.utils.Log;
import com.mopub.network.ImpressionData;
import java.util.Iterator;
import org.json.JSONArray;
import org.json.JSONObject;
public class z {
JSONObject b;
private AppodealRequestCallbacks c;
SparseArray<JSONObject> f1325a = new SparseArray<>();
private SparseArray<Pair<String, Long>> d = new SparseArray<>();
public z() {
}
public z(AppodealRequestCallbacks appodealRequestCallbacks) {
this.c = appodealRequestCallbacks;
}
private boolean b(int i) {
m a2;
if (i == 1) {
a2 = an.a();
} else if (i == 2) {
a2 = bg.a();
} else {
if (i == 3) {
return an.a().C() || bg.a().C();
}
if (i == 4) {
a2 = ab.a();
} else if (i == 128) {
a2 = bm.a();
} else if (i == 256) {
a2 = av.a();
} else {
if (i != 512) {
return false;
}
a2 = Native.a();
}
}
return a2.C();
}
private synchronized JSONObject c(int i) {
JSONObject jSONObject;
JSONObject jSONObject2;
String str;
String str2;
try {
if (this.b == null) {
JSONObject jSONObject3 = new JSONObject();
this.b = jSONObject3;
jSONObject3.put("device_id", bj.f1115a.getIfa());
this.b.put("package_name", bo.e.getPackageName());
this.b.put("os", "Android");
this.b.put("sdk_version", "2.10.3");
this.b.put("os_version", Build.VERSION.RELEASE);
this.b.put("osv", Build.VERSION.RELEASE);
if (aj.q(bo.e)) {
jSONObject2 = this.b;
str = "device_type";
str2 = "tablet";
} else {
jSONObject2 = this.b;
str = "device_type";
str2 = "phone";
}
jSONObject2.put(str, str2);
ConnectionData connectionData = bj.f1115a.getConnectionData(bo.e);
if (connectionData != null) {
this.b.put("connection_type", connectionData.type);
}
this.b.put("user_agent", bj.f1115a.getHttpAgent(bo.e));
this.b.put("model", String.format("%s %s", Build.MANUFACTURER, Build.MODEL));
}
jSONObject = new JSONObject();
Iterator<String> keys = this.b.keys();
while (keys.hasNext()) {
String next = keys.next();
jSONObject.put(next, this.b.get(next));
}
jSONObject.put("waterfall_ad_type", i);
jSONObject.put("waterfall_start_time", System.currentTimeMillis());
jSONObject.put("ad_units", new JSONArray());
} catch (Exception e) {
Log.log(e);
return null;
}
return jSONObject;
}
String a() {
return "https://rri.appodeal.com/api/stat";
}
public void a(int i) {
if (b(i)) {
this.f1325a.put(i, c(i));
}
AppodealRequestCallbacks appodealRequestCallbacks = this.c;
if (appodealRequestCallbacks != null) {
appodealRequestCallbacks.onWaterfallStart(i);
}
}
public void a(int i, String str) {
AppodealRequestCallbacks appodealRequestCallbacks = this.c;
if (appodealRequestCallbacks != null) {
appodealRequestCallbacks.onImpression(i, str);
}
}
public void a(int i, String str, String str2) {
if (b(i)) {
this.d.put(i, new Pair<>(str2, Long.valueOf(System.currentTimeMillis())));
}
AppodealRequestCallbacks appodealRequestCallbacks = this.c;
if (appodealRequestCallbacks != null) {
appodealRequestCallbacks.onRequestStart(i, str, "");
}
}
public void a(int i, String str, boolean z) {
a(i, str, z, 0);
}
public void a(int i, String str, boolean z, int i2) {
Pair<String, Long> pair;
try {
if (b(i) && (pair = this.d.get(i)) != null) {
String str2 = (String) pair.first;
Long l = (Long) pair.second;
JSONObject jSONObject = this.f1325a.get(i);
if (l != null && jSONObject != null) {
Long valueOf = Long.valueOf(System.currentTimeMillis() - l.longValue());
JSONArray jSONArray = jSONObject.getJSONArray("ad_units");
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("aid", str2);
jSONObject2.put(ImpressionData.NETWORK_NAME, str);
jSONObject2.put("fill", z);
jSONObject2.put("delta", valueOf);
if (!z) {
jSONObject2.put("reason", i2);
}
jSONArray.put(jSONObject2);
}
}
if (this.c != null) {
this.c.onRequestFinish(i, str, z);
}
} catch (Exception e) {
Log.log(e);
}
}
public void a(int i, boolean z) {
JSONObject jSONObject;
try {
if (b(i) && (jSONObject = this.f1325a.get(i)) != null) {
jSONObject.put("result", z);
a(jSONObject, i);
}
if (this.c != null) {
this.c.onWaterfallFinish(i, z);
}
} catch (Exception e) {
Log.log(e);
}
}
void a(JSONObject jSONObject, int i) {
this.f1325a.remove(i);
this.d.remove(i);
com.appodeal.ads.utils.s.f1302a.execute(new com.appodeal.ads.utils.v(jSONObject.toString(), a()));
}
public void b(int i, String str) {
AppodealRequestCallbacks appodealRequestCallbacks = this.c;
if (appodealRequestCallbacks != null) {
appodealRequestCallbacks.onClick(i, str);
}
}
}