- 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
118 lines
5.1 KiB
Java
118 lines
5.1 KiB
Java
package com.mbridge.msdk.mbsignalcommon.communication;
|
|
|
|
import android.text.TextUtils;
|
|
import android.util.Base64;
|
|
import com.mbridge.msdk.foundation.db.g;
|
|
import com.mbridge.msdk.foundation.db.j;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
import com.mbridge.msdk.foundation.tools.ak;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class d {
|
|
public static final String a = "d";
|
|
public static int b = 0;
|
|
public static int c = 1;
|
|
|
|
public static void a(Object obj, JSONObject jSONObject) {
|
|
try {
|
|
JSONObject optJSONObject = jSONObject.optJSONObject("data");
|
|
if (optJSONObject == null) {
|
|
a(obj, "data is empty");
|
|
return;
|
|
}
|
|
final CampaignEx parseCampaignWithBackData = CampaignEx.parseCampaignWithBackData(optJSONObject);
|
|
if (parseCampaignWithBackData == null) {
|
|
a(obj, "data camapign is empty");
|
|
return;
|
|
}
|
|
new Thread(new Runnable() { // from class: com.mbridge.msdk.mbsignalcommon.communication.d.1
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
try {
|
|
j a2 = j.a(g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
|
|
if (a2 != null) {
|
|
if (!a2.b(CampaignEx.this.getId())) {
|
|
com.mbridge.msdk.foundation.entity.g gVar = new com.mbridge.msdk.foundation.entity.g();
|
|
gVar.a(CampaignEx.this.getId());
|
|
gVar.b(CampaignEx.this.getFca());
|
|
gVar.c(CampaignEx.this.getFcb());
|
|
gVar.a(0);
|
|
gVar.d(1);
|
|
gVar.a(System.currentTimeMillis());
|
|
a2.a(gVar);
|
|
} else {
|
|
a2.a(CampaignEx.this.getId());
|
|
}
|
|
}
|
|
d.a(CampaignEx.this.getCampaignUnitId(), CampaignEx.this);
|
|
} catch (Throwable th) {
|
|
af.b(d.a, th.getMessage(), th);
|
|
}
|
|
}
|
|
}).start();
|
|
try {
|
|
JSONObject jSONObject2 = new JSONObject();
|
|
jSONObject2.put("code", b);
|
|
JSONObject jSONObject3 = new JSONObject();
|
|
jSONObject3.put("id", "");
|
|
jSONObject2.put("data", jSONObject3);
|
|
com.mbridge.msdk.mbsignalcommon.windvane.g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
|
|
} catch (Exception e) {
|
|
a(obj, e.getMessage());
|
|
af.a(a, e.getMessage());
|
|
}
|
|
} catch (Throwable th) {
|
|
a(obj, th.getMessage());
|
|
}
|
|
}
|
|
|
|
public static String a(float f, float f2) {
|
|
JSONObject jSONObject = new JSONObject();
|
|
try {
|
|
JSONObject jSONObject2 = new JSONObject();
|
|
jSONObject2.put(com.mbridge.msdk.foundation.same.a.h, ak.b(com.mbridge.msdk.foundation.controller.c.m().c(), f));
|
|
jSONObject2.put(com.mbridge.msdk.foundation.same.a.i, ak.b(com.mbridge.msdk.foundation.controller.c.m().c(), f2));
|
|
jSONObject2.put(com.mbridge.msdk.foundation.same.a.m, 0);
|
|
jSONObject2.put(com.mbridge.msdk.foundation.same.a.k, com.mbridge.msdk.foundation.controller.c.m().c().getResources().getConfiguration().orientation);
|
|
jSONObject2.put(com.mbridge.msdk.foundation.same.a.l, ak.d(com.mbridge.msdk.foundation.controller.c.m().c()));
|
|
jSONObject.put(com.mbridge.msdk.foundation.same.a.j, jSONObject2);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
return jSONObject.toString();
|
|
}
|
|
|
|
public static String a(int i) {
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
jSONObject.put("code", i);
|
|
String jSONObject2 = jSONObject.toString();
|
|
return !TextUtils.isEmpty(jSONObject2) ? Base64.encodeToString(jSONObject2.getBytes(), 2) : "";
|
|
} catch (Throwable unused) {
|
|
af.b(a, "code to string is error");
|
|
return "";
|
|
}
|
|
}
|
|
|
|
public static void a(Object obj, String str) {
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
jSONObject.put("code", c);
|
|
jSONObject.put("message", str);
|
|
jSONObject.put("data", new JSONObject());
|
|
com.mbridge.msdk.mbsignalcommon.windvane.g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
|
|
} catch (Exception e) {
|
|
af.a(a, e.getMessage());
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ void a(String str, CampaignEx campaignEx) {
|
|
if (com.mbridge.msdk.foundation.same.a.b.b == null || TextUtils.isEmpty(campaignEx.getId())) {
|
|
return;
|
|
}
|
|
com.mbridge.msdk.foundation.same.a.b.a(str, campaignEx, "banner");
|
|
}
|
|
}
|