正在查看: All File Recovery v1.0.2 应用的 C2740b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: All File Recovery v1.0.2 应用的 C2740b.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.AbstractC2733a2;
import com.applovin.impl.AbstractC2785f0;
import com.applovin.impl.AbstractC2805h4;
import com.applovin.impl.AbstractC2825k0;
import com.applovin.impl.AbstractC3002z6;
import com.applovin.impl.C2738a7;
import com.applovin.impl.C2774d7;
import com.applovin.impl.C2837l4;
import com.applovin.impl.C2912s;
import com.applovin.impl.a8;
import com.applovin.impl.i7;
import com.applovin.impl.sdk.C2932k;
import com.applovin.impl.sdk.C2936o;
import com.applovin.impl.sdk.ad.AbstractC2922b;
import com.applovin.impl.sdk.ad.AppLovinAdImpl;
import com.applovin.impl.sdk.ad.C2921a;
import com.applovin.impl.sdk.utils.CollectionUtils;
import com.applovin.impl.sdk.utils.StringUtils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
public class C2740b extends AbstractC2785f0 {
private static final Set f40428j = Collections.newSetFromMap(new WeakHashMap());
private static final Object f40429k = new Object();
private final C2936o f40430c;
private final C2932k f40431d;
private AbstractC2922b f40432e;
private boolean f40433f;
private boolean f40434g;
private final List f40435h;
private final Object f40436i;
public class a extends AbstractC2805h4 {
public a() {
}
@Override
public Map a() {
return CollectionUtils.hashMap("name", "AdWebView");
}
}
public C2740b(C2741c c2741c, C2932k c2932k, Context context) {
super(context);
this.f40435h = new ArrayList();
this.f40436i = new Object();
if (c2932k == null) {
throw new IllegalArgumentException("No sdk specified.");
}
this.f40431d = c2932k;
this.f40430c = c2932k.O();
Integer num = (Integer) c2932k.a(C2837l4.f41302b6);
if (num.intValue() > 0) {
synchronized (f40429k) {
Set set = f40428j;
set.add(this);
AbstractC3002z6.a("AdWebView", set.size(), num.intValue(), c2932k.E());
}
}
setBackgroundColor(0);
WebSettings settings = getSettings();
settings.setSupportMultipleWindows(false);
settings.setJavaScriptEnabled(true);
setWebViewClient(c2741c != null ? c2741c : new a());
setWebChromeClient(new C2912s(c2741c != null ? c2741c.d() : null, c2932k));
setVerticalScrollBarEnabled(false);
setHorizontalScrollBarEnabled(false);
setScrollBarStyle(33554432);
if (AbstractC2825k0.i() && ((Boolean) c2932k.a(C2837l4.f41469w5)).booleanValue()) {
setWebViewRenderProcessClient(new C2742d(c2932k).a());
}
setOnTouchListener(new C());
setOnLongClickListener(new View.OnLongClickListener() {
@Override
public final boolean onLongClick(View view) {
boolean a10;
a10 = C2740b.this.a(view);
return a10;
}
});
}
public static boolean a(View view, MotionEvent motionEvent) {
if (view.hasFocus()) {
return false;
}
view.requestFocus();
return false;
}
@Override
public void computeScroll() {
}
@Override
public void destroy() {
this.f40433f = true;
this.f40434g = false;
super.destroy();
}
public AbstractC2922b getCurrentAd() {
return this.f40432e;
}
@Override
public void onScrollChanged(int i10, int i11, int i12, int i13) {
}
@Override
public void scrollTo(int i10, int i11) {
}
public void setAdHtmlLoaded(boolean z10) {
this.f40434g = z10;
if (z10 && ((Boolean) this.f40431d.a(C2837l4.f41246T5)).booleanValue()) {
b();
}
}
private void b() {
synchronized (this.f40436i) {
try {
Iterator it = this.f40435h.iterator();
while (it.hasNext()) {
a8.a(this, (String) it.next(), "AdWebView", this.f40431d);
}
this.f40435h.clear();
} catch (Throwable th) {
throw th;
}
}
}
public boolean a(View view) {
if (!C2936o.a()) {
return true;
}
this.f40430c.a("AdWebView", "Received a LongClick event.");
return true;
}
public void a(AbstractC2922b abstractC2922b) {
String str;
if (!this.f40433f) {
this.f40432e = abstractC2922b;
try {
applySettings(abstractC2922b);
if (AbstractC3002z6.a(abstractC2922b.getSize())) {
setVisibility(0);
}
if (abstractC2922b instanceof C2921a) {
loadDataWithBaseURL(abstractC2922b.k(), ((C2921a) abstractC2922b).o1(), "text/html", null, "");
if (C2936o.a()) {
this.f40430c.a("AdWebView", "AppLovinAd rendered");
return;
}
return;
}
if (abstractC2922b instanceof C2738a7) {
C2738a7 c2738a7 = (C2738a7) abstractC2922b;
C2774d7 o12 = c2738a7.o1();
if (o12 != null) {
i7 e10 = o12.e();
Uri c10 = e10.c();
if (c10 != null) {
str = c10.toString();
} else {
str = "";
}
String b10 = e10.b();
String q12 = c2738a7.q1();
if (!StringUtils.isValidString(str) && !StringUtils.isValidString(b10)) {
if (C2936o.a()) {
this.f40430c.b("AdWebView", "Unable to load companion ad. No resources provided.");
return;
}
return;
}
if (e10.d() == i7.a.STATIC) {
if (C2936o.a()) {
this.f40430c.a("AdWebView", "Rendering WebView for static VAST ad");
}
String a10 = a((String) this.f40431d.a(C2837l4.f41404o4), str);
if (c2738a7.F1() && c2738a7.isOpenMeasurementEnabled() && c2738a7.G1()) {
a10 = this.f40431d.d0().a(a10, AbstractC2733a2.a((AppLovinAdImpl) abstractC2922b));
}
loadDataWithBaseURL(abstractC2922b.k(), a10, "text/html", null, "");
return;
}
if (e10.d() == i7.a.HTML) {
if (StringUtils.isValidString(b10)) {
String a11 = a(q12, b10);
String str2 = StringUtils.isValidString(a11) ? a11 : b10;
if (C2936o.a()) {
this.f40430c.a("AdWebView", "Rendering WebView for HTML VAST ad with resourceContents: " + str2);
}
loadDataWithBaseURL(abstractC2922b.k(), str2, "text/html", null, "");
return;
}
if (StringUtils.isValidString(str)) {
if (C2936o.a()) {
this.f40430c.a("AdWebView", "Preparing to load HTML VAST ad resourceUri");
}
a(str, abstractC2922b.k(), q12, this.f40431d, c2738a7);
return;
}
return;
}
String str3 = str;
if (e10.d() == i7.a.IFRAME) {
if (StringUtils.isValidString(str3)) {
if (C2936o.a()) {
this.f40430c.a("AdWebView", "Preparing to load iFrame VAST ad resourceUri");
}
a(str3, abstractC2922b.k(), q12, this.f40431d, c2738a7);
return;
} else {
if (StringUtils.isValidString(b10)) {
String a12 = a(q12, b10);
String str4 = StringUtils.isValidString(a12) ? a12 : b10;
if (C2936o.a()) {
this.f40430c.a("AdWebView", "Rendering WebView for iFrame VAST ad with resourceContents: " + str4);
}
loadDataWithBaseURL(abstractC2922b.k(), str4, "text/html", null, "");
return;
}
return;
}
}
if (C2936o.a()) {
this.f40430c.b("AdWebView", "Failed to render VAST companion ad of invalid type");
return;
}
return;
}
if (C2936o.a()) {
this.f40430c.a("AdWebView", "No companion ad provided.");
return;
}
return;
}
return;
} catch (Throwable th) {
throw new RuntimeException("Unable to render AppLovin ad (" + (abstractC2922b != null ? String.valueOf(abstractC2922b.getAdIdNumber()) : "null") + ") - " + th);
}
}
C2936o.h("AdWebView", "Ad can not be loaded in a destroyed webview");
}
public void a(String str) {
if (((Boolean) this.f40431d.a(C2837l4.f41246T5)).booleanValue()) {
if (this.f40434g) {
a8.a(this, str, "AdWebView", this.f40431d);
return;
}
synchronized (this.f40435h) {
this.f40435h.add(str);
}
return;
}
a8.a(this, str, "AdWebView", this.f40431d);
}
private void a(String str, String str2, String str3, C2932k c2932k, C2738a7 c2738a7) {
String a10 = a(str3, str);
if (StringUtils.isValidString(a10)) {
if (C2936o.a()) {
com.applovin.impl.E.a("Rendering webview for VAST ad with resourceContents : ", a10, this.f40430c, "AdWebView");
}
loadDataWithBaseURL(str2, a10, "text/html", null, "");
return;
}
String a11 = a((String) c2932k.a(C2837l4.f41412p4), str);
if (StringUtils.isValidString(a11)) {
if (c2738a7.F1() && c2738a7.isOpenMeasurementEnabled()) {
a11 = c2932k.d0().a(a11, AbstractC2733a2.a((AppLovinAdImpl) c2738a7));
}
if (C2936o.a()) {
com.applovin.impl.E.a("Rendering webview for VAST ad with resourceContents : ", a11, this.f40430c, "AdWebView");
}
loadDataWithBaseURL(str2, a11, "text/html", null, "");
return;
}
if (C2936o.a()) {
com.applovin.impl.E.a("Rendering webview for VAST ad with resourceURL : ", str, this.f40430c, "AdWebView");
}
loadUrl(str);
}
private String a(String str, String str2) {
if (StringUtils.isValidString(str)) {
return str.replace("{SOURCE}", str2);
}
return null;
}
}