导航菜单

页面标题

页面副标题

FileWipe Pro v3.0.0 - b.java 源代码

正在查看: FileWipe Pro v3.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.a2;
import com.applovin.impl.a7;
import com.applovin.impl.b7;
import com.applovin.impl.b8;
import com.applovin.impl.e7;
import com.applovin.impl.f0;
import com.applovin.impl.h4;
import com.applovin.impl.j7;
import com.applovin.impl.k0;
import com.applovin.impl.l4;
import com.applovin.impl.sdk.ad.AppLovinAdImpl;
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 b extends f0 {

    private static final Set f2157j = Collections.newSetFromMap(new WeakHashMap());

    private static final Object f2158k = new Object();

    private final com.applovin.impl.sdk.o f2159c;

    private final com.applovin.impl.sdk.k f2160d;

    private com.applovin.impl.sdk.ad.b f2161e;

    private boolean f2162f;

    private boolean f2163g;

    private final List f2164h;

    private final Object f2165i;

    public class a extends h4 {
        public a() {
        }

        @Override
        public Map a() {
            return CollectionUtils.hashMap("name", "AdWebView");
        }
    }

    public b(c cVar, com.applovin.impl.sdk.k kVar, Context context) {
        super(context);
        this.f2164h = new ArrayList();
        this.f2165i = new Object();
        if (kVar == null) {
            throw new IllegalArgumentException("No sdk specified.");
        }
        this.f2160d = kVar;
        this.f2159c = kVar.O();
        Integer num = (Integer) kVar.a(l4.f2881c6);
        if (num.intValue() > 0) {
            synchronized (f2158k) {
                Set set = f2157j;
                set.add(this);
                a7.a("AdWebView", set.size(), num.intValue(), kVar.E());
            }
        }
        setBackgroundColor(0);
        WebSettings settings = getSettings();
        settings.setSupportMultipleWindows(false);
        settings.setJavaScriptEnabled(true);
        setWebViewClient(cVar != null ? cVar : new a());
        setWebChromeClient(new com.applovin.impl.s(cVar != null ? cVar.d() : null, kVar));
        setVerticalScrollBarEnabled(false);
        setHorizontalScrollBarEnabled(false);
        setScrollBarStyle(33554432);
        if (k0.i() && ((Boolean) kVar.a(l4.f3027x5)).booleanValue()) {
            setWebViewRenderProcessClient(new d(kVar).a());
        }
        setOnTouchListener(new r(0));
        setOnLongClickListener(new View.OnLongClickListener() {
            @Override
            public final boolean onLongClick(View view) {
                boolean a10;
                a10 = b.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.f2162f = true;
        this.f2163g = false;
        super.destroy();
    }

    public com.applovin.impl.sdk.ad.b getCurrentAd() {
        return this.f2161e;
    }

    @Override
    public void onScrollChanged(int i10, int i11, int i12, int i13) {
    }

    @Override
    public void scrollTo(int i10, int i11) {
    }

    public void setAdHtmlLoaded(boolean z3) {
        this.f2163g = z3;
        if (z3 && ((Boolean) this.f2160d.a(l4.U5)).booleanValue()) {
            b();
        }
    }

    private void b() {
        synchronized (this.f2165i) {
            try {
                Iterator it = this.f2164h.iterator();
                while (it.hasNext()) {
                    b8.a(this, (String) it.next(), "AdWebView", this.f2160d);
                }
                this.f2164h.clear();
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    public boolean a(View view) {
        if (!com.applovin.impl.sdk.o.a()) {
            return true;
        }
        this.f2159c.a("AdWebView", "Received a LongClick event.");
        return true;
    }

    public void a(com.applovin.impl.sdk.ad.b bVar) {
        String str;
        if (!this.f2162f) {
            this.f2161e = bVar;
            try {
                applySettings(bVar);
                if (a7.a(bVar.getSize())) {
                    setVisibility(0);
                }
                if (bVar instanceof com.applovin.impl.sdk.ad.a) {
                    loadDataWithBaseURL(bVar.k(), ((com.applovin.impl.sdk.ad.a) bVar).o1(), "text/html", null, "");
                    if (com.applovin.impl.sdk.o.a()) {
                        this.f2159c.a("AdWebView", "AppLovinAd rendered");
                        return;
                    }
                    return;
                }
                if (bVar instanceof b7) {
                    b7 b7Var = (b7) bVar;
                    e7 o12 = b7Var.o1();
                    if (o12 != null) {
                        j7 e4 = o12.e();
                        Uri c4 = e4.c();
                        if (c4 != null) {
                            str = c4.toString();
                        } else {
                            str = "";
                        }
                        String b10 = e4.b();
                        String q12 = b7Var.q1();
                        if (!StringUtils.isValidString(str) && !StringUtils.isValidString(b10)) {
                            if (com.applovin.impl.sdk.o.a()) {
                                this.f2159c.b("AdWebView", "Unable to load companion ad. No resources provided.");
                                return;
                            }
                            return;
                        }
                        if (e4.d() == j7.a.STATIC) {
                            if (com.applovin.impl.sdk.o.a()) {
                                this.f2159c.a("AdWebView", "Rendering WebView for static VAST ad");
                            }
                            String a10 = a((String) this.f2160d.a(l4.f2961o4), str);
                            if (b7Var.F1() && b7Var.isOpenMeasurementEnabled() && b7Var.G1()) {
                                a10 = this.f2160d.d0().a(a10, a2.a((AppLovinAdImpl) bVar));
                            }
                            loadDataWithBaseURL(bVar.k(), a10, "text/html", null, "");
                            return;
                        }
                        if (e4.d() == j7.a.HTML) {
                            if (StringUtils.isValidString(b10)) {
                                String a11 = a(q12, b10);
                                String str2 = StringUtils.isValidString(a11) ? a11 : b10;
                                if (com.applovin.impl.sdk.o.a()) {
                                    this.f2159c.a("AdWebView", "Rendering WebView for HTML VAST ad with resourceContents: " + str2);
                                }
                                loadDataWithBaseURL(bVar.k(), str2, "text/html", null, "");
                                return;
                            }
                            if (StringUtils.isValidString(str)) {
                                if (com.applovin.impl.sdk.o.a()) {
                                    this.f2159c.a("AdWebView", "Preparing to load HTML VAST ad resourceUri");
                                }
                                a(str, bVar.k(), q12, this.f2160d, b7Var);
                                return;
                            }
                            return;
                        }
                        String str3 = str;
                        if (e4.d() == j7.a.IFRAME) {
                            if (StringUtils.isValidString(str3)) {
                                if (com.applovin.impl.sdk.o.a()) {
                                    this.f2159c.a("AdWebView", "Preparing to load iFrame VAST ad resourceUri");
                                }
                                a(str3, bVar.k(), q12, this.f2160d, b7Var);
                                return;
                            } else {
                                if (StringUtils.isValidString(b10)) {
                                    String a12 = a(q12, b10);
                                    String str4 = StringUtils.isValidString(a12) ? a12 : b10;
                                    if (com.applovin.impl.sdk.o.a()) {
                                        this.f2159c.a("AdWebView", "Rendering WebView for iFrame VAST ad with resourceContents: " + str4);
                                    }
                                    loadDataWithBaseURL(bVar.k(), str4, "text/html", null, "");
                                    return;
                                }
                                return;
                            }
                        }
                        if (com.applovin.impl.sdk.o.a()) {
                            this.f2159c.b("AdWebView", "Failed to render VAST companion ad of invalid type");
                            return;
                        }
                        return;
                    }
                    if (com.applovin.impl.sdk.o.a()) {
                        this.f2159c.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.o.h("AdWebView", "Ad can not be loaded in a destroyed webview");
    }

    public void a(String str) {
        if (((Boolean) this.f2160d.a(l4.U5)).booleanValue()) {
            if (this.f2163g) {
                b8.a(this, str, "AdWebView", this.f2160d);
                return;
            }
            synchronized (this.f2164h) {
                this.f2164h.add(str);
            }
            return;
        }
        b8.a(this, str, "AdWebView", this.f2160d);
    }

    private void a(String str, String str2, String str3, com.applovin.impl.sdk.k kVar, b7 b7Var) {
        String a10 = a(str3, str);
        if (StringUtils.isValidString(a10)) {
            if (com.applovin.impl.sdk.o.a()) {
                s1.a.y("Rendering webview for VAST ad with resourceContents : ", a10, this.f2159c, "AdWebView");
            }
            loadDataWithBaseURL(str2, a10, "text/html", null, "");
            return;
        }
        String a11 = a((String) kVar.a(l4.f2967p4), str);
        if (StringUtils.isValidString(a11)) {
            if (b7Var.F1() && b7Var.isOpenMeasurementEnabled()) {
                a11 = kVar.d0().a(a11, a2.a((AppLovinAdImpl) b7Var));
            }
            if (com.applovin.impl.sdk.o.a()) {
                s1.a.y("Rendering webview for VAST ad with resourceContents : ", a11, this.f2159c, "AdWebView");
            }
            loadDataWithBaseURL(str2, a11, "text/html", null, "");
            return;
        }
        if (com.applovin.impl.sdk.o.a()) {
            s1.a.y("Rendering webview for VAST ad with resourceURL : ", str, this.f2159c, "AdWebView");
        }
        loadUrl(str);
    }

    private String a(String str, String str2) {
        if (StringUtils.isValidString(str)) {
            return str.replace("{SOURCE}", str2);
        }
        return null;
    }
}