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

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


package com.tencent.mtt.file.secretspace.crypto.ui;

import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.view.View;
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.task.QBTask;
import com.tencent.mtt.base.functionwindow.ActivityHandler;
import com.tencent.mtt.base.stat.StatManager;
import com.tencent.mtt.browser.file.facade.IFileManager;
import com.tencent.mtt.browser.window.UrlParams;
import com.tencent.mtt.businesscenter.facade.IFrameworkDelegate;
import com.tencent.mtt.file.page.statistics.FileKeyEvent;
import com.tencent.mtt.file.pagecommon.utils.FileDialogStyleExp;
import com.tencent.mtt.file.secretspace.SecretConst;
import com.tencent.mtt.fileclean.utils.LottieAnimHelper;
import com.tencent.mtt.qbcontext.core.QBContext;
import com.tencent.mtt.setting.PublicSettingManager;
import com.tencent.mtt.view.dialog.alert.NewQBAlertDialogBuilder;
import com.tencent.mtt.view.dialog.alert.QBAlertDialog;
import com.tencent.mtt.view.dialog.newui.DialogABTestHelper;
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 com.tencent.mtt.view.toast.NotificationBar;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import java.util.concurrent.Callable;

public class FileCryptSuccessTipsHelper {

    private IFileManager.ICryptListener f64526a;

    public FileCryptSuccessTipsHelper() {
        this.f64526a = null;
    }

    private FileCryptSuccessTipsHelper(IFileManager.ICryptListener iCryptListener) {
        this.f64526a = null;
        this.f64526a = iCryptListener;
    }

    public static void a(final IFileManager.ICryptListener iCryptListener) {
        QBTask.b((Callable) new Callable<Object>() {
            @Override
            public Object call() {
                new FileCryptSuccessTipsHelper(IFileManager.ICryptListener.this).b();
                return null;
            }
        });
    }

    public void b() {
        if (!PublicSettingManager.a().getBoolean("has_showed_first_encrypt_success_dialog", false)) {
            a();
            LottieAnimHelper.a().k();
        } else if (!LottieAnimHelper.a().a("file_secret_space_encrypt_success_9.6") && SecretConst.f64436b) {
            LottieAnimHelper.a().k();
            d();
        } else {
            if (ActivityHandler.b().a() == null) {
                return;
            }
            new FileCryptSuccessTipsView(ActivityHandler.b().a(), this.f64526a).a();
            new FileKeyEvent("SECRET_0024", "", "", "SECRET", "SE", "", "").b();
        }
    }

    public void b(Drawable drawable) {
        if (DialogABTestHelper.a()) {
            c(drawable);
        } else {
            d(drawable);
        }
    }

    private String c() {
        return DialogABTestHelper.a() ? "https://static.res.qq.com/qbt/qb/android/file/secret_guid_10.9.5.png" : "https://res.imtt.qq.com/res_mtt/file/secret_guid_9.6.png";
    }

    private void c(Drawable drawable) {
        SimpleDialogBuilder.a().a(drawable).a(IDialogBuilderInterface.ImageStyle.MATCH_MARGIN).b(true).e("已移入私密空间,可在“文件>右上角更多菜单>私密空间”查看").a((CharSequence) "去看看").c("好的").a_(new ViewOnClickListener() {
            @Override
            public void onClick(View view, DialogBase dialogBase) {
                if (FileCryptSuccessTipsHelper.this.f64526a != null) {
                    FileCryptSuccessTipsHelper.this.f64526a.a();
                }
                FileDialogStyleExp.a(new FileKeyEvent("SECRET_0019", "", "", "SECRET", "SE", "", "")).b();
                StatManager.b().c("BMRB016");
                ((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(new UrlParams("qb://tab/file?showSecretGuide&callFrom=JX_SAVE&entry=true"));
                dialogBase.dismiss();
            }
        }).c(new ViewOnClickListener() {
            @Override
            public void onClick(View view, DialogBase dialogBase) {
                dialogBase.dismiss();
            }
        }).e();
        FileDialogStyleExp.a(new FileKeyEvent("SECRET_0018", "", "", "SECRET", "SE", "", "")).b();
    }

    private void d() {
        NotificationBar notificationBar = new NotificationBar("文件已移入私密空间,", "点击查看", 2000);
        StatManager.b().c("BMRB272");
        notificationBar.a(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                EventCollector.getInstance().onViewClickedBefore(view);
                if (FileCryptSuccessTipsHelper.this.f64526a != null) {
                    FileCryptSuccessTipsHelper.this.f64526a.a();
                }
                ((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(new UrlParams("qb://filesdk/secret"));
                StatManager.b().c("BMRB273");
                new FileKeyEvent("SECRET_0023", "", "", "SECRET", "SE", "", "").b();
                NotificationBar.e();
                EventCollector.getInstance().onViewClicked(view);
            }
        });
        notificationBar.c();
        new FileKeyEvent("SECRET_0022", "", "", "SECRET", "SE", "", "").b();
    }

    private void d(Drawable drawable) {
        NewQBAlertDialogBuilder newQBAlertDialogBuilder = new NewQBAlertDialogBuilder();
        newQBAlertDialogBuilder.b("已移入私密空间,可在“文件>右上角更多菜单>私密空间”查看");
        final QBAlertDialog a2 = newQBAlertDialogBuilder.a(drawable, false).d("好的").a("去看看", 1).a(ActivityHandler.b().a());
        a2.setCanceledOnTouchOutside(true);
        StatManager.b().c("BMRB015");
        a2.h(true);
        a2.a(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                EventCollector.getInstance().onViewClickedBefore(view);
                if (view.getId() == 100) {
                    a2.dismiss();
                    if (FileCryptSuccessTipsHelper.this.f64526a != null) {
                        FileCryptSuccessTipsHelper.this.f64526a.a();
                    }
                    new FileKeyEvent("SECRET_0019", "", "", "SECRET", "SE", "", "").b();
                    StatManager.b().c("BMRB016");
                    ((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(new UrlParams("qb://tab/file?showSecretGuide&callFrom=JX_SAVE&entry=true"));
                }
                EventCollector.getInstance().onViewClicked(view);
            }
        });
        a2.show();
        new FileKeyEvent("SECRET_0018", "", "", "SECRET", "SE", "", "").b();
    }

    public void a() {
        ImageHub.a().a(c(), new ImageRequestCallBack() {
            @Override
            public void onRequestFailure(ImageRequester imageRequester, Throwable th) {
                FileCryptSuccessTipsHelper.this.a((Drawable) null);
            }

            @Override
            public void onRequestSuccess(ImageRequester imageRequester, CImage cImage) {
                if (cImage != null) {
                    Bitmap b2 = cImage.b();
                    if (b2 != null) {
                        FileCryptSuccessTipsHelper.this.a(new BitmapDrawable(b2));
                    } else {
                        FileCryptSuccessTipsHelper.this.a((Drawable) null);
                    }
                }
            }
        });
        PublicSettingManager.a().setBoolean("has_showed_first_encrypt_success_dialog", true);
    }

    void a(final Drawable drawable) {
        QBTask.b((Callable) new Callable<Object>() {
            @Override
            public Object call() {
                if (ActivityHandler.b().a() == null) {
                    return null;
                }
                FileCryptSuccessTipsHelper.this.b(drawable);
                return null;
            }
        });
    }
}