- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
119 lines
4.5 KiB
Java
119 lines
4.5 KiB
Java
package com.fyber.inneractive.sdk.dv;
|
|
|
|
import com.fyber.inneractive.sdk.config.enums.UnitDisplayType;
|
|
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
|
|
import com.fyber.inneractive.sdk.external.InneractiveErrorCode;
|
|
import com.fyber.inneractive.sdk.external.InneractiveInfrastructureError;
|
|
import com.fyber.inneractive.sdk.flow.h;
|
|
import com.fyber.inneractive.sdk.util.IAlog;
|
|
import com.fyber.inneractive.sdk.util.o;
|
|
import com.fyber.inneractive.sdk.util.p;
|
|
import com.google.android.gms.ads.AdRequest;
|
|
import com.google.android.gms.ads.MobileAds;
|
|
import com.google.android.gms.ads.query.AdInfo;
|
|
import com.google.android.gms.ads.query.QueryInfo;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class b extends h<f, com.fyber.inneractive.sdk.dv.a> implements d {
|
|
public final boolean m = !o.a("com.google.android.gms.ads.InterstitialAd");
|
|
|
|
public static /* synthetic */ class a {
|
|
public static final /* synthetic */ int[] a;
|
|
|
|
static {
|
|
int[] iArr = new int[UnitDisplayType.values().length];
|
|
a = iArr;
|
|
try {
|
|
iArr[UnitDisplayType.INTERSTITIAL.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
a[UnitDisplayType.BANNER.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
a[UnitDisplayType.MRECT.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
try {
|
|
a[UnitDisplayType.REWARDED.ordinal()] = 4;
|
|
} catch (NoSuchFieldError unused4) {
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.h
|
|
public final String d() {
|
|
return null;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.h
|
|
public final void g() {
|
|
Response response = this.b;
|
|
if (response == 0 || ((f) response).s == null) {
|
|
i();
|
|
return;
|
|
}
|
|
InneractiveAdRequest inneractiveAdRequest = this.a;
|
|
if (inneractiveAdRequest != null) {
|
|
boolean muteVideo = inneractiveAdRequest.getMuteVideo();
|
|
try {
|
|
MobileAds.setAppMuted(muteVideo);
|
|
MobileAds.setAppVolume(muteVideo ? 0.0f : 1.0f);
|
|
} catch (Throwable unused) {
|
|
}
|
|
}
|
|
f fVar = (f) this.b;
|
|
UnitDisplayType unitDisplayType = fVar.n;
|
|
QueryInfo queryInfo = fVar.s.a;
|
|
int i = a.a[unitDisplayType.ordinal()];
|
|
com.fyber.inneractive.sdk.dv.a aVar = i != 1 ? (i == 2 || i == 3) ? new com.fyber.inneractive.sdk.dv.banner.a(e(), this.g, (f) this.b) : i != 4 ? null : this.m ? new com.fyber.inneractive.sdk.dv.rewarded.a(e(), this.g, (f) this.b) : new com.fyber.inneractive.sdk.dv.rewarded.b(e(), this.g, (f) this.b) : this.m ? new com.fyber.inneractive.sdk.dv.interstitial.b(e(), this.g, (f) this.b) : new com.fyber.inneractive.sdk.dv.interstitial.c(e(), this.g, (f) this.b);
|
|
this.c = aVar;
|
|
if (queryInfo == null || aVar == null || this.b == 0) {
|
|
i();
|
|
return;
|
|
}
|
|
try {
|
|
AdRequest.Builder builder = new AdRequest.Builder();
|
|
try {
|
|
AdRequest.Builder.class.getMethod("setAdString", String.class).invoke(builder, ((f) this.b).K);
|
|
} catch (Exception unused2) {
|
|
builder.setAdInfo(new AdInfo(queryInfo, ((f) this.b).K));
|
|
}
|
|
((com.fyber.inneractive.sdk.dv.a) this.c).a(builder.build(), this);
|
|
} catch (Throwable unused3) {
|
|
i();
|
|
}
|
|
}
|
|
|
|
public final void i() {
|
|
a(new InneractiveInfrastructureError(InneractiveErrorCode.SDK_INTERNAL_ERROR, com.fyber.inneractive.sdk.flow.g.NETWORK_ERROR));
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.h, com.fyber.inneractive.sdk.interfaces.a.b
|
|
public final void b() {
|
|
Content content = this.c;
|
|
if (content != 0) {
|
|
((com.fyber.inneractive.sdk.dv.a) content).a();
|
|
}
|
|
super.b();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.h, com.fyber.inneractive.sdk.interfaces.a
|
|
public final void cancel() {
|
|
Content content = this.c;
|
|
if (content != 0) {
|
|
((com.fyber.inneractive.sdk.dv.a) content).a();
|
|
}
|
|
this.k.a();
|
|
IAlog.a("%s: IAAdContentLoaderImpl : cancel load ad content retry task", IAlog.a(this));
|
|
p.b.removeCallbacks(this.l);
|
|
this.a = null;
|
|
this.b = null;
|
|
this.c = null;
|
|
this.d = null;
|
|
this.e = null;
|
|
this.f = null;
|
|
}
|
|
}
|