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

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


package com.tencent.mtt.external.novel.ui;

import android.content.Context;
import android.graphics.Paint;
import android.text.TextUtils;
import android.view.View;
import android.widget.LinearLayout;
import com.tencent.mtt.R;
import com.tencent.mtt.base.nativeframework.NativeWebLongClickListener;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.base.utils.DeviceUtils;
import com.tencent.mtt.base.webview.QBWebView;
import com.tencent.mtt.base.webview.common.QBWebChromeClient;
import com.tencent.mtt.base.webview.common.QBWebChromeClientExtension;
import com.tencent.mtt.base.webview.common.QBWebViewClient;
import com.tencent.mtt.browser.WebEngine;
import com.tencent.mtt.browser.window.templayer.BaseNativeGroup;
import com.tencent.mtt.setting.BaseSettings;
import com.tencent.mtt.view.common.QBImageView;
import com.tencent.mtt.view.common.QBTextView;
import com.tencent.mtt.view.layout.QBLinearLayout;
import com.tencent.mtt.view.recyclerview.QBListView;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import java.io.File;
import qb.a.f;

public class ReaderFeedbackView extends QBLinearLayout {
    protected static final int e = MttResources.s(48);
    protected static final int f = MttResources.s(48);
    protected static int g = 0;

    protected Context f56039a;

    protected QBImageView f56040b;

    protected QBTextView f56041c;

    protected QBListView f56042d;
    protected final int h;
    protected int i;
    boolean j;
    Paint k;
    protected ReaderTopBar l;
    private QBWebView m;
    private int n;
    private BaseNativeGroup o;

    public ReaderFeedbackView(Context context, BaseNativeGroup baseNativeGroup) {
        super(context);
        this.f56039a = null;
        this.f56040b = null;
        this.f56041c = null;
        this.f56042d = null;
        this.h = MttResources.h(f.r);
        this.i = BaseSettings.a().m();
        this.j = false;
        this.k = new Paint();
        this.m = null;
        this.n = 74565;
        this.l = null;
        this.o = baseNativeGroup;
        this.f56039a = context;
        a();
        WebEngine e2 = WebEngine.e();
        if (e2 != null) {
            e2.a(context);
        }
        this.m = new QBWebView(this.f56039a);
        this.m.getQBSettings().o(true);
        this.m.addDefaultJavaScriptInterface();
        this.m.setQBWebViewClient(new QBWebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(QBWebView qBWebView, String str) {
                if (!str.contains("ui.ptlogin2.qq.com")) {
                    return false;
                }
                ReaderFeedbackView.this.m.loadUrl(str + "&pt_no_onekey=1");
                return true;
            }
        });
        this.m.setQQBrowserClient(null);
        this.m.setQBWebChromeClient(new QBWebChromeClient() {
            @Override
            public void onReceivedTitle(QBWebView qBWebView, String str) {
                ReaderFeedbackView.this.setTilteText(str);
                super.onReceivedTitle(qBWebView, str);
            }
        });
        this.m.setWebViewType(6);
        QBWebView qBWebView = this.m;
        qBWebView.setWebChromeClientExtension(new QBWebChromeClientExtension(qBWebView, 6, new NativeWebLongClickListener(qBWebView)));
        addView(this.m, new LinearLayout.LayoutParams(-1, -1));
        this.m.getQBSettings().a(100);
    }

    public void a() {
        g = DeviceUtils.af() - (f * 2);
        setOrientation(1);
        setBackgroundColor(MttResources.c(R.color.reader_statusbar_default));
        this.l = new ReaderTopBar(getContext(), false);
        this.l.setLeftBtnShow(true);
        this.l.setLeftBtnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                EventCollector.getInstance().onViewClickedBefore(view);
                ReaderFeedbackView.this.o.back();
                EventCollector.getInstance().onViewClicked(view);
            }
        });
        this.l.setRightBtnShow(false);
        addView(this.l);
    }

    public void a(String str, String str2) {
        if (this.m != null) {
            if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
                this.m.loadUrl("https://bbs.mb.qq.com/mobilefb/feedback?from=file");
                return;
            }
            try {
                StringBuilder sb = new StringBuilder(305);
                sb.append("https://bbs.mb.qq.com/mobilefb/feedback?from=file");
                File file = new File(str);
                sb.append("&filename=");
                sb.append(file.getName());
                sb.append("&filetype=");
                sb.append(str2);
                sb.append("&filesize=");
                sb.append(file.length());
                this.m.loadUrl(sb.toString());
            } catch (Throwable unused) {
                this.m.loadUrl("https://bbs.mb.qq.com/mobilefb/feedback?from=file");
            }
        }
    }

    public void setTilteText(String str) {
        ReaderTopBar readerTopBar;
        if (TextUtils.isEmpty(str) || (readerTopBar = this.l) == null) {
            return;
        }
        readerTopBar.setTitle(str);
    }
}