正在查看: All File Recovery v1.0.2 应用的 C0480b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: All File Recovery v1.0.2 应用的 C0480b.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.AbstractC0473a2;
import com.applovin.impl.AbstractC0525f0;
import com.applovin.impl.AbstractC0545h4;
import com.applovin.impl.AbstractC0565k0;
import com.applovin.impl.AbstractC0742z6;
import com.applovin.impl.C0478a7;
import com.applovin.impl.C0514d7;
import com.applovin.impl.C0577l4;
import com.applovin.impl.C0652s;
import com.applovin.impl.a8;
import com.applovin.impl.i7;
import com.applovin.impl.sdk.C0672k;
import com.applovin.impl.sdk.C0676o;
import com.applovin.impl.sdk.ad.AbstractC0662b;
import com.applovin.impl.sdk.ad.AppLovinAdImpl;
import com.applovin.impl.sdk.ad.C0661a;
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 C0480b extends AbstractC0525f0 {
private static final Set j = Collections.newSetFromMap(new WeakHashMap());
private static final Object k = new Object();
private final C0676o c;
private final C0672k d;
private AbstractC0662b e;
private boolean f;
private boolean g;
private final List h;
private final Object i;
public class a extends AbstractC0545h4 {
public a() {
}
@Override
public Map a() {
return CollectionUtils.hashMap("name", "AdWebView");
}
}
public C0480b(C0481c c0481c, C0672k c0672k, Context context) {
super(context);
this.h = new ArrayList();
this.i = new Object();
if (c0672k == null) {
throw new IllegalArgumentException("No sdk specified.");
}
this.d = c0672k;
this.c = c0672k.O();
Integer num = (Integer) c0672k.a(C0577l4.b6);
if (num.intValue() > 0) {
synchronized (k) {
Set set = j;
set.add(this);
AbstractC0742z6.a("AdWebView", set.size(), num.intValue(), c0672k.E());
}
}
setBackgroundColor(0);
WebSettings settings = getSettings();
settings.setSupportMultipleWindows(false);
settings.setJavaScriptEnabled(true);
setWebViewClient(c0481c != null ? c0481c : new a());
setWebChromeClient(new C0652s(c0481c != null ? c0481c.d() : null, c0672k));
setVerticalScrollBarEnabled(false);
setHorizontalScrollBarEnabled(false);
setScrollBarStyle(33554432);
if (AbstractC0565k0.i() && ((Boolean) c0672k.a(C0577l4.f464w5)).booleanValue()) {
setWebViewRenderProcessClient(new C0482d(c0672k).a());
}
setOnTouchListener(new C());
setOnLongClickListener(new View.OnLongClickListener() {
@Override
public final boolean onLongClick(View view) {
boolean a2;
a2 = C0480b.this.a(view);
return a2;
}
});
}
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.f = true;
this.g = false;
super.destroy();
}
public AbstractC0662b getCurrentAd() {
return this.e;
}
@Override
public void onScrollChanged(int i, int i2, int i3, int i6) {
}
@Override
public void scrollTo(int i, int i2) {
}
public void setAdHtmlLoaded(boolean z) {
this.g = z;
if (z && ((Boolean) this.d.a(C0577l4.T5)).booleanValue()) {
b();
}
}
private void b() {
synchronized (this.i) {
try {
Iterator it = this.h.iterator();
while (it.hasNext()) {
a8.a(this, (String) it.next(), "AdWebView", this.d);
}
this.h.clear();
} catch (Throwable th) {
throw th;
}
}
}
public boolean a(View view) {
if (!C0676o.a()) {
return true;
}
this.c.a("AdWebView", "Received a LongClick event.");
return true;
}
public void a(AbstractC0662b abstractC0662b) {
String str;
if (!this.f) {
this.e = abstractC0662b;
try {
applySettings(abstractC0662b);
if (AbstractC0742z6.a(abstractC0662b.getSize())) {
setVisibility(0);
}
if (abstractC0662b instanceof C0661a) {
loadDataWithBaseURL(abstractC0662b.k(), ((C0661a) abstractC0662b).o1(), "text/html", null, "");
if (C0676o.a()) {
this.c.a("AdWebView", "AppLovinAd rendered");
return;
}
return;
}
if (abstractC0662b instanceof C0478a7) {
C0478a7 c0478a7 = (C0478a7) abstractC0662b;
C0514d7 o1 = c0478a7.o1();
if (o1 != null) {
i7 e = o1.e();
Uri c = e.c();
if (c != null) {
str = c.toString();
} else {
str = "";
}
String b = e.b();
String q1 = c0478a7.q1();
if (!StringUtils.isValidString(str) && !StringUtils.isValidString(b)) {
if (C0676o.a()) {
this.c.b("AdWebView", "Unable to load companion ad. No resources provided.");
return;
}
return;
}
if (e.d() == i7.a.STATIC) {
if (C0676o.a()) {
this.c.a("AdWebView", "Rendering WebView for static VAST ad");
}
String a2 = a((String) this.d.a(C0577l4.f441o4), str);
if (c0478a7.F1() && c0478a7.isOpenMeasurementEnabled() && c0478a7.G1()) {
a2 = this.d.d0().a(a2, AbstractC0473a2.a((AppLovinAdImpl) abstractC0662b));
}
loadDataWithBaseURL(abstractC0662b.k(), a2, "text/html", null, "");
return;
}
if (e.d() == i7.a.HTML) {
if (StringUtils.isValidString(b)) {
String a3 = a(q1, b);
String str2 = StringUtils.isValidString(a3) ? a3 : b;
if (C0676o.a()) {
this.c.a("AdWebView", "Rendering WebView for HTML VAST ad with resourceContents: " + str2);
}
loadDataWithBaseURL(abstractC0662b.k(), str2, "text/html", null, "");
return;
}
if (StringUtils.isValidString(str)) {
if (C0676o.a()) {
this.c.a("AdWebView", "Preparing to load HTML VAST ad resourceUri");
}
a(str, abstractC0662b.k(), q1, this.d, c0478a7);
return;
}
return;
}
String str3 = str;
if (e.d() == i7.a.IFRAME) {
if (StringUtils.isValidString(str3)) {
if (C0676o.a()) {
this.c.a("AdWebView", "Preparing to load iFrame VAST ad resourceUri");
}
a(str3, abstractC0662b.k(), q1, this.d, c0478a7);
return;
} else {
if (StringUtils.isValidString(b)) {
String a6 = a(q1, b);
String str4 = StringUtils.isValidString(a6) ? a6 : b;
if (C0676o.a()) {
this.c.a("AdWebView", "Rendering WebView for iFrame VAST ad with resourceContents: " + str4);
}
loadDataWithBaseURL(abstractC0662b.k(), str4, "text/html", null, "");
return;
}
return;
}
}
if (C0676o.a()) {
this.c.b("AdWebView", "Failed to render VAST companion ad of invalid type");
return;
}
return;
}
if (C0676o.a()) {
this.c.a("AdWebView", "No companion ad provided.");
return;
}
return;
}
return;
} catch (Throwable th) {
throw new RuntimeException("Unable to render AppLovin ad (" + (abstractC0662b != null ? String.valueOf(abstractC0662b.getAdIdNumber()) : "null") + ") - " + th);
}
}
C0676o.h("AdWebView", "Ad can not be loaded in a destroyed webview");
}
public void a(String str) {
if (((Boolean) this.d.a(C0577l4.T5)).booleanValue()) {
if (this.g) {
a8.a(this, str, "AdWebView", this.d);
return;
}
synchronized (this.h) {
this.h.add(str);
}
return;
}
a8.a(this, str, "AdWebView", this.d);
}
private void a(String str, String str2, String str3, C0672k c0672k, C0478a7 c0478a7) {
String a2 = a(str3, str);
if (StringUtils.isValidString(a2)) {
if (C0676o.a()) {
com.applovin.impl.E.a("Rendering webview for VAST ad with resourceContents : ", a2, this.c, "AdWebView");
}
loadDataWithBaseURL(str2, a2, "text/html", null, "");
return;
}
String a3 = a((String) c0672k.a(C0577l4.f443p4), str);
if (StringUtils.isValidString(a3)) {
if (c0478a7.F1() && c0478a7.isOpenMeasurementEnabled()) {
a3 = c0672k.d0().a(a3, AbstractC0473a2.a((AppLovinAdImpl) c0478a7));
}
if (C0676o.a()) {
com.applovin.impl.E.a("Rendering webview for VAST ad with resourceContents : ", a3, this.c, "AdWebView");
}
loadDataWithBaseURL(str2, a3, "text/html", null, "");
return;
}
if (C0676o.a()) {
com.applovin.impl.E.a("Rendering webview for VAST ad with resourceURL : ", str, this.c, "AdWebView");
}
loadUrl(str);
}
private String a(String str, String str2) {
if (StringUtils.isValidString(str)) {
return str.replace("{SOURCE}", str2);
}
return null;
}
}