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

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


package com.tencent.mtt.file.page.documents.newpage;

import android.graphics.Bitmap;
import android.text.TextUtils;
import android.view.View;
import com.tencent.common.featuretoggle.FeatureToggle;
import com.tencent.common.fresco.pipeline.CImage;
import com.tencent.common.fresco.pipeline.ImageHub;
import com.tencent.common.fresco.request.ImageRequestCallBack;
import com.tencent.common.fresco.request.ImageRequester;
import com.tencent.common.utils.UrlUtils;
import com.tencent.mtt.base.page.content.OnHolderChangeListener;
import com.tencent.mtt.base.page.recycler.itemholder.AbsItemDataHolder;
import com.tencent.mtt.base.presenter.SimpleFilePagePresenter;
import com.tencent.mtt.browser.window.UrlParams;
import com.tencent.mtt.file.page.documents.newpage.DocumentsTopBarNew;
import com.tencent.mtt.file.page.documents.newpage.DocumentsTopNoteView;
import com.tencent.mtt.file.page.homepage.stat.highlight.HighlightStatUtils;
import com.tencent.mtt.file.page.homepage.tab.card.FileItemClick;
import com.tencent.mtt.file.page.homepage.tab.card.doc.DocUtils;
import com.tencent.mtt.file.page.homepage.tab.card.doc.filter.DocFilter;
import com.tencent.mtt.file.page.homepage.tab.card.doc.filter.DocFilterDialog;
import com.tencent.mtt.file.page.statistics.FileKeyEvent;
import com.tencent.mtt.nxeasy.page.EasyPageContext;
import com.tencent.mtt.setting.PublicSettingManager;
import com.tencent.mtt.tool.FilePreferenceManager;
import com.tencent.mtt.view.dialog.newui.SimpleDialogBuilder;
import com.tencent.mtt.view.dialog.newui.builder.api.base.IDialogBuilderInterface;
import com.tencent.mtt.view.dialog.newui.dialog.DialogBase;
import com.tencent.mtt.view.dialog.newui.view.ViewOnClickListener;
import java.util.ArrayList;
import qb.file.BuildConfig;

public class DocumentsPagePresenter extends SimpleFilePagePresenter implements OnHolderChangeListener, DocumentsTopBarNew.OnTopBarClickListener, DocFilterDialog.OnDocFilterChangeListener {
    DocumentsPageContentPresenterNew n;
    DocumentsTopBarNew o;

    public DocumentsPagePresenter(final EasyPageContext easyPageContext) {
        super(easyPageContext);
        c("Documents");
        PublicSettingManager.a().setString("KEY_DOC_TAB_CURRENT_INDEX", "4");
        this.n = new DocumentsPageContentPresenterNew(easyPageContext, this);
        a(this.n);
        this.o = new DocumentsTopBarNew(easyPageContext, this);
        a(this.o);
        if (!FilePreferenceManager.a().getBoolean("show_goto_cloud_page_tips", true) || FeatureToggle.a(BuildConfig.FEATURE_TOGGLE_869333371)) {
            return;
        }
        new FileKeyEvent("tips_cloudbanner_expose", easyPageContext.g, easyPageContext.h).a();
        DocumentsTopNoteView documentsTopNoteView = new DocumentsTopNoteView(easyPageContext.f68800c);
        a(documentsTopNoteView);
        documentsTopNoteView.setClickListener(new DocumentsTopNoteView.ClickListener() {
            @Override
            public void a() {
                new FileKeyEvent("tips_cloudbanner_forward", easyPageContext.g, easyPageContext.h).a();
                new FileKeyEvent("doc_fm_anyclick", easyPageContext.g, easyPageContext.h, "", "DOC_FM_ALL", "", "").a();
                String addParamsToUrl = UrlUtils.addParamsToUrl(UrlUtils.addParamsToUrl(UrlUtils.addParamsToUrl("qb://tab/file", "animation=cloudDoc"), "callFrom=" + easyPageContext.g), "callerName=" + easyPageContext.h);
                easyPageContext.f68798a.b(new UrlParams(addParamsToUrl));
                HighlightStatUtils.c().a(addParamsToUrl).a("local_doc_goto_see", 0);
            }

            @Override
            public void a(View view) {
                new FileKeyEvent("tips_cloudbanner_close", easyPageContext.g, easyPageContext.h).a();
                new FileKeyEvent("doc_fm_anyclick", easyPageContext.g, easyPageContext.h, "", "DOC_FM_ALL", "", "").a();
                DocumentsPagePresenter.this.b(view);
                FilePreferenceManager.a().setBoolean("show_goto_cloud_page_tips", false);
            }
        });
    }

    public void a(Bitmap bitmap) {
        SimpleDialogBuilder.a(this.p.f68800c).a(1.4645f).a(bitmap).a(IDialogBuilderInterface.ImageStyle.MATCH_MARGIN).b(true).d("文档列表搬家了").e("在「文件」首页上滑即可查看").a((CharSequence) "去看看").c("我知道了").a_(new ViewOnClickListener() {
            @Override
            public void onClick(View view, DialogBase dialogBase) {
                DocumentsPagePresenter.this.t();
                new FileKeyEvent("tips_listchange_forward", DocumentsPagePresenter.this.p.g, DocumentsPagePresenter.this.p.h).a();
                dialogBase.dismiss();
            }
        }).c(new ViewOnClickListener() {
            @Override
            public void onClick(View view, DialogBase dialogBase) {
                new FileKeyEvent("tips_listchange_close", DocumentsPagePresenter.this.p.g, DocumentsPagePresenter.this.p.h).a();
                dialogBase.dismiss();
            }
        }).e();
        new FileKeyEvent("tips_listchange_expose", this.p.g, this.p.h).a();
        FilePreferenceManager.a().setBoolean("KEY_HAS_SHOW_DIALOG_TO_FILE_TAB", true);
    }

    public void t() {
        String str;
        String str2 = this.p.g;
        String str3 = this.p.h;
        String str4 = "";
        if (TextUtils.isEmpty(str3)) {
            str = "";
        } else {
            str = "callerName=" + str3;
        }
        String addParamsToUrl = UrlUtils.addParamsToUrl("qb://tab/file", str);
        if (!TextUtils.isEmpty(str2)) {
            str4 = "callFrom=" + str2;
        }
        this.p.f68798a.b(new UrlParams(UrlUtils.addParamsToUrl(UrlUtils.addParamsToUrl(addParamsToUrl, str4), "showDocBubble=true")));
    }

    @Override
    public void a() {
        this.m.a(this.n.b());
    }

    @Override
    public void onHolderItemViewClick(View view, AbsItemDataHolder absItemDataHolder) {
        new FileItemClick(this.p, this, this).a(view, absItemDataHolder, "DOC_FM_ALL");
        new FileKeyEvent("doc_fm_anyclick", this.p.g, this.p.h, "", "DOC_FM_ALL", "", "").a();
    }

    @Override
    public void a(DocFilter docFilter) {
        this.n.a(docFilter);
        this.o.setFilterSelected(DocUtils.a(docFilter, 2));
    }

    @Override
    public void a(ArrayList<AbsItemDataHolder> arrayList) {
        super.a(arrayList);
    }

    @Override
    protected boolean b() {
        return true;
    }

    @Override
    public void d_(boolean z) {
        super.d_(z);
        if (z) {
            new FileKeyEvent("doc_fm_anyclick", this.p.g, this.p.h, "", "DOC_FM_ALL", "", "").a();
            new FileKeyEvent("doc_fm_longclick", this.p.g, this.p.h, "", "DOC_FM_ALL", "", "").a();
        }
    }

    @Override
    public void p() {
        super.p();
        if (FilePreferenceManager.a().getBoolean("KEY_HAS_SHOW_DIALOG_TO_FILE_TAB", false)) {
            return;
        }
        ImageHub.a().a("https://m4.publicimg.browser.qq.com/publicimg/nav/file/localdoc_to_filetab_v2.png", new ImageRequestCallBack() {
            @Override
            public void onRequestFailure(ImageRequester imageRequester, Throwable th) {
                DocumentsPagePresenter.this.a((Bitmap) null);
            }

            @Override
            public void onRequestSuccess(ImageRequester imageRequester, CImage cImage) {
                if (cImage != null) {
                    DocumentsPagePresenter.this.a(cImage.b());
                }
            }
        });
    }

    @Override
    public void s() {
        new FileKeyEvent("qdoc_filter_clk", this.p.g, this.p.h, "", "DOC_FM_ALL", "", DocUtils.g().a()).a();
        DocFilterDialog docFilterDialog = new DocFilterDialog(this.p, this.n.r(), this);
        docFilterDialog.a("DOC_FM_ALL");
        docFilterDialog.show();
        new FileKeyEvent("doc_fm_anyclick", this.p.g, this.p.h, "", "DOC_FM_ALL", "", "").a();
    }
}