MT Manager v2.15.3版本的 MD5 值为:34ea5286e529d87838c6cae0a2220d93

以下内容为反编译后的 C2243.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 C2243 extends WebViewClient {

    public final a f6772;

    public C2243(a aVar) {
        this.f6772 = aVar;
    }

    @Override
    public final boolean shouldOverrideUrlLoading(WebView webView, String str) {
        Uri parse;
        Context context;
        List<String> pathSegments;
        FrameLayout frameLayout;
        FrameLayout frameLayout2;
        C13891 c13891;
        C10851 c10851;
        C13891 c138912;
        C8979 c8979;
        C8979 c89792;
        boolean z;
        C13891 c138913;
        String str2;
        String str3;
        String str4;
        C13891 c138914;
        String str5;
        C5471.m13581("openSDK_LOG.AuthDialog", "-->Redirect URL: " + str);
        boolean startsWith = str.startsWith("auth://browser");
        a aVar = this.f6772;
        if (startsWith) {
            JSONObject m19349 = C8325.m19349(str);
            aVar.f64 = a.m294(aVar);
            z = aVar.f64;
            if (!z) {
                if (m19349.optString("fail_cb", null) != null) {
                    aVar.m304(m19349.optString("fail_cb"));
                } else if (m19349.optInt("fall_to_wv") == 1) {
                    StringBuilder sb = new StringBuilder();
                    str2 = aVar.f69;
                    sb.append(str2);
                    str3 = aVar.f69;
                    sb.append(str3.indexOf("?") > -1 ? com.alipay.sdk.m.s.a.n : "?");
                    aVar.f69 = sb.toString();
                    StringBuilder sb2 = new StringBuilder();
                    str4 = aVar.f69;
                    aVar.f69 = C13032.m27586(sb2, str4, "browser_error=1");
                    c138914 = aVar.f63;
                    str5 = aVar.f69;
                    c138914.loadUrl(str5);
                } else {
                    String optString = m19349.optString("redir", null);
                    if (optString != null) {
                        c138913 = aVar.f63;
                        c138913.loadUrl(optString);
                    }
                }
            }
            return true;
        }
        if (str.startsWith("auth://tauth.qq.com/")) {
            c89792 = aVar.f74;
            c89792.mo1549(C8325.m19349(str));
            aVar.dismiss();
            return true;
        }
        if (str.startsWith("auth://cancel")) {
            c8979 = aVar.f74;
            c8979.mo1548();
            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(C5132.f14228);
                context = aVar.f66;
                context.startActivity(intent);
            } catch (Exception e) {
                C5471.m13577("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.f65;
                frameLayout2.setVisibility(8);
                c13891 = aVar.f63;
                c13891.setVisibility(0);
            } else if (intValue == 1) {
                frameLayout = aVar.f65;
                frameLayout.setVisibility(0);
            }
            return true;
        }
        if (!str.startsWith("auth://onLoginSubmit")) {
            c10851 = aVar.f72;
            c138912 = aVar.f63;
            if (c10851.mo11193(c138912, str)) {
                return true;
            }
            C5471.m13573("openSDK_LOG.AuthDialog", "-->Redirect URL: return false");
            return false;
        }
        try {
            List<String> pathSegments2 = Uri.parse(str).getPathSegments();
            if (!pathSegments2.isEmpty()) {
                aVar.f68 = 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;
        C8979 c8979;
        long j;
        int i2;
        C13891 c13891;
        long j2;
        Handler handler;
        C8979 c89792;
        super.onReceivedError(webView, i, str, str2);
        C5471.m13573("openSDK_LOG.AuthDialog", "-->onReceivedError, errorCode: " + i + " | description: " + str);
        a aVar = this.f6772;
        context = aVar.f66;
        if (!C8325.m19357(context)) {
            c89792 = aVar.f74;
            c89792.mo1550(new C4957(9001, "当前网络不可用,请稍后重试!", str2));
            aVar.dismiss();
            return;
        }
        str3 = aVar.f79;
        if (str3.startsWith("https://imgcache.qq.com/ptlogin/static/qzsjump.html?")) {
            c8979 = aVar.f74;
            c8979.mo1550(new C4957(i, str, str2));
            aVar.dismiss();
            return;
        }
        long elapsedRealtime = SystemClock.elapsedRealtime();
        j = aVar.f77;
        long j3 = elapsedRealtime - j;
        i2 = aVar.f73;
        if (i2 < 1) {
            j2 = aVar.f75;
            if (j3 < j2) {
                a.m280(aVar);
                handler = aVar.f80;
                handler.postDelayed(new RunnableC8137(this), 500L);
                return;
            }
        }
        c13891 = aVar.f63;
        c13891.loadUrl(a.m283(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;
        C5471.m13581("openSDK_LOG.AuthDialog", "-->onPageStarted, url: " + str);
        super.onPageStarted(webView, str, bitmap);
        a aVar = this.f6772;
        frameLayout = aVar.f65;
        frameLayout.setVisibility(0);
        aVar.f77 = SystemClock.elapsedRealtime();
        str2 = aVar.f79;
        if (!TextUtils.isEmpty(str2)) {
            handler2 = aVar.f80;
            hashMap2 = aVar.f70;
            str4 = aVar.f79;
            handler2.removeCallbacks((Runnable) hashMap2.remove(str4));
        }
        aVar.f79 = str;
        str3 = aVar.f79;
        RunnableC5611 runnableC5611 = new RunnableC5611(aVar, str3);
        hashMap = aVar.f70;
        hashMap.put(str, runnableC5611);
        handler = aVar.f80;
        handler.postDelayed(runnableC5611, 120000L);
    }

    @Override
    public final void onPageFinished(WebView webView, String str) {
        FrameLayout frameLayout;
        C13891 c13891;
        Handler handler;
        HashMap hashMap;
        C13891 c138912;
        super.onPageFinished(webView, str);
        C5471.m13581("openSDK_LOG.AuthDialog", "-->onPageFinished, url: " + str);
        a aVar = this.f6772;
        frameLayout = aVar.f65;
        frameLayout.setVisibility(8);
        c13891 = aVar.f63;
        if (c13891 != null) {
            c138912 = aVar.f63;
            c138912.setVisibility(0);
        }
        if (TextUtils.isEmpty(str)) {
            return;
        }
        handler = aVar.f80;
        hashMap = aVar.f70;
        handler.removeCallbacks((Runnable) hashMap.remove(str));
    }

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