正在查看: Cantique de Louanges v12 应用的 u.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Cantique de Louanges v12 应用的 u.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.adcolony.sdk;
import android.content.Context;
import android.net.Uri;
import android.os.Build;
import android.view.MotionEvent;
import android.view.ViewGroup;
import android.webkit.JsResult;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import com.adcolony.sdk.e0;
import com.applovin.mediation.MaxReward;
import com.applovin.sdk.AppLovinMediationProvider;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.ArrayList;
public class u extends WebView {
public static final g f9704u = new g(null);
private final int f9705a;
private final m0 f9706b;
private int f9707c;
private String f9708d;
private String f9709e;
private String f9710f;
private String f9711g;
private String f9712h;
private String f9713i;
private h0 f9714j;
private boolean f9715k;
private w f9716l;
private int f9717m;
private int f9718n;
private int f9719o;
private int f9720p;
private int f9721q;
private int f9722r;
private int f9723s;
private int f9724t;
private final class a extends WebChromeClient {
public a() {
}
@Override
public boolean onConsoleMessage(android.webkit.ConsoleMessage r9) {
throw new UnsupportedOperationException("Method not decompiled: com.adcolony.sdk.u.a.onConsoleMessage(android.webkit.ConsoleMessage):boolean");
}
@Override
public boolean onJsAlert(WebView webView, String str, String str2, JsResult jsResult) {
if (jsResult == null) {
return true;
}
jsResult.confirm();
return true;
}
}
protected class b extends WebViewClient {
public b() {
}
@Override
public void onPageFinished(WebView webView, String str) {
ha.l0 l0Var;
h0 q4 = x.q();
x.u(q4, "id", u.this.f9707c);
x.n(q4, "url", str);
w parentContainer = u.this.getParentContainer();
if (parentContainer == null) {
l0Var = null;
} else {
x.n(q4, "ad_session_id", u.this.getAdSessionId());
x.u(q4, "container_id", parentContainer.q());
new m0("WebView.on_load", parentContainer.J(), q4).e();
l0Var = ha.l0.a;
}
if (l0Var == null) {
new m0("WebView.on_load", u.this.getWebViewModuleId(), q4).e();
}
}
@Override
public void onReceivedError(WebView webView, int i5, String str, String str2) {
u.this.d(i5, str, str2);
}
@Override
public WebResourceResponse shouldInterceptRequest(WebView webView, String str) {
boolean z4 = false;
if (str != null && ld.m.s(str, "mraid.js", false, 2, (Object) null)) {
z4 = true;
}
if (!z4) {
return null;
}
String str2 = u.this.f9709e;
Charset charset = n0.f9449a;
if (str2 == null) {
throw new NullPointerException("null cannot be cast to non-null type java.lang.String");
}
return new WebResourceResponse("text/javascript", charset.name(), new ByteArrayInputStream(str2.getBytes(charset)));
}
}
protected class c extends b {
public c() {
super();
}
@Override
public WebResourceResponse shouldInterceptRequest(WebView webView, String str) {
return null;
}
@Override
public WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
Uri url;
String uri;
boolean z4 = false;
if (webResourceRequest != null && (url = webResourceRequest.getUrl()) != null && (uri = url.toString()) != null && ld.m.s(uri, "mraid.js", false, 2, (Object) null)) {
z4 = true;
}
if (!z4) {
return null;
}
String str = u.this.f9709e;
Charset charset = n0.f9449a;
if (str != null) {
return new WebResourceResponse("text/javascript", charset.name(), new ByteArrayInputStream(str.getBytes(charset)));
}
throw new NullPointerException("null cannot be cast to non-null type java.lang.String");
}
}
protected class d extends c {
public d() {
super();
}
@Override
public void onReceivedError(WebView webView, int i5, String str, String str2) {
}
@Override
public void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, WebResourceError webResourceError) {
int errorCode;
CharSequence description;
Uri url;
if (webResourceError == null) {
return;
}
u uVar = u.this;
errorCode = webResourceError.getErrorCode();
description = webResourceError.getDescription();
uVar.d(errorCode, description.toString(), (webResourceRequest == null || (url = webResourceRequest.getUrl()) == null) ? null : url.toString());
}
}
protected class e extends d {
public e(u uVar) {
super();
}
}
protected class f extends e {
public f() {
super(u.this);
}
@Override
public boolean onRenderProcessGone(android.webkit.WebView r3, android.webkit.RenderProcessGoneDetail r4) {
throw new UnsupportedOperationException("Method not decompiled: com.adcolony.sdk.u.f.onRenderProcessGone(android.webkit.WebView, android.webkit.RenderProcessGoneDetail):boolean");
}
}
public static final class g {
public g(kotlin.jvm.internal.k kVar) {
this();
}
public final u a(Context context, m0 m0Var, int i5, w wVar) {
int t4 = r.h().P0().t();
h0 a5 = m0Var.a();
u v0Var = x.t(a5, "use_mraid_module") ? new v0(context, t4, m0Var, r.h().P0().t()) : x.t(a5, "enable_messages") ? new z(context, t4, m0Var) : new u(context, t4, m0Var);
v0Var.i(m0Var, i5, wVar);
v0Var.u();
return v0Var;
}
private g() {
}
}
public static final class h implements r0 {
static final class a extends kotlin.jvm.internal.u implements ta.a {
final u f9731d;
final m0 f9732e;
a(u uVar, m0 m0Var) {
super(0);
this.f9731d = uVar;
this.f9732e = m0Var;
}
public final void a() {
this.f9731d.l(x.E(this.f9732e.a(), "custom_js"));
}
public Object invoke() {
a();
return ha.l0.a;
}
}
h() {
}
@Override
public void a(m0 m0Var) {
u uVar = u.this;
uVar.j(m0Var, new a(uVar, m0Var));
}
}
public static final class i implements r0 {
static final class a extends kotlin.jvm.internal.u implements ta.a {
final u f9734d;
final m0 f9735e;
a(u uVar, m0 m0Var) {
super(0);
this.f9734d = uVar;
this.f9735e = m0Var;
}
public final void a() {
this.f9734d.setVisible(this.f9735e);
}
public Object invoke() {
a();
return ha.l0.a;
}
}
i() {
}
@Override
public void a(m0 m0Var) {
u uVar = u.this;
uVar.j(m0Var, new a(uVar, m0Var));
}
}
public static final class j implements r0 {
static final class a extends kotlin.jvm.internal.u implements ta.a {
final u f9737d;
final m0 f9738e;
a(u uVar, m0 m0Var) {
super(0);
this.f9737d = uVar;
this.f9738e = m0Var;
}
public final void a() {
this.f9737d.setBounds(this.f9738e);
}
public Object invoke() {
a();
return ha.l0.a;
}
}
j() {
}
@Override
public void a(m0 m0Var) {
u uVar = u.this;
uVar.j(m0Var, new a(uVar, m0Var));
}
}
public static final class k implements r0 {
static final class a extends kotlin.jvm.internal.u implements ta.a {
final u f9740d;
final m0 f9741e;
a(u uVar, m0 m0Var) {
super(0);
this.f9740d = uVar;
this.f9741e = m0Var;
}
public final void a() {
this.f9740d.setTransparent(x.t(this.f9741e.a(), "transparent"));
}
public Object invoke() {
a();
return ha.l0.a;
}
}
k() {
}
@Override
public void a(m0 m0Var) {
u uVar = u.this;
uVar.j(m0Var, new a(uVar, m0Var));
}
}
static final class l implements Runnable {
private final ta.a f9742a;
l(ta.a aVar) {
this.f9742a = aVar;
}
@Override
public final void run() {
this.f9742a.invoke();
}
}
static final class m implements Runnable {
public static final class a extends WebViewClient {
final u f9744a;
a(u uVar) {
this.f9744a = uVar;
}
@Override
public void onPageFinished(WebView webView, String str) {
this.f9744a.destroy();
}
}
m() {
}
@Override
public final void run() {
u.this.setWebChromeClient(null);
u.this.setWebViewClient(new a(u.this));
u.this.clearCache(true);
u.this.removeAllViews();
u.this.loadUrl("about:blank");
}
}
protected u(Context context, int i5, m0 m0Var) {
super(context);
this.f9705a = i5;
this.f9706b = m0Var;
this.f9708d = MaxReward.DEFAULT_LABEL;
this.f9709e = MaxReward.DEFAULT_LABEL;
this.f9710f = MaxReward.DEFAULT_LABEL;
this.f9711g = MaxReward.DEFAULT_LABEL;
this.f9712h = MaxReward.DEFAULT_LABEL;
this.f9713i = MaxReward.DEFAULT_LABEL;
this.f9714j = x.q();
}
public static final u b(Context context, m0 m0Var, int i5, w wVar) {
return f9704u.a(context, m0Var, i5, wVar);
}
public final void d(int i5, String str, String str2) {
w wVar = this.f9716l;
if (wVar != null) {
h0 q4 = x.q();
x.u(q4, "id", this.f9707c);
x.n(q4, "ad_session_id", getAdSessionId());
x.u(q4, "container_id", wVar.q());
x.u(q4, "code", i5);
x.n(q4, "error", str);
x.n(q4, "url", str2);
new m0("WebView.on_error", wVar.J(), q4).e();
}
e0.a c5 = new e0.a().c("onReceivedError: ");
if (str == null) {
str = "WebViewErrorMessage: null description";
}
c5.c(str).d(e0.f9334i);
}
public final void j(m0 m0Var, ta.a aVar) {
h0 a5 = m0Var.a();
if (x.A(a5, "id") == this.f9707c) {
int A = x.A(a5, "container_id");
w wVar = this.f9716l;
if (wVar != null && A == wVar.q()) {
String E = x.E(a5, "ad_session_id");
w wVar2 = this.f9716l;
if (kotlin.jvm.internal.s.a(E, wVar2 == null ? null : wVar2.b())) {
h2.G(new l(aVar));
}
}
}
}
private final void k(Exception exc) {
new e0.a().c(exc.getClass().toString()).c(" during metadata injection w/ metadata = ").c(x.E(this.f9714j, "metadata")).d(e0.f9334i);
w wVar = this.f9716l;
if (wVar == null) {
return;
}
h0 q4 = x.q();
x.n(q4, "id", getAdSessionId());
new m0("AdSession.on_error", wVar.J(), q4).e();
}
private final void p() {
ArrayList H;
ArrayList F;
w wVar = this.f9716l;
if (wVar != null && (F = wVar.F()) != null) {
F.add(r.b("WebView.execute_js", new h(), true));
F.add(r.b("WebView.set_visible", new i(), true));
F.add(r.b("WebView.set_bounds", new j(), true));
F.add(r.b("WebView.set_transparent", new k(), true));
}
w wVar2 = this.f9716l;
if (wVar2 == null || (H = wVar2.H()) == null) {
return;
}
H.add("WebView.execute_js");
H.add("WebView.set_visible");
H.add("WebView.set_bounds");
H.add("WebView.set_transparent");
}
private final WebViewClient s() {
int i5 = Build.VERSION.SDK_INT;
return i5 >= 26 ? getWebViewClientApi26() : i5 >= 24 ? getWebViewClientApi24() : i5 >= 23 ? getWebViewClientApi23() : getWebViewClientApi21();
}
public final void setTransparent(boolean z4) {
setBackgroundColor(z4 ? 0 : -1);
}
protected final String getAdSessionId() {
return this.f9712h;
}
protected final com.adcolony.sdk.d getAdView() {
return (com.adcolony.sdk.d) r.h().Z().w().get(this.f9712h);
}
protected final String getBaseUrl() {
return this.f9711g;
}
public final int getCurrentHeight() {
return this.f9720p;
}
public final int getCurrentWidth() {
return this.f9719o;
}
public final int getCurrentX() {
return this.f9717m;
}
public final int getCurrentY() {
return this.f9718n;
}
protected final boolean getDestroyed() {
return this.f9715k;
}
protected final h0 getInfo() {
return this.f9714j;
}
public final int getInitialHeight() {
return this.f9724t;
}
public final int getInitialWidth() {
return this.f9723s;
}
public final int getInitialX() {
return this.f9721q;
}
public final int getInitialY() {
return this.f9722r;
}
protected final com.adcolony.sdk.j getInterstitial() {
return (com.adcolony.sdk.j) r.h().Z().E().get(this.f9712h);
}
protected final String getMUrl() {
return this.f9710f;
}
protected final m0 getMessage() {
return this.f9706b;
}
protected final String getMraidFilepath() {
return this.f9713i;
}
protected final w getParentContainer() {
return this.f9716l;
}
protected WebViewClient getWebViewClientApi21() {
return new c();
}
protected WebViewClient getWebViewClientApi23() {
return new d();
}
protected WebViewClient getWebViewClientApi24() {
return new e(this);
}
protected WebViewClient getWebViewClientApi26() {
return new f();
}
protected WebViewClient getWebViewClientDefault() {
return new b();
}
public final int getWebViewModuleId() {
return this.f9705a;
}
public final void h(m0 m0Var) {
setBounds(m0Var);
}
protected void i(m0 m0Var, int i5, w wVar) {
this.f9707c = i5;
this.f9716l = wVar;
h0 a5 = m0Var.a();
String F = x.F(a5, "url");
if (F == null) {
F = x.E(a5, "data");
}
this.f9710f = F;
this.f9711g = x.E(a5, "base_url");
this.f9708d = x.E(a5, "custom_js");
this.f9712h = x.E(a5, "ad_session_id");
this.f9714j = x.C(a5, "info");
this.f9713i = x.E(a5, "mraid_filepath");
this.f9719o = x.A(a5, "width");
this.f9720p = x.A(a5, "height");
this.f9717m = x.A(a5, "x");
int A = x.A(a5, "y");
this.f9718n = A;
this.f9723s = this.f9719o;
this.f9724t = this.f9720p;
this.f9721q = this.f9717m;
this.f9722r = A;
w();
r();
}
protected final void l(String str) {
if (this.f9715k) {
new e0.a().c("Ignoring call to execute_js as WebView has been destroyed.").d(e0.f9328c);
return;
}
try {
evaluateJavascript(str, null);
} catch (IllegalStateException unused) {
new e0.a().c("Device reporting incorrect OS version, evaluateJavascript ").c("is not available. Disabling AdColony.").d(e0.f9333h);
com.adcolony.sdk.a.t();
}
}
protected boolean m(h0 h0Var, String str) {
Context a5 = r.a();
s sVar = a5 instanceof s ? (s) a5 : null;
if (sVar == null) {
return false;
}
r.h().Z().d(sVar, h0Var, str);
return true;
}
public final void o(m0 m0Var, int i5, w wVar) {
i(m0Var, i5, wVar);
q();
}
@Override
public boolean onTouchEvent(MotionEvent motionEvent) {
if (motionEvent != null && motionEvent.getAction() == 1) {
com.adcolony.sdk.d adView = getAdView();
if (adView != null && !adView.f()) {
h0 q4 = x.q();
x.n(q4, "ad_session_id", getAdSessionId());
new m0("WebView.on_first_click", 1, q4).e();
adView.setUserInteraction(true);
}
com.adcolony.sdk.j interstitial = getInterstitial();
if (interstitial != null) {
interstitial.o(true);
}
}
return super.onTouchEvent(motionEvent);
}
protected void q() {
p();
setVisibility(4);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(this.f9719o, this.f9720p);
layoutParams.setMargins(getCurrentX(), getCurrentY(), 0, 0);
layoutParams.gravity = 0;
w wVar = this.f9716l;
if (wVar == null) {
return;
}
wVar.addView(this, layoutParams);
}
public final void r() {
r.h().Z().g(this, this.f9712h, this.f9716l);
}
protected final void setAdSessionId(String str) {
this.f9712h = str;
}
protected final void setBaseUrl(String str) {
this.f9711g = str;
}
protected void setBounds(m0 m0Var) {
h0 a5 = m0Var.a();
this.f9717m = x.A(a5, "x");
this.f9718n = x.A(a5, "y");
this.f9719o = x.A(a5, "width");
this.f9720p = x.A(a5, "height");
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams == null) {
throw new NullPointerException("null cannot be cast to non-null type android.widget.FrameLayout.LayoutParams");
}
FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) layoutParams;
layoutParams2.setMargins(getCurrentX(), getCurrentY(), 0, 0);
layoutParams2.width = getCurrentWidth();
layoutParams2.height = getCurrentHeight();
ha.l0 l0Var = ha.l0.a;
setLayoutParams(layoutParams2);
}
protected final void setInfo(h0 h0Var) {
this.f9714j = h0Var;
}
protected final void setMUrl(String str) {
this.f9710f = str;
}
protected final void setMraidFilepath(String str) {
this.f9713i = str;
}
protected void setVisible(m0 m0Var) {
setVisibility(x.t(m0Var.a(), "visible") ? 0 : 4);
}
protected final String t() {
com.adcolony.sdk.j interstitial = getInterstitial();
if (interstitial != null) {
String str = ((Object) interstitial.b()) + " : " + interstitial.C();
if (str != null) {
return str;
}
}
return AppLovinMediationProvider.UNKNOWN;
}
protected void u() {
setFocusable(true);
setHorizontalScrollBarEnabled(false);
setVerticalScrollBarEnabled(false);
WebView.setWebContentsDebuggingEnabled(false);
setWebChromeClient(new a());
WebSettings settings = getSettings();
settings.setJavaScriptEnabled(true);
settings.setBuiltInZoomControls(true);
settings.setDisplayZoomControls(false);
settings.setUseWideViewPort(true);
settings.setGeolocationEnabled(true);
settings.setMediaPlaybackRequiresUserGesture(false);
settings.setAllowFileAccessFromFileURLs(true);
settings.setAllowUniversalAccessFromFileURLs(true);
settings.setAllowFileAccess(true);
setWebViewClient(s());
v();
if (!(this instanceof q0)) {
q();
}
if (this.f9708d.length() > 0) {
l(this.f9708d);
}
}
protected void v() {
if (!ld.m.F(this.f9710f, "http", false, 2, (Object) null) && !ld.m.F(this.f9710f, "file", false, 2, (Object) null)) {
loadDataWithBaseURL(this.f9711g, this.f9710f, "text/html", null, null);
return;
}
if (ld.m.K(this.f9710f, ".html", false, 2, (Object) null) || !ld.m.F(this.f9710f, "file", false, 2, (Object) null)) {
loadUrl(this.f9710f);
return;
}
loadDataWithBaseURL(this.f9710f, "<html><script src=\"" + this.f9710f + "\"></script></html>", "text/html", null, null);
}
protected void w() {
if (this.f9713i.length() > 0) {
try {
this.f9709e = r.h().L0().a(this.f9713i, false).toString();
this.f9709e = new ld.j("bridge.os_name\\s*=\\s*\"\"\\s*;").d(this.f9709e, "bridge.os_name = \"\";\nvar ADC_DEVICE_INFO = " + this.f9714j + ";\n");
} catch (IOException e5) {
k(e5);
} catch (IllegalArgumentException e6) {
k(e6);
} catch (IndexOutOfBoundsException e7) {
k(e7);
}
}
}
public final void x() {
if (this.f9715k) {
return;
}
this.f9715k = true;
h2.G(new m());
}
}