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

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


package com.tencent.mtt.external.pagetoolbox.saveofflinewebpage;

import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.View;
import com.tencent.common.utils.UrlUtils;
import com.tencent.mtt.R;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.base.stat.StatManager;
import com.tencent.mtt.browser.window.UrlParams;
import com.tencent.mtt.businesscenter.facade.IFrameworkDelegate;
import com.tencent.mtt.qbcontext.core.QBContext;
import com.tencent.mtt.view.dialog.alert.NewQBAlertDialogBuilder;
import com.tencent.mtt.view.dialog.alert.QBAlertDialog;
import com.tencent.mtt.view.dialog.newui.SimpleDialogBuilder;
import com.tencent.mtt.view.dialog.newui.builder.api.ICommonDialogBuilder;
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 com.tencent.mtt.view.toast.MttToaster;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import java.util.HashMap;
import qb.a.h;

public class OfflineWebPageNotifyCenter {

    public static boolean f56258a = false;

    public static int f56259b = -1;

    private static int f56260c;

    private static Handler f56261d = new Handler() {
        @Override
        public void handleMessage(final Message message) {
            Handler handler;
            Runnable runnable;
            if (message.what == OfflineWebPageNotifyCenter.f56260c) {
                OfflineWebPageNotifyCenter.f56258a = false;
                int i = OfflineWebPageNotifyCenter.f56259b;
                if (i == 0) {
                    handler = OfflineWebPageNotifyCenter.f56261d;
                    runnable = new Runnable() {
                        @Override
                        public void run() {
                            OfflineWebPageNotifyCenter.a(message.arg1, (String) null);
                        }
                    };
                } else {
                    if (i != 1) {
                        if (i == 2) {
                            handler = OfflineWebPageNotifyCenter.f56261d;
                            runnable = new Runnable() {
                                @Override
                                public void run() {
                                    OfflineWebPageNotifyCenter.b(message.arg1);
                                }
                            };
                        }
                        OfflineWebPageNotifyCenter.f56259b = -1;
                    }
                    handler = OfflineWebPageNotifyCenter.f56261d;
                    runnable = new Runnable() {
                        @Override
                        public void run() {
                            OfflineWebPageNotifyCenter.a(message.arg1);
                        }
                    };
                }
                handler.postDelayed(runnable, 1000L);
                OfflineWebPageNotifyCenter.f56259b = -1;
            }
        }
    };

    public static void a(final int i) {
        NewQBAlertDialogBuilder newQBAlertDialogBuilder = new NewQBAlertDialogBuilder();
        newQBAlertDialogBuilder.b(MttResources.l(R.string.b9_));
        newQBAlertDialogBuilder.a(MttResources.l(R.string.b96), 1);
        newQBAlertDialogBuilder.b(MttResources.l(R.string.b97), 3);
        newQBAlertDialogBuilder.a(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                EventCollector.getInstance().onViewClickedBefore(view);
                if (view.getId() == 100) {
                    OfflineWebPageNotifyCenter.e(i);
                }
                EventCollector.getInstance().onViewClicked(view);
            }
        });
        QBAlertDialog a2 = newQBAlertDialogBuilder.a();
        if (a2 != null) {
            a2.show();
        }
    }

    public static void a(final int i, final String str) {
        ICommonDialogBuilder a2 = SimpleDialogBuilder.a();
        a2.a(IDialogBuilderInterface.ImageStyle.MATCH_MARGIN).a("https://static.res.qq.com/nav/toolbox/save_offline_web_notify.png").d("离线网页已保存").e("可在“文件>离线网页”查看").a(IDialogBuilderInterface.ButtonOrientation.VERTICAL).a((CharSequence) "去看看").c("好的");
        a2.a_(new ViewOnClickListener() {
            @Override
            public void onClick(View view, DialogBase dialogBase) {
                OfflineWebPageNotifyCenter.e(i);
                OfflineWebPageNotifyCenter.b(str, "SavemodulePopup_Gotosee_Click");
                dialogBase.dismiss();
            }
        });
        a2.c(new ViewOnClickListener() {
            @Override
            public void onClick(View view, DialogBase dialogBase) {
                OfflineWebPageNotifyCenter.b(str, "SavemodulePopup_OkFine_Click");
                dialogBase.dismiss();
            }
        });
        a2.e();
    }

    public static void b(int i) {
        MttToaster.show(MttResources.l(h.L), 3000);
    }

    public static void b(String str, String str2) {
        if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
            return;
        }
        HashMap hashMap = new HashMap();
        hashMap.put("domain", UrlUtils.getHost(str));
        hashMap.put("FileType", "OfflinePage");
        StatManager.b().b(str2, hashMap);
    }

    public static void c(int i) {
        MttToaster.show(R.string.b98, 3000);
        f56258a = true;
        Message obtainMessage = f56261d.obtainMessage(f56260c);
        obtainMessage.arg1 = i;
        f56261d.sendMessageDelayed(obtainMessage, 3000L);
    }

    public static void e(int i) {
        StatManager b2;
        String str;
        ((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(new UrlParams("qb://filesdk/webpagelist?callFrom=SV_WEB&entry=true&guid=true").d(true));
        if (i == 0) {
            b2 = StatManager.b();
            str = "PAGESAVE5";
        } else {
            if (i != 1) {
                return;
            }
            b2 = StatManager.b();
            str = "N398";
        }
        b2.c(str);
    }
}