MT Manager v2.15.3版本的 MD5 值为:27f0d62ac7123fbbaefff319fdab9f13

以下内容为反编译后的 C2746.java 源代码,内容仅作参考


package l;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Handler;
import android.os.SystemClock;
import android.text.TextUtils;
import android.webkit.SslErrorHandler;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import com.tencent.connect.auth.a;
import java.util.HashMap;
import java.util.List;
import org.json.JSONObject;

public final class C2746 extends WebViewClient {

    public final a f10000;

    public C2746(a aVar) {
        this.f10000 = aVar;
    }

    @Override
    public final boolean shouldOverrideUrlLoading(WebView webView, String str) {
        Uri parse;
        Context context;
        List<String> pathSegments;
        FrameLayout frameLayout;
        FrameLayout frameLayout2;
        C12568 c12568;
        C4568 c4568;
        C12568 c125682;
        C8641 c8641;
        C8641 c86412;
        boolean z;
        C12568 c125683;
        String str2;
        String str3;
        String str4;
        C12568 c125684;
        String str5;
        C10884.m24178("openSDK_LOG.AuthDialog", "-->Redirect URL: " + str);
        boolean startsWith = str.startsWith("auth://browser");
        a aVar = this.f10000;
        if (startsWith) {
            JSONObject m24731 = C11305.m24731(str);
            aVar.f81 = a.m311(aVar);
            z = aVar.f81;
            if (!z) {
                if (m24731.optString("fail_cb", null) != null) {
                    aVar.m320(m24731.optString("fail_cb"));
                } else if (m24731.optInt("fall_to_wv") == 1) {
                    StringBuilder sb = new StringBuilder();
                    str2 = aVar.f76;
                    sb.append(str2);
                    str3 = aVar.f76;
                    sb.append(str3.indexOf("?") > -1 ? com.alipay.sdk.m.s.a.n : "?");
                    aVar.f76 = sb.toString();
                    StringBuilder sb2 = new StringBuilder();
                    str4 = aVar.f76;
                    aVar.f76 = C4043.m10765(sb2, str4, "browser_error=1");
                    c125684 = aVar.f67;
                    str5 = aVar.f76;
                    c125684.loadUrl(str5);
                } else {
                    String optString = m24731.optString("redir", null);
                    if (optString != null) {
                        c125683 = aVar.f67;
                        c125683.loadUrl(optString);
                    }
                }
            }
            return true;
        }
        if (str.startsWith("auth://tauth.qq.com/")) {
            c86412 = aVar.f66;
            c86412.mo1041(C11305.m24731(str));
            aVar.dismiss();
            return true;
        }
        if (str.startsWith("auth://cancel")) {
            c8641 = aVar.f66;
            c8641.mo1040();
            aVar.dismiss();
            return true;
        }
        if (str.startsWith("auth://close")) {
            aVar.dismiss();
            return true;
        }
        if (str.startsWith("download://") || str.endsWith(".apk")) {
            try {
                if (str.startsWith("download://")) {
                    parse = Uri.parse(Uri.decode(str.substring(11)));
                } else {
                    parse = Uri.parse(Uri.decode(str));
                }
                Intent intent = new Intent("android.intent.action.VIEW", parse);
                intent.addFlags(C10740.f30806);
                context = aVar.f63;
                context.startActivity(intent);
            } catch (Exception e) {
                C10884.m24177("openSDK_LOG.AuthDialog", "-->start download activity exception, e: ", e);
            }
            return true;
        }
        if (str.startsWith("auth://progress")) {
            try {
                pathSegments = Uri.parse(str).getPathSegments();
            } catch (Exception unused) {
            }
            if (pathSegments.isEmpty()) {
                return true;
            }
            int intValue = Integer.valueOf(pathSegments.get(0)).intValue();
            if (intValue == 0) {
                frameLayout2 = aVar.f68;
                frameLayout2.setVisibility(8);
                c12568 = aVar.f67;
                c12568.setVisibility(0);
            } else if (intValue == 1) {
                frameLayout = aVar.f68;
                frameLayout.setVisibility(0);
            }
            return true;
        }
        if (!str.startsWith("auth://onLoginSubmit")) {
            c4568 = aVar.f72;
            c125682 = aVar.f67;
            if (c4568.mo11672(c125682, str)) {
                return true;
            }
            C10884.m24184("openSDK_LOG.AuthDialog", "-->Redirect URL: return false");
            return false;
        }
        try {
            List<String> pathSegments2 = Uri.parse(str).getPathSegments();
            if (!pathSegments2.isEmpty()) {
                aVar.f80 = pathSegments2.get(0);
            }
        } catch (Exception unused2) {
        }
        return true;
    }

    @Override
    public final void onReceivedError(WebView webView, int i, String str, String str2) {
        Context context;
        String str3;
        C8641 c8641;
        long j;
        int i2;
        C12568 c12568;
        long j2;
        Handler handler;
        C8641 c86412;
        super.onReceivedError(webView, i, str, str2);
        C10884.m24184("openSDK_LOG.AuthDialog", "-->onReceivedError, errorCode: " + i + " | description: " + str);
        a aVar = this.f10000;
        context = aVar.f63;
        if (!C11305.m24722(context)) {
            c86412 = aVar.f66;
            c86412.mo1042(new C14065(9001, "当前网络不可用,请稍后重试!", str2));
            aVar.dismiss();
            return;
        }
        str3 = aVar.f70;
        if (str3.startsWith("https://imgcache.qq.com/ptlogin/static/qzsjump.html?")) {
            c8641 = aVar.f66;
            c8641.mo1042(new C14065(i, str, str2));
            aVar.dismiss();
            return;
        }
        long elapsedRealtime = SystemClock.elapsedRealtime();
        j = aVar.f64;
        long j3 = elapsedRealtime - j;
        i2 = aVar.f65;
        if (i2 < 1) {
            j2 = aVar.f71;
            if (j3 < j2) {
                a.m313(aVar);
                handler = aVar.f78;
                handler.postDelayed(new RunnableC11167(this), 500L);
                return;
            }
        }
        c12568 = aVar.f67;
        c12568.loadUrl(a.m306(aVar));
    }

    @Override
    public final void onPageStarted(WebView webView, String str, Bitmap bitmap) {
        FrameLayout frameLayout;
        String str2;
        String str3;
        HashMap hashMap;
        Handler handler;
        Handler handler2;
        HashMap hashMap2;
        String str4;
        C10884.m24178("openSDK_LOG.AuthDialog", "-->onPageStarted, url: " + str);
        super.onPageStarted(webView, str, bitmap);
        a aVar = this.f10000;
        frameLayout = aVar.f68;
        frameLayout.setVisibility(0);
        aVar.f64 = SystemClock.elapsedRealtime();
        str2 = aVar.f70;
        if (!TextUtils.isEmpty(str2)) {
            handler2 = aVar.f78;
            hashMap2 = aVar.f77;
            str4 = aVar.f70;
            handler2.removeCallbacks((Runnable) hashMap2.remove(str4));
        }
        aVar.f70 = str;
        str3 = aVar.f70;
        RunnableC10325 runnableC10325 = new RunnableC10325(aVar, str3);
        hashMap = aVar.f77;
        hashMap.put(str, runnableC10325);
        handler = aVar.f78;
        handler.postDelayed(runnableC10325, 120000L);
    }

    @Override
    public final void onPageFinished(WebView webView, String str) {
        FrameLayout frameLayout;
        C12568 c12568;
        Handler handler;
        HashMap hashMap;
        C12568 c125682;
        super.onPageFinished(webView, str);
        C10884.m24178("openSDK_LOG.AuthDialog", "-->onPageFinished, url: " + str);
        a aVar = this.f10000;
        frameLayout = aVar.f68;
        frameLayout.setVisibility(8);
        c12568 = aVar.f67;
        if (c12568 != null) {
            c125682 = aVar.f67;
            c125682.setVisibility(0);
        }
        if (TextUtils.isEmpty(str)) {
            return;
        }
        handler = aVar.f78;
        hashMap = aVar.f77;
        handler.removeCallbacks((Runnable) hashMap.remove(str));
    }

    @Override
    @TargetApi(8)
    public final void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
        C10884.m24182("openSDK_LOG.AuthDialog", "-->onReceivedSslError " + sslError.getPrimaryError() + "请求不合法,请检查手机安全设置,如系统时间、代理等");
        sslErrorHandler.cancel();
    }
}