- 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
307 lines
13 KiB
Java
307 lines
13 KiB
Java
package com.tapjoy.internal;
|
|
|
|
import android.content.SharedPreferences;
|
|
import com.applovin.sdk.AppLovinEventTypes;
|
|
import com.ironsource.ad;
|
|
import com.ironsource.mediationsdk.utils.IronSourceConstants;
|
|
import com.ironsource.u3;
|
|
import com.ironsource.v8;
|
|
import com.ironsource.zk;
|
|
import com.mbridge.msdk.MBridgeConstans;
|
|
import com.tapjoy.TJAppInfo;
|
|
import com.tapjoy.TJConnectListener;
|
|
import com.tapjoy.TJStore;
|
|
import com.tapjoy.TJUser;
|
|
import com.tapjoy.TJVerifierKt;
|
|
import com.tapjoy.TapjoyAppSettings;
|
|
import com.tapjoy.TapjoyCache;
|
|
import com.tapjoy.TapjoyConfig;
|
|
import com.tapjoy.TapjoyConnectCore;
|
|
import com.tapjoy.TapjoyConnectFlag;
|
|
import com.tapjoy.TapjoyConstants;
|
|
import com.tapjoy.TapjoyLog;
|
|
import com.tapjoy.TapjoyUtil;
|
|
import java.util.ArrayList;
|
|
import java.util.Collection;
|
|
import java.util.HashMap;
|
|
import java.util.Iterator;
|
|
import kotlin.collections.CollectionsKt___CollectionsKt;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlin.text.StringsKt__StringNumberConversionsKt;
|
|
import kotlin.text.StringsKt__StringsJVMKt;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class w1 extends t1 {
|
|
public final Integer i;
|
|
public final c3 j = new c3();
|
|
|
|
public w1() {
|
|
this.i = null;
|
|
TJUser tJUser = TJUser.INSTANCE;
|
|
tJUser.checkIfMaxLevelRequired();
|
|
Intrinsics.checkNotNullParameter(TapjoyConfig.TJC_CONNECT_SERVICE_URL, "<set-?>");
|
|
this.h = TapjoyConfig.TJC_CONNECT_SERVICE_URL;
|
|
this.i = tJUser.getMaxLevelParam();
|
|
}
|
|
|
|
public static final void b(TJConnectListener connectListener) {
|
|
Intrinsics.checkNotNullParameter(connectListener, "$connectListener");
|
|
connectListener.onConnectSuccess();
|
|
}
|
|
|
|
public static final void c(TJConnectListener connectListener) {
|
|
Intrinsics.checkNotNullParameter(connectListener, "$connectListener");
|
|
connectListener.onConnectFailure(0, "Connect Failure");
|
|
}
|
|
|
|
public final void a(final TJConnectListener connectListener) {
|
|
String str;
|
|
JSONObject jSONObject;
|
|
String str2;
|
|
y1 y1Var;
|
|
boolean equals;
|
|
ArrayList b;
|
|
Object orNull;
|
|
Long d;
|
|
ArrayList a;
|
|
String b2;
|
|
Intrinsics.checkNotNullParameter(connectListener, "connectListener");
|
|
String connectFlagValue = TapjoyConnectCore.getInstance().getConnectFlagValue(TapjoyConnectFlag.USER_ID);
|
|
if (connectFlagValue != null && connectFlagValue.length() != 0) {
|
|
if (connectFlagValue.length() < 200) {
|
|
a(connectFlagValue);
|
|
} else {
|
|
a((String) null);
|
|
}
|
|
}
|
|
c3 c3Var = this.j;
|
|
String str3 = b() + "api/connect/v4";
|
|
HashMap a2 = t1.a();
|
|
p1 p1Var = this.d;
|
|
p1Var.getClass();
|
|
JSONObject jSONObject2 = new JSONObject();
|
|
z.a(jSONObject2, "id", p1Var.a);
|
|
z.a(jSONObject2, "unityads_idfi", p1Var.b);
|
|
z.a(jSONObject2, "auid", p1Var.c);
|
|
z.a(jSONObject2, "version", p1Var.d);
|
|
z.a(jSONObject2, "pkg_id", p1Var.e);
|
|
z.a(jSONObject2, "version_build", p1Var.g);
|
|
z.a(jSONObject2, "group_id", p1Var.h);
|
|
c2 c2Var = p1Var.i;
|
|
c2Var.getClass();
|
|
JSONObject jSONObject3 = new JSONObject();
|
|
z.a(jSONObject3, "cp", c2Var.a);
|
|
z.a(jSONObject2, zk.b, jSONObject3);
|
|
z1 z1Var = this.e;
|
|
z1Var.getClass();
|
|
JSONObject jSONObject4 = new JSONObject();
|
|
z.a(jSONObject4, "name", z1Var.e);
|
|
z.a(jSONObject4, "type", z1Var.b);
|
|
z.a(jSONObject4, "volume", z1Var.f);
|
|
z.a(jSONObject4, "battery", z1Var.g);
|
|
z.a(jSONObject4, "brightness", z1Var.h);
|
|
z.a(jSONObject4, "display_w", z1Var.i);
|
|
z.a(jSONObject4, "display_h", z1Var.j);
|
|
z.a(jSONObject4, "display_d", z1Var.k);
|
|
z.a(jSONObject4, "connection_type", z1Var.c);
|
|
z.a(jSONObject4, "connection_subtype", z1Var.d);
|
|
z.a(jSONObject4, "managed_device_id", z1Var.a);
|
|
a2 a2Var = z1Var.l;
|
|
a2Var.getClass();
|
|
JSONObject jSONObject5 = new JSONObject();
|
|
z.a(jSONObject5, "country_code", a2Var.a);
|
|
z.a(jSONObject4, "geo", jSONObject5);
|
|
b2 b2Var = z1Var.n;
|
|
b2Var.getClass();
|
|
JSONObject jSONObject6 = new JSONObject();
|
|
z.a(jSONObject6, "name", b2Var.f);
|
|
z.a(jSONObject6, "version", b2Var.g);
|
|
z.a(jSONObject6, "language_code", b2Var.a);
|
|
z.a(jSONObject6, "timezone", b2Var.h);
|
|
z.a(jSONObject6, "theme", b2Var.i);
|
|
z.a(jSONObject6, "advertising_id", b2Var.e);
|
|
z.a(jSONObject6, "ad_tracking_enabled", Boolean.valueOf(b2Var.d));
|
|
z.a(jSONObject6, v8.h.U, b2Var.b);
|
|
z.a(jSONObject6, "store_view", b2Var.c);
|
|
o1 o1Var = b2Var.j;
|
|
o1Var.getClass();
|
|
JSONObject jSONObject7 = new JSONObject();
|
|
z.a(jSONObject7, "android_id", o1Var.d);
|
|
z.a(jSONObject7, "manufacturer", o1Var.e);
|
|
z.a(jSONObject7, "app_set_id", o1Var.c);
|
|
z.a(jSONObject7, "device_gps_version", o1Var.f);
|
|
z.a(jSONObject7, "packaged_gps_version", o1Var.g);
|
|
z.a(jSONObject7, "ad_id_check_disabled", o1Var.i);
|
|
z.a(jSONObject7, "legacy_id_fallback_allowed", o1Var.j);
|
|
z.a(jSONObject7, "optout_adid", o1Var.h);
|
|
z.a(jSONObject7, "installer", o1Var.b);
|
|
z.a(jSONObject7, "pkg_sign", o1Var.k);
|
|
z.a(jSONObject7, "screen_layout_size", o1Var.a);
|
|
z.a(jSONObject7, "avail_disk", o1Var.l);
|
|
z.a(jSONObject7, "total_disk", o1Var.m);
|
|
z.a(jSONObject6, "android", jSONObject7);
|
|
z.a(jSONObject4, ad.y, jSONObject6);
|
|
JSONArray jSONArray = new JSONArray();
|
|
u1 u1Var = z1Var.m;
|
|
u1Var.getClass();
|
|
JSONObject jSONObject8 = new JSONObject();
|
|
z.a(jSONObject8, "carrier_name", u1Var.a);
|
|
z.a(jSONObject8, "carrier_name_sim", u1Var.b);
|
|
z.a(jSONObject8, "country_sim", u1Var.f);
|
|
z.a(jSONObject8, "carrier_country_code", u1Var.c);
|
|
String str4 = u1Var.d;
|
|
z.a(jSONObject8, "mobile_country_code", str4 != null ? StringsKt__StringNumberConversionsKt.toIntOrNull(str4) : null);
|
|
String str5 = u1Var.e;
|
|
z.a(jSONObject8, "mobile_network_code", str5 != null ? StringsKt__StringNumberConversionsKt.toIntOrNull(str5) : null);
|
|
z.a(jSONObject4, "carriers", jSONArray.put(jSONObject8));
|
|
e2 e2Var = this.f;
|
|
e2Var.getClass();
|
|
JSONObject jSONObject9 = new JSONObject();
|
|
z.a(jSONObject9, TapjoyConstants.PREF_BELOW_CONSENT_AGE, e2Var.a);
|
|
z.a(jSONObject9, TapjoyConstants.PREF_SUBJECT_TO_GDPR, e2Var.b);
|
|
z.a(jSONObject9, TapjoyConstants.PREF_USER_CONSENT, e2Var.c);
|
|
z.a(jSONObject9, TapjoyConstants.PREF_US_PRIVACY, e2Var.d);
|
|
f2 f2Var = this.c;
|
|
if (f2Var != null) {
|
|
jSONObject = new JSONObject();
|
|
str = connectFlagValue;
|
|
z.a(jSONObject, "debug", f2Var.b);
|
|
z.a(jSONObject, TJVerifierKt.TJC_VERIFIER, f2Var.a);
|
|
z.a(jSONObject, "type", f2Var.c);
|
|
z.a(jSONObject, "installed", f2Var.d);
|
|
z.a(jSONObject, ad.E, f2Var.e);
|
|
z.a(jSONObject, "test_id", f2Var.f);
|
|
z.a(jSONObject, "install_id", f2Var.g);
|
|
z.a(jSONObject, "version", f2Var.h);
|
|
z.a(jSONObject, "revision", f2Var.i);
|
|
z.a(jSONObject, "bridge_version", f2Var.j);
|
|
h2 h2Var = f2Var.k;
|
|
h2Var.getClass();
|
|
JSONObject jSONObject10 = new JSONObject();
|
|
z.a(jSONObject10, "id", h2Var.a);
|
|
z.a(jSONObject10, "last_length", h2Var.b);
|
|
z.a(jSONObject10, "last_at", h2Var.c);
|
|
z.a(jSONObject10, "total_count", h2Var.d);
|
|
z.a(jSONObject10, "total_length", h2Var.e);
|
|
z.a(jSONObject10, IronSourceConstants.EVENTS_DURATION, h2Var.f);
|
|
z.a(jSONObject10, "fq7", h2Var.g);
|
|
z.a(jSONObject10, "fq30", h2Var.h);
|
|
z.a(jSONObject, "session", jSONObject10);
|
|
} else {
|
|
str = connectFlagValue;
|
|
jSONObject = null;
|
|
}
|
|
l2 l2Var = this.g;
|
|
l2Var.getClass();
|
|
JSONObject jSONObject11 = new JSONObject();
|
|
z.a(jSONObject11, "id", l2Var.a);
|
|
z.a(jSONObject11, u3.i, l2Var.c);
|
|
z.a(jSONObject11, AppLovinEventTypes.USER_COMPLETED_LEVEL, l2Var.b);
|
|
z.a(jSONObject11, "tags", new JSONArray((Collection) l2Var.d));
|
|
n1 n1Var = l2Var.e;
|
|
n1Var.getClass();
|
|
JSONObject jSONObject12 = new JSONObject();
|
|
z.a(jSONObject12, "uptime", n1Var.a);
|
|
d2 d2Var = n1Var.b;
|
|
d2Var.getClass();
|
|
JSONObject jSONObject13 = new JSONObject();
|
|
z.a(jSONObject13, "currency_code", d2Var.a);
|
|
z.a(jSONObject13, "total_price", d2Var.b);
|
|
z.a(jSONObject13, "last_at", d2Var.c);
|
|
z.a(jSONObject13, "last_price", d2Var.d);
|
|
z.a(jSONObject13, "total_count", d2Var.e);
|
|
z.a(jSONObject12, "purchase", jSONObject13);
|
|
z.a(jSONObject11, "analytics", jSONObject12);
|
|
JSONObject jSONObject14 = new JSONObject();
|
|
jSONObject14.putOpt("id", this.a);
|
|
jSONObject14.putOpt(MBridgeConstans.DYNAMIC_VIEW_WX_APP, jSONObject2);
|
|
jSONObject14.putOpt("device", jSONObject4);
|
|
jSONObject14.putOpt("regs", jSONObject9);
|
|
jSONObject14.putOpt("sdk", jSONObject);
|
|
jSONObject14.putOpt("user", jSONObject11);
|
|
jSONObject14.put("timestamp", this.b);
|
|
try {
|
|
jSONObject14.getJSONObject("user").put("max_level", this.i);
|
|
} catch (JSONException unused) {
|
|
TapjoyLog.e("ConnectRequest", "Failed to load JSON object from connect request.");
|
|
}
|
|
String jSONObject15 = jSONObject14.toString();
|
|
c3Var.getClass();
|
|
b3 a3 = c3.a(str3, a2, jSONObject15);
|
|
if (a3.a != 200 || (str2 = a3.c) == null || str2.length() == 0) {
|
|
TapjoyConnectCore.getInstance().setConnected(false);
|
|
TapjoyUtil.runOnMainThread(new Runnable() { // from class: com.tapjoy.internal.w1$$ExternalSyntheticLambda1
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
w1.c(TJConnectListener.this);
|
|
}
|
|
});
|
|
y.b.notifyObservers(Boolean.FALSE);
|
|
return;
|
|
}
|
|
x1 x1Var = new x1(new JSONObject(a3.c));
|
|
TJAppInfo tJAppInfo = TJAppInfo.INSTANCE;
|
|
q1 a4 = x1Var.a();
|
|
tJAppInfo.setAppGroupId(a4 != null ? a4.a() : null);
|
|
tJAppInfo.setManagedDeviceID(x1Var.b());
|
|
TJStore tJStore = TJStore.INSTANCE;
|
|
g2 c = x1Var.c();
|
|
tJStore.setStore(c != null ? c.e() : null);
|
|
g2 c2 = x1Var.c();
|
|
String c3 = c2 != null ? c2.c() : null;
|
|
if (c3 != null && c3.length() != 0) {
|
|
TapjoyConnectCore.getInstance().addConnectFlag(TapjoyConnectFlag.SERVICE_URL, c3);
|
|
}
|
|
g2 c4 = x1Var.c();
|
|
if (c4 != null && (b2 = c4.b()) != null) {
|
|
TapjoyAppSettings.getInstance().saveLoggingLevel(b2);
|
|
}
|
|
g2 c5 = x1Var.c();
|
|
if (c5 != null && (a = c5.a()) != null) {
|
|
Iterator it = a.iterator();
|
|
while (it.hasNext()) {
|
|
s1 s1Var = (s1) it.next();
|
|
if (TapjoyCache.getInstance() != null) {
|
|
TapjoyCache tapjoyCache = TapjoyCache.getInstance();
|
|
String b3 = s1Var.b();
|
|
Long a5 = s1Var.a();
|
|
tapjoyCache.cacheAssetFromURL(b3, null, a5 != null ? a5.longValue() : 0L);
|
|
}
|
|
}
|
|
}
|
|
g2 c6 = x1Var.c();
|
|
if (c6 != null && (d = c6.d()) != null) {
|
|
s2.a().a(Long.valueOf(d.longValue()));
|
|
}
|
|
q1 a6 = x1Var.a();
|
|
if (a6 == null || (b = a6.b()) == null) {
|
|
y1Var = null;
|
|
} else {
|
|
orNull = CollectionsKt___CollectionsKt.getOrNull(b, 0);
|
|
y1Var = (y1) orNull;
|
|
}
|
|
SharedPreferences.Editor edit = TapjoyConnectCore.getInstance().getContext().getSharedPreferences(TapjoyConstants.TJC_PREFERENCE, 0).edit();
|
|
equals = StringsKt__StringsJVMKt.equals(y1Var != null ? y1Var.a() : null, "self_managed", true);
|
|
edit.putBoolean("self_managed", equals);
|
|
q1 a7 = x1Var.a();
|
|
edit.putString(TapjoyConstants.PREF_SERVER_CURRENCY_IDS, a7 != null ? a7.c() : null);
|
|
edit.apply();
|
|
if (str == null || str.length() == 0) {
|
|
TapjoyUtil.runOnMainThread(new Runnable() { // from class: com.tapjoy.internal.w1$$ExternalSyntheticLambda0
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
w1.b(TJConnectListener.this);
|
|
}
|
|
});
|
|
} else {
|
|
TJUser.INSTANCE.setUserIdRequest(str, new v1(connectListener));
|
|
}
|
|
TapjoyConnectCore.getInstance().setConnected(true);
|
|
y.a.notifyObservers();
|
|
y.b.notifyObservers(Boolean.TRUE);
|
|
}
|
|
}
|