- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
590 lines
24 KiB
Java
590 lines
24 KiB
Java
package com.fyber.inneractive.sdk.renderers;
|
|
|
|
import android.content.Context;
|
|
import android.text.TextUtils;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.view.ViewParent;
|
|
import android.widget.FrameLayout;
|
|
import android.widget.RelativeLayout;
|
|
import androidx.work.WorkRequest;
|
|
import com.fyber.inneractive.sdk.R;
|
|
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.x;
|
|
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
|
|
import com.fyber.inneractive.sdk.external.InneractiveAdSpot;
|
|
import com.fyber.inneractive.sdk.external.InneractiveAdViewEventsListener;
|
|
import com.fyber.inneractive.sdk.external.InneractiveAdViewUnitController;
|
|
import com.fyber.inneractive.sdk.external.InneractiveFullscreenUnitController;
|
|
import com.fyber.inneractive.sdk.flow.c0;
|
|
import com.fyber.inneractive.sdk.flow.q;
|
|
import com.fyber.inneractive.sdk.flow.r;
|
|
import com.fyber.inneractive.sdk.measurement.tracker.c;
|
|
import com.fyber.inneractive.sdk.mraid.b0;
|
|
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.p;
|
|
import com.fyber.inneractive.sdk.util.q0;
|
|
import com.fyber.inneractive.sdk.util.t;
|
|
import com.fyber.inneractive.sdk.util.y;
|
|
import com.iab.omid.library.fyber.adsession.AdSession;
|
|
import com.ironsource.nb;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class h extends r<c0, InneractiveAdViewEventsListener> implements com.fyber.inneractive.sdk.interfaces.b, y.b {
|
|
public InneractiveAdViewUnitController l;
|
|
public IAmraidWebViewController m;
|
|
public f n;
|
|
public ViewGroup p;
|
|
public a q;
|
|
public g s;
|
|
public com.fyber.inneractive.sdk.renderers.b y;
|
|
public long k = 0;
|
|
public boolean o = false;
|
|
public long r = 0;
|
|
public int t = 0;
|
|
public long u = 0;
|
|
public boolean v = false;
|
|
public boolean w = true;
|
|
public boolean x = false;
|
|
|
|
public static class a extends RelativeLayout {
|
|
public final float a;
|
|
|
|
public a(Context context, float f) {
|
|
super(context);
|
|
this.a = f;
|
|
}
|
|
|
|
@Override // android.widget.RelativeLayout, android.view.View
|
|
public final void onMeasure(int i, int i2) {
|
|
int i3;
|
|
View.MeasureSpec.getMode(i);
|
|
int mode = View.MeasureSpec.getMode(i2);
|
|
if (mode == 0 || (mode == Integer.MIN_VALUE && View.MeasureSpec.getSize(i2) > 0)) {
|
|
int size = View.MeasureSpec.getSize(i);
|
|
int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(size, 1073741824);
|
|
float f = this.a;
|
|
if (f != 0.0f) {
|
|
i2 = View.MeasureSpec.makeMeasureSpec((int) (size * f), 1073741824);
|
|
}
|
|
i3 = makeMeasureSpec;
|
|
} else {
|
|
int size2 = View.MeasureSpec.getSize(i);
|
|
int size3 = View.MeasureSpec.getSize(i2);
|
|
i3 = View.MeasureSpec.makeMeasureSpec(size2, 1073741824);
|
|
i2 = View.MeasureSpec.makeMeasureSpec(size3, 1073741824);
|
|
}
|
|
super.onMeasure(i3, i2);
|
|
}
|
|
}
|
|
|
|
public enum b {
|
|
BANNER_WIDTH("BANNER_WIDTH"),
|
|
BANNER_HEIGHT("BANNER_HEIGHT"),
|
|
BANNER_TABLET_HEIGHT("BANNER_TABLET_HEIGHT"),
|
|
BANNER_TABLET_WIDTH("BANNER_TABLET_WIDTH"),
|
|
RECTANGLE_HEIGHT("RECTANGLE_HEIGHT"),
|
|
RECTANGLE_WIDTH("RECTANGLE_WIDTH");
|
|
|
|
final int value;
|
|
|
|
b(String str) {
|
|
this.value = r2;
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final void a() {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final void a(int i) {
|
|
this.t = i;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final boolean a(q qVar) {
|
|
return qVar instanceof c0;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.r, com.fyber.inneractive.sdk.external.InneractiveAdRenderer
|
|
public final boolean canRefreshAd() {
|
|
IAmraidWebViewController iAmraidWebViewController = this.m;
|
|
if (iAmraidWebViewController != null) {
|
|
return (iAmraidWebViewController.o() || this.m.O == b0.RESIZED) ? false : true;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.r, com.fyber.inneractive.sdk.external.InneractiveAdRenderer
|
|
public final void destroy() {
|
|
H();
|
|
com.fyber.inneractive.sdk.renderers.b bVar = this.y;
|
|
if (bVar != null) {
|
|
bVar.g = false;
|
|
p.b.removeCallbacks(bVar.j);
|
|
}
|
|
if (this.m != null) {
|
|
H();
|
|
AdContent adcontent = this.b;
|
|
if (adcontent != 0) {
|
|
((c0) adcontent).a();
|
|
}
|
|
this.m = null;
|
|
this.b = null;
|
|
ViewGroup viewGroup = this.p;
|
|
if (viewGroup != null) {
|
|
viewGroup.removeView(this.q);
|
|
}
|
|
a aVar = this.q;
|
|
if (aVar != null) {
|
|
aVar.removeAllViews();
|
|
this.q = null;
|
|
}
|
|
}
|
|
this.v = false;
|
|
this.n = null;
|
|
y.a.a.a.remove(this);
|
|
g gVar = this.s;
|
|
if (gVar != null) {
|
|
p.b.removeCallbacks(gVar);
|
|
}
|
|
super.destroy();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final void s() {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.r
|
|
public final int A() {
|
|
IAmraidWebViewController iAmraidWebViewController = this.m;
|
|
if (iAmraidWebViewController != null) {
|
|
return (iAmraidWebViewController.b == null || !iAmraidWebViewController.o()) ? com.fyber.inneractive.sdk.util.o.b(this.m.e0) : com.fyber.inneractive.sdk.util.o.b(this.m.b.getWidth());
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
public final void J() {
|
|
com.fyber.inneractive.sdk.web.h hVar;
|
|
IAmraidWebViewController iAmraidWebViewController = this.m;
|
|
if (iAmraidWebViewController == null || (hVar = iAmraidWebViewController.b) == null || !hVar.getIsVisible() || this.r == 0 || this.m.o() || this.m.O == b0.RESIZED) {
|
|
return;
|
|
}
|
|
if (!this.w) {
|
|
if (this.k < System.currentTimeMillis() - this.r) {
|
|
this.u = 1L;
|
|
} else {
|
|
this.u = this.k - (System.currentTimeMillis() - this.r);
|
|
}
|
|
}
|
|
IAlog.a("%sresuming refresh runnable mRefreshTimeStamp %d", IAlog.a(this), Long.valueOf(this.u));
|
|
a(false, this.u);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.util.y.b
|
|
public final void b(boolean z) {
|
|
IAlog.a("%sgot onLockScreenStateChanged with: %s", IAlog.a(this), Boolean.valueOf(z));
|
|
if (z) {
|
|
d(false);
|
|
com.fyber.inneractive.sdk.renderers.b bVar = this.y;
|
|
if (bVar == null || !bVar.g) {
|
|
return;
|
|
}
|
|
bVar.g = false;
|
|
p.b.removeCallbacks(bVar.j);
|
|
return;
|
|
}
|
|
J();
|
|
com.fyber.inneractive.sdk.renderers.b bVar2 = this.y;
|
|
if (bVar2 == null || bVar2.h || bVar2.g || bVar2.f == 0) {
|
|
return;
|
|
}
|
|
bVar2.f = 0L;
|
|
bVar2.g = true;
|
|
bVar2.a();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.r
|
|
public final void c(View view) {
|
|
com.fyber.inneractive.sdk.measurement.tracker.c cVar;
|
|
IAmraidWebViewController iAmraidWebViewController = this.m;
|
|
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.interfaces.b
|
|
public final int f() {
|
|
return this.m.e0;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final void k() {
|
|
com.fyber.inneractive.sdk.web.h hVar;
|
|
IAlog.a("%sgot onAdRefreshFailed", IAlog.a(this));
|
|
IAmraidWebViewController iAmraidWebViewController = this.m;
|
|
if (iAmraidWebViewController == null || (hVar = iAmraidWebViewController.b) == null) {
|
|
return;
|
|
}
|
|
if (!hVar.getIsVisible() || y.a.a.b || this.m.o() || this.m.O == b0.RESIZED) {
|
|
IAlog.a("%sview is not visible or screen is locked or webView is Expanded or web is Resised. Waiting for visibility change", IAlog.a(this));
|
|
this.u = 1L;
|
|
return;
|
|
}
|
|
IAlog.a("%sview is visible and screen is unlocked: refreshing ad and webView is not expanded", IAlog.a(this));
|
|
long I = I();
|
|
this.k = I;
|
|
if (I != 0) {
|
|
a(false, WorkRequest.MIN_BACKOFF_MILLIS);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final void m() {
|
|
com.fyber.inneractive.sdk.renderers.b bVar = this.y;
|
|
if (bVar != null) {
|
|
bVar.g = false;
|
|
p.b.removeCallbacks(bVar.j);
|
|
}
|
|
a aVar = this.q;
|
|
if (aVar != null) {
|
|
aVar.removeAllViews();
|
|
this.q = null;
|
|
}
|
|
ViewGroup viewGroup = this.p;
|
|
if (viewGroup != null) {
|
|
viewGroup.removeAllViews();
|
|
this.p = null;
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final int u() {
|
|
return this.m.f0;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.r
|
|
public final View y() {
|
|
IAmraidWebViewController iAmraidWebViewController = this.m;
|
|
if (iAmraidWebViewController != null) {
|
|
return iAmraidWebViewController.b;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.r
|
|
public final int z() {
|
|
IAmraidWebViewController iAmraidWebViewController = this.m;
|
|
if (iAmraidWebViewController != null) {
|
|
return (iAmraidWebViewController.b == null || !iAmraidWebViewController.o()) ? com.fyber.inneractive.sdk.util.o.b(this.m.f0) : com.fyber.inneractive.sdk.util.o.b(this.m.b.getHeight());
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
public final void H() {
|
|
if (this.s != null) {
|
|
IAlog.a("%scancelling refreen runnable", IAlog.a(this));
|
|
p.b.removeCallbacks(this.s);
|
|
this.s = null;
|
|
}
|
|
}
|
|
|
|
public final int I() {
|
|
x xVar;
|
|
int intValue;
|
|
int i = this.t;
|
|
if (i == -1) {
|
|
IAlog.a("%sreturning disable value for banner refresh", IAlog.a(this));
|
|
return 0;
|
|
}
|
|
if (i > 0) {
|
|
IAlog.a("%sreturning overriden refresh interval = %d", IAlog.a(this), Integer.valueOf(this.t));
|
|
intValue = this.t;
|
|
} else {
|
|
f0 f0Var = this.a.getAdContent().d;
|
|
if (f0Var != null && (xVar = ((e0) f0Var).c) != null) {
|
|
Integer num = xVar.a;
|
|
IAlog.a("%sreturning refreshConfig = %d", IAlog.a(this), num);
|
|
if (num != null) {
|
|
intValue = num.intValue();
|
|
}
|
|
}
|
|
IAlog.a("%sgetRefreshInterval: returning 0. Refresh is disabled", IAlog.a(this));
|
|
return 0;
|
|
}
|
|
return intValue * 1000;
|
|
}
|
|
|
|
public final void d(boolean z) {
|
|
if (this.s != null) {
|
|
this.w = z;
|
|
H();
|
|
this.u = this.k - (System.currentTimeMillis() - this.r);
|
|
IAlog.a("%sPause refresh time : time remaning:%d ,refreshInterval: %d", IAlog.a(this), Long.valueOf(this.u), Long.valueOf(this.k));
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final void a(ViewGroup viewGroup) {
|
|
ViewGroup viewGroup2;
|
|
ViewGroup viewGroup3;
|
|
a aVar;
|
|
x xVar;
|
|
UnitDisplayType unitDisplayType;
|
|
InneractiveAdSpot inneractiveAdSpot = this.a;
|
|
if (inneractiveAdSpot == null) {
|
|
IAlog.f("%sYou must set the spot to render before calling renderAd", IAlog.a(this));
|
|
return;
|
|
}
|
|
this.o = false;
|
|
this.e = false;
|
|
if (viewGroup != null) {
|
|
this.p = viewGroup;
|
|
this.l = (InneractiveAdViewUnitController) inneractiveAdSpot.getSelectedUnitController();
|
|
} else if (!this.x) {
|
|
com.fyber.inneractive.sdk.renderers.b bVar = this.y;
|
|
if (bVar != null) {
|
|
bVar.g = false;
|
|
p.b.removeCallbacks(bVar.j);
|
|
}
|
|
if (this.m != null) {
|
|
H();
|
|
AdContent adcontent = this.b;
|
|
if (adcontent != 0) {
|
|
((c0) adcontent).a();
|
|
}
|
|
this.m = null;
|
|
this.b = null;
|
|
ViewGroup viewGroup4 = this.p;
|
|
if (viewGroup4 != null) {
|
|
viewGroup4.removeView(this.q);
|
|
}
|
|
a aVar2 = this.q;
|
|
if (aVar2 != null) {
|
|
aVar2.removeAllViews();
|
|
this.q = null;
|
|
}
|
|
}
|
|
this.v = false;
|
|
if (this.a.getAdContent() instanceof c0) {
|
|
this.b = (c0) this.a.getAdContent();
|
|
} else {
|
|
IAlog.f("InneractiveAdViewMraidAdRenderer.renderAd: Spot ad content is not the right content :( %s", this.a.getAdContent());
|
|
return;
|
|
}
|
|
}
|
|
AdContent adcontent2 = this.b;
|
|
IAmraidWebViewController iAmraidWebViewController = adcontent2 != 0 ? ((c0) adcontent2).i : null;
|
|
this.m = iAmraidWebViewController;
|
|
if (iAmraidWebViewController != null) {
|
|
if (this.n == null) {
|
|
this.n = new f(this);
|
|
}
|
|
iAmraidWebViewController.setListener(this.n);
|
|
c0 c0Var = (c0) this.b;
|
|
InneractiveAdRequest inneractiveAdRequest = c0Var.a;
|
|
f0 f0Var = c0Var.d;
|
|
if (f0Var != null && (xVar = ((e0) f0Var).c) != null && (unitDisplayType = xVar.b) != null && unitDisplayType.isFullscreenUnit()) {
|
|
a aVar3 = new a(this.p.getContext(), 1.5f);
|
|
this.q = aVar3;
|
|
IAmraidWebViewController iAmraidWebViewController2 = this.m;
|
|
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(-1, -1);
|
|
com.fyber.inneractive.sdk.web.h hVar = iAmraidWebViewController2.b;
|
|
if (hVar != null) {
|
|
aVar3.addView(hVar, layoutParams);
|
|
b0.c.a.a(aVar3.getContext(), iAmraidWebViewController2.b, iAmraidWebViewController2);
|
|
iAmraidWebViewController2.b.setTapListener(iAmraidWebViewController2);
|
|
}
|
|
this.p.addView(this.q, new ViewGroup.LayoutParams(-2, -2));
|
|
} else {
|
|
this.q = new a(this.p.getContext(), 0.0f);
|
|
c0 c0Var2 = (c0) this.b;
|
|
com.fyber.inneractive.sdk.response.f fVar = (com.fyber.inneractive.sdk.response.f) c0Var2.b;
|
|
q0 a2 = a(fVar.e, fVar.f, c0Var2.d);
|
|
this.m.setAdDefaultSize(a2.a, a2.b);
|
|
IAmraidWebViewController iAmraidWebViewController3 = this.m;
|
|
com.fyber.inneractive.sdk.web.h hVar2 = iAmraidWebViewController3.b;
|
|
if (hVar2 != null || com.fyber.inneractive.sdk.util.o.a == null) {
|
|
ViewParent parent = hVar2 != null ? hVar2.getParent() : null;
|
|
if (parent instanceof ViewGroup) {
|
|
((ViewGroup) parent).removeView(hVar2);
|
|
}
|
|
RelativeLayout.LayoutParams a3 = t.a(a2.a, a2.b, 13);
|
|
IAmraidWebViewController iAmraidWebViewController4 = this.m;
|
|
a aVar4 = this.q;
|
|
com.fyber.inneractive.sdk.web.h hVar3 = iAmraidWebViewController4.b;
|
|
if (hVar3 != null) {
|
|
aVar4.addView(hVar3, a3);
|
|
b0.c.a.a(aVar4.getContext(), iAmraidWebViewController4.b, iAmraidWebViewController4);
|
|
iAmraidWebViewController4.b.setTapListener(iAmraidWebViewController4);
|
|
}
|
|
this.p.addView(this.q, new ViewGroup.LayoutParams(-2, -2));
|
|
InneractiveAdSpot inneractiveAdSpot2 = this.a;
|
|
if (inneractiveAdSpot2 != null && inneractiveAdSpot2.getAdContent() != null && (viewGroup2 = this.p) != null) {
|
|
com.fyber.inneractive.sdk.flow.e eVar = new com.fyber.inneractive.sdk.flow.e(viewGroup2.getContext(), false, this.a.getAdContent().a, this.a.getAdContent().d(), this.a.getAdContent().c);
|
|
RelativeLayout relativeLayout = (RelativeLayout) View.inflate(this.p.getContext(), R.layout.ia_layout_fyber_ad_identifier_relative, null);
|
|
eVar.a(relativeLayout, IFyberAdIdentifier.Corner.BOTTOM_LEFT);
|
|
relativeLayout.setVisibility(0);
|
|
relativeLayout.setGravity(83);
|
|
IAmraidWebViewController iAmraidWebViewController5 = this.m;
|
|
if (iAmraidWebViewController5 == null) {
|
|
viewGroup3 = null;
|
|
} else {
|
|
viewGroup3 = iAmraidWebViewController5.b;
|
|
if (viewGroup3 != null && viewGroup3.getParent() != null) {
|
|
viewGroup3 = (ViewGroup) viewGroup3.getParent();
|
|
}
|
|
}
|
|
if (viewGroup3 != null && y() != null) {
|
|
ViewGroup.LayoutParams layoutParams2 = y().getLayoutParams();
|
|
IAmraidWebViewController iAmraidWebViewController6 = this.m;
|
|
viewGroup3.addView(relativeLayout, layoutParams2);
|
|
iAmraidWebViewController6.a(relativeLayout, c.EnumC0077c.IdentifierView);
|
|
}
|
|
}
|
|
} else if (!this.x) {
|
|
this.x = true;
|
|
iAmraidWebViewController3.b = iAmraidWebViewController3.a(((c0) this.b).c);
|
|
try {
|
|
iAmraidWebViewController3.h();
|
|
iAmraidWebViewController3.b.loadDataWithBaseURL(iAmraidWebViewController3.p, iAmraidWebViewController3.q, "text/html", nb.N, null);
|
|
} catch (Throwable unused) {
|
|
FrameLayout frameLayout = new FrameLayout(this.p.getContext());
|
|
frameLayout.setBackgroundResource(R.color.ia_blank_background);
|
|
this.p.removeAllViews();
|
|
this.p.addView(frameLayout, new FrameLayout.LayoutParams(a2.a, a2.b, 17));
|
|
}
|
|
} else {
|
|
FrameLayout frameLayout2 = new FrameLayout(this.p.getContext());
|
|
frameLayout2.setBackgroundResource(R.color.ia_blank_background);
|
|
this.p.removeAllViews();
|
|
this.p.addView(frameLayout2, new FrameLayout.LayoutParams(a2.a, a2.b, 17));
|
|
}
|
|
}
|
|
AdContent adcontent3 = this.b;
|
|
com.fyber.inneractive.sdk.response.f fVar2 = adcontent3 != 0 ? (com.fyber.inneractive.sdk.response.f) ((c0) adcontent3).b : null;
|
|
if (fVar2 != null && (aVar = this.q) != null) {
|
|
com.fyber.inneractive.sdk.renderers.b bVar2 = new com.fyber.inneractive.sdk.renderers.b(fVar2, aVar, new e(this));
|
|
this.y = bVar2;
|
|
bVar2.h = false;
|
|
bVar2.d = 1;
|
|
bVar2.e = 0.0f;
|
|
int i = fVar2.t;
|
|
if (i >= 1) {
|
|
bVar2.d = Math.min(i, 100);
|
|
}
|
|
float f = fVar2.u;
|
|
if (f >= -1.0f) {
|
|
bVar2.e = f;
|
|
}
|
|
if (bVar2.e >= 0.0f) {
|
|
IAlog.a("IAVisibilityTracker: startTrackingVisibility", new Object[0]);
|
|
bVar2.c = 0.0f;
|
|
bVar2.f = System.currentTimeMillis();
|
|
bVar2.g = true;
|
|
bVar2.a();
|
|
}
|
|
}
|
|
} else {
|
|
IAlog.f("InneractiveAdViewMraidAdRenderer.renderAd: Spot ad content is not the right content :( %s", adcontent2);
|
|
}
|
|
y yVar = y.a.a;
|
|
if (yVar.a.contains(this)) {
|
|
return;
|
|
}
|
|
yVar.a.add(this);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.r
|
|
public final void b(View view) {
|
|
IAmraidWebViewController iAmraidWebViewController = this.m;
|
|
if (iAmraidWebViewController != null) {
|
|
iAmraidWebViewController.a(view, c.EnumC0077c.ProgressOverlay);
|
|
}
|
|
}
|
|
|
|
public final void a(boolean z, long j) {
|
|
IAmraidWebViewController iAmraidWebViewController;
|
|
com.fyber.inneractive.sdk.web.h hVar;
|
|
InneractiveAdViewUnitController inneractiveAdViewUnitController;
|
|
if (!TextUtils.isEmpty(this.a.getMediationNameString()) || j == 0 || (this.a.getSelectedUnitController() instanceof InneractiveFullscreenUnitController) || this.t == -1 || (iAmraidWebViewController = this.m) == null || (hVar = iAmraidWebViewController.b) == null) {
|
|
return;
|
|
}
|
|
if (!hVar.getIsVisible()) {
|
|
IAlog.a("%sstartRefreshTimer called but ad is not visible", IAlog.a(this));
|
|
return;
|
|
}
|
|
this.r = System.currentTimeMillis();
|
|
this.k = z ? this.k : j;
|
|
IAlog.a("%sstartRefreshTimer in %d msec, mRefreshInterval = %d", IAlog.a(this), Long.valueOf(j), Long.valueOf(this.k));
|
|
if (j > 1) {
|
|
g gVar = this.s;
|
|
if (gVar != null) {
|
|
p.b.removeCallbacks(gVar);
|
|
}
|
|
H();
|
|
g gVar2 = new g(this);
|
|
this.s = gVar2;
|
|
p.b.postDelayed(gVar2, j);
|
|
return;
|
|
}
|
|
IAmraidWebViewController iAmraidWebViewController2 = this.m;
|
|
if (iAmraidWebViewController2 == null || iAmraidWebViewController2.b == null) {
|
|
return;
|
|
}
|
|
IAlog.a("%srefreshing ad", IAlog.a(this));
|
|
if ((!this.m.o() || this.m.O == com.fyber.inneractive.sdk.mraid.b0.RESIZED) && (inneractiveAdViewUnitController = this.l) != null) {
|
|
this.r = 0L;
|
|
inneractiveAdViewUnitController.refreshAd();
|
|
}
|
|
}
|
|
|
|
public static q0 a(int i, int i2, f0 f0Var) {
|
|
int a2;
|
|
int a3;
|
|
x xVar;
|
|
IAlog.a("View layout params: response width and height: %d, %d", Integer.valueOf(i), Integer.valueOf(i2));
|
|
if (i > 0 && i2 > 0) {
|
|
a2 = com.fyber.inneractive.sdk.util.o.a(i);
|
|
a3 = com.fyber.inneractive.sdk.util.o.a(i2);
|
|
} else {
|
|
UnitDisplayType unitDisplayType = UnitDisplayType.BANNER;
|
|
if (f0Var != null && (xVar = ((e0) f0Var).c) != null) {
|
|
unitDisplayType = xVar.b;
|
|
}
|
|
if (unitDisplayType.equals(UnitDisplayType.MRECT)) {
|
|
a2 = com.fyber.inneractive.sdk.util.o.a(b.RECTANGLE_WIDTH.value);
|
|
a3 = com.fyber.inneractive.sdk.util.o.a(b.RECTANGLE_HEIGHT.value);
|
|
} else if (com.fyber.inneractive.sdk.util.m.q()) {
|
|
a2 = com.fyber.inneractive.sdk.util.o.a(b.BANNER_TABLET_WIDTH.value);
|
|
a3 = com.fyber.inneractive.sdk.util.o.a(b.BANNER_TABLET_HEIGHT.value);
|
|
} else {
|
|
a2 = com.fyber.inneractive.sdk.util.o.a(b.BANNER_WIDTH.value);
|
|
a3 = com.fyber.inneractive.sdk.util.o.a(b.BANNER_HEIGHT.value);
|
|
}
|
|
}
|
|
IAlog.e("View layout params: final scaled width and height: %d, %d", Integer.valueOf(a2), Integer.valueOf(a3));
|
|
return new q0(a2, a3);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final boolean a(View view) {
|
|
return view.equals(this.p);
|
|
}
|
|
}
|