- 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
434 lines
16 KiB
Java
434 lines
16 KiB
Java
package com.fyber.inneractive.sdk.renderers;
|
|
|
|
import android.app.Activity;
|
|
import android.content.ActivityNotFoundException;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.graphics.Bitmap;
|
|
import android.graphics.Rect;
|
|
import android.text.TextUtils;
|
|
import android.view.View;
|
|
import android.view.ViewGroup;
|
|
import android.widget.FrameLayout;
|
|
import com.fyber.inneractive.sdk.activities.InneractiveFullscreenAdActivity;
|
|
import com.fyber.inneractive.sdk.activities.InneractiveRichMediaVideoPlayerActivityCore;
|
|
import com.fyber.inneractive.sdk.config.enums.Orientation;
|
|
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.InneractiveAdViewVideoContentController;
|
|
import com.fyber.inneractive.sdk.external.InneractiveContentController;
|
|
import com.fyber.inneractive.sdk.external.InneractiveNativeVideoContentController;
|
|
import com.fyber.inneractive.sdk.external.InneractiveUnitController;
|
|
import com.fyber.inneractive.sdk.external.VideoContentListener;
|
|
import com.fyber.inneractive.sdk.external.WebViewRendererProcessHasGoneError;
|
|
import com.fyber.inneractive.sdk.flow.g0;
|
|
import com.fyber.inneractive.sdk.flow.q;
|
|
import com.fyber.inneractive.sdk.flow.r;
|
|
import com.fyber.inneractive.sdk.network.u;
|
|
import com.fyber.inneractive.sdk.player.c;
|
|
import com.fyber.inneractive.sdk.player.controller.v;
|
|
import com.fyber.inneractive.sdk.util.IAlog;
|
|
import com.fyber.inneractive.sdk.util.a0;
|
|
import com.fyber.inneractive.sdk.util.b0;
|
|
import com.fyber.inneractive.sdk.util.p0;
|
|
import com.fyber.inneractive.sdk.web.a;
|
|
import com.google.android.gms.drive.DriveFile;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class i extends r<g0, InneractiveAdViewEventsListener> implements com.fyber.inneractive.sdk.interfaces.b, InneractiveNativeVideoContentController.Renderer, b0.d {
|
|
public FrameLayout k;
|
|
public com.fyber.inneractive.sdk.player.ui.l l;
|
|
public v m;
|
|
public VideoContentListener n;
|
|
public ViewGroup p;
|
|
public o q;
|
|
public j t;
|
|
public final a o = new a();
|
|
public float r = 0.0f;
|
|
public final Rect s = new Rect();
|
|
public boolean u = false;
|
|
public final b v = new b();
|
|
|
|
public class a implements c.InterfaceC0080c {
|
|
public a() {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.c.InterfaceC0080c
|
|
public final void a() {
|
|
v vVar = i.this.m;
|
|
if (vVar != null) {
|
|
vVar.e(false);
|
|
i.this.m.f();
|
|
}
|
|
}
|
|
}
|
|
|
|
public class b implements v.a {
|
|
public b() {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void a(boolean z) {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void a(boolean z, Orientation orientation) {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void e() {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void g() {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final com.fyber.inneractive.sdk.ignite.l j() {
|
|
return com.fyber.inneractive.sdk.ignite.l.NONE;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void o() {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void onCompleted() {
|
|
com.fyber.inneractive.sdk.player.ui.l lVar;
|
|
i iVar = i.this;
|
|
VideoContentListener videoContentListener = iVar.n;
|
|
if (videoContentListener == null || (lVar = iVar.l) == null || !((com.fyber.inneractive.sdk.player.ui.d) lVar).e) {
|
|
return;
|
|
}
|
|
videoContentListener.onCompleted();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void onPlayerError() {
|
|
com.fyber.inneractive.sdk.player.ui.l lVar;
|
|
i iVar = i.this;
|
|
VideoContentListener videoContentListener = iVar.n;
|
|
if (videoContentListener == null || (lVar = iVar.l) == null || !((com.fyber.inneractive.sdk.player.ui.d) lVar).e) {
|
|
return;
|
|
}
|
|
videoContentListener.onPlayerError();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void onProgress(int i, int i2) {
|
|
com.fyber.inneractive.sdk.player.ui.l lVar;
|
|
i iVar = i.this;
|
|
VideoContentListener videoContentListener = iVar.n;
|
|
if (videoContentListener == null || (lVar = iVar.l) == null || !((com.fyber.inneractive.sdk.player.ui.d) lVar).e) {
|
|
return;
|
|
}
|
|
videoContentListener.onProgress(i, i2);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void p() {
|
|
i.this.a(new WebViewRendererProcessHasGoneError());
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void q() {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void a(String str, String str2) {
|
|
i iVar = i.this;
|
|
iVar.getClass();
|
|
IAlog.a("%s ad view video ad renderer callback: onSuspiciousNoUserWebActionDetected", IAlog.a(iVar));
|
|
ViewGroup viewGroup = i.this.p;
|
|
if (viewGroup == null || viewGroup.getContext() == null) {
|
|
return;
|
|
}
|
|
i iVar2 = i.this;
|
|
if (iVar2.u) {
|
|
IAlog.a("%s redirect already reported for this ad", IAlog.a(iVar2));
|
|
return;
|
|
}
|
|
u.a(iVar2.p.getContext(), str, str2, i.this.b);
|
|
i iVar3 = i.this;
|
|
iVar3.u = true;
|
|
IAlog.a("%s reporting auto redirect", IAlog.a(iVar3));
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.v.a
|
|
public final void c() {
|
|
i iVar = i.this;
|
|
EventsListener eventslistener = iVar.c;
|
|
if (eventslistener != 0) {
|
|
((InneractiveAdViewEventsListener) eventslistener).onAdExpanded(iVar.a);
|
|
}
|
|
ViewGroup viewGroup = i.this.p;
|
|
if (viewGroup == null || viewGroup.getContext() == null) {
|
|
return;
|
|
}
|
|
com.fyber.inneractive.sdk.display.a bVar = i.this.b instanceof com.fyber.inneractive.sdk.dv.a ? new com.fyber.inneractive.sdk.display.b() : new com.fyber.inneractive.sdk.display.c();
|
|
if (bVar instanceof com.fyber.inneractive.sdk.display.c) {
|
|
Context context = i.this.p.getContext();
|
|
InneractiveAdSpot inneractiveAdSpot = i.this.a;
|
|
Intent intent = new Intent(context, (Class<?>) InneractiveFullscreenAdActivity.class);
|
|
intent.putExtra("spotId", inneractiveAdSpot.getLocalUniqueId());
|
|
if (!(context instanceof Activity)) {
|
|
intent.setFlags(DriveFile.MODE_READ_ONLY);
|
|
}
|
|
try {
|
|
IAlog.a("%sIAInterstitialUtil: Opening interstitial for spot id: %s", IAlog.a(context), inneractiveAdSpot.getLocalUniqueId());
|
|
context.startActivity(intent);
|
|
} catch (ActivityNotFoundException unused) {
|
|
IAlog.c("%sIAInterstitialUtil: InneractiveFullscreenAdActivity.class not found. Did you declare InneractiveFullscreenAdActivity in your manifest?", IAlog.a(context));
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void i() {
|
|
i iVar = i.this;
|
|
g0 g0Var = (g0) iVar.b;
|
|
if (g0Var.j) {
|
|
return;
|
|
}
|
|
g0Var.j = true;
|
|
iVar.D();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void l() {
|
|
i iVar = i.this;
|
|
if (iVar.c != 0) {
|
|
iVar.C();
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final void a(View view, String str) {
|
|
if (view == null || view.getContext() == null) {
|
|
return;
|
|
}
|
|
InneractiveRichMediaVideoPlayerActivityCore.startRichMediaIntent(view.getContext(), str);
|
|
i.this.C();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final a0.a a(p0 p0Var, com.fyber.inneractive.sdk.util.h hVar) {
|
|
T t;
|
|
com.fyber.inneractive.sdk.model.vast.b bVar;
|
|
i iVar = i.this;
|
|
Context context = iVar.l.getContext() == null ? com.fyber.inneractive.sdk.util.o.a : i.this.l.getContext();
|
|
AdContent adcontent = i.this.b;
|
|
return iVar.a(context, (adcontent == 0 || (t = ((g0) adcontent).b) == 0 || (bVar = ((com.fyber.inneractive.sdk.response.g) t).L) == null) ? null : bVar.b, p0Var, hVar);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.y
|
|
public final a0.a a(String str, p0 p0Var, a.b bVar, boolean z) {
|
|
AdContent adcontent;
|
|
com.fyber.inneractive.sdk.model.vast.b bVar2;
|
|
if (TextUtils.isEmpty(str) && (adcontent = i.this.b) != 0) {
|
|
g0 g0Var = (g0) adcontent;
|
|
T t = g0Var.b;
|
|
if (t != 0) {
|
|
com.fyber.inneractive.sdk.model.vast.c cVar = ((com.fyber.inneractive.sdk.response.g) t).L.i;
|
|
str = cVar != null ? cVar.g : null;
|
|
if (TextUtils.isEmpty(str)) {
|
|
T t2 = g0Var.b;
|
|
if (t2 != 0 && (bVar2 = ((com.fyber.inneractive.sdk.response.g) t2).L) != null) {
|
|
str = bVar2.b;
|
|
}
|
|
}
|
|
}
|
|
str = null;
|
|
}
|
|
i iVar = i.this;
|
|
Context context = com.fyber.inneractive.sdk.util.o.a;
|
|
ViewGroup viewGroup = iVar.p;
|
|
if (viewGroup != null && viewGroup.getContext() != null) {
|
|
context = iVar.p.getContext();
|
|
}
|
|
return iVar.a(context, str, p0Var, z ? com.fyber.inneractive.sdk.util.h.DEFAULT_ENDCARD : com.fyber.inneractive.sdk.util.h.VAST_ENDCARD);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final void a(int i) {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final boolean a(q qVar) {
|
|
return qVar instanceof g0;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.r, com.fyber.inneractive.sdk.external.InneractiveAdRenderer
|
|
public final void destroy() {
|
|
m();
|
|
super.destroy();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final int f() {
|
|
return 0;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final void k() {
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final int u() {
|
|
return 0;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.flow.r
|
|
public final View y() {
|
|
return this.k;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final void m() {
|
|
ViewGroup viewGroup;
|
|
j jVar = this.t;
|
|
if (jVar != null && (viewGroup = this.p) != null) {
|
|
viewGroup.removeCallbacks(jVar);
|
|
this.t = null;
|
|
}
|
|
b0.c.a.a(this.p);
|
|
IAlog.a("%sunbind called. root is %s", IAlog.a(this), this.p);
|
|
if (this.m != null) {
|
|
IAlog.a("%sdestroying video ui controller", IAlog.a(this));
|
|
this.m.a((v) null);
|
|
this.m.destroy();
|
|
this.m = null;
|
|
}
|
|
if (this.l != null) {
|
|
this.p.setLayoutTransition(null);
|
|
this.p.removeView(this.k);
|
|
this.l.destroy();
|
|
this.l = null;
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.external.InneractiveNativeVideoContentController.Renderer
|
|
public final void pauseVideo() {
|
|
v vVar = this.m;
|
|
if (vVar != null) {
|
|
vVar.pauseVideo();
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.external.InneractiveNativeVideoContentController.Renderer
|
|
public final void playVideo() {
|
|
v vVar = this.m;
|
|
if (vVar != null) {
|
|
vVar.b(0);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final void s() {
|
|
v vVar = this.m;
|
|
if (vVar != null) {
|
|
vVar.e(false);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final void a(ViewGroup viewGroup) {
|
|
Bitmap bitmap;
|
|
InneractiveAdSpot inneractiveAdSpot = this.a;
|
|
if (inneractiveAdSpot == null) {
|
|
IAlog.f("%sYou must set the spot to render before calling renderAd", IAlog.a(this));
|
|
return;
|
|
}
|
|
this.p = viewGroup;
|
|
InneractiveUnitController selectedUnitController = inneractiveAdSpot.getSelectedUnitController();
|
|
if (!(selectedUnitController instanceof InneractiveAdViewUnitController)) {
|
|
IAlog.f("%sWrong type of unit controller found. Expecting InneractiveAdViewUnitController", IAlog.a(this));
|
|
} else {
|
|
InneractiveContentController selectedContentController = selectedUnitController.getSelectedContentController();
|
|
if (selectedContentController != null) {
|
|
if (selectedContentController instanceof InneractiveAdViewVideoContentController) {
|
|
this.n = ((InneractiveAdViewVideoContentController) selectedContentController).getEventsListener();
|
|
} else {
|
|
IAlog.f("%sContent controller expected to be InneractiveFullscreenVideoContentController and is %s", IAlog.a(this), selectedContentController.getClass().getSimpleName());
|
|
}
|
|
}
|
|
}
|
|
this.u = false;
|
|
this.k = new FrameLayout(viewGroup.getContext());
|
|
AdContent adcontent = this.b;
|
|
com.fyber.inneractive.sdk.player.h hVar = adcontent != 0 ? ((g0) adcontent).i : null;
|
|
Context context = viewGroup.getContext();
|
|
if (hVar != null) {
|
|
((com.fyber.inneractive.sdk.player.e) hVar.f).getClass();
|
|
com.fyber.inneractive.sdk.renderers.a aVar = new com.fyber.inneractive.sdk.renderers.a(hVar);
|
|
this.q = aVar;
|
|
this.l = aVar.a(context, ((g0) this.b).c);
|
|
this.m = (v) this.q.a(this.a, (g0) this.b);
|
|
this.p.addView(this.k, new ViewGroup.LayoutParams(-1, -2));
|
|
this.p.setLayoutTransition(null);
|
|
this.k.addView((View) this.l, new FrameLayout.LayoutParams(-2, -2, 17));
|
|
this.m.a((v) this.v);
|
|
v vVar = this.m;
|
|
this.q.b();
|
|
vVar.e(false);
|
|
this.q.a(this.o);
|
|
if ((this.q instanceof com.fyber.inneractive.sdk.renderers.a) && (bitmap = ((com.fyber.inneractive.sdk.player.e) hVar.f).k) != null) {
|
|
this.m.a(bitmap);
|
|
}
|
|
b0 b0Var = b0.c.a;
|
|
ViewGroup viewGroup2 = this.p;
|
|
b0Var.getClass();
|
|
b0Var.a(viewGroup2.getContext(), viewGroup2, this);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.util.b0.d
|
|
public final void a(float f, Rect rect) {
|
|
ViewGroup viewGroup;
|
|
ViewGroup viewGroup2;
|
|
if (this.r == f && this.s.equals(rect)) {
|
|
return;
|
|
}
|
|
this.r = f;
|
|
this.s.set(rect);
|
|
v vVar = this.m;
|
|
if (vVar != null) {
|
|
vVar.d(false);
|
|
((com.fyber.inneractive.sdk.player.ui.d) this.l).e();
|
|
this.m.a(f);
|
|
}
|
|
if (f <= 0.0f) {
|
|
j jVar = this.t;
|
|
if (jVar == null || (viewGroup = this.p) == null) {
|
|
return;
|
|
}
|
|
viewGroup.removeCallbacks(jVar);
|
|
this.t = null;
|
|
return;
|
|
}
|
|
j jVar2 = this.t;
|
|
if (jVar2 != null && (viewGroup2 = this.p) != null) {
|
|
viewGroup2.removeCallbacks(jVar2);
|
|
this.t = null;
|
|
}
|
|
j jVar3 = new j(this);
|
|
this.t = jVar3;
|
|
this.p.postDelayed(jVar3, 100L);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final boolean a(View view) {
|
|
return view.equals(this.p);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.interfaces.b
|
|
public final void a() {
|
|
v vVar = this.m;
|
|
if (vVar != null) {
|
|
vVar.a();
|
|
}
|
|
}
|
|
}
|