- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
413 lines
13 KiB
Java
413 lines
13 KiB
Java
package com.ironsource;
|
|
|
|
import com.ironsource.environment.thread.IronSourceThreadManager;
|
|
import com.ironsource.mediationsdk.adunit.adapter.utility.AdInfo;
|
|
import com.ironsource.mediationsdk.logger.IronLog;
|
|
import com.ironsource.mediationsdk.logger.IronSourceError;
|
|
import com.ironsource.mediationsdk.logger.IronSourceLogger;
|
|
import com.ironsource.mediationsdk.logger.IronSourceLoggerManager;
|
|
import com.ironsource.mediationsdk.model.Placement;
|
|
import com.ironsource.mediationsdk.sdk.LevelPlayRewardedVideoBaseListener;
|
|
import com.ironsource.mediationsdk.sdk.LevelPlayRewardedVideoListener;
|
|
import com.ironsource.mediationsdk.sdk.LevelPlayRewardedVideoManualListener;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class to extends n7 {
|
|
private static final to d = new to();
|
|
private LevelPlayRewardedVideoBaseListener b = null;
|
|
private LevelPlayRewardedVideoBaseListener c = null;
|
|
|
|
public class a implements Runnable {
|
|
final /* synthetic */ boolean a;
|
|
final /* synthetic */ AdInfo b;
|
|
|
|
public a(boolean z, AdInfo adInfo) {
|
|
this.a = z;
|
|
this.b = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
IronLog ironLog;
|
|
String str;
|
|
if (to.this.b != null) {
|
|
if (this.a) {
|
|
((LevelPlayRewardedVideoListener) to.this.b).onAdAvailable(to.this.a(this.b));
|
|
ironLog = IronLog.CALLBACK;
|
|
str = "onAdAvailable() adInfo = " + to.this.a(this.b);
|
|
} else {
|
|
((LevelPlayRewardedVideoListener) to.this.b).onAdUnavailable();
|
|
ironLog = IronLog.CALLBACK;
|
|
str = "onAdUnavailable()";
|
|
}
|
|
ironLog.info(str);
|
|
}
|
|
}
|
|
}
|
|
|
|
public class b implements Runnable {
|
|
final /* synthetic */ Placement a;
|
|
final /* synthetic */ AdInfo b;
|
|
|
|
public b(Placement placement, AdInfo adInfo) {
|
|
this.a = placement;
|
|
this.b = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.c != null) {
|
|
to.this.c.onAdRewarded(this.a, to.this.a(this.b));
|
|
IronLog.CALLBACK.info("onAdRewarded() placement = " + this.a + ", adInfo = " + to.this.a(this.b));
|
|
}
|
|
}
|
|
}
|
|
|
|
public class c implements Runnable {
|
|
final /* synthetic */ Placement a;
|
|
final /* synthetic */ AdInfo b;
|
|
|
|
public c(Placement placement, AdInfo adInfo) {
|
|
this.a = placement;
|
|
this.b = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.b != null) {
|
|
to.this.b.onAdRewarded(this.a, to.this.a(this.b));
|
|
IronLog.CALLBACK.info("onAdRewarded() placement = " + this.a + ", adInfo = " + to.this.a(this.b));
|
|
}
|
|
}
|
|
}
|
|
|
|
public class d implements Runnable {
|
|
final /* synthetic */ IronSourceError a;
|
|
final /* synthetic */ AdInfo b;
|
|
|
|
public d(IronSourceError ironSourceError, AdInfo adInfo) {
|
|
this.a = ironSourceError;
|
|
this.b = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.c != null) {
|
|
to.this.c.onAdShowFailed(this.a, to.this.a(this.b));
|
|
IronLog.CALLBACK.info("onAdShowFailed() adInfo = " + to.this.a(this.b) + ", error = " + this.a.getErrorMessage());
|
|
}
|
|
}
|
|
}
|
|
|
|
public class e implements Runnable {
|
|
final /* synthetic */ IronSourceError a;
|
|
final /* synthetic */ AdInfo b;
|
|
|
|
public e(IronSourceError ironSourceError, AdInfo adInfo) {
|
|
this.a = ironSourceError;
|
|
this.b = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.b != null) {
|
|
to.this.b.onAdShowFailed(this.a, to.this.a(this.b));
|
|
IronLog.CALLBACK.info("onAdShowFailed() adInfo = " + to.this.a(this.b) + ", error = " + this.a.getErrorMessage());
|
|
}
|
|
}
|
|
}
|
|
|
|
public class f implements Runnable {
|
|
final /* synthetic */ Placement a;
|
|
final /* synthetic */ AdInfo b;
|
|
|
|
public f(Placement placement, AdInfo adInfo) {
|
|
this.a = placement;
|
|
this.b = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.c != null) {
|
|
to.this.c.onAdClicked(this.a, to.this.a(this.b));
|
|
IronLog.CALLBACK.info("onAdClicked() placement = " + this.a + ", adInfo = " + to.this.a(this.b));
|
|
}
|
|
}
|
|
}
|
|
|
|
public class g implements Runnable {
|
|
final /* synthetic */ Placement a;
|
|
final /* synthetic */ AdInfo b;
|
|
|
|
public g(Placement placement, AdInfo adInfo) {
|
|
this.a = placement;
|
|
this.b = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.b != null) {
|
|
to.this.b.onAdClicked(this.a, to.this.a(this.b));
|
|
IronLog.CALLBACK.info("onAdClicked() placement = " + this.a + ", adInfo = " + to.this.a(this.b));
|
|
}
|
|
}
|
|
}
|
|
|
|
public class h implements Runnable {
|
|
final /* synthetic */ AdInfo a;
|
|
|
|
public h(AdInfo adInfo) {
|
|
this.a = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.c != null) {
|
|
((LevelPlayRewardedVideoManualListener) to.this.c).onAdReady(to.this.a(this.a));
|
|
IronLog.CALLBACK.info("onAdReady() adInfo = " + to.this.a(this.a));
|
|
}
|
|
}
|
|
}
|
|
|
|
public class i implements Runnable {
|
|
final /* synthetic */ AdInfo a;
|
|
|
|
public i(AdInfo adInfo) {
|
|
this.a = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.b != null) {
|
|
((LevelPlayRewardedVideoManualListener) to.this.b).onAdReady(to.this.a(this.a));
|
|
IronLog.CALLBACK.info("onAdReady() adInfo = " + to.this.a(this.a));
|
|
}
|
|
}
|
|
}
|
|
|
|
public class j implements Runnable {
|
|
final /* synthetic */ IronSourceError a;
|
|
|
|
public j(IronSourceError ironSourceError) {
|
|
this.a = ironSourceError;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.c != null) {
|
|
((LevelPlayRewardedVideoManualListener) to.this.c).onAdLoadFailed(this.a);
|
|
IronLog.CALLBACK.info("onAdLoadFailed() error = " + this.a.getErrorMessage());
|
|
}
|
|
}
|
|
}
|
|
|
|
public class k implements Runnable {
|
|
final /* synthetic */ IronSourceError a;
|
|
|
|
public k(IronSourceError ironSourceError) {
|
|
this.a = ironSourceError;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.b != null) {
|
|
((LevelPlayRewardedVideoManualListener) to.this.b).onAdLoadFailed(this.a);
|
|
IronLog.CALLBACK.info("onAdLoadFailed() error = " + this.a.getErrorMessage());
|
|
}
|
|
}
|
|
}
|
|
|
|
public class l implements Runnable {
|
|
final /* synthetic */ AdInfo a;
|
|
|
|
public l(AdInfo adInfo) {
|
|
this.a = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.c != null) {
|
|
to.this.c.onAdOpened(to.this.a(this.a));
|
|
IronLog.CALLBACK.info("onAdOpened() adInfo = " + to.this.a(this.a));
|
|
}
|
|
}
|
|
}
|
|
|
|
public class m implements Runnable {
|
|
final /* synthetic */ AdInfo a;
|
|
|
|
public m(AdInfo adInfo) {
|
|
this.a = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.b != null) {
|
|
to.this.b.onAdOpened(to.this.a(this.a));
|
|
IronLog.CALLBACK.info("onAdOpened() adInfo = " + to.this.a(this.a));
|
|
}
|
|
}
|
|
}
|
|
|
|
public class n implements Runnable {
|
|
final /* synthetic */ AdInfo a;
|
|
|
|
public n(AdInfo adInfo) {
|
|
this.a = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.c != null) {
|
|
to.this.c.onAdClosed(to.this.a(this.a));
|
|
IronLog.CALLBACK.info("onAdClosed() adInfo = " + to.this.a(this.a));
|
|
}
|
|
}
|
|
}
|
|
|
|
public class o implements Runnable {
|
|
final /* synthetic */ AdInfo a;
|
|
|
|
public o(AdInfo adInfo) {
|
|
this.a = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
if (to.this.b != null) {
|
|
to.this.b.onAdClosed(to.this.a(this.a));
|
|
IronLog.CALLBACK.info("onAdClosed() adInfo = " + to.this.a(this.a));
|
|
}
|
|
}
|
|
}
|
|
|
|
public class p implements Runnable {
|
|
final /* synthetic */ boolean a;
|
|
final /* synthetic */ AdInfo b;
|
|
|
|
public p(boolean z, AdInfo adInfo) {
|
|
this.a = z;
|
|
this.b = adInfo;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
IronLog ironLog;
|
|
String str;
|
|
if (to.this.c != null) {
|
|
if (this.a) {
|
|
((LevelPlayRewardedVideoListener) to.this.c).onAdAvailable(to.this.a(this.b));
|
|
ironLog = IronLog.CALLBACK;
|
|
str = "onAdAvailable() adInfo = " + to.this.a(this.b);
|
|
} else {
|
|
((LevelPlayRewardedVideoListener) to.this.c).onAdUnavailable();
|
|
ironLog = IronLog.CALLBACK;
|
|
str = "onAdUnavailable()";
|
|
}
|
|
ironLog.info(str);
|
|
}
|
|
}
|
|
}
|
|
|
|
private to() {
|
|
}
|
|
|
|
public static to a() {
|
|
return d;
|
|
}
|
|
|
|
private void a(String str) {
|
|
IronSourceLoggerManager.getLogger().log(IronSourceLogger.IronSourceTag.CALLBACK, str, 1);
|
|
}
|
|
|
|
public void a(IronSourceError ironSourceError) {
|
|
if (this.c != null) {
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new j(ironSourceError));
|
|
return;
|
|
}
|
|
LevelPlayRewardedVideoBaseListener levelPlayRewardedVideoBaseListener = this.b;
|
|
if (levelPlayRewardedVideoBaseListener == null || !(levelPlayRewardedVideoBaseListener instanceof LevelPlayRewardedVideoManualListener)) {
|
|
return;
|
|
}
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new k(ironSourceError));
|
|
}
|
|
|
|
public void a(IronSourceError ironSourceError, AdInfo adInfo) {
|
|
if (this.c != null) {
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new d(ironSourceError, adInfo));
|
|
} else if (this.b != null) {
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new e(ironSourceError, adInfo));
|
|
}
|
|
}
|
|
|
|
public void a(Placement placement, AdInfo adInfo) {
|
|
if (this.c != null) {
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new f(placement, adInfo));
|
|
} else if (this.b != null) {
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new g(placement, adInfo));
|
|
}
|
|
}
|
|
|
|
public void a(LevelPlayRewardedVideoBaseListener levelPlayRewardedVideoBaseListener) {
|
|
this.b = levelPlayRewardedVideoBaseListener;
|
|
}
|
|
|
|
public void a(boolean z, AdInfo adInfo) {
|
|
if (this.c != null) {
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new p(z, adInfo));
|
|
return;
|
|
}
|
|
LevelPlayRewardedVideoBaseListener levelPlayRewardedVideoBaseListener = this.b;
|
|
if (levelPlayRewardedVideoBaseListener == null || !(levelPlayRewardedVideoBaseListener instanceof LevelPlayRewardedVideoListener)) {
|
|
return;
|
|
}
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new a(z, adInfo));
|
|
}
|
|
|
|
public void b() {
|
|
}
|
|
|
|
public void b(AdInfo adInfo) {
|
|
if (this.c != null) {
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new n(adInfo));
|
|
} else if (this.b != null) {
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new o(adInfo));
|
|
}
|
|
}
|
|
|
|
public void b(Placement placement, AdInfo adInfo) {
|
|
if (this.c != null) {
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new b(placement, adInfo));
|
|
} else if (this.b != null) {
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new c(placement, adInfo));
|
|
}
|
|
}
|
|
|
|
public void b(LevelPlayRewardedVideoBaseListener levelPlayRewardedVideoBaseListener) {
|
|
this.c = levelPlayRewardedVideoBaseListener;
|
|
}
|
|
|
|
public void c() {
|
|
}
|
|
|
|
public void c(AdInfo adInfo) {
|
|
if (this.c != null) {
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new l(adInfo));
|
|
} else if (this.b != null) {
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new m(adInfo));
|
|
}
|
|
}
|
|
|
|
public void d(AdInfo adInfo) {
|
|
if (this.c != null) {
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new h(adInfo));
|
|
return;
|
|
}
|
|
LevelPlayRewardedVideoBaseListener levelPlayRewardedVideoBaseListener = this.b;
|
|
if (levelPlayRewardedVideoBaseListener == null || !(levelPlayRewardedVideoBaseListener instanceof LevelPlayRewardedVideoManualListener)) {
|
|
return;
|
|
}
|
|
IronSourceThreadManager.INSTANCE.postOnUiThreadTask(new i(adInfo));
|
|
}
|
|
}
|