Files
rr3-apk/decompiled-community/sources/com/fyber/inneractive/sdk/web/f.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- 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
2026-02-18 15:48:36 -08:00

342 lines
9.8 KiB
Java

package com.fyber.inneractive.sdk.web;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.graphics.Rect;
import android.webkit.WebSettings;
import android.webkit.WebView;
import com.fyber.inneractive.sdk.config.IAConfigManager;
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
import com.fyber.inneractive.sdk.external.InneractiveInfrastructureError;
import com.fyber.inneractive.sdk.measurement.a;
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.util.u0;
import com.fyber.inneractive.sdk.web.a0;
import com.fyber.inneractive.sdk.web.h;
import com.fyber.inneractive.sdk.web.h0;
import com.vungle.ads.internal.presenter.MRAIDPresenter;
/* loaded from: classes2.dex */
public abstract class f<L extends h0> implements g, b0.d, h.b, a0.a {
public h b;
public s c;
public t d;
public b f;
public L g;
public boolean j;
public final boolean k;
public a l;
public final d m;
public final com.fyber.inneractive.sdk.web.c n;
public e o;
public String p;
public String q;
public InneractiveAdRequest r;
public com.fyber.inneractive.sdk.flow.q s;
public com.fyber.inneractive.sdk.response.e t;
public boolean a = false;
public float h = 0.0f;
public final Rect i = new Rect();
public final boolean e = false;
public interface a {
String a();
void b();
void c();
String getUrl();
}
public interface b {
void a(InneractiveInfrastructureError inneractiveInfrastructureError);
void a(f fVar);
}
public class c implements a {
public final String a;
public final p0 b;
public c(String str, p0 p0Var) {
this.b = p0Var;
this.a = str;
}
@Override // com.fyber.inneractive.sdk.web.f.a
public final String a() {
return MRAIDPresenter.OPEN;
}
@Override // com.fyber.inneractive.sdk.web.f.a
public final void b() {
}
@Override // com.fyber.inneractive.sdk.web.f.a
public final String getUrl() {
return null;
}
public final String toString() {
return "action: open url: " + this.a;
}
@Override // com.fyber.inneractive.sdk.web.f.a
public final void c() {
f fVar = f.this;
String str = this.a;
p0 p0Var = this.b;
L l = fVar.g;
if (l != null) {
a0.d dVar = l.a(str, p0Var, null).a;
}
}
}
public f(boolean z, com.fyber.inneractive.sdk.config.global.s sVar) {
this.k = z;
this.b = a(sVar);
g0 g0Var = (g0) this;
this.n = new com.fyber.inneractive.sdk.web.c(g0Var);
this.m = new d(g0Var);
}
public final h a(com.fyber.inneractive.sdk.config.global.s sVar) {
boolean z;
int i;
int i2;
int i3;
h hVar = new h();
if (sVar != null) {
com.fyber.inneractive.sdk.config.global.features.e eVar = (com.fyber.inneractive.sdk.config.global.features.e) sVar.a(com.fyber.inneractive.sdk.config.global.features.e.class);
boolean a2 = eVar.a(false, "agg_res");
int max = Math.max(eVar.a("agg_res_ct", 500), 50);
z = a2;
i2 = Math.max(eVar.a("agg_res_rt", 500), 50);
i3 = Math.max(eVar.a("agg_res_retries", 2), 1);
i = max;
} else {
z = false;
i = 500;
i2 = 500;
i3 = 2;
}
t tVar = new t(this, z, i, i2, i3);
this.d = tVar;
hVar.setWebViewClient(tVar);
return hVar;
}
@Override // com.fyber.inneractive.sdk.web.g
public void a(WebView webView) {
}
public abstract boolean a(String str, p0 p0Var);
@Override // com.fyber.inneractive.sdk.web.g
public void b() {
}
public void b(boolean z) {
IAlog.a("%s destroy is fatal: %b", IAlog.a(this), Boolean.valueOf(z));
e eVar = this.o;
if (eVar != null && !eVar.a()) {
this.o.b();
this.o = null;
}
h hVar = this.b;
if (hVar != null) {
b0.c.a.a(hVar);
com.fyber.inneractive.sdk.util.t.a(this.b);
this.b.setWebChromeClient(null);
if (e() == null) {
this.b.destroy();
} else {
((com.fyber.inneractive.sdk.measurement.tracker.c) e()).a(z);
}
}
t tVar = this.d;
if (tVar != null) {
tVar.e = null;
}
com.fyber.inneractive.sdk.web.c cVar = this.n;
if (cVar != null) {
com.fyber.inneractive.sdk.util.p.b.removeCallbacks(cVar);
}
d dVar = this.m;
if (dVar != null) {
com.fyber.inneractive.sdk.util.p.b.removeCallbacks(dVar);
}
this.g = null;
if (!z) {
this.f = null;
}
this.b = null;
this.c = null;
this.d = null;
this.s = null;
this.r = null;
}
public void d() {
b(false);
}
public abstract a.InterfaceC0075a e();
public final h f() {
return this.b;
}
public void h() {
WebSettings settings = this.b.getSettings();
boolean z = true;
settings.setJavaScriptEnabled(true);
settings.setLoadsImagesAutomatically(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
if (!IAConfigManager.L.q && com.fyber.inneractive.sdk.util.s.a()) {
settings.setMixedContentMode(2);
}
if (this.e) {
settings.setMediaPlaybackRequiresUserGesture(false);
}
this.b.a();
this.b.getClass();
this.b.setFocusable(true);
this.b.setBackgroundColor(0);
s sVar = new s();
this.c = sVar;
this.b.setWebChromeClient(sVar);
try {
Context context = this.b.getContext();
ApplicationInfo applicationInfo = context != null ? context.getApplicationInfo() : null;
if (applicationInfo == null || (applicationInfo.flags & 2) == 0) {
z = false;
}
WebView.setWebContentsDebuggingEnabled(z);
} catch (Exception unused) {
IAlog.a("Could not set web contents debugging flag", new Object[0]);
}
this.b.setListener(this);
}
public final void i() {
this.b.setTapListener(this);
}
public final void j() {
IAlog.a("IAWebViewController resetClick()", new Object[0]);
com.fyber.inneractive.sdk.web.c cVar = this.n;
if (cVar != null) {
com.fyber.inneractive.sdk.util.p.b.removeCallbacks(cVar);
}
d dVar = this.m;
if (dVar != null) {
com.fyber.inneractive.sdk.util.p.b.removeCallbacks(dVar);
}
this.j = false;
}
public void setAdContent(com.fyber.inneractive.sdk.flow.q qVar) {
this.s = qVar;
}
public void setAdRequest(InneractiveAdRequest inneractiveAdRequest) {
this.r = inneractiveAdRequest;
}
public void setAdResponse(com.fyber.inneractive.sdk.response.e eVar) {
this.t = eVar;
}
public void setListener(L l) {
this.g = l;
}
public p0 g() {
h hVar = this.b;
return hVar != null ? hVar.getLastClickedLocation() : p0.a();
}
public final void a(InneractiveInfrastructureError inneractiveInfrastructureError) {
b bVar = this.f;
if (bVar != null) {
bVar.a(inneractiveInfrastructureError);
}
b(true);
}
@Override // com.fyber.inneractive.sdk.util.b0.d
public final void a(float f, Rect rect) {
if (f == this.h && rect.equals(this.i)) {
return;
}
this.h = f;
this.i.set(rect);
h hVar = this.b;
if (hVar != null) {
hVar.b();
}
}
@Override // com.fyber.inneractive.sdk.web.g
public boolean a(WebView webView, String str) {
IAlog.a("%shandleUrl called with: %s", IAlog.a(this), str);
if (this.b == null) {
IAlog.a("handleUrl: web view already destroyed. Cannot handle url", new Object[0]);
return false;
}
if (u0.a(str)) {
this.b.loadUrl("chrome://crash");
return true;
}
p0 g = g();
if (a(str, g)) {
return true;
}
a(new c(str, g));
return true;
}
public void a(boolean z) {
IAlog.a("%sonWebViewVisibilityChanged called with: %s", IAlog.a(this), Boolean.valueOf(z));
L l = this.g;
if (l != null) {
l.a(z);
}
}
public final void a(a aVar) {
IAlog.e("IAWebViewController Web view click detected", new Object[0]);
if (this.j) {
IAlog.e("IAWebViewController Native click detected before web view request. Processing click", new Object[0]);
aVar.c();
j();
return;
}
if (this.k) {
IAlog.e("IAWebViewController Native click was not detected yet. Caching click request and waiting", new Object[0]);
d dVar = this.m;
if (dVar != null) {
com.fyber.inneractive.sdk.util.p.b.removeCallbacks(dVar);
}
this.l = aVar;
if (this.m != null) {
com.fyber.inneractive.sdk.util.p.b.postDelayed(this.m, IAConfigManager.L.t.b.a(1000, 1000, "click_timeout"));
return;
}
return;
}
d dVar2 = this.m;
if (dVar2 != null) {
com.fyber.inneractive.sdk.util.p.b.removeCallbacks(dVar2);
}
this.l = null;
aVar.c();
}
}