- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
336 lines
16 KiB
Java
336 lines
16 KiB
Java
package com.mbridge.msdk.c;
|
|
|
|
import android.content.Context;
|
|
import android.text.TextUtils;
|
|
import com.ironsource.v8;
|
|
import com.mbridge.msdk.MBridgeConstans;
|
|
import com.mbridge.msdk.foundation.tools.SameMD5;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
import com.mbridge.msdk.foundation.tools.ak;
|
|
import com.mbridge.msdk.foundation.tools.v;
|
|
import com.mbridge.msdk.playercommon.exoplayer2.source.chunk.ChunkedTrackBlacklistUtil;
|
|
import com.vungle.ads.internal.signals.SignalManager;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class j {
|
|
private static final String a = "j";
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void c(final Context context, final String str, final String str2) {
|
|
if (!(!com.mbridge.msdk.foundation.same.net.e.d.f().a())) {
|
|
b(context, str, str2);
|
|
return;
|
|
}
|
|
try {
|
|
if (com.mbridge.msdk.foundation.same.net.e.d.f().q) {
|
|
return;
|
|
}
|
|
com.mbridge.msdk.foundation.same.net.e.d.f().q = true;
|
|
if (System.currentTimeMillis() >= com.mbridge.msdk.foundation.a.a.a.a().b("mkey_spare_host_ts").longValue() + SignalManager.TWENTY_FOUR_HOURS_MILLIS) {
|
|
String a2 = com.mbridge.msdk.foundation.a.a.a.a().a("mkey_spare_host");
|
|
if (!TextUtils.isEmpty(a2)) {
|
|
for (String str3 : a2.split("\n")) {
|
|
if (!TextUtils.isEmpty(str3.trim()) && !com.mbridge.msdk.foundation.same.net.e.d.f().t.contains(str3.trim())) {
|
|
com.mbridge.msdk.foundation.same.net.e.d.f().t.add(str3.trim());
|
|
com.mbridge.msdk.foundation.same.net.e.d.f().w.add(str3.trim());
|
|
}
|
|
}
|
|
c(context, str, str2);
|
|
return;
|
|
}
|
|
}
|
|
new com.mbridge.msdk.foundation.same.net.f.c(context.getApplicationContext()).get(0, com.mbridge.msdk.foundation.same.net.e.d.f().b, new com.mbridge.msdk.foundation.same.net.f.e(), new com.mbridge.msdk.foundation.same.net.b.a() { // from class: com.mbridge.msdk.c.j.3
|
|
@Override // com.mbridge.msdk.foundation.same.net.b.a
|
|
public final void b(String str4) {
|
|
af.a(j.a, "fetch CNDSettingHost success, content = " + str4);
|
|
if (TextUtils.isEmpty(str4)) {
|
|
return;
|
|
}
|
|
com.mbridge.msdk.foundation.a.a.a.a().a("mkey_spare_host_ts", System.currentTimeMillis());
|
|
com.mbridge.msdk.foundation.a.a.a.a().a("mkey_spare_host", str4);
|
|
for (String str5 : str4.split("\n")) {
|
|
if (!TextUtils.isEmpty(str5.trim()) && !com.mbridge.msdk.foundation.same.net.e.d.f().t.contains(str5.trim())) {
|
|
com.mbridge.msdk.foundation.same.net.e.d.f().t.add(str5.trim());
|
|
com.mbridge.msdk.foundation.same.net.e.d.f().w.add(str5.trim());
|
|
}
|
|
}
|
|
j.this.c(context, str, str2);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.same.net.b.a
|
|
public final void a(String str4) {
|
|
com.mbridge.msdk.foundation.same.net.e.d.f().q = false;
|
|
af.a(j.a, "fetch CNDSettingHost failed, errorCode = " + str4);
|
|
}
|
|
}, "setting", ChunkedTrackBlacklistUtil.DEFAULT_TRACK_BLACKLIST_MS);
|
|
} catch (Throwable th) {
|
|
com.mbridge.msdk.foundation.same.net.e.d.f().q = false;
|
|
af.b(a, th.getMessage());
|
|
}
|
|
}
|
|
|
|
private String b() {
|
|
String str = com.mbridge.msdk.foundation.same.net.e.d.f().r ? com.mbridge.msdk.foundation.same.net.e.d.f().H : com.mbridge.msdk.foundation.same.net.e.d.f().G;
|
|
try {
|
|
if (!com.mbridge.msdk.foundation.same.net.e.d.f().r || !com.mbridge.msdk.foundation.same.net.e.d.f().q || com.mbridge.msdk.foundation.same.net.e.d.f().v >= com.mbridge.msdk.foundation.same.net.e.d.f().w.size()) {
|
|
return str;
|
|
}
|
|
String str2 = com.mbridge.msdk.foundation.same.net.e.d.f().w.get(com.mbridge.msdk.foundation.same.net.e.d.f().v);
|
|
if (TextUtils.isEmpty(str2)) {
|
|
return str;
|
|
}
|
|
if (!str2.startsWith("http") && !str2.startsWith("https")) {
|
|
return str;
|
|
}
|
|
return str2 + "/setting";
|
|
} catch (Throwable th) {
|
|
af.b(a, th.getMessage());
|
|
return str;
|
|
}
|
|
}
|
|
|
|
public final void a(Context context, String str, String str2) {
|
|
a(context, str, str2, "1", new com.mbridge.msdk.foundation.same.net.f.d() { // from class: com.mbridge.msdk.c.j.1
|
|
@Override // com.mbridge.msdk.foundation.same.net.f.d
|
|
public final void a(String str3) {
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.same.net.f.d
|
|
public final void a(JSONObject jSONObject) {
|
|
if (jSONObject == null || !jSONObject.has(com.mbridge.msdk.foundation.entity.b.JSON_KEY_C_I)) {
|
|
return;
|
|
}
|
|
try {
|
|
v.a().a(jSONObject.getString(com.mbridge.msdk.foundation.entity.b.JSON_KEY_C_I));
|
|
} catch (Exception e) {
|
|
af.b(j.a, e.getMessage());
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
private void a(Context context, String str, String str2, String str3, com.mbridge.msdk.foundation.same.net.f.d dVar) {
|
|
if (context == null) {
|
|
return;
|
|
}
|
|
com.mbridge.msdk.foundation.same.net.f.e eVar = new com.mbridge.msdk.foundation.same.net.f.e();
|
|
eVar.a("app_id", str);
|
|
eVar.a("sign", SameMD5.getMD5(str + str2));
|
|
try {
|
|
String ay = h.a().a(str).ay();
|
|
if (TextUtils.isEmpty(ay)) {
|
|
ay = "";
|
|
}
|
|
eVar.a("vtag", ay);
|
|
} catch (Throwable th) {
|
|
af.b(a, th.getMessage());
|
|
}
|
|
if (com.mbridge.msdk.foundation.same.net.e.d.f().q) {
|
|
eVar.a("st_net", com.mbridge.msdk.foundation.same.net.e.d.f().s + "");
|
|
}
|
|
eVar.a("only_p_info", str3);
|
|
com.mbridge.msdk.c.a.c cVar = new com.mbridge.msdk.c.a.c(context);
|
|
String str4 = com.mbridge.msdk.foundation.same.net.e.d.f().G;
|
|
try {
|
|
if (com.mbridge.msdk.foundation.same.net.e.d.f().r && com.mbridge.msdk.foundation.same.net.e.d.f().q && com.mbridge.msdk.foundation.same.net.e.d.f().v < com.mbridge.msdk.foundation.same.net.e.d.f().w.size()) {
|
|
String str5 = com.mbridge.msdk.foundation.same.net.e.d.f().w.get(com.mbridge.msdk.foundation.same.net.e.d.f().v);
|
|
if (!TextUtils.isEmpty(str5)) {
|
|
if (!str5.startsWith("http")) {
|
|
if (str5.startsWith("https")) {
|
|
}
|
|
}
|
|
str4 = str5 + "/setting";
|
|
}
|
|
}
|
|
} catch (Throwable th2) {
|
|
af.b(a, th2.getMessage());
|
|
}
|
|
cVar.get(1, str4, eVar, dVar, "setting", ChunkedTrackBlacklistUtil.DEFAULT_TRACK_BLACKLIST_MS);
|
|
}
|
|
|
|
public final void b(final Context context, final String str, final String str2) {
|
|
if (context == null) {
|
|
return;
|
|
}
|
|
a(context, str, str2, "0", new com.mbridge.msdk.foundation.same.net.f.d() { // from class: com.mbridge.msdk.c.j.2
|
|
@Override // com.mbridge.msdk.foundation.same.net.f.d
|
|
public final void a(JSONObject jSONObject) {
|
|
try {
|
|
j.this.a(1, 0, "");
|
|
} catch (Throwable th) {
|
|
af.b(j.a, th.getMessage());
|
|
}
|
|
try {
|
|
if (ak.a(jSONObject)) {
|
|
if (jSONObject.optInt("vtag_status", 0) == 1) {
|
|
String g = h.a().g(str);
|
|
if (!TextUtils.isEmpty(g)) {
|
|
try {
|
|
jSONObject = h.a().a(new JSONObject(g), jSONObject);
|
|
} catch (Exception e) {
|
|
af.b(j.a, e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
jSONObject.put("current_time", System.currentTimeMillis());
|
|
if (com.mbridge.msdk.foundation.same.net.e.d.f().r) {
|
|
if (TextUtils.isEmpty(jSONObject.optString("hst_st_t"))) {
|
|
jSONObject.put("hst_st_t", com.mbridge.msdk.foundation.same.net.e.d.f().l);
|
|
}
|
|
} else if (TextUtils.isEmpty(jSONObject.optString("hst_st"))) {
|
|
jSONObject.put("hst_st", com.mbridge.msdk.foundation.same.net.e.d.f().h);
|
|
}
|
|
h.a().g(str, jSONObject.toString());
|
|
com.mbridge.msdk.foundation.same.net.e.d.f().e();
|
|
try {
|
|
if (!TextUtils.isEmpty(jSONObject.optString("mraid_js"))) {
|
|
com.mbridge.msdk.c.b.a.a().a(context, jSONObject.optString("mraid_js"));
|
|
}
|
|
} catch (Exception e2) {
|
|
af.b(j.a, e2.getMessage());
|
|
}
|
|
if (!TextUtils.isEmpty(jSONObject.optString("web_env_url"))) {
|
|
com.mbridge.msdk.c.b.b.a().a(context, jSONObject.optString("web_env_url"));
|
|
}
|
|
j.a(j.this, context, str);
|
|
} else {
|
|
h.a().f(str);
|
|
}
|
|
j.a(j.this);
|
|
} catch (Exception e3) {
|
|
af.b(j.a, e3.getMessage());
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.same.net.f.d
|
|
public final void a(String str3) {
|
|
try {
|
|
j.this.a(2, 0, str3);
|
|
} catch (Throwable th) {
|
|
af.b(j.a, th.getMessage());
|
|
}
|
|
if (!com.mbridge.msdk.foundation.same.net.e.d.f().r) {
|
|
com.mbridge.msdk.foundation.same.net.e.d.f().u++;
|
|
} else {
|
|
com.mbridge.msdk.foundation.same.net.e.d.f().v++;
|
|
}
|
|
j.this.c(context, str, str2);
|
|
j.a(j.this);
|
|
af.b(j.a, "get app setting error" + str3);
|
|
}
|
|
});
|
|
a(3, 0, "");
|
|
}
|
|
|
|
public final void a(Context context, final String str, String str2, final String str3) {
|
|
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
|
|
str = com.mbridge.msdk.foundation.controller.c.m().k();
|
|
str2 = com.mbridge.msdk.foundation.controller.c.m().b();
|
|
}
|
|
if (h.a().e(str3, str) && h.a().a(str, 2, str3)) {
|
|
com.mbridge.msdk.foundation.same.net.f.e eVar = new com.mbridge.msdk.foundation.same.net.f.e();
|
|
String str4 = v8.i.d + str3 + v8.i.e;
|
|
eVar.a("unit_ids", str4);
|
|
eVar.a("app_id", str);
|
|
eVar.a("sign", SameMD5.getMD5(str + str2));
|
|
try {
|
|
String t = h.a().c(str, str4).t();
|
|
if (TextUtils.isEmpty(t)) {
|
|
t = "";
|
|
}
|
|
eVar.a("vtag", t);
|
|
} catch (Throwable th) {
|
|
af.b(a, th.getMessage());
|
|
}
|
|
com.mbridge.msdk.foundation.same.net.f.d dVar = new com.mbridge.msdk.foundation.same.net.f.d() { // from class: com.mbridge.msdk.c.j.4
|
|
@Override // com.mbridge.msdk.foundation.same.net.f.d
|
|
public final void a(JSONObject jSONObject) {
|
|
try {
|
|
if (ak.a(jSONObject)) {
|
|
String optString = jSONObject.optString("vtag", "");
|
|
String optString2 = jSONObject.optString("rid", "");
|
|
JSONArray optJSONArray = jSONObject.optJSONArray("unitSetting");
|
|
if (optJSONArray != null && optJSONArray.length() > 0) {
|
|
JSONObject optJSONObject = optJSONArray.optJSONObject(0);
|
|
if (jSONObject.optInt("vtag_status", 0) == 1) {
|
|
h.a();
|
|
String a2 = com.mbridge.msdk.foundation.a.a.a.a().a(str + "_" + str3);
|
|
if (!TextUtils.isEmpty(a2)) {
|
|
try {
|
|
optJSONObject = h.a().a(new JSONObject(a2), optJSONObject);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
optJSONObject.put("current_time", System.currentTimeMillis());
|
|
optJSONObject.put("vtag", optString);
|
|
optJSONObject.put("rid", optString2);
|
|
h.a().a(str, str3, optJSONObject.toString());
|
|
}
|
|
} else {
|
|
h.a().h(str, str3);
|
|
}
|
|
j.this.a(1, 1, "");
|
|
} catch (Exception e2) {
|
|
af.b(j.a, e2.getMessage());
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.foundation.same.net.f.d
|
|
public final void a(String str5) {
|
|
j.this.a(2, 1, "");
|
|
}
|
|
};
|
|
dVar.setUnitId(str3);
|
|
new com.mbridge.msdk.c.a.c(context).get(1, com.mbridge.msdk.foundation.same.net.e.d.f().G, eVar, dVar, "setting", ChunkedTrackBlacklistUtil.DEFAULT_TRACK_BLACKLIST_MS);
|
|
a(3, 1, "");
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void a(int i, int i2, String str) {
|
|
String str2;
|
|
try {
|
|
com.mbridge.msdk.foundation.same.report.d.c cVar = new com.mbridge.msdk.foundation.same.report.d.c();
|
|
com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e();
|
|
eVar.a("key", "2000112");
|
|
eVar.a("st_net", Integer.valueOf(com.mbridge.msdk.foundation.same.net.e.d.f().s));
|
|
eVar.a("result", Integer.valueOf(i));
|
|
eVar.a("type", Integer.valueOf(i2));
|
|
if (i2 == 0) {
|
|
str2 = b();
|
|
} else {
|
|
str2 = com.mbridge.msdk.foundation.same.net.e.d.f().r ? com.mbridge.msdk.foundation.same.net.e.d.f().H : com.mbridge.msdk.foundation.same.net.e.d.f().G;
|
|
}
|
|
eVar.a("url", str2);
|
|
eVar.a("reason", str);
|
|
cVar.a("2000112", eVar);
|
|
com.mbridge.msdk.foundation.same.report.d.d.a().a("2000112", cVar);
|
|
} catch (Throwable th) {
|
|
af.b(a, th.getMessage());
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void a(j jVar, Context context, String str) {
|
|
g b;
|
|
h a2 = h.a();
|
|
if (a2 != null && (b = a2.b(str)) != null) {
|
|
MBridgeConstans.OMID_JS_SERVICE_URL = b.X();
|
|
MBridgeConstans.OMID_JS_H5_URL = b.W();
|
|
}
|
|
com.mbridge.msdk.a.b.a(context);
|
|
com.mbridge.msdk.a.b.b(context);
|
|
}
|
|
|
|
public static /* synthetic */ void a(j jVar) {
|
|
try {
|
|
new com.mbridge.msdk.foundation.same.report.h(com.mbridge.msdk.foundation.controller.c.m().c()).a();
|
|
} catch (Throwable th) {
|
|
af.b(a, th.getMessage());
|
|
}
|
|
}
|
|
}
|