- 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
472 lines
19 KiB
Java
472 lines
19 KiB
Java
package com.fyber.inneractive.sdk.renderers;
|
|
|
|
import android.app.Activity;
|
|
import android.content.res.Resources;
|
|
import android.os.SystemClock;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.FrameLayout;
|
|
import com.fyber.inneractive.sdk.R;
|
|
import com.fyber.inneractive.sdk.config.IAConfigManager;
|
|
import com.fyber.inneractive.sdk.config.e0;
|
|
import com.fyber.inneractive.sdk.config.enums.UnitDisplayType;
|
|
import com.fyber.inneractive.sdk.config.f0;
|
|
import com.fyber.inneractive.sdk.config.global.s;
|
|
import com.fyber.inneractive.sdk.config.x;
|
|
import com.fyber.inneractive.sdk.external.InneractiveAdManager;
|
|
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
|
|
import com.fyber.inneractive.sdk.external.InneractiveAdSpot;
|
|
import com.fyber.inneractive.sdk.external.InneractiveFullScreenAdRewardedListener;
|
|
import com.fyber.inneractive.sdk.external.InneractiveFullscreenAdEventsListener;
|
|
import com.fyber.inneractive.sdk.external.InneractiveFullscreenUnitController;
|
|
import com.fyber.inneractive.sdk.external.InneractiveUnitController;
|
|
import com.fyber.inneractive.sdk.flow.c0;
|
|
import com.fyber.inneractive.sdk.flow.q;
|
|
import com.fyber.inneractive.sdk.flow.w;
|
|
import com.fyber.inneractive.sdk.flow.z;
|
|
import com.fyber.inneractive.sdk.interfaces.c;
|
|
import com.fyber.inneractive.sdk.measurement.tracker.c;
|
|
import com.fyber.inneractive.sdk.network.j0;
|
|
import com.fyber.inneractive.sdk.network.r;
|
|
import com.fyber.inneractive.sdk.network.s;
|
|
import com.fyber.inneractive.sdk.ui.IAmraidWebViewController;
|
|
import com.fyber.inneractive.sdk.ui.IFyberAdIdentifier;
|
|
import com.fyber.inneractive.sdk.util.IAlog;
|
|
import com.fyber.inneractive.sdk.util.b0;
|
|
import com.fyber.inneractive.sdk.util.c1;
|
|
import com.fyber.inneractive.sdk.util.l0;
|
|
import com.fyber.inneractive.sdk.util.t;
|
|
import com.iab.omid.library.fyber.adsession.AdSession;
|
|
import java.lang.ref.WeakReference;
|
|
import java.util.ArrayList;
|
|
import java.util.Locale;
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class l extends z<c0, InneractiveFullscreenAdEventsListener> {
|
|
public c1 E;
|
|
public c.b I;
|
|
public l0 J;
|
|
public m w;
|
|
public IAmraidWebViewController y;
|
|
public boolean x = false;
|
|
public boolean z = false;
|
|
public boolean A = false;
|
|
public boolean B = false;
|
|
public boolean C = false;
|
|
public boolean D = false;
|
|
public UnitDisplayType F = UnitDisplayType.INTERSTITIAL;
|
|
public boolean G = false;
|
|
public boolean H = false;
|
|
|
|
public class a implements c1.b {
|
|
public a() {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.util.c1.b
|
|
public final void a() {
|
|
l.this.G = true;
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.z
|
|
public final int J() {
|
|
s sVar;
|
|
AdContent adcontent = this.b;
|
|
if (adcontent == 0 || (sVar = ((c0) adcontent).c) == null || sVar.a(com.fyber.inneractive.sdk.config.global.features.d.class) == null) {
|
|
return -1;
|
|
}
|
|
return ((com.fyber.inneractive.sdk.config.global.features.d) ((c0) this.b).c.a(com.fyber.inneractive.sdk.config.global.features.d.class)).a("close_clickable_area_dp", -1);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.z
|
|
public final int K() {
|
|
s sVar;
|
|
AdContent adcontent = this.b;
|
|
if (adcontent == 0 || (sVar = ((c0) adcontent).c) == null || sVar.a(com.fyber.inneractive.sdk.config.global.features.d.class) == null) {
|
|
return -1;
|
|
}
|
|
return ((com.fyber.inneractive.sdk.config.global.features.d) ((c0) this.b).c.a(com.fyber.inneractive.sdk.config.global.features.d.class)).a("close_visible_size_dp", -1);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.z
|
|
public final long L() {
|
|
int i;
|
|
s sVar;
|
|
if (this.F == UnitDisplayType.REWARDED) {
|
|
i = IAConfigManager.L.t.b.a(31, 30, "rewarded_mraid_delay");
|
|
IAlog.a("%sGetting rewarded total delay of %d seconds", IAlog.a(this), Integer.valueOf(i));
|
|
} else {
|
|
try {
|
|
i = Integer.parseInt(IAConfigManager.L.t.b.a("mraid_x_delay", Long.toString(2L)));
|
|
} catch (Throwable unused) {
|
|
i = 2;
|
|
}
|
|
}
|
|
if (InneractiveAdManager.isCurrentUserAChild()) {
|
|
AdContent adcontent = this.b;
|
|
int i2 = 5;
|
|
if (adcontent != 0 && (sVar = adcontent.c) != null && sVar.a(com.fyber.inneractive.sdk.config.global.features.b.class) != null) {
|
|
com.fyber.inneractive.sdk.config.global.features.b bVar = (com.fyber.inneractive.sdk.config.global.features.b) this.b.c.a(com.fyber.inneractive.sdk.config.global.features.b.class);
|
|
bVar.getClass();
|
|
if (new ArrayList(bVar.c.values()).size() > 0) {
|
|
int a2 = ((com.fyber.inneractive.sdk.config.global.features.b) ((c0) this.b).c.a(com.fyber.inneractive.sdk.config.global.features.b.class)).a("skip_time_sec", 5);
|
|
if (a2 >= 0 && a2 <= 8) {
|
|
i2 = a2;
|
|
}
|
|
i = Math.min(i2, i);
|
|
}
|
|
}
|
|
i2 = Math.min(i, 5);
|
|
i = Math.min(i2, i);
|
|
}
|
|
return i * 1000;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.z
|
|
public final boolean M() {
|
|
return false;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.c
|
|
public final void a(InneractiveFullscreenUnitController.a aVar) {
|
|
this.I = aVar;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.z, com.fyber.inneractive.sdk.interfaces.c
|
|
public final void a(c.a aVar, Activity activity) throws InneractiveUnitController.AdDisplayError, Resources.NotFoundException {
|
|
f0 f0Var;
|
|
super.a(aVar, activity);
|
|
AdContent adcontent = this.b;
|
|
x xVar = (adcontent == 0 || (f0Var = ((c0) adcontent).d) == null) ? null : ((e0) f0Var).c;
|
|
if (xVar == null) {
|
|
IAlog.f("%sNo display config for full screen mraid ad renderer! Cannot render", IAlog.a(this));
|
|
throw new InneractiveUnitController.AdDisplayError("No display config for full screen mraid");
|
|
}
|
|
IAmraidWebViewController iAmraidWebViewController = adcontent != 0 ? ((c0) adcontent).i : null;
|
|
this.y = iAmraidWebViewController;
|
|
if (iAmraidWebViewController == null || iAmraidWebViewController.b == null) {
|
|
IAlog.f("%sWeb view controller content is not valid. Web view might have crashed", IAlog.a(this));
|
|
throw new InneractiveUnitController.AdDisplayError("Web view could not be loaded");
|
|
}
|
|
((c0) adcontent).h();
|
|
this.F = xVar.b;
|
|
this.z = false;
|
|
this.A = false;
|
|
this.J = new l0(this.a);
|
|
this.k = aVar;
|
|
IAmraidWebViewController iAmraidWebViewController2 = this.y;
|
|
if (iAmraidWebViewController2 == null) {
|
|
IAlog.f("InneractiveFullscreenMraidAdRenderer.renderAd: Spot ad content is not the right content :( %s", this.b);
|
|
return;
|
|
}
|
|
iAmraidWebViewController2.a(aVar.getCloseButton(), c.EnumC0077c.CloseButton);
|
|
com.fyber.inneractive.sdk.response.f fVar = (com.fyber.inneractive.sdk.response.f) ((c0) this.b).b;
|
|
int i = fVar.e;
|
|
int i2 = fVar.f;
|
|
boolean z = (i == 300 && i2 == 250) || (i == 600 && i2 == 500);
|
|
this.B = z;
|
|
if (z) {
|
|
this.y.setAdDefaultSize(com.fyber.inneractive.sdk.util.o.a(i), com.fyber.inneractive.sdk.util.o.a(i2));
|
|
}
|
|
if (this.w == null) {
|
|
this.w = new m(this);
|
|
}
|
|
this.y.setListener(this.w);
|
|
InneractiveAdSpot inneractiveAdSpot = this.a;
|
|
if (inneractiveAdSpot != null && inneractiveAdSpot.getAdContent() != null && activity != null) {
|
|
q adContent = this.a.getAdContent();
|
|
com.fyber.inneractive.sdk.flow.e eVar = new com.fyber.inneractive.sdk.flow.e(activity, false, adContent.a, adContent.d(), adContent.c);
|
|
ViewGroup viewGroup = (ViewGroup) activity.findViewById(R.id.ia_identifier_overlay);
|
|
eVar.a(viewGroup, IFyberAdIdentifier.Corner.BOTTOM_LEFT);
|
|
viewGroup.setVisibility(0);
|
|
this.y.a(viewGroup, c.EnumC0077c.IdentifierView);
|
|
}
|
|
O();
|
|
IAmraidWebViewController iAmraidWebViewController3 = this.y;
|
|
ViewGroup layout = this.k.getLayout();
|
|
InneractiveAdRequest inneractiveAdRequest = ((c0) this.b).a;
|
|
com.fyber.inneractive.sdk.web.h hVar = iAmraidWebViewController3.b;
|
|
if (hVar != null) {
|
|
layout.addView(hVar);
|
|
b0.c.a.a(layout.getContext(), iAmraidWebViewController3.b, iAmraidWebViewController3);
|
|
iAmraidWebViewController3.b.setTapListener(iAmraidWebViewController3);
|
|
}
|
|
this.z = true;
|
|
if (this.F == UnitDisplayType.REWARDED) {
|
|
c1 c1Var = new c1(TimeUnit.SECONDS, IAConfigManager.L.t.b.a(31, 30, "rewarded_mraid_delay"));
|
|
this.E = c1Var;
|
|
c1Var.e = new a();
|
|
c1.a aVar2 = new c1.a(c1Var);
|
|
c1Var.c = aVar2;
|
|
c1Var.d = false;
|
|
aVar2.sendEmptyMessage(1932593528);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.z
|
|
public final /* bridge */ /* synthetic */ boolean b(c0 c0Var) {
|
|
return false;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.z, com.fyber.inneractive.sdk.interfaces.c
|
|
public final void c(boolean z) {
|
|
if (!H()) {
|
|
if (z) {
|
|
this.u.a((String) null);
|
|
} else {
|
|
com.fyber.inneractive.sdk.util.a aVar = this.u;
|
|
aVar.d = 0L;
|
|
aVar.e = 0L;
|
|
aVar.f = 0L;
|
|
aVar.b = false;
|
|
}
|
|
}
|
|
c.a aVar2 = this.k;
|
|
if (aVar2 != null) {
|
|
aVar2.destroy();
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.c
|
|
public final void r() {
|
|
s sVar;
|
|
EventsListener eventslistener;
|
|
if (this.F == UnitDisplayType.REWARDED && this.G) {
|
|
N();
|
|
}
|
|
if (!this.A && (eventslistener = this.c) != 0) {
|
|
this.A = true;
|
|
((InneractiveFullscreenAdEventsListener) eventslistener).onAdDismissed(this.a);
|
|
}
|
|
l0 l0Var = this.J;
|
|
if (l0Var != null && l0Var.b != 0) {
|
|
long currentTimeMillis = (System.currentTimeMillis() - l0Var.b) - l0Var.d;
|
|
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
|
|
long seconds = timeUnit.toSeconds(currentTimeMillis);
|
|
String format = String.format(Locale.US, "%d.%d", Long.valueOf(seconds), Long.valueOf(timeUnit.toMillis(currentTimeMillis - TimeUnit.SECONDS.toMillis(seconds))));
|
|
l0Var.b = 0L;
|
|
l0Var.c = 0L;
|
|
l0Var.d = 0L;
|
|
InneractiveAdSpot inneractiveAdSpot = l0Var.a;
|
|
q adContent = inneractiveAdSpot != null ? inneractiveAdSpot.getAdContent() : null;
|
|
s.a aVar = new s.a(r.INTERSTITIAL_VIEW_TIME, adContent != null ? adContent.a : null, adContent != null ? adContent.d() : null, (adContent == null || (sVar = adContent.c) == null) ? null : sVar.c());
|
|
aVar.a("time", format);
|
|
aVar.a((String) null);
|
|
}
|
|
InneractiveAdSpot inneractiveAdSpot2 = this.a;
|
|
if (inneractiveAdSpot2 == null || !(inneractiveAdSpot2 instanceof w)) {
|
|
return;
|
|
}
|
|
((w) inneractiveAdSpot2).a();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.z, com.fyber.inneractive.sdk.interfaces.c
|
|
public final void t() {
|
|
c1 c1Var;
|
|
super.t();
|
|
if (this.F == UnitDisplayType.REWARDED && (c1Var = this.E) != null) {
|
|
c1Var.d = false;
|
|
long uptimeMillis = (SystemClock.uptimeMillis() - SystemClock.uptimeMillis()) + 50 + c1Var.f;
|
|
c1Var.f = uptimeMillis;
|
|
if (c1Var.e == null || uptimeMillis <= c1Var.a.toMillis(c1Var.b)) {
|
|
c1.a aVar = c1Var.c;
|
|
if (aVar != null && c1Var.e != null) {
|
|
aVar.removeMessages(1932593528);
|
|
c1Var.c.sendEmptyMessageDelayed(1932593528, 50L);
|
|
}
|
|
} else {
|
|
c1Var.e.a();
|
|
}
|
|
}
|
|
l0 l0Var = this.J;
|
|
if (l0Var != null) {
|
|
if (l0Var.b == 0) {
|
|
l0Var.b = System.currentTimeMillis();
|
|
}
|
|
if (l0Var.c > 0) {
|
|
l0Var.d += System.currentTimeMillis() - l0Var.c;
|
|
l0Var.c = 0L;
|
|
}
|
|
}
|
|
com.fyber.inneractive.sdk.util.a aVar2 = this.u;
|
|
if (!aVar2.b || aVar2.e <= 0) {
|
|
return;
|
|
}
|
|
aVar2.f += System.currentTimeMillis() - aVar2.e;
|
|
aVar2.e = 0L;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.z, com.fyber.inneractive.sdk.interfaces.c
|
|
public final void v() {
|
|
c1 c1Var;
|
|
super.v();
|
|
if (this.F == UnitDisplayType.REWARDED && (c1Var = this.E) != null) {
|
|
c1Var.d = true;
|
|
c1.a aVar = c1Var.c;
|
|
if (aVar != null) {
|
|
aVar.removeMessages(1932593528);
|
|
}
|
|
}
|
|
l0 l0Var = this.J;
|
|
if (l0Var != null) {
|
|
l0Var.c = System.currentTimeMillis();
|
|
}
|
|
com.fyber.inneractive.sdk.util.a aVar2 = this.u;
|
|
if (aVar2.b) {
|
|
aVar2.e = System.currentTimeMillis();
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.z
|
|
public final boolean H() {
|
|
return !this.B && this.y.Y;
|
|
}
|
|
|
|
public final void N() {
|
|
WeakReference weakReference;
|
|
IAlog.a("%sprovide reward called", IAlog.a(this));
|
|
if (this.H) {
|
|
IAlog.a("%sreward was already provided", IAlog.a(this));
|
|
return;
|
|
}
|
|
IAlog.a("%sreward sent", IAlog.a(this));
|
|
if (this.I != null) {
|
|
com.fyber.inneractive.sdk.flow.r.a(com.fyber.inneractive.sdk.cache.session.enums.a.COMPLETION, com.fyber.inneractive.sdk.cache.session.enums.b.REWARDED_DISPLAY);
|
|
InneractiveFullscreenUnitController.a aVar = (InneractiveFullscreenUnitController.a) this.I;
|
|
weakReference = ((com.fyber.inneractive.sdk.flow.f0) InneractiveFullscreenUnitController.this).mAdSpot;
|
|
w wVar = (w) t.a(weakReference);
|
|
InneractiveFullScreenAdRewardedListener inneractiveFullScreenAdRewardedListener = InneractiveFullscreenUnitController.this.b;
|
|
if (inneractiveFullScreenAdRewardedListener != null && wVar != null) {
|
|
inneractiveFullScreenAdRewardedListener.onAdRewarded(wVar);
|
|
}
|
|
}
|
|
IAmraidWebViewController iAmraidWebViewController = this.y;
|
|
if (iAmraidWebViewController == null || !iAmraidWebViewController.D) {
|
|
G();
|
|
}
|
|
this.H = true;
|
|
}
|
|
|
|
public final void O() {
|
|
IAmraidWebViewController iAmraidWebViewController;
|
|
if (this.b == 0 || (iAmraidWebViewController = this.y) == null) {
|
|
IAlog.a("updateWebViewLayoutParams called, but web view is invalid", new Object[0]);
|
|
return;
|
|
}
|
|
com.fyber.inneractive.sdk.web.h hVar = iAmraidWebViewController.b;
|
|
if (hVar != null) {
|
|
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -1);
|
|
layoutParams.gravity = 17;
|
|
hVar.setLayoutParams(layoutParams);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.c
|
|
public final void b() {
|
|
O();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.r
|
|
public final void b(View view) {
|
|
IAmraidWebViewController iAmraidWebViewController = this.y;
|
|
if (iAmraidWebViewController != null) {
|
|
iAmraidWebViewController.a(view, c.EnumC0077c.ProgressOverlay);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.z, com.fyber.inneractive.sdk.flow.r, com.fyber.inneractive.sdk.external.InneractiveAdRenderer
|
|
public final void destroy() {
|
|
EventsListener eventslistener;
|
|
if (this.z && !this.A && (eventslistener = this.c) != 0) {
|
|
this.A = true;
|
|
((InneractiveFullscreenAdEventsListener) eventslistener).onAdDismissed(this.a);
|
|
}
|
|
this.w = null;
|
|
c1 c1Var = this.E;
|
|
if (c1Var != null) {
|
|
c1Var.e = null;
|
|
this.E = null;
|
|
}
|
|
super.destroy();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.c
|
|
public final boolean n() {
|
|
boolean z;
|
|
if (this.k != null) {
|
|
if (this.F == UnitDisplayType.REWARDED) {
|
|
if (this.G) {
|
|
N();
|
|
}
|
|
z = this.G;
|
|
} else {
|
|
z = this.p;
|
|
}
|
|
if (!z) {
|
|
return true;
|
|
}
|
|
}
|
|
c.a aVar = this.k;
|
|
if (aVar == null) {
|
|
return false;
|
|
}
|
|
aVar.dismissAd(true);
|
|
return true;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.r
|
|
public final void c(View view) {
|
|
com.fyber.inneractive.sdk.measurement.tracker.c cVar;
|
|
IAmraidWebViewController iAmraidWebViewController = this.y;
|
|
if (iAmraidWebViewController == null || (cVar = iAmraidWebViewController.J) == null) {
|
|
return;
|
|
}
|
|
try {
|
|
AdSession adSession = cVar.a;
|
|
if (adSession == null || view == null) {
|
|
return;
|
|
}
|
|
adSession.removeFriendlyObstruction(view);
|
|
} catch (Throwable th) {
|
|
cVar.a(th);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.z
|
|
public final long a(long j) {
|
|
if (this.F == UnitDisplayType.REWARDED) {
|
|
return 0L;
|
|
}
|
|
long j2 = 13;
|
|
try {
|
|
j2 = Long.parseLong(IAConfigManager.L.t.b.a("mraid_x_fallback_delay", Long.toString(13L)));
|
|
} catch (Throwable unused) {
|
|
}
|
|
return j2 * 1000;
|
|
}
|
|
|
|
public static void a(l lVar) {
|
|
String str;
|
|
if (lVar.b == 0) {
|
|
return;
|
|
}
|
|
IAmraidWebViewController iAmraidWebViewController = lVar.y;
|
|
if (iAmraidWebViewController != null) {
|
|
iAmraidWebViewController.n();
|
|
}
|
|
T t = ((c0) lVar.b).b;
|
|
if (t != 0 && (str = t.k) != null && str.trim().length() > 0) {
|
|
IAlog.e("%sfiring impression!", IAlog.a(lVar));
|
|
j0.b(str);
|
|
}
|
|
com.fyber.inneractive.sdk.web.h hVar = lVar.y.b;
|
|
if (hVar != null) {
|
|
hVar.a("var forceReflow = function(elem){ elem = elem || document.documentElement; elem.style.zIndex = 2147483646; var width = elem.style.width, px = elem.offsetWidth+1; elem.style.width = px+'px'; setTimeout(function(){ elem.style.zIndex = 2147483646; elem.style.width = width; elem = null; }, 0); }; forceReflow(document.documentElement);");
|
|
}
|
|
com.fyber.inneractive.sdk.flow.r.a(com.fyber.inneractive.sdk.cache.session.enums.a.IMPRESSION, lVar.F == UnitDisplayType.REWARDED ? com.fyber.inneractive.sdk.cache.session.enums.b.REWARDED_DISPLAY : com.fyber.inneractive.sdk.cache.session.enums.b.INTERSTITIAL_DISPLAY);
|
|
lVar.D();
|
|
lVar.I();
|
|
}
|
|
}
|