导航菜单

页面标题

页面副标题

Antivirus Cleaner v1.2.0.0 - MraidBaseWebView.java 源代码

正在查看: Antivirus Cleaner v1.2.0.0 应用的 MraidBaseWebView.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.thinkup.basead.mraid;

import android.content.Context;
import android.content.IntentFilter;
import android.net.Uri;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import com.thinkup.core.common.o0.o0n;
import com.thinkup.core.common.ooo.no;
import com.thinkup.core.common.ooo.o0o;
import com.thinkup.core.express.web.BaseWebView;

public class MraidBaseWebView extends BaseWebView {
    protected o m;
    private boolean mm;
    private float mn;
    private String mo;
    protected m0 n;
    private float n0;
    private int nm;
    private String no;
    protected mm o;
    private Object o0;
    private String om;
    private com.thinkup.core.express.web.n on;
    private Object oo;

    public MraidBaseWebView(Context context) {
        super(context);
        this.mm = false;
        this.mn = 0.0f;
        this.n0 = 0.0f;
    }

    public static boolean o(MraidBaseWebView mraidBaseWebView) {
        mraidBaseWebView.mm = true;
        return true;
    }

    @Override
    public String checkToGetUrl(String str) {
        if (TextUtils.isEmpty(str)) {
            return str;
        }
        if (!str.contains("../")) {
            if (!str.startsWith("file")) {
                return str;
            }
            String path = Uri.parse(str).getPath();
            if (!TextUtils.isEmpty(path) && path.contains(com.thinkup.core.common.res.o0.o(o0n.m().on()).o())) {
                return str;
            }
        }
        Log.e("tpn_thinkup_express", "illegal URL: ".concat(String.valueOf(str)));
        return com.thinkup.core.common.res.o0.o;
    }

    public void clearWebView() {
        if (this.mm) {
            return;
        }
        loadUrl(com.thinkup.core.common.res.o0.o);
    }

    public String getCampaignId() {
        return this.om;
    }

    public Object getJsObject(String str) {
        m0 m0Var = this.n;
        if (m0Var == null) {
            return null;
        }
        m0Var.o(this.m0, this);
        return this.n;
    }

    public String getLocalRequestId() {
        return this.no;
    }

    public Object getMraidObject() {
        return this.oo;
    }

    public Object getObject() {
        return this.o0;
    }

    public String getRid() {
        return this.mo;
    }

    public o getSignalCommunication() {
        return this.m;
    }

    public com.thinkup.core.express.web.n getWebViewListener() {
        return this.on;
    }

    @Override
    public boolean isDestroyed() {
        return this.mm;
    }

    @Override
    public boolean onTouchEvent(MotionEvent motionEvent) {
        com.thinkup.core.express.web.m mVar = this.mWebViewClient;
        if (mVar != null && (mVar.o() instanceof IntentFilter)) {
            String url = getUrl();
            if (!TextUtils.isEmpty(url) && url.contains("https://play.google.com")) {
                if (motionEvent.getAction() == 0) {
                    this.mn = motionEvent.getRawX();
                    this.n0 = motionEvent.getRawY();
                } else {
                    float rawX = motionEvent.getRawX() - this.mn;
                    float y = motionEvent.getY() - this.n0;
                    if ((rawX >= 0.0f || rawX * (-1.0f) <= 48.0f) && ((rawX <= 0.0f || rawX <= 48.0f) && ((y >= 0.0f || (-1.0f) * y <= 48.0f) && (y <= 0.0f || y <= 48.0f)))) {
                        setClickable(false);
                        return true;
                    }
                }
            }
        }
        return super.onTouchEvent(motionEvent);
    }

    @Override
    public void release() {
        try {
            removeAllViews();
            setDownloadListener(null);
            this.o0 = null;
            Context context = getContext();
            if (context == null) {
                context = o0n.m().on();
            }
            float mo = o0o.mo(context);
            if (mo != 0.0f) {
                o0n.m().o(new Runnable() {
                    @Override
                    public final void run() {
                        MraidBaseWebView.o(MraidBaseWebView.this);
                        MraidBaseWebView.this.destroy();
                    }
                }, (long) (mo * 1000.0f));
            } else {
                this.mm = true;
                destroy();
            }
        } catch (Throwable th) {
            th.printStackTrace();
        }
    }

    public void setCampaignId(String str) {
        this.om = str;
    }

    public void setLocalRequestId(String str) {
        this.no = str;
    }

    public void setMraidObject(Object obj) {
        this.oo = obj;
    }

    public void setObject(Object obj) {
        this.o0 = obj;
    }

    public void setRid(String str) {
        this.mo = str;
    }

    public void setSignalCommunication(o oVar) {
        this.m = oVar;
        oVar.n = this;
    }

    public void setTempTypeForMetrics(int i) {
        this.nm = i;
    }

    public void setWebViewChromeClient(mm mmVar) {
        this.o = mmVar;
        setWebChromeClient(mmVar);
    }

    public void setWebViewListener(com.thinkup.core.express.web.n nVar) {
        this.on = nVar;
        mm mmVar = this.o;
        if (mmVar != null) {
            mmVar.o(nVar);
        }
        com.thinkup.core.express.web.m mVar = this.mWebViewClient;
        if (mVar != null) {
            mVar.o(nVar);
        }
    }

    public void setWebViewTransparent() {
        super.setTransparent();
    }

    @Override
    public final void o() {
        super.o();
        getSettings().setSavePassword(false);
        try {
            getSettings().setUserAgentString(getSettings().getUserAgentString() + " WindVane/3.0.2");
        } catch (Throwable unused) {
            getSettings().setUserAgentString(no.m0() + " WindVane/3.0.2");
        }
        if (this.o == null) {
            this.o = new mm(this);
        }
        setWebViewChromeClient(this.o);
        this.n = new m0();
        if (this.m == null) {
            o oVar = new o(this.m0);
            this.m = oVar;
            setSignalCommunication(oVar);
        }
    }

    public MraidBaseWebView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        this.mm = false;
        this.mn = 0.0f;
        this.n0 = 0.0f;
    }

    public MraidBaseWebView(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        this.mm = false;
        this.mn = 0.0f;
        this.n0 = 0.0f;
    }
}