QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685

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


package com.tencent.ilinkservice;

import android.graphics.Bitmap;
import android.os.Build;
import com.google.protobuf.InvalidProtocolBufferException;
import com.tencent.ilinkservice.a;
import com.tencent.qqlive.module.videoreport.inject.webview.jsinject.JsInjector;
import com.tencent.smtt.export.external.interfaces.WebResourceRequest;
import com.tencent.smtt.export.external.interfaces.WebResourceResponse;
import com.tencent.smtt.sdk.WebView;
import com.tencent.smtt.sdk.WebViewClient;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class aq {

    private final String f11515a;

    private com.tencent.luggage.wxa.ax.a f11516b;

    private WebView f11517c;

    private com.tencent.luggage.wxa.ax.b f11518d;
    private String e;

    class AnonymousClass1 extends WebViewClient {

        final aq f11519a;

        @Override
        public void onPageFinished(WebView webView, String str) {
            this.f11519a.f11517c.evaluateJavascript(this.f11519a.f11518d.a(), null);
            super.onPageFinished(webView, str);
        }

        @Override
        public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
            JsInjector.getInstance().onPageStarted(webView);
            super.onPageStarted(webView, str, bitmap);
        }

        @Override
        public WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
            String uri = Build.VERSION.SDK_INT >= 21 ? webResourceRequest.getUrl().toString() : "";
            com.tencent.luggage.wxa.ax.b unused = this.f11519a.f11518d;
            au.a().c("IlinkLiveServiceImpl", "shouldInterceptRequest:" + uri, new Object[0]);
            if (uri.contains("https://ilinklivelocal")) {
                try {
                    return new WebResourceResponse("image/jpg", "UTF-8", new FileInputStream(new File(uri.replace("https://ilinklivelocal", "").trim())));
                } catch (FileNotFoundException e) {
                    e.printStackTrace();
                    au.a().e("IlinkLiveServiceImpl", "shouldInterceptRequest error:" + uri, new Object[0]);
                }
            }
            return super.shouldInterceptRequest(webView, webResourceRequest);
        }

        @Override
        public boolean shouldOverrideUrlLoading(WebView webView, String str) {
            webView.loadUrl(str);
            return true;
        }
    }

    public static class a {

        private static aq f11520a = new aq(null);
    }

    private aq() {
        this.f11515a = "IlinkLiveServiceImpl";
        this.f11516b = null;
        this.f11518d = null;
        this.e = IlinkServiceImpl.getInstance().getContext().getExternalFilesDir(null) + "/ilinkservice";
    }

    aq(AnonymousClass1 anonymousClass1) {
        this();
    }

    public static aq a() {
        return a.f11520a;
    }

    public void a(String str) {
        com.tencent.luggage.wxa.ax.a aVar = this.f11516b;
        if (aVar != null) {
            aVar.a(str);
        }
    }

    public void a(byte[] bArr) {
        char c2;
        try {
            a.t a2 = a.t.a(bArr);
            String a3 = a2.a();
            switch (a3.hashCode()) {
                case -2042114055:
                    if (a3.equals("onUploadMediaFileComplete")) {
                        c2 = '\f';
                        break;
                    }
                    c2 = 65535;
                    break;
                case -1750465475:
                    if (a3.equals("onFinderSetAnchorStatusComplete")) {
                        c2 = 7;
                        break;
                    }
                    c2 = 65535;
                    break;
                case -1378277085:
                    if (a3.equals("onLiveStartEvent")) {
                        c2 = '\n';
                        break;
                    }
                    c2 = 65535;
                    break;
                case -1316413900:
                    if (a3.equals("onAutoLoginComplete")) {
                        c2 = 0;
                        break;
                    }
                    c2 = 65535;
                    break;
                case -1258845322:
                    if (a3.equals("onSendTransferRequestComplete")) {
                        c2 = '\b';
                        break;
                    }
                    c2 = 65535;
                    break;
                case -1038118920:
                    if (a3.equals("onFinderCloseLiveComplete")) {
                        c2 = 6;
                        break;
                    }
                    c2 = 65535;
                    break;
                case -790105818:
                    if (a3.equals("onFinderCreateLiveComplete")) {
                        c2 = 4;
                        break;
                    }
                    c2 = 65535;
                    break;
                case -742078323:
                    if (a3.equals("onLiveStopEvent")) {
                        c2 = 11;
                        break;
                    }
                    c2 = 65535;
                    break;
                case -691925495:
                    if (a3.equals("onThirdAppLoginComplete")) {
                        c2 = 1;
                        break;
                    }
                    c2 = 65535;
                    break;
                case 246121876:
                    if (a3.equals("onFinderJoinLiveComplete")) {
                        c2 = 5;
                        break;
                    }
                    c2 = 65535;
                    break;
                case 1104525743:
                    if (a3.equals("onFinderLivePrepareComplete")) {
                        c2 = 3;
                        break;
                    }
                    c2 = 65535;
                    break;
                case 1626050918:
                    if (a3.equals("onRtmpUrlUpdateEvent")) {
                        c2 = '\t';
                        break;
                    }
                    c2 = 65535;
                    break;
                case 1784438254:
                    if (a3.equals("onFinderInitComplete")) {
                        c2 = 2;
                        break;
                    }
                    c2 = 65535;
                    break;
                default:
                    c2 = 65535;
                    break;
            }
            switch (c2) {
                case 0:
                    a.v a4 = a.v.a(a2.b());
                    this.f11518d.a(a4.a(), a4.b());
                    return;
                case 1:
                    a.v a5 = a.v.a(a2.b());
                    this.f11518d.b(a5.a(), a5.b());
                    return;
                case 2:
                    a.u a6 = a.u.a(a2.b());
                    this.f11518d.b(a6.a(), a6.b().toStringUtf8());
                    return;
                case 3:
                    a.u a7 = a.u.a(a2.b());
                    this.f11518d.c(a7.a(), a7.b().toStringUtf8());
                    return;
                case 4:
                    a.u a8 = a.u.a(a2.b());
                    this.f11518d.d(a8.a(), a8.b().toStringUtf8());
                    return;
                case 5:
                    a.u a9 = a.u.a(a2.b());
                    this.f11518d.e(a9.a(), a9.b().toStringUtf8());
                    return;
                case 6:
                    a.u a10 = a.u.a(a2.b());
                    this.f11518d.f(a10.a(), a10.b().toStringUtf8());
                    return;
                case 7:
                    a.u a11 = a.u.a(a2.b());
                    this.f11518d.g(a11.a(), a11.b().toStringUtf8());
                    return;
                case '\b':
                    a.u a12 = a.u.a(a2.b());
                    this.f11518d.h(a12.a(), a12.b().toStringUtf8());
                    return;
                case '\t':
                    this.f11518d.a(a.w.a(a2.b()).a().toStringUtf8());
                    return;
                case '\n':
                    this.f11518d.b();
                    return;
                case 11:
                    this.f11518d.c();
                    return;
                case '\f':
                    a.u a13 = a.u.a(a2.b());
                    this.f11518d.i(a13.a(), a13.b().toStringUtf8());
                    return;
                default:
                    au.a().e("IlinkLiveServiceImpl", "not supported callback:" + a2.a(), new Object[0]);
                    return;
            }
        } catch (InvalidProtocolBufferException e) {
            e.printStackTrace();
            au.a().e("IlinkLiveServiceImpl", "OnReceiveCommonCallback resp error", new Object[0]);
        }
    }

    public byte[] b() {
        try {
            return a.k.a(IlinkServiceImpl.getInstance().ReqCommFunctionWithResp("ilinkLiveFunc", a.i.c().a("getJsBridgeData").build().toByteArray())).a().toByteArray();
        } catch (InvalidProtocolBufferException e) {
            e.printStackTrace();
            au.a().e("IlinkLiveServiceImpl", "getJsBridgeData resp error", new Object[0]);
            return new byte[0];
        }
    }

    public void c() {
        com.tencent.luggage.wxa.ax.a aVar = this.f11516b;
        if (aVar != null) {
            aVar.a();
        }
    }

    public void d() {
        com.tencent.luggage.wxa.ax.a aVar = this.f11516b;
        if (aVar != null) {
            aVar.b();
        }
    }
}