正在查看: Antivirus Cleaner v1.2.0.0 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Antivirus Cleaner v1.2.0.0 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.applovin.impl.adview;
import android.content.Context;
import android.net.Uri;
import android.view.MotionEvent;
import android.view.View;
import android.webkit.WebSettings;
import com.applovin.impl.a7;
import com.applovin.impl.a8;
import com.applovin.impl.d7;
import com.applovin.impl.h4;
import com.applovin.impl.i7;
import com.applovin.impl.k0;
import com.applovin.impl.l4;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.impl.z6;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.WeakHashMap;
public class b extends com.applovin.impl.f0 {
private static final Set f5338j = Collections.newSetFromMap(new WeakHashMap());
private static final Object f5339k = new Object();
private final com.applovin.impl.sdk.n f5340c;
private final com.applovin.impl.sdk.j f5341d;
private com.applovin.impl.sdk.ad.b f5342e;
private boolean f5343f;
private boolean f5344g;
private final List f5345h;
private final Object f5346i;
public b(c cVar, com.applovin.impl.sdk.j jVar, Context context) {
super(context);
this.f5345h = new ArrayList();
this.f5346i = new Object();
if (jVar == null) {
throw new IllegalArgumentException("No sdk specified.");
}
this.f5341d = jVar;
this.f5340c = jVar.I();
Integer num = (Integer) jVar.a(l4.U5);
if (num.intValue() > 0) {
synchronized (f5339k) {
Set set = f5338j;
set.add(this);
z6.a("AdWebView", set.size(), num.intValue(), jVar.A());
}
}
setBackgroundColor(0);
WebSettings settings = getSettings();
settings.setSupportMultipleWindows(false);
settings.setJavaScriptEnabled(true);
setWebViewClient(cVar != null ? cVar : new h4());
setWebChromeClient(new com.applovin.impl.r(cVar != null ? cVar.c() : null, jVar));
setVerticalScrollBarEnabled(false);
setHorizontalScrollBarEnabled(false);
setScrollBarStyle(33554432);
if (k0.i() && ((Boolean) jVar.a(l4.q5)).booleanValue()) {
setWebViewRenderProcessClient(new d(jVar).a());
}
setOnTouchListener(new View.OnTouchListener() {
@Override
public final boolean onTouch(View view, MotionEvent motionEvent) {
boolean a4;
a4 = b.a(view, motionEvent);
return a4;
}
});
setOnLongClickListener(new View.OnLongClickListener() {
@Override
public final boolean onLongClick(View view) {
boolean a4;
a4 = b.this.a(view);
return a4;
}
});
}
public static boolean a(View view, MotionEvent motionEvent) {
if (view.hasFocus()) {
return false;
}
view.requestFocus();
return false;
}
@Override
public void destroy() {
this.f5343f = true;
this.f5344g = false;
super.destroy();
}
public com.applovin.impl.sdk.ad.b getCurrentAd() {
return this.f5342e;
}
public void setAdHtmlLoaded(boolean z3) {
this.f5344g = z3;
if (z3 && ((Boolean) this.f5341d.a(l4.M5)).booleanValue()) {
b();
}
}
private void b() {
synchronized (this.f5346i) {
try {
Iterator it = this.f5345h.iterator();
while (it.hasNext()) {
a8.a(this, (String) it.next(), "AdWebView", this.f5341d);
}
this.f5345h.clear();
} catch (Throwable th) {
throw th;
}
}
}
public boolean a(View view) {
if (!com.applovin.impl.sdk.n.a()) {
return true;
}
this.f5340c.a("AdWebView", "Received a LongClick event.");
return true;
}
public void a(com.applovin.impl.sdk.ad.b bVar) {
String str;
if (!this.f5343f) {
this.f5342e = bVar;
try {
applySettings(bVar);
if (z6.a(bVar.getSize())) {
setVisibility(0);
}
if (bVar instanceof com.applovin.impl.sdk.ad.a) {
loadDataWithBaseURL(bVar.h(), ((com.applovin.impl.sdk.ad.a) bVar).f1(), "text/html", null, "");
if (com.applovin.impl.sdk.n.a()) {
this.f5340c.a("AdWebView", "AppLovinAd rendered");
return;
}
return;
}
if (bVar instanceof a7) {
a7 a7Var = (a7) bVar;
d7 f12 = a7Var.f1();
if (f12 != null) {
i7 e4 = f12.e();
Uri c4 = e4.c();
if (c4 != null) {
str = c4.toString();
} else {
str = "";
}
String str2 = str;
String b4 = e4.b();
String h12 = a7Var.h1();
if (!StringUtils.isValidString(str2) && !StringUtils.isValidString(b4)) {
if (com.applovin.impl.sdk.n.a()) {
this.f5340c.b("AdWebView", "Unable to load companion ad. No resources provided.");
return;
}
return;
}
if (e4.d() == i7.a.STATIC) {
if (com.applovin.impl.sdk.n.a()) {
this.f5340c.a("AdWebView", "Rendering WebView for static VAST ad");
}
String a4 = a((String) this.f5341d.a(l4.i4), str2);
if (a7Var.w1() && a7Var.isOpenMeasurementEnabled() && a7Var.x1()) {
a4 = this.f5341d.W().a(a4);
}
loadDataWithBaseURL(bVar.h(), a4, "text/html", null, "");
return;
}
if (e4.d() == i7.a.HTML) {
if (StringUtils.isValidString(b4)) {
String a5 = a(h12, b4);
String str3 = StringUtils.isValidString(a5) ? a5 : b4;
if (com.applovin.impl.sdk.n.a()) {
this.f5340c.a("AdWebView", "Rendering WebView for HTML VAST ad with resourceContents: " + str3);
}
loadDataWithBaseURL(bVar.h(), str3, "text/html", null, "");
return;
}
if (StringUtils.isValidString(str2)) {
if (com.applovin.impl.sdk.n.a()) {
this.f5340c.a("AdWebView", "Preparing to load HTML VAST ad resourceUri");
}
a(str2, bVar.h(), h12, this.f5341d, a7Var);
return;
}
return;
}
if (e4.d() == i7.a.IFRAME) {
if (StringUtils.isValidString(str2)) {
if (com.applovin.impl.sdk.n.a()) {
this.f5340c.a("AdWebView", "Preparing to load iFrame VAST ad resourceUri");
}
a(str2, bVar.h(), h12, this.f5341d, a7Var);
return;
} else {
if (StringUtils.isValidString(b4)) {
String a6 = a(h12, b4);
String str4 = StringUtils.isValidString(a6) ? a6 : b4;
if (com.applovin.impl.sdk.n.a()) {
this.f5340c.a("AdWebView", "Rendering WebView for iFrame VAST ad with resourceContents: " + str4);
}
loadDataWithBaseURL(bVar.h(), str4, "text/html", null, "");
return;
}
return;
}
}
if (com.applovin.impl.sdk.n.a()) {
this.f5340c.b("AdWebView", "Failed to render VAST companion ad of invalid type");
return;
}
return;
}
if (com.applovin.impl.sdk.n.a()) {
this.f5340c.a("AdWebView", "No companion ad provided.");
return;
}
return;
}
return;
} catch (Throwable th) {
throw new RuntimeException("Unable to render AppLovin ad (" + (bVar != null ? String.valueOf(bVar.getAdIdNumber()) : "null") + ") - " + th);
}
}
com.applovin.impl.sdk.n.h("AdWebView", "Ad can not be loaded in a destroyed webview");
}
@Override
public void computeScroll() {
}
@Override
public void scrollTo(int i4, int i5) {
}
public void a(String str) {
if (((Boolean) this.f5341d.a(l4.M5)).booleanValue()) {
if (this.f5344g) {
a8.a(this, str, "AdWebView", this.f5341d);
return;
}
synchronized (this.f5345h) {
this.f5345h.add(str);
}
return;
}
a8.a(this, str, "AdWebView", this.f5341d);
}
private void a(String str, String str2, String str3, com.applovin.impl.sdk.j jVar, a7 a7Var) {
String a4 = a(str3, str);
if (StringUtils.isValidString(a4)) {
if (com.applovin.impl.sdk.n.a()) {
this.f5340c.a("AdWebView", "Rendering webview for VAST ad with resourceContents : " + a4);
}
loadDataWithBaseURL(str2, a4, "text/html", null, "");
return;
}
String a5 = a((String) jVar.a(l4.j4), str);
if (StringUtils.isValidString(a5)) {
if (a7Var.w1() && a7Var.isOpenMeasurementEnabled()) {
a5 = jVar.W().a(a5);
}
String str4 = a5;
if (com.applovin.impl.sdk.n.a()) {
this.f5340c.a("AdWebView", "Rendering webview for VAST ad with resourceContents : " + str4);
}
loadDataWithBaseURL(str2, str4, "text/html", null, "");
return;
}
if (com.applovin.impl.sdk.n.a()) {
this.f5340c.a("AdWebView", "Rendering webview for VAST ad with resourceURL : " + str);
}
loadUrl(str);
}
private String a(String str, String str2) {
if (StringUtils.isValidString(str)) {
return str.replace("{SOURCE}", str2);
}
return null;
}
@Override
public void onScrollChanged(int i4, int i5, int i6, int i7) {
}
}