导航菜单

页面标题

页面副标题

小柿子 v1.3.8 - a.java 源代码

正在查看: 小柿子 v1.3.8 应用的 a.java JAVA 源代码文件

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


package com.mbridge.msdk.foundation.webview;

import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.webkit.WebView;
import com.mbridge.msdk.activity.MBCommonActivity;
import com.mbridge.msdk.c.g;
import com.mbridge.msdk.c.h;
import com.mbridge.msdk.c.i;
import com.mbridge.msdk.click.entity.JumpLoaderResult;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.aj;
import com.mbridge.msdk.foundation.webview.BrowserView;
import com.mbridge.msdk.out.BaseTrackingListener;
import com.ss.android.download.api.constant.BaseConstants;
import java.util.ArrayList;

public class a implements BrowserView.a {
    private static String a = "a";
    private int b;
    private String d;
    private boolean e;
    private BaseTrackingListener f;

    private BrowserView f41g;
    private CampaignEx h;
    private com.mbridge.msdk.click.b i;
    private Context j;
    private JumpLoaderResult l;
    private long o;
    private boolean c = true;
    private boolean m = false;
    private final Runnable n = new Runnable() {
        @Override
        public final void run() {
            af.b(a.a, "webview js!超时上限:" + a.this.b + "ms");
            if (a.this.i != null && a.this.l != null) {
                a.this.l.setSuccess(false);
                a.this.l.setUrl(a.this.d);
                a.this.l.setType(2);
                a.this.l.setExceptionMsg("linktype 8 time out");
                a.this.i.a(a.this.l, a.this.h, 1, false);
            }
            a aVar = a.this;
            if (aVar.d(null, aVar.d) && !a.this.m) {
                a.this.m = true;
                a aVar2 = a.this;
                aVar2.a(aVar2.j, a.this.d, a.this.h);
            }
            if (a.this.f != null) {
                a.this.f.onFinishRedirection(a.this.h, a.this.d);
            }
        }
    };
    private Handler k = new Handler(Looper.getMainLooper());

    public a(Context context, CampaignEx campaignEx, com.mbridge.msdk.click.b bVar, BrowserView browserView, BaseTrackingListener baseTrackingListener) {
        this.b = 10000;
        this.l = null;
        this.j = context;
        this.h = campaignEx;
        this.f41g = browserView;
        this.f = baseTrackingListener;
        g b = h.a().b(com.mbridge.msdk.foundation.controller.c.q().k());
        if (b == null) {
            h.a();
            b = i.a();
        }
        this.i = bVar;
        this.l = new JumpLoaderResult();
        this.b = (int) b.aq();
    }

    @Override
    public final void a() {
    }

    public boolean d(android.webkit.WebView r7, java.lang.String r8) {
        throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.foundation.webview.a.d(android.webkit.WebView, java.lang.String):boolean");
    }

    private boolean e(android.webkit.WebView r8, java.lang.String r9) {
        throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.foundation.webview.a.e(android.webkit.WebView, java.lang.String):boolean");
    }

    @Override
    public final void c(WebView webView, final String str) {
        af.b(a, "onPageFinished1  " + str);
        if (this.c) {
            this.o = 0L;
            this.c = false;
            com.mbridge.msdk.foundation.same.f.b.g().execute(new Runnable() {
                @Override
                public final void run() {
                    if (a.this.f != null) {
                        a.this.f.onFinishRedirection(a.this.h, str);
                    }
                    if (a.this.i == null || a.this.l == null) {
                        return;
                    }
                    a.this.l.setSuccess(true);
                    a.this.l.setUrl(str);
                    a.this.l.setType(2);
                    a.this.i.a(a.this.l, a.this.h, 1, true);
                }
            });
            if (TextUtils.isEmpty(str)) {
                return;
            }
            c();
            Uri parse = Uri.parse(str);
            if (!(parse.getScheme().equals("http") || parse.getScheme().equals(BaseConstants.SCHEME_HTTPS)) || this.m) {
                return;
            }
            this.m = true;
            a(this.j, str, this.h);
        }
    }

    @Override
    public final boolean b(WebView webView, final String str) {
        af.b(a, "shouldOverrideUrlLoading1  " + str);
        this.c = false;
        if (aj.a.b(str) && aj.a.a(this.j, str, null)) {
            this.m = true;
        }
        boolean e = e(webView, str);
        if (e) {
            this.o = 0L;
            this.c = false;
            c();
            com.mbridge.msdk.foundation.same.f.b.g().execute(new Runnable() {
                @Override
                public final void run() {
                    if (a.this.i != null && a.this.l != null) {
                        a.this.l.setSuccess(true);
                        a.this.l.setUrl(str);
                        a.this.l.setType(2);
                        a.this.i.a(a.this.l, a.this.h, 1, true);
                    }
                    if (a.this.f != null) {
                        a.this.f.onFinishRedirection(a.this.h, str);
                    }
                }
            });
        }
        return e;
    }

    @Override
    public final void a(WebView webView, String str) {
        if (this.o == 0) {
            this.o = System.currentTimeMillis();
            if (!this.e) {
                this.e = true;
                d();
            }
        }
        this.d = str;
        this.c = true;
    }

    @Override
    public final void a(WebView webView, String str, Bitmap bitmap) {
        if (this.o == 0) {
            this.o = System.currentTimeMillis();
            if (!this.e) {
                this.e = true;
                d();
            }
            this.m = false;
        }
        this.d = str;
        this.c = true;
    }

    private void c() {
        this.k.removeCallbacks(this.n);
    }

    private void d() {
        this.k.postDelayed(this.n, this.b);
    }

    @Override
    public final void a(WebView webView, int i, final String str, final String str2) {
        af.d(a, str);
        c();
        com.mbridge.msdk.foundation.same.f.b.g().execute(new Runnable() {
            @Override
            public final void run() {
                if (a.this.f != null) {
                    a.this.f.onFinishRedirection(a.this.h, str2);
                }
                if (a.this.i == null || a.this.l == null) {
                    return;
                }
                a.this.l.setSuccess(false);
                a.this.l.setUrl(str2);
                a.this.l.setType(2);
                a.this.l.setExceptionMsg(str);
                a.this.i.a(a.this.l, a.this.h, 1, true);
            }
        });
        if (!d(webView, str2) || this.m) {
            return;
        }
        this.m = true;
        a(this.j, str2, this.h);
    }

    public void a(Context context, String str, CampaignEx campaignEx) {
        if (context == null) {
            return;
        }
        if (campaignEx != null) {
            campaignEx.getCurrentLocalRid();
        }
        try {
            int i = MBCommonActivity.d;
            Intent intent = new Intent(context, (Class<?>) MBCommonActivity.class);
            if (TextUtils.isEmpty(str)) {
                return;
            }
            b.a.put(str, this.f41g);
            if (aj.a.a(str)) {
                str = "https://play.google.com/store/apps/details?id=" + str.replace(BaseConstants.MARKET_PREFIX, "");
            }
            intent.putExtra("url", str);
            af.c("url", "webview url = " + str);
            intent.setFlags(805306368);
            intent.putExtra("mvcommon", campaignEx);
            context.startActivity(intent);
        } catch (Exception unused) {
            aj.a(context, str, this.f, campaignEx, new ArrayList());
        }
    }
}