- 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
436 lines
14 KiB
Java
436 lines
14 KiB
Java
package com.ironsource.mediationsdk;
|
|
|
|
import android.content.Context;
|
|
import android.content.IntentFilter;
|
|
import android.os.CountDownTimer;
|
|
import android.os.Handler;
|
|
import android.text.TextUtils;
|
|
import com.ironsource.cr;
|
|
import com.ironsource.d4;
|
|
import com.ironsource.dr;
|
|
import com.ironsource.el;
|
|
import com.ironsource.en;
|
|
import com.ironsource.environment.ContextProvider;
|
|
import com.ironsource.environment.NetworkStateReceiver;
|
|
import com.ironsource.environment.thread.IronSourceThreadManager;
|
|
import com.ironsource.fl;
|
|
import com.ironsource.fr;
|
|
import com.ironsource.i9;
|
|
import com.ironsource.ja;
|
|
import com.ironsource.kb;
|
|
import com.ironsource.mediationsdk.IronSource;
|
|
import com.ironsource.mediationsdk.integration.IntegrationHelper;
|
|
import com.ironsource.mediationsdk.logger.IronLog;
|
|
import com.ironsource.mediationsdk.logger.IronSourceLogger;
|
|
import com.ironsource.mediationsdk.logger.IronSourceLoggerManager;
|
|
import com.ironsource.mediationsdk.p;
|
|
import com.ironsource.mediationsdk.sdk.SegmentListener;
|
|
import com.ironsource.mediationsdk.utils.IronSourceConstants;
|
|
import com.ironsource.mediationsdk.utils.IronSourceUtils;
|
|
import com.ironsource.qq;
|
|
import com.ironsource.rp;
|
|
import com.ironsource.rq;
|
|
import com.ironsource.sd;
|
|
import com.ironsource.so;
|
|
import com.ironsource.t3;
|
|
import com.ironsource.uo;
|
|
import com.ironsource.vi;
|
|
import com.ironsource.vm;
|
|
import com.ironsource.x3;
|
|
import com.ironsource.xc;
|
|
import com.ironsource.zn;
|
|
import com.mbridge.msdk.interstitial.view.MBInterstitialActivity;
|
|
import com.mbridge.msdk.playercommon.exoplayer2.source.chunk.ChunkedTrackBlacklistUtil;
|
|
import java.util.ArrayList;
|
|
import java.util.Date;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.concurrent.atomic.AtomicBoolean;
|
|
import kotlin.jvm.functions.Function0;
|
|
|
|
/* loaded from: classes4.dex */
|
|
class s implements vm {
|
|
private static s A;
|
|
private fr a;
|
|
private NetworkStateReceiver p;
|
|
private CountDownTimer q;
|
|
private String t;
|
|
private cr u;
|
|
private SegmentListener v;
|
|
private long x;
|
|
private int b = e.f;
|
|
private sd c = el.N().t();
|
|
private final String d = "appKey";
|
|
private final String e = getClass().getSimpleName();
|
|
private boolean l = false;
|
|
private boolean n = false;
|
|
private List<en> r = new ArrayList();
|
|
private String s = "";
|
|
private f z = new a();
|
|
private Handler m = IronSourceThreadManager.INSTANCE.getInitHandler();
|
|
private int f = 1;
|
|
private int g = 0;
|
|
private int h = 62;
|
|
private int i = 12;
|
|
private int j = 5;
|
|
private AtomicBoolean o = new AtomicBoolean(true);
|
|
private boolean k = false;
|
|
private boolean w = false;
|
|
private vi y = new vi();
|
|
|
|
public class a extends f {
|
|
public a() {
|
|
super();
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
dr i;
|
|
try {
|
|
p m = p.m();
|
|
if (!TextUtils.isEmpty(s.this.s)) {
|
|
xc.a().a("userId", s.this.s);
|
|
}
|
|
if (!TextUtils.isEmpty(s.this.t)) {
|
|
xc.a().a("appKey", s.this.t);
|
|
}
|
|
s.this.y.i(s.this.s);
|
|
s.this.x = new Date().getTime();
|
|
so.c().a();
|
|
s.this.u = m.b(ContextProvider.getInstance().getApplicationContext(), s.this.s, this.c);
|
|
if (s.this.u != null) {
|
|
s.this.m.removeCallbacks(this);
|
|
if (s.this.u.p()) {
|
|
s.this.b(d.INITIATED);
|
|
new fl().a(s.this.u.c().b().d().b(), m.B());
|
|
d4 e = s.this.u.c().b().e();
|
|
if (e != null) {
|
|
ja jaVar = ja.a;
|
|
jaVar.c(e.g());
|
|
jaVar.a(e.f());
|
|
jaVar.a(e.j());
|
|
IronSourceThreadManager.INSTANCE.setUseSharedExecutorService(e.h());
|
|
s.this.c.a(e);
|
|
}
|
|
s.this.a(ContextProvider.getInstance().getApplicationContext(), s.this.u);
|
|
m.a(new Date().getTime() - s.this.x, s.this.u.h());
|
|
if (e != null && e.e()) {
|
|
new uo(rp.i(), new Function0() { // from class: com.ironsource.mediationsdk.s$a$$ExternalSyntheticLambda0
|
|
@Override // kotlin.jvm.functions.Function0
|
|
public final Object invoke() {
|
|
return Long.valueOf(System.currentTimeMillis());
|
|
}
|
|
}, el.N(), IronSourceThreadManager.INSTANCE.getThreadPoolExecutor()).c(ContextProvider.getInstance().getApplicationContext());
|
|
}
|
|
s.this.a = new fr();
|
|
s.this.a.a(s.this.c);
|
|
if (s.this.u.c().b().f() && ContextProvider.getInstance().getApplicationContext() != null) {
|
|
IntegrationHelper.validateIntegration(ContextProvider.getInstance().getApplicationContext());
|
|
}
|
|
List<IronSource.AD_UNIT> g = s.this.u.g();
|
|
Iterator it = s.this.r.iterator();
|
|
while (it.hasNext()) {
|
|
((en) it.next()).a(g, s.this.h(), s.this.u.c());
|
|
}
|
|
new zn.a().a();
|
|
if (s.this.v != null && (i = s.this.u.c().b().i()) != null && !TextUtils.isEmpty(i.c())) {
|
|
s.this.v.onSegmentReceived(i.c());
|
|
}
|
|
x3 c = s.this.u.c().b().c();
|
|
if (c.f()) {
|
|
i9.d().a(c.b(), c.d(), c.c(), c.e(), IronSourceUtils.getSessionId(), c.a(), c.g());
|
|
}
|
|
} else if (!s.this.l) {
|
|
s.this.b(d.INIT_FAILED);
|
|
s.this.l = true;
|
|
Iterator it2 = s.this.r.iterator();
|
|
while (it2.hasNext()) {
|
|
((en) it2.next()).d("serverResponseIsNotValid");
|
|
}
|
|
}
|
|
} else {
|
|
if (s.this.g == 3) {
|
|
s.this.w = true;
|
|
Iterator it3 = s.this.r.iterator();
|
|
while (it3.hasNext()) {
|
|
((en) it3.next()).a();
|
|
}
|
|
}
|
|
if (this.a && s.this.g < s.this.h) {
|
|
s.this.k = true;
|
|
s.this.m.postDelayed(this, s.this.f * 1000);
|
|
if (s.this.g < s.this.i) {
|
|
s.a(s.this, 2);
|
|
}
|
|
}
|
|
if ((!this.a || s.this.g == s.this.j) && !s.this.l) {
|
|
s.this.l = true;
|
|
if (TextUtils.isEmpty(this.b)) {
|
|
this.b = "noServerResponse";
|
|
}
|
|
Iterator it4 = s.this.r.iterator();
|
|
while (it4.hasNext()) {
|
|
((en) it4.next()).d(this.b);
|
|
}
|
|
s.this.b(d.INIT_FAILED);
|
|
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.API, "Mediation availability false reason: No server response", 1);
|
|
}
|
|
s.f(s.this);
|
|
}
|
|
s.this.e();
|
|
} catch (Exception e2) {
|
|
i9.d().a(e2);
|
|
IronLog.INTERNAL.error(e2.toString());
|
|
}
|
|
}
|
|
}
|
|
|
|
public class b implements Runnable {
|
|
|
|
public class a extends CountDownTimer {
|
|
public a(long j, long j2) {
|
|
super(j, j2);
|
|
}
|
|
|
|
@Override // android.os.CountDownTimer
|
|
public void onFinish() {
|
|
if (s.this.l) {
|
|
return;
|
|
}
|
|
s.this.l = true;
|
|
Iterator it = s.this.r.iterator();
|
|
while (it.hasNext()) {
|
|
((en) it.next()).d("noInternetConnection");
|
|
}
|
|
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.API, "Mediation availability false reason: No internet connection", 1);
|
|
}
|
|
|
|
@Override // android.os.CountDownTimer
|
|
public void onTick(long j) {
|
|
if (j <= 45000) {
|
|
s.this.w = true;
|
|
Iterator it = s.this.r.iterator();
|
|
while (it.hasNext()) {
|
|
((en) it.next()).a();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public b() {
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
s.this.q = new a(ChunkedTrackBlacklistUtil.DEFAULT_TRACK_BLACKLIST_MS, MBInterstitialActivity.WEB_LOAD_TIME).start();
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ class c {
|
|
static final /* synthetic */ int[] a;
|
|
|
|
static {
|
|
int[] iArr = new int[d.values().length];
|
|
a = iArr;
|
|
try {
|
|
iArr[d.INIT_IN_PROGRESS.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
a[d.INIT_FAILED.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
a[d.INITIATED.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
}
|
|
}
|
|
|
|
public enum d {
|
|
NOT_INIT,
|
|
INIT_IN_PROGRESS,
|
|
INIT_FAILED,
|
|
INITIATED
|
|
}
|
|
|
|
public static class e {
|
|
public static int a = 0;
|
|
public static int b = 1;
|
|
public static int c = 2;
|
|
public static int d = 3;
|
|
public static int e = 4;
|
|
public static int f = 5;
|
|
}
|
|
|
|
public abstract class f implements Runnable {
|
|
String b;
|
|
boolean a = true;
|
|
protected p.c c = new a();
|
|
|
|
public class a implements p.c {
|
|
public a() {
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.p.c
|
|
public void a(String str) {
|
|
f fVar = f.this;
|
|
fVar.a = false;
|
|
fVar.b = str;
|
|
}
|
|
}
|
|
|
|
public f() {
|
|
}
|
|
}
|
|
|
|
private s() {
|
|
}
|
|
|
|
private static int a(d dVar) {
|
|
int i = c.a[dVar.ordinal()];
|
|
return i != 1 ? i != 2 ? i != 3 ? e.a : e.b : e.e : e.d;
|
|
}
|
|
|
|
public static /* synthetic */ int a(s sVar, int i) {
|
|
int i2 = sVar.f * i;
|
|
sVar.f = i2;
|
|
return i2;
|
|
}
|
|
|
|
public static synchronized s c() {
|
|
s sVar;
|
|
synchronized (s.class) {
|
|
try {
|
|
if (A == null) {
|
|
A = new s();
|
|
}
|
|
sVar = A;
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
}
|
|
return sVar;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void e() {
|
|
if (el.N().d().b()) {
|
|
rp.i().a(new kb(IronSourceConstants.EP_CONFIG_RECEIVED, null));
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ int f(s sVar) {
|
|
int i = sVar.g;
|
|
sVar.g = i + 1;
|
|
return i;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public boolean h() {
|
|
return this.k;
|
|
}
|
|
|
|
public synchronized d a() {
|
|
return d.values()[rq.a.a().ordinal()];
|
|
}
|
|
|
|
public void a(Context context, cr crVar) {
|
|
this.y.i(crVar.f().h());
|
|
this.y.b(crVar.f().d());
|
|
t3 b2 = crVar.c().b();
|
|
this.y.a(b2.a());
|
|
this.y.c(b2.b().b());
|
|
this.y.b(b2.j().b());
|
|
this.y.a(Boolean.valueOf(IronSourceUtils.getFirstSession(context)));
|
|
d4 e2 = crVar.c().b().e();
|
|
this.y.b(e2.b());
|
|
el.I().v().a(e2.c());
|
|
}
|
|
|
|
public synchronized void a(Context context, String str, String str2, IronSource.AD_UNIT... ad_unitArr) {
|
|
try {
|
|
try {
|
|
AtomicBoolean atomicBoolean = this.o;
|
|
if (atomicBoolean == null || !atomicBoolean.compareAndSet(true, false)) {
|
|
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.API, this.e + ": Multiple calls to init are not allowed", 2);
|
|
} else {
|
|
b(d.INIT_IN_PROGRESS);
|
|
this.s = str2;
|
|
this.t = str;
|
|
if (IronSourceUtils.isNetworkConnected(context)) {
|
|
this.m.post(this.z);
|
|
} else {
|
|
this.n = true;
|
|
if (this.p == null) {
|
|
this.p = new NetworkStateReceiver(context, this);
|
|
}
|
|
context.registerReceiver(this.p, new IntentFilter("android.net.conn.CONNECTIVITY_CHANGE"));
|
|
IronSourceThreadManager.INSTANCE.postMediationBackgroundTask(new b());
|
|
}
|
|
}
|
|
} catch (Exception e2) {
|
|
i9.d().a(e2);
|
|
IronLog.INTERNAL.error(e2.toString());
|
|
}
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
public void a(en enVar) {
|
|
if (enVar == null) {
|
|
return;
|
|
}
|
|
this.r.add(enVar);
|
|
}
|
|
|
|
public void a(SegmentListener segmentListener) {
|
|
this.v = segmentListener;
|
|
}
|
|
|
|
@Override // com.ironsource.vm
|
|
public void a(boolean z) {
|
|
if (this.n && z) {
|
|
CountDownTimer countDownTimer = this.q;
|
|
if (countDownTimer != null) {
|
|
countDownTimer.cancel();
|
|
}
|
|
this.n = false;
|
|
this.k = true;
|
|
rp.i().a(new kb(IronSourceConstants.INIT_AFTER_REACHABILITY_CHANGE, IronSourceUtils.getMediationAdditionalData(false)));
|
|
this.m.post(this.z);
|
|
}
|
|
}
|
|
|
|
public int b() {
|
|
return this.b;
|
|
}
|
|
|
|
public void b(en enVar) {
|
|
if (enVar == null || this.r.size() == 0) {
|
|
return;
|
|
}
|
|
this.r.remove(enVar);
|
|
}
|
|
|
|
public synchronized void b(d dVar) {
|
|
IronLog.INTERNAL.verbose("old status: " + a() + ", new status: " + dVar + ")");
|
|
rq.a.a(qq.values()[dVar.ordinal()]);
|
|
}
|
|
|
|
public synchronized boolean d() {
|
|
return this.w;
|
|
}
|
|
|
|
public void f() {
|
|
b(d.INIT_FAILED);
|
|
}
|
|
|
|
public synchronized void g() {
|
|
int a2 = a(a());
|
|
this.b = a2;
|
|
this.y.c(a2);
|
|
}
|
|
}
|