导航菜单

页面标题

页面副标题

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

正在查看: FileWipe Pro v3.0.0 应用的 o.java JAVA 源代码文件

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


package com.mbridge.msdk.click;

import android.content.Context;
import android.graphics.Bitmap;
import android.net.http.SslError;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.webkit.JsPromptResult;
import android.webkit.JsResult;
import android.webkit.RenderProcessGoneDetail;
import android.webkit.SslErrorHandler;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.google.android.gms.internal.measurement.a1;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.tools.p0;
import com.mbridge.msdk.playercommon.exoplayer2.DefaultLoadControl;
import java.util.HashMap;

public class o {

    private static final String f11744r = "o";

    private int f11745a;

    private int f11746b;

    private com.mbridge.msdk.setting.g f11748d;

    private f f11749e;

    private String f11750f;

    private String f11751g;

    private WebView f11752h;

    private boolean f11753i;

    private String f11754j;

    private int f11755k;
    private boolean m;

    boolean f11756n;

    boolean f11757o;
    private boolean l = false;

    private final Runnable f11758p = new d();

    private final Runnable f11759q = new e();

    private Handler f11747c = new Handler(Looper.getMainLooper());

    public class a implements Runnable {

        final String f11760a;

        final String f11761b;

        final Context f11762c;

        public a(String str, String str2, Context context) {
            this.f11760a = str;
            this.f11761b = str2;
            this.f11762c = context;
        }

        @Override
        public void run() {
            o oVar = o.this;
            oVar.a(this.f11760a, this.f11761b, this.f11762c, oVar.f11750f);
        }
    }

    public class b extends WebViewClient {

        final String f11764a;

        final String f11765b;

        final Context f11766c;

        public b(String str, String str2, Context context) {
            this.f11764a = str;
            this.f11765b = str2;
            this.f11766c = context;
        }

        @Override
        public void onPageFinished(WebView webView, String str) {
            super.onPageFinished(webView, str);
            try {
                webView.loadUrl("javascript:window.navigator.vibrate([]);");
            } catch (Exception e4) {
                e4.printStackTrace();
            }
        }

        @Override
        public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
            try {
                webView.loadUrl("javascript:window.navigator.vibrate([]);");
                if (o.this.m) {
                    o.this.f11755k = 0;
                    o.this.f();
                    return;
                }
                o.this.f11757o = false;
                if (webView.getTag() == null) {
                    webView.setTag("has_first_started");
                } else {
                    o.this.f11756n = true;
                }
                synchronized (o.f11744r) {
                    try {
                        o.this.f11750f = str;
                        if (o.this.f11749e == null || !o.this.f11749e.a(str)) {
                            o.this.h();
                        } else {
                            o.this.m = true;
                            o.this.f();
                        }
                    } finally {
                    }
                }
            } catch (Exception e4) {
                e4.printStackTrace();
            }
        }

        @Override
        public void onReceivedError(WebView webView, int i10, String str, String str2) {
            synchronized (o.f11744r) {
                o.this.m = true;
                o.this.b();
                o.this.f();
            }
            if (o.this.f11749e != null) {
                o.this.f11749e.a(i10, webView.getUrl(), str, o.this.f11754j);
            }
        }

        @Override
        public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
            try {
                if (MBridgeConstans.IS_SP_CBT_CF && sslErrorHandler != null) {
                    sslErrorHandler.cancel();
                }
                if (TextUtils.isEmpty(this.f11764a) || TextUtils.isEmpty(this.f11765b)) {
                    return;
                }
                new com.mbridge.msdk.foundation.same.report.h(this.f11766c).a(this.f11765b, this.f11764a, webView.getUrl());
            } catch (Exception e4) {
                e4.printStackTrace();
            }
        }

        @Override
        public boolean onRenderProcessGone(WebView webView, RenderProcessGoneDetail renderProcessGoneDetail) {
            try {
                synchronized (o.f11744r) {
                    o.this.m = true;
                    o.this.b();
                    o.this.f();
                }
                if (o.this.f11749e != null) {
                    o.this.f11749e.a(-1, webView.getUrl(), "WebView render process crash.", o.this.f11754j);
                }
                if (webView != null) {
                    webView.destroy();
                }
                return true;
            } catch (Throwable th) {
                p0.b(o.f11744r, th.getMessage());
                return true;
            }
        }

        @Override
        public boolean shouldOverrideUrlLoading(WebView webView, String str) {
            synchronized (o.f11744r) {
                try {
                    o oVar = o.this;
                    oVar.f11757o = true;
                    oVar.c();
                    if (o.this.m) {
                        o.this.d();
                        o.this.f();
                        return true;
                    }
                    o.this.f11750f = str;
                    if (o.this.f11749e != null && o.this.f11749e.c(str)) {
                        o.this.m = true;
                        o.this.d();
                        o.this.f();
                        return true;
                    }
                    if (o.this.f11753i) {
                        HashMap hashMap = new HashMap();
                        if (o.this.f11752h.getUrl() != null) {
                            hashMap.put("Referer", o.this.f11752h.getUrl());
                        }
                        o.this.f11752h.loadUrl(str, hashMap);
                    } else {
                        o.this.f11752h.loadUrl(str);
                    }
                    return true;
                } catch (Throwable th) {
                    throw th;
                }
            }
        }
    }

    public class c extends WebChromeClient {
        public c() {
        }

        @Override
        public boolean onJsAlert(WebView webView, String str, String str2, JsResult jsResult) {
            return true;
        }

        @Override
        public boolean onJsConfirm(WebView webView, String str, String str2, JsResult jsResult) {
            return true;
        }

        @Override
        public boolean onJsPrompt(WebView webView, String str, String str2, String str3, JsPromptResult jsPromptResult) {
            return true;
        }

        @Override
        public void onProgressChanged(WebView webView, int i10) {
            if (i10 == 100) {
                try {
                    webView.loadUrl("javascript:window.navigator.vibrate([]);");
                    if (!o.this.m) {
                        o oVar = o.this;
                        if (!oVar.f11757o) {
                            oVar.g();
                        }
                    }
                    if (o.this.f11749e != null) {
                        o.this.f11749e.b(webView.getUrl());
                    }
                } catch (Exception e4) {
                    e4.printStackTrace();
                }
            }
        }
    }

    public class d implements Runnable {
        public d() {
        }

        @Override
        public void run() {
            o.this.l = true;
            o.this.f11755k = 1;
            o.this.e();
        }
    }

    public class e implements Runnable {
        public e() {
        }

        @Override
        public void run() {
            o.this.l = true;
            o.this.f11755k = 2;
            o.this.e();
        }
    }

    public interface f {
        void a(int i10, String str, String str2, String str3);

        void a(String str, boolean z3, String str2);

        boolean a(String str);

        boolean b(String str);

        boolean c(String str);
    }

    public o() {
        this.f11745a = DefaultLoadControl.DEFAULT_MIN_BUFFER_MS;
        this.f11746b = 3000;
        com.mbridge.msdk.setting.g g5 = a1.g(com.mbridge.msdk.setting.h.b());
        this.f11748d = g5;
        if (g5 == null) {
            this.f11748d = com.mbridge.msdk.setting.h.b().a();
        }
        this.f11753i = this.f11748d.I0();
        this.f11745a = (int) this.f11748d.o0();
        this.f11746b = (int) this.f11748d.o0();
    }

    public void c() {
        this.f11747c.removeCallbacks(this.f11758p);
    }

    public void d() {
        this.f11747c.removeCallbacks(this.f11759q);
    }

    public void e() {
        synchronized (f11744r) {
            try {
                try {
                    b();
                    this.f11752h.destroy();
                    f fVar = this.f11749e;
                    if (fVar != null) {
                        fVar.a(this.f11750f, this.l, this.f11754j);
                    }
                } catch (Exception e4) {
                    p0.b(f11744r, e4.getMessage());
                } catch (Throwable th) {
                    p0.b(f11744r, th.getMessage());
                }
            } catch (Throwable th2) {
                throw th2;
            }
        }
    }

    public void f() {
        synchronized (f11744r) {
            try {
                try {
                    try {
                        b();
                        f fVar = this.f11749e;
                        if (fVar != null) {
                            fVar.a(this.f11750f, this.l, this.f11754j);
                        }
                    } finally {
                    }
                } catch (Exception e4) {
                    p0.b(f11744r, e4.getMessage());
                }
            } catch (Throwable th) {
            }
        }
    }

    public void g() {
        c();
        i();
    }

    public void h() {
        d();
        j();
    }

    private void i() {
        this.f11747c.postDelayed(this.f11758p, this.f11746b);
    }

    private void j() {
        this.f11747c.postDelayed(this.f11759q, this.f11745a);
    }

    public void b() {
        c();
        d();
    }

    public void a(String str, String str2, Context context, String str3, String str4, f fVar) {
        if (fVar != null) {
            this.f11751g = str4;
            this.f11750f = str3;
            this.f11749e = fVar;
            a(str, str2, context);
            return;
        }
        throw new NullPointerException("OverrideUrlLoadingListener can not be null");
    }

    public void a(String str, String str2, Context context, String str3, f fVar) {
        if (fVar != null) {
            this.f11750f = str3;
            this.f11749e = fVar;
            a(str, str2, context);
            return;
        }
        throw new NullPointerException("OverrideUrlLoadingListener can not be null");
    }

    private void a(String str, String str2, Context context) {
        if (Thread.currentThread() == Looper.getMainLooper().getThread()) {
            a(str, str2, context, this.f11750f);
        } else {
            this.f11747c.post(new a(str, str2, context));
        }
    }

    public void a(String str, String str2, Context context, String str3) {
        try {
            a(context, str, str2);
            if (!TextUtils.isEmpty(this.f11751g)) {
                this.f11752h.getSettings().setDefaultTextEncodingName("utf-8");
                this.f11746b = 2000;
                this.f11745a = 2000;
                p0.c(f11744r, this.f11751g);
                this.f11752h.loadDataWithBaseURL(str3, this.f11751g, "*/*", "utf-8", str3);
                return;
            }
            if (this.f11753i) {
                HashMap hashMap = new HashMap();
                if (this.f11752h.getUrl() != null) {
                    hashMap.put("Referer", this.f11752h.getUrl());
                }
                this.f11752h.loadUrl(str3, hashMap);
                return;
            }
            this.f11752h.loadUrl(str3);
        } catch (Throwable th) {
            try {
                f fVar = this.f11749e;
                if (fVar != null) {
                    fVar.a(0, this.f11750f, th.getMessage(), this.f11754j);
                }
            } catch (Exception e4) {
                e4.printStackTrace();
            }
        }
    }

    private void a(Context context, String str, String str2) {
        WebView webView = new WebView(context);
        this.f11752h = webView;
        webView.getSettings().setJavaScriptEnabled(true);
        this.f11752h.getSettings().setCacheMode(2);
        this.f11752h.getSettings().setLoadsImagesAutomatically(false);
        this.f11752h.setWebViewClient(new b(str2, str, context));
        this.f11752h.setWebChromeClient(new c());
    }
}