- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
148 lines
5.7 KiB
Java
148 lines
5.7 KiB
Java
package com.ironsource;
|
|
|
|
import com.ironsource.environment.ContextProvider;
|
|
import com.ironsource.mediationsdk.IronSource;
|
|
import com.ironsource.mediationsdk.adunit.adapter.internal.AdapterBaseInterface;
|
|
import com.ironsource.mediationsdk.adunit.adapter.utility.AdData;
|
|
import com.ironsource.mediationsdk.logger.IronLog;
|
|
import com.ironsource.mediationsdk.model.NetworkSettings;
|
|
import com.unity3d.mediation.LevelPlay;
|
|
import java.util.Arrays;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.UUID;
|
|
import kotlin.NoWhenBranchMatchedException;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlin.jvm.internal.StringCompanionObject;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class no {
|
|
private final p2 a;
|
|
private final List<rm> b;
|
|
private final s1 c;
|
|
private final IronSource.AD_UNIT d;
|
|
|
|
public /* synthetic */ class a {
|
|
public static final /* synthetic */ int[] a;
|
|
|
|
static {
|
|
int[] iArr = new int[LevelPlay.AdFormat.values().length];
|
|
try {
|
|
iArr[LevelPlay.AdFormat.REWARDED.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
iArr[LevelPlay.AdFormat.INTERSTITIAL.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
iArr[LevelPlay.AdFormat.BANNER.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
try {
|
|
iArr[LevelPlay.AdFormat.NATIVE_AD.ordinal()] = 4;
|
|
} catch (NoSuchFieldError unused4) {
|
|
}
|
|
a = iArr;
|
|
}
|
|
}
|
|
|
|
public static final class b extends yp {
|
|
final /* synthetic */ NetworkSettings b;
|
|
final /* synthetic */ AdapterBaseInterface c;
|
|
final /* synthetic */ AdData d;
|
|
|
|
public b(NetworkSettings networkSettings, AdapterBaseInterface adapterBaseInterface, AdData adData) {
|
|
this.b = networkSettings;
|
|
this.c = adapterBaseInterface;
|
|
this.d = adData;
|
|
}
|
|
|
|
@Override // com.ironsource.yp
|
|
public void a() {
|
|
no noVar = no.this;
|
|
NetworkSettings networkSettings = this.b;
|
|
AdapterBaseInterface networkAdapter = this.c;
|
|
Intrinsics.checkNotNullExpressionValue(networkAdapter, "networkAdapter");
|
|
noVar.a(networkSettings, networkAdapter, this.d);
|
|
}
|
|
|
|
@Override // com.ironsource.yp
|
|
public void a(Throwable t) {
|
|
Intrinsics.checkNotNullParameter(t, "t");
|
|
no.this.a.e().g().f("initProvider - exception while calling networkAdapter.init with " + this.b.getProviderName() + " - " + t);
|
|
}
|
|
}
|
|
|
|
public no(p2 adUnitTools, LevelPlay.AdFormat adFormat, List<rm> providers, s1 adUnitData) {
|
|
Intrinsics.checkNotNullParameter(adUnitTools, "adUnitTools");
|
|
Intrinsics.checkNotNullParameter(adFormat, "adFormat");
|
|
Intrinsics.checkNotNullParameter(providers, "providers");
|
|
Intrinsics.checkNotNullParameter(adUnitData, "adUnitData");
|
|
this.a = adUnitTools;
|
|
this.b = providers;
|
|
this.c = adUnitData;
|
|
this.d = a(adFormat);
|
|
}
|
|
|
|
private final IronSource.AD_UNIT a(LevelPlay.AdFormat adFormat) {
|
|
int i = a.a[adFormat.ordinal()];
|
|
if (i == 1) {
|
|
return IronSource.AD_UNIT.REWARDED_VIDEO;
|
|
}
|
|
if (i == 2) {
|
|
return IronSource.AD_UNIT.INTERSTITIAL;
|
|
}
|
|
if (i == 3) {
|
|
return IronSource.AD_UNIT.BANNER;
|
|
}
|
|
if (i == 4) {
|
|
return IronSource.AD_UNIT.NATIVE_AD;
|
|
}
|
|
throw new NoWhenBranchMatchedException();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public final void a(NetworkSettings networkSettings, AdapterBaseInterface adapterBaseInterface, AdData adData) {
|
|
a("Start initializing provider %s on thread %s", networkSettings);
|
|
adapterBaseInterface.init(adData, ContextProvider.getInstance().getApplicationContext(), null);
|
|
a("Done initializing provider %s on thread %s", networkSettings);
|
|
}
|
|
|
|
private final void a(String str, NetworkSettings networkSettings) {
|
|
IronLog ironLog = IronLog.INTERNAL;
|
|
p2 p2Var = this.a;
|
|
StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
|
|
String format = String.format(str, Arrays.copyOf(new Object[]{networkSettings.getProviderInstanceName(), Thread.currentThread().getName()}, 2));
|
|
Intrinsics.checkNotNullExpressionValue(format, "format(format, *args)");
|
|
ironLog.verbose(k1.a(p2Var, format, (String) null, 2, (Object) null));
|
|
}
|
|
|
|
private final boolean a(NetworkSettings networkSettings, AdapterBaseInterface adapterBaseInterface) {
|
|
if (adapterBaseInterface == null) {
|
|
return false;
|
|
}
|
|
p2 p2Var = this.a;
|
|
IronSource.AD_UNIT ad_unit = this.d;
|
|
String providerInstanceName = networkSettings.getProviderInstanceName();
|
|
Intrinsics.checkNotNullExpressionValue(providerInstanceName, "providerSettings.providerInstanceName");
|
|
if (p2Var.a(adapterBaseInterface, ad_unit, providerInstanceName)) {
|
|
return false;
|
|
}
|
|
return networkSettings.shouldEarlyInit() || networkSettings.isIronSource() || networkSettings.isBidder(this.d);
|
|
}
|
|
|
|
public final void a() {
|
|
IronLog.INTERNAL.verbose(k1.a(this.a, (String) null, (String) null, 3, (Object) null));
|
|
UUID randomUUID = UUID.randomUUID();
|
|
Iterator<rm> it = this.b.iterator();
|
|
while (it.hasNext()) {
|
|
NetworkSettings f = it.next().f();
|
|
AdapterBaseInterface b2 = com.ironsource.mediationsdk.c.b().b(f, this.d, randomUUID);
|
|
if (a(f, b2)) {
|
|
ls.a(ls.a, new b(f, b2, this.c.a(f)), 0L, 2, null);
|
|
}
|
|
}
|
|
}
|
|
}
|