Files
rr3-apk/decompiled-community/sources/com/fyber/inneractive/sdk/network/s.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- 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
2026-02-18 15:48:36 -08:00

313 lines
13 KiB
Java

package com.fyber.inneractive.sdk.network;
import android.os.Build;
import android.text.TextUtils;
import androidx.core.app.NotificationCompat;
import com.fyber.inneractive.sdk.config.IAConfigManager;
import com.fyber.inneractive.sdk.external.InneractiveAdManager;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.util.IAlog;
import com.ironsource.ad;
import com.ironsource.kq;
import com.ironsource.nb;
import com.ironsource.v8;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Locale;
import java.util.TimeZone;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public final class s extends l {
public static class a {
public static final SimpleDateFormat h = new SimpleDateFormat("yyyy-MM-dd", Locale.US);
public final InneractiveAdRequest a;
public final q b;
public final r c;
public final JSONArray d;
public final com.fyber.inneractive.sdk.response.e e;
public final JSONArray f;
public boolean g;
/* renamed from: com.fyber.inneractive.sdk.network.s$a$a, reason: collision with other inner class name */
public class RunnableC0078a implements Runnable {
public final /* synthetic */ s a;
public final /* synthetic */ String b;
public final /* synthetic */ String c;
public final /* synthetic */ String d;
public final /* synthetic */ String e;
public final /* synthetic */ Object f;
public final /* synthetic */ String g;
public RunnableC0078a(s sVar, String str, String str2, String str3, String str4, Integer num, String str5) {
this.a = sVar;
this.b = str;
this.c = str2;
this.d = str3;
this.e = str4;
this.f = num;
this.g = str5;
}
@Override // java.lang.Runnable
public final void run() {
String str;
HashMap hashMap;
com.fyber.inneractive.sdk.response.e eVar;
a aVar = a.this;
q qVar = aVar.b;
if (qVar != null) {
this.a.a(Integer.valueOf(qVar.val), NotificationCompat.CATEGORY_ERROR);
a.this.b.getClass();
str = y0.ERROR_TABLE.e();
IAlog.a("Event dispatcher - dispatching error: %s", a.this.b);
int i = a.this.b.val;
} else {
r rVar = aVar.c;
if (rVar != null) {
this.a.a(Integer.valueOf(rVar.val), NotificationCompat.CATEGORY_EVENT);
a.this.c.getClass();
str = y0.EVENT_TABLE.e();
IAlog.a("Event dispatcher - dispatching event: %s", a.this.c);
int i2 = a.this.c.val;
} else {
str = null;
}
}
s sVar = this.a;
StringBuilder sb = new StringBuilder();
sb.append(str);
a aVar2 = a.this;
q qVar2 = aVar2.b;
sb.append(qVar2 != null ? String.valueOf(qVar2.val) : String.valueOf(aVar2.c.val));
sVar.a(sb.toString(), nb.Q);
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
this.a.a(Long.valueOf(calendar.getTimeInMillis()), "date_created");
if (!IAConfigManager.g()) {
this.a.a(this.b, "contentid");
this.a.a(this.c, "fairbidv");
if (!TextUtils.isEmpty(this.d)) {
this.a.a(this.d, "placement_type");
}
if (!TextUtils.isEmpty(this.e)) {
this.a.a(this.e, "spot_id");
}
if (!InneractiveAdManager.isCurrentUserAChild()) {
String j = com.fyber.inneractive.sdk.util.m.j();
if (!TextUtils.isEmpty(j)) {
this.a.a(j, "ciso");
}
}
this.a.a(this.f, "ad_type");
if (a.this.g && !TextUtils.isEmpty(this.g)) {
this.a.c = this.g;
}
this.a.a(com.fyber.inneractive.sdk.util.k0.e().f(), nb.q);
try {
this.a.a(a.h.format(calendar.getTime()), "day");
} catch (Throwable unused) {
}
this.a.a(Integer.valueOf(calendar.get(11)), "hour");
JSONArray jSONArray = a.this.d;
if (jSONArray != null && jSONArray.length() > 0) {
this.a.a(a.this.d, kq.d);
}
com.fyber.inneractive.sdk.response.e eVar2 = a.this.e;
if (eVar2 != null && eVar2.B) {
this.a.a("1", "sdk_bidding");
}
if (InneractiveAdManager.isCurrentUserAChild()) {
this.a.a("1", "child_mode");
}
IAConfigManager iAConfigManager = IAConfigManager.L;
this.a.a(iAConfigManager.D.m() && (eVar = a.this.e) != null && eVar.F != com.fyber.inneractive.sdk.ignite.l.NONE ? "1" : "0", "ignite");
s sVar2 = this.a;
com.fyber.inneractive.sdk.ignite.k kVar = iAConfigManager.D.p;
sVar2.a(kVar != null ? kVar.a.h() : null, "ignitep");
s sVar3 = this.a;
com.fyber.inneractive.sdk.ignite.k kVar2 = iAConfigManager.D.p;
sVar3.a(kVar2 != null ? kVar2.a.e() : null, "ignitev");
JSONArray c = iAConfigManager.K.c();
if (c != null && c.length() > 0) {
this.a.a(c, "s_experiments");
}
JSONArray jSONArray2 = a.this.f;
if (jSONArray2 != null && jSONArray2.length() > 0) {
int i3 = 0;
while (true) {
if (i3 >= jSONArray2.length()) {
break;
}
if (jSONArray2.optJSONObject(i3).length() >= 1) {
this.a.a(a.this.f, "extra");
break;
}
i3++;
}
}
com.fyber.inneractive.sdk.response.e eVar3 = a.this.e;
if (eVar3 != null && eVar3.J) {
this.a.a("1", "dynamic_controls");
}
}
s sVar4 = this.a;
sVar4.getClass();
if (TextUtils.isEmpty(sVar4.a) || (hashMap = sVar4.b) == null || hashMap.size() == 0) {
return;
}
d dVar = IAConfigManager.L.G;
dVar.getClass();
JSONObject jSONObject = new JSONObject();
HashMap hashMap2 = sVar4.b;
for (String str2 : hashMap2.keySet()) {
Object obj = hashMap2.get(str2);
if (obj != null) {
try {
jSONObject.put(str2, obj);
} catch (JSONException unused2) {
}
}
}
String str3 = sVar4.c;
if (str3 != null) {
int length = str3.length();
if (length > 51200) {
int indexOf = str3.indexOf("iawrapper");
if (indexOf == -1) {
indexOf = 0;
}
str3 = str3.substring(indexOf, 51199);
IAlog.a("Sdk event dispatcher: message size %d is too long! trimming message to %d Characters", Integer.valueOf(length), 51200);
}
try {
jSONObject.put("ad", str3);
} catch (JSONException e) {
IAlog.a("Failed inserting ad body to json", e, new Object[0]);
}
}
if (IAlog.a == 1) {
try {
jSONObject.toString();
} catch (Throwable unused3) {
}
}
dVar.a.offer(jSONObject);
if (dVar.a.size() > 30) {
com.fyber.inneractive.sdk.util.n0 n0Var = dVar.d;
if (n0Var != null && n0Var.hasMessages(12312329)) {
dVar.d.removeMessages(12312329);
}
com.fyber.inneractive.sdk.util.n0 n0Var2 = dVar.d;
if (n0Var2 != null) {
n0Var2.post(new c(dVar, 12312329, 0L));
}
}
}
}
public a(q qVar) {
this(qVar, (InneractiveAdRequest) null, (com.fyber.inneractive.sdk.response.e) null, (JSONArray) null);
}
public final a a(Object... objArr) {
if (objArr.length > 0) {
JSONObject jSONObject = new JSONObject();
for (int i = 0; i < objArr.length - 1; i += 2) {
String obj = objArr[i].toString();
Object obj2 = objArr[i + 1];
try {
jSONObject.put(obj, obj2);
} catch (Exception unused) {
IAlog.f("Got exception adding param to json object: %s, %s", obj, obj2);
}
}
this.f.put(jSONObject);
}
return this;
}
public a(r rVar) {
this(rVar, (InneractiveAdRequest) null, (com.fyber.inneractive.sdk.response.e) null, (JSONArray) null);
}
public a(q qVar, InneractiveAdRequest inneractiveAdRequest, com.fyber.inneractive.sdk.response.e eVar, JSONArray jSONArray) {
this(eVar);
this.b = qVar;
this.a = inneractiveAdRequest;
this.d = jSONArray;
}
public a(r rVar, InneractiveAdRequest inneractiveAdRequest, com.fyber.inneractive.sdk.response.e eVar, JSONArray jSONArray) {
this(eVar);
this.c = rVar;
this.a = inneractiveAdRequest;
this.d = jSONArray;
}
/* JADX WARN: Removed duplicated region for block: B:75:0x0123 */
/* JADX WARN: Removed duplicated region for block: B:78:0x0131 */
/* JADX WARN: Removed duplicated region for block: B:86:0x014d */
/* JADX WARN: Removed duplicated region for block: B:89:0x015f */
/* JADX WARN: Removed duplicated region for block: B:92:0x016c */
/* JADX WARN: Removed duplicated region for block: B:96:0x0170 */
/* JADX WARN: Removed duplicated region for block: B:97:0x0161 */
/* JADX WARN: Removed duplicated region for block: B:98:0x0152 */
/* JADX WARN: Removed duplicated region for block: B:99:0x0133 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(java.lang.String r20) {
/*
Method dump skipped, instructions count: 391
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.network.s.a.a(java.lang.String):void");
}
public a(com.fyber.inneractive.sdk.response.e eVar) {
this.g = false;
this.e = eVar;
this.f = new JSONArray();
}
}
public static class b {
public final JSONObject a = new JSONObject();
public final b a(Object obj, String str) {
try {
this.a.put(str, obj);
} catch (Exception unused) {
IAlog.f("Got exception adding param to json object: %s, %s", str, obj);
}
return this;
}
}
public s(String str, String str2, String str3, Long l, String str4, String str5, String str6, String str7) {
super(com.fyber.inneractive.sdk.config.a.a());
a(str7 == null ? "8.3.1" : str7, ad.M);
a(com.fyber.inneractive.sdk.util.m.n(), "pkgn");
if (IAConfigManager.g()) {
return;
}
a(v8.d, "osn");
a(Build.VERSION.RELEASE, ad.z);
a(com.fyber.inneractive.sdk.util.m.k(), "model");
a(com.fyber.inneractive.sdk.util.m.o(), "pkgv");
a(str, "appid");
a(str2, "session");
a(str3, "adnt");
a(l, "adnt_id");
a(str4, CampaignEx.JSON_KEY_CREATIVE_ID);
a(str5, "adomain");
a(str6, "campaign_id");
}
}