- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
484 lines
15 KiB
Java
484 lines
15 KiB
Java
package com.ironsource;
|
|
|
|
import com.ironsource.environment.ContextProvider;
|
|
import com.ironsource.m1;
|
|
import com.ironsource.mediationsdk.IronSource;
|
|
import com.ironsource.mediationsdk.adunit.adapter.internal.BaseAdAdapter;
|
|
import com.ironsource.mediationsdk.adunit.adapter.internal.listener.AdapterAdListener;
|
|
import com.ironsource.mediationsdk.adunit.adapter.listener.NetworkInitializationListener;
|
|
import com.ironsource.mediationsdk.adunit.adapter.utility.AdData;
|
|
import com.ironsource.mediationsdk.adunit.adapter.utility.AdapterErrorType;
|
|
import com.ironsource.mediationsdk.logger.IronLog;
|
|
import com.ironsource.mediationsdk.logger.IronSourceError;
|
|
import com.ironsource.mediationsdk.model.Placement;
|
|
import com.ironsource.mediationsdk.utils.ErrorBuilder;
|
|
import com.ironsource.x;
|
|
import com.unity3d.mediation.LevelPlayAdInfo;
|
|
import java.lang.ref.WeakReference;
|
|
import java.util.concurrent.TimeUnit;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public abstract class x implements AdapterAdListener {
|
|
private final p2 a;
|
|
private final y b;
|
|
private WeakReference<b0> c;
|
|
private c0 d;
|
|
private final BaseAdAdapter<?, ?> e;
|
|
private ta f;
|
|
private yp g;
|
|
private boolean h;
|
|
private boolean i;
|
|
private boolean j;
|
|
private boolean k;
|
|
private final AdData l;
|
|
private final f5 m;
|
|
private final f5 n;
|
|
private final boolean o;
|
|
private final String p;
|
|
private final int q;
|
|
private final String r;
|
|
private final IronSource.AD_UNIT s;
|
|
private final int t;
|
|
private final e0 u;
|
|
|
|
public final class a implements NetworkInitializationListener {
|
|
public a() {
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static final void a(x this$0) {
|
|
Intrinsics.checkNotNullParameter(this$0, "this$0");
|
|
this$0.D();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static final void a(x this$0, int i, String str) {
|
|
Intrinsics.checkNotNullParameter(this$0, "this$0");
|
|
this$0.a(i, str);
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.adunit.adapter.listener.NetworkInitializationListener
|
|
public void onInitFailed(final int i, final String str) {
|
|
final x xVar = x.this;
|
|
xVar.a(new Runnable() { // from class: com.ironsource.x$a$$ExternalSyntheticLambda0
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
x.a.a(x.this, i, str);
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.adunit.adapter.listener.NetworkInitializationListener
|
|
public void onInitSuccess() {
|
|
final x xVar = x.this;
|
|
xVar.a(new Runnable() { // from class: com.ironsource.x$a$$ExternalSyntheticLambda1
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
x.a.a(x.this);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
public static final class b extends yp {
|
|
public b() {
|
|
}
|
|
|
|
@Override // com.ironsource.yp
|
|
public void a() {
|
|
long a = ta.a(x.this.f);
|
|
IronLog.INTERNAL.verbose(x.this.a("Load duration = " + a + ", isBidder = " + x.this.s()));
|
|
x.this.k = true;
|
|
x.this.e().e().e().a(a, 1025);
|
|
x.this.e().e().e().a(a, 1025, "time out");
|
|
x xVar = x.this;
|
|
IronSourceError buildLoadFailedError = ErrorBuilder.buildLoadFailedError("time out");
|
|
Intrinsics.checkNotNullExpressionValue(buildLoadFailedError, "buildLoadFailedError(errorMessage)");
|
|
xVar.a(buildLoadFailedError);
|
|
}
|
|
}
|
|
|
|
public x(p2 adTools, y instanceData, b0 listener) {
|
|
Intrinsics.checkNotNullParameter(adTools, "adTools");
|
|
Intrinsics.checkNotNullParameter(instanceData, "instanceData");
|
|
Intrinsics.checkNotNullParameter(listener, "listener");
|
|
this.a = adTools;
|
|
this.b = instanceData;
|
|
this.c = new WeakReference<>(listener);
|
|
this.l = instanceData.g();
|
|
this.m = instanceData.n();
|
|
this.n = instanceData.p();
|
|
this.o = instanceData.j().j();
|
|
this.p = instanceData.r();
|
|
this.q = instanceData.s();
|
|
this.r = instanceData.w();
|
|
this.s = instanceData.h();
|
|
this.t = instanceData.v();
|
|
this.u = instanceData.t();
|
|
BaseAdAdapter<?, ?> a2 = a(instanceData);
|
|
this.e = a2;
|
|
adTools.e().a(new z(adTools, instanceData, a2));
|
|
adTools.e().a(new n4(instanceData.k()));
|
|
}
|
|
|
|
private final void A() {
|
|
IronLog.INTERNAL.verbose(a(this, (String) null, 1, (Object) null));
|
|
this.a.e().a().a(j());
|
|
b0 b0Var = this.c.get();
|
|
if (b0Var != null) {
|
|
b0Var.a(this);
|
|
}
|
|
}
|
|
|
|
private final void B() {
|
|
IronLog ironLog = IronLog.INTERNAL;
|
|
c0 c0Var = null;
|
|
ironLog.verbose(a(this, (String) null, 1, (Object) null));
|
|
F();
|
|
if (this.k || this.i) {
|
|
return;
|
|
}
|
|
this.i = true;
|
|
long a2 = ta.a(this.f);
|
|
ironLog.verbose(a("Load duration = " + a2));
|
|
this.a.e().e().a(a2, false);
|
|
a(m1.a.LoadedSuccessfully);
|
|
c0 c0Var2 = this.d;
|
|
if (c0Var2 == null) {
|
|
Intrinsics.throwUninitializedPropertyAccessException("loadListener");
|
|
} else {
|
|
c0Var = c0Var2;
|
|
}
|
|
c0Var.a(this);
|
|
}
|
|
|
|
private final void C() {
|
|
IronLog.INTERNAL.verbose(a(this, (String) null, 1, (Object) null));
|
|
if (this.j) {
|
|
return;
|
|
}
|
|
this.j = true;
|
|
this.a.e().a().g(j());
|
|
a(m1.a.ShowedSuccessfully);
|
|
b0 b0Var = this.c.get();
|
|
if (b0Var != null) {
|
|
b0Var.b(this);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public final void D() {
|
|
IronLog.INTERNAL.verbose(a(this, (String) null, 1, (Object) null));
|
|
F();
|
|
if (this.k) {
|
|
return;
|
|
}
|
|
z();
|
|
}
|
|
|
|
private final void E() {
|
|
F();
|
|
b a2 = a();
|
|
this.g = a2;
|
|
if (a2 != null) {
|
|
this.a.a((yp) a2, TimeUnit.SECONDS.toMillis(m()));
|
|
}
|
|
}
|
|
|
|
private final void F() {
|
|
yp ypVar = this.g;
|
|
if (ypVar != null) {
|
|
this.a.b(ypVar);
|
|
this.g = null;
|
|
}
|
|
}
|
|
|
|
private final BaseAdAdapter<?, ?> a(y yVar) {
|
|
return this.a.a(yVar);
|
|
}
|
|
|
|
private final b a() {
|
|
return new b();
|
|
}
|
|
|
|
public static /* synthetic */ String a(x xVar, String str, int i, Object obj) {
|
|
if (obj != null) {
|
|
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: createLogMessage");
|
|
}
|
|
if ((i & 1) != 0) {
|
|
str = null;
|
|
}
|
|
return xVar.a(str);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public final void a(int i, String str) {
|
|
IronLog.INTERNAL.verbose(a("error = " + i + ", " + str));
|
|
F();
|
|
this.k = true;
|
|
a(AdapterErrorType.ADAPTER_ERROR_TYPE_INTERNAL, i, str, ta.a(this.f));
|
|
a(new IronSourceError(i, str));
|
|
}
|
|
|
|
private final void a(AdapterErrorType adapterErrorType, int i, String str) {
|
|
long a2 = ta.a(this.f);
|
|
IronLog.INTERNAL.verbose(a("Load duration = " + a2 + ", error = " + i + ", " + str));
|
|
F();
|
|
a(adapterErrorType, i, str, a2);
|
|
this.k = true;
|
|
a(new IronSourceError(i, str));
|
|
}
|
|
|
|
private final void a(AdapterErrorType adapterErrorType, int i, String str, long j) {
|
|
if (adapterErrorType == AdapterErrorType.ADAPTER_ERROR_TYPE_NO_FILL) {
|
|
this.a.e().e().b(j, i);
|
|
} else {
|
|
this.a.e().e().a(j, i, str);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public final void a(IronSourceError ironSourceError) {
|
|
a(m1.a.FailedToLoad);
|
|
c0 c0Var = this.d;
|
|
if (c0Var == null) {
|
|
Intrinsics.throwUninitializedPropertyAccessException("loadListener");
|
|
c0Var = null;
|
|
}
|
|
c0Var.a(ironSourceError, this);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static final void a(x this$0, AdapterErrorType adapterErrorType, int i, String errorMessage) {
|
|
Intrinsics.checkNotNullParameter(this$0, "this$0");
|
|
Intrinsics.checkNotNullParameter(adapterErrorType, "$adapterErrorType");
|
|
Intrinsics.checkNotNullParameter(errorMessage, "$errorMessage");
|
|
this$0.a(adapterErrorType, i, errorMessage);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static final void c(x this$0) {
|
|
Intrinsics.checkNotNullParameter(this$0, "this$0");
|
|
this$0.A();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static final void d(x this$0) {
|
|
Intrinsics.checkNotNullParameter(this$0, "this$0");
|
|
this$0.B();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static final void e(x this$0) {
|
|
Intrinsics.checkNotNullParameter(this$0, "this$0");
|
|
this$0.C();
|
|
}
|
|
|
|
private final int m() {
|
|
Integer e = this.b.n().e();
|
|
return (e == null || e.intValue() <= 0) ? this.b.i().i() : e.intValue();
|
|
}
|
|
|
|
private final void z() {
|
|
IronLog.INTERNAL.verbose(a(this, (String) null, 1, (Object) null));
|
|
try {
|
|
E();
|
|
y();
|
|
} catch (Throwable th) {
|
|
i9.d().a(th);
|
|
String str = "unexpected error while calling adapter.loadAd() - " + th.getMessage();
|
|
IronLog.INTERNAL.error(a(str));
|
|
this.a.e().g().f(str);
|
|
a(AdapterErrorType.ADAPTER_ERROR_TYPE_INTERNAL, 510, str);
|
|
}
|
|
}
|
|
|
|
public final String a(String str) {
|
|
return this.a.a(str, this.r);
|
|
}
|
|
|
|
/* JADX WARN: Type inference failed for: r4v9, types: [com.ironsource.mediationsdk.adunit.adapter.internal.AdapterBaseInterface] */
|
|
public final void a(c0 listener) {
|
|
Intrinsics.checkNotNullParameter(listener, "listener");
|
|
IronLog ironLog = IronLog.INTERNAL;
|
|
ironLog.verbose(a(this, (String) null, 1, (Object) null));
|
|
this.d = listener;
|
|
this.h = true;
|
|
try {
|
|
this.a.e().e().a(false);
|
|
this.f = new ta();
|
|
E();
|
|
BaseAdAdapter<?, ?> baseAdAdapter = this.e;
|
|
Intrinsics.checkNotNull(baseAdAdapter);
|
|
?? networkAdapter = baseAdAdapter.getNetworkAdapter();
|
|
if (networkAdapter != 0) {
|
|
networkAdapter.init(this.b.g(), ContextProvider.getInstance().getApplicationContext(), new a());
|
|
} else {
|
|
String str = "loadAd - network adapter not available " + this.r;
|
|
ironLog.error(a(str));
|
|
a(t1.c(this.b.h()), str);
|
|
}
|
|
} catch (Throwable th) {
|
|
i9.d().a(th);
|
|
String str2 = "loadAd - exception = " + th.getLocalizedMessage();
|
|
IronLog.INTERNAL.error(a(str2));
|
|
this.a.e().g().f(str2);
|
|
a(t1.c(this.b.h()), str2);
|
|
}
|
|
}
|
|
|
|
public abstract void a(f0 f0Var);
|
|
|
|
public final void a(m1.a performance) {
|
|
Intrinsics.checkNotNullParameter(performance, "performance");
|
|
this.b.a(performance);
|
|
}
|
|
|
|
public final void a(Runnable callback) {
|
|
Intrinsics.checkNotNullParameter(callback, "callback");
|
|
this.a.a(callback);
|
|
}
|
|
|
|
public final void a(boolean z) {
|
|
this.a.e().a().a(z);
|
|
}
|
|
|
|
public void b() {
|
|
IronLog.INTERNAL.verbose(a(this, (String) null, 1, (Object) null));
|
|
F();
|
|
this.a.e().e().a(this.t);
|
|
}
|
|
|
|
public final IronSource.AD_UNIT c() {
|
|
return this.s;
|
|
}
|
|
|
|
public LevelPlayAdInfo d() {
|
|
String b2 = this.b.i().b().b();
|
|
String ad_unit = this.b.h().toString();
|
|
Intrinsics.checkNotNullExpressionValue(ad_unit, "instanceData.adFormat.toString()");
|
|
return new LevelPlayAdInfo(b2, ad_unit, this.b.n().a(j()), null, 8, null);
|
|
}
|
|
|
|
public final p2 e() {
|
|
return this.a;
|
|
}
|
|
|
|
public final BaseAdAdapter<?, ?> f() {
|
|
return this.e;
|
|
}
|
|
|
|
public final f5 g() {
|
|
return this.m;
|
|
}
|
|
|
|
public final AdData h() {
|
|
return this.l;
|
|
}
|
|
|
|
public final Placement i() {
|
|
return this.b.i().b().e();
|
|
}
|
|
|
|
public final String j() {
|
|
return this.b.i().m();
|
|
}
|
|
|
|
public final f5 k() {
|
|
return this.n;
|
|
}
|
|
|
|
public final y l() {
|
|
return this.b;
|
|
}
|
|
|
|
public final String n() {
|
|
return this.p;
|
|
}
|
|
|
|
public final String o() {
|
|
return this.r;
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.adunit.adapter.internal.listener.AdapterAdListener
|
|
public void onAdClicked() {
|
|
a(new Runnable() { // from class: com.ironsource.x$$ExternalSyntheticLambda3
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
x.c(x.this);
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.adunit.adapter.internal.listener.AdapterAdListener
|
|
public void onAdLoadFailed(final AdapterErrorType adapterErrorType, final int i, final String errorMessage) {
|
|
Intrinsics.checkNotNullParameter(adapterErrorType, "adapterErrorType");
|
|
Intrinsics.checkNotNullParameter(errorMessage, "errorMessage");
|
|
a(new Runnable() { // from class: com.ironsource.x$$ExternalSyntheticLambda1
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
x.a(x.this, adapterErrorType, i, errorMessage);
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.adunit.adapter.internal.listener.AdapterAdListener
|
|
public void onAdLoadSuccess() {
|
|
a(new Runnable() { // from class: com.ironsource.x$$ExternalSyntheticLambda0
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
x.d(x.this);
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.adunit.adapter.internal.listener.AdapterAdListener
|
|
public void onAdOpened() {
|
|
a(new Runnable() { // from class: com.ironsource.x$$ExternalSyntheticLambda2
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
x.e(x.this);
|
|
}
|
|
});
|
|
}
|
|
|
|
public final int p() {
|
|
return this.q;
|
|
}
|
|
|
|
public final e0 q() {
|
|
return this.u;
|
|
}
|
|
|
|
public final int r() {
|
|
return this.t;
|
|
}
|
|
|
|
public final boolean s() {
|
|
return this.o;
|
|
}
|
|
|
|
public final boolean t() {
|
|
return this.k;
|
|
}
|
|
|
|
public final boolean u() {
|
|
return this.i;
|
|
}
|
|
|
|
public final boolean v() {
|
|
return this.h;
|
|
}
|
|
|
|
public final boolean w() {
|
|
return this.j;
|
|
}
|
|
|
|
public boolean x() {
|
|
return this.i;
|
|
}
|
|
|
|
public abstract void y();
|
|
}
|