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

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


package com.tencent.mtt.fileclean.appclean.compress.page.done;

import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.tencent.common.utils.StringUtils;
import com.tencent.connect.common.Constants;
import com.tencent.mtt.R;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.base.stat.StatManager;
import com.tencent.mtt.base.ui.widget.QBWebImageView;
import com.tencent.mtt.browser.setting.manager.SkinManager;
import com.tencent.mtt.browser.window.UrlParams;
import com.tencent.mtt.external.comic.facade.IComicService;
import com.tencent.mtt.file.page.statistics.FileKeyEvent;
import com.tencent.mtt.fileclean.appclean.compress.ImageCompressManager;
import com.tencent.mtt.fileclean.appclean.compress.VideoCompressManager;
import com.tencent.mtt.fileclean.appclean.image.manager.ImageCleanManager;
import com.tencent.mtt.fileclean.controller.JunkRecommendManager;
import com.tencent.mtt.fileclean.page.JunkPageBase;
import com.tencent.mtt.fileclean.page.function.ArrowFunctionItemView;
import com.tencent.mtt.fileclean.page.function.BtnFunctionItemView;
import com.tencent.mtt.fileclean.page.function.FunctionDividerView;
import com.tencent.mtt.fileclean.page.function.FunctionItemDataHolder;
import com.tencent.mtt.fileclean.page.function.FunctionItemManager;
import com.tencent.mtt.fileclean.stat.JunkEventHelper;
import com.tencent.mtt.newskin.SimpleSkinBuilder;
import com.tencent.mtt.nxeasy.page.EasyPageContext;
import com.tencent.mtt.resources.BrowserBusinessBaseRes;
import com.tencent.mtt.setting.PublicSettingManager;
import com.tencent.mtt.view.layout.QBLinearLayout;
import com.tencent.mtt.view.scrollview.QBScrollView;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import com.tencent.qqlive.module.videoreport.dtreport.constants.DTConstants;
import java.util.HashMap;
import java.util.List;
import qb.a.e;
import qb.a.g;

public class MCCompressDonePage extends JunkPageBase {

    int f65252a;

    String f65253b;

    EasyPageContext f65254c;

    private LinearLayout f65255d;

    public MCCompressDonePage(EasyPageContext easyPageContext, String str) {
        super(easyPageContext);
        this.f65254c = easyPageContext;
        this.f65253b = str;
        this.f65252a = e.C;
        setBackgroundNormalIds(0, this.f65252a);
        b();
    }

    private void a(String str) {
        HashMap hashMap = new HashMap();
        hashMap.put("type", str);
        new FileKeyEvent("JUNK_0285").a(hashMap);
    }

    private void b() {
        StringBuilder sb;
        long a2;
        this.l.setBgColor(this.f65252a);
        this.l.setTitle("");
        this.l.setTitleColor(R.color.theme_common_color_a1);
        if (SkinManager.s().o() != 3) {
            this.l.setBackBtn(g.E);
        }
        this.n = new QBScrollView(this.q);
        this.n.setOverScrollMode(2);
        this.k.addView(this.n, new ViewGroup.LayoutParams(-1, -2));
        this.f65255d = new LinearLayout(getContext());
        this.f65255d.setOrientation(1);
        this.n.addView(this.f65255d, new ViewGroup.LayoutParams(-1, -1));
        QBWebImageView qBWebImageView = new QBWebImageView(this.q);
        LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(MttResources.s(110), MttResources.s(110));
        layoutParams.gravity = 1;
        qBWebImageView.setPlaceHolderColorId(R.color.transparent);
        layoutParams.topMargin = MttResources.s(30);
        qBWebImageView.setUrl("https://m4.publicimg.browser.qq.com/publicimg/nav/file/icon_compress_done.png");
        this.f65255d.addView(qBWebImageView, layoutParams);
        TextView textView = new TextView(this.q);
        textView.setText("压缩完成");
        textView.setTextSize(0, MttResources.s(20));
        SimpleSkinBuilder.a(textView).g(R.color.theme_common_color_a1).f();
        LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-2, -2);
        layoutParams2.gravity = 1;
        layoutParams2.topMargin = MttResources.s(24);
        this.f65255d.addView(textView, layoutParams2);
        TextView textView2 = new TextView(this.q);
        if (this.f65253b.equals(DTConstants.TAG.VIDEO)) {
            sb = new StringBuilder();
            sb.append("已压缩");
            a2 = VideoCompressManager.c().a();
        } else {
            sb = new StringBuilder();
            sb.append("已压缩");
            a2 = ImageCompressManager.c().a();
        }
        sb.append(StringUtils.c(a2));
        sb.append("空间, 点击查看 >");
        textView2.setText(sb.toString());
        textView2.setTextSize(0, MttResources.s(14));
        SimpleSkinBuilder.a(textView2).g(R.color.theme_common_color_b9).f();
        LinearLayout.LayoutParams layoutParams3 = new LinearLayout.LayoutParams(-2, -2);
        layoutParams3.gravity = 1;
        layoutParams3.topMargin = MttResources.s(20);
        this.f65255d.addView(textView2, layoutParams3);
        textView2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                EventCollector.getInstance().onViewClickedBefore(view);
                new FileKeyEvent("JUNK_0283").b();
                MCCompressDonePage.this.f65254c.f68798a.a(new UrlParams("qb://filesdk/clean/compress/compressed"));
                EventCollector.getInstance().onViewClicked(view);
            }
        });
        TextView textView3 = new TextView(this.q);
        textView3.setText("继续压缩");
        textView3.setGravity(17);
        textView3.setBackground(MttResources.i(SkinManager.s().l() ? R.drawable.ca : R.drawable.c_));
        textView3.setTextSize(0, MttResources.s(16));
        SimpleSkinBuilder.a(textView3).g(R.color.theme_common_color_a5).f();
        LinearLayout.LayoutParams layoutParams4 = new LinearLayout.LayoutParams(MttResources.s(160), MttResources.s(40));
        layoutParams4.gravity = 1;
        layoutParams4.topMargin = MttResources.s(26);
        layoutParams4.bottomMargin = MttResources.s(30);
        this.f65255d.addView(textView3, layoutParams4);
        textView3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                EventCollector.getInstance().onViewClickedBefore(view);
                new FileKeyEvent("JUNK_0284").b();
                MCCompressDonePage.this.f65254c.f68798a.a();
                EventCollector.getInstance().onViewClicked(view);
            }
        });
        a();
    }

    private void b(String str) {
        UrlParams urlParams = new UrlParams("qb://filesdk/clean/video?from=cross");
        urlParams.d(true);
        this.f65254c.f68798a.a(urlParams);
    }

    private int c(int i) {
        int i2 = 0;
        for (FunctionItemDataHolder functionItemDataHolder : FunctionItemManager.a().f65989a) {
            if (functionItemDataHolder.e == i) {
                break;
            }
            if (functionItemDataHolder.e != 4) {
                i2++;
            }
        }
        return i2;
    }

    private void c() {
        UrlParams urlParams = new UrlParams("qb://filesdk/clean/compress/scan?from=cross");
        urlParams.d(true);
        PublicSettingManager.a().setBoolean("new_tip", false);
        this.y.setShowRedDot(false);
        this.f65254c.f68798a.a(urlParams);
    }

    private void c(String str) {
        StatManager.b().c("BMRB123");
        UrlParams urlParams = new UrlParams("qb://filesdk/clean/accelerate?from=cross");
        urlParams.d(true);
        this.f65254c.f68798a.a(urlParams);
    }

    private void d(String str) {
        StatManager.b().c("BMRB277");
        new FileKeyEvent("JUNK_0011", this.f65254c.g, this.f65254c.h, "JUNK_FINISH", "JK", "", str).b();
        UrlParams urlParams = new UrlParams("qb://filesdk/clean/scan?from=cross");
        urlParams.d(true);
        this.f65254c.f68798a.a(urlParams);
    }

    private void e() {
        StatManager.b().c("BMRB047");
        l();
    }

    private void f() {
        StatManager.b().c("BMRB054");
        a(false);
    }

    private void p() {
        UrlParams urlParams = new UrlParams("qb://filesdk/clean/bigfile?from=cross");
        urlParams.d(true);
        this.f65254c.f68798a.a(urlParams);
    }

    private void q() {
        StatManager.b().c("BMRB121");
        UrlParams urlParams = new UrlParams("qb://filesdk/clean/qb?from=cross");
        urlParams.d(true);
        this.f65254c.f68798a.a(urlParams);
    }

    private void r() {
        StatManager.b().c("BMRB044");
        UrlParams urlParams = new UrlParams("qb://filesdk/clean/qq?from=cross");
        urlParams.d(true);
        this.f65254c.f68798a.a(urlParams);
    }

    private void s() {
        StatManager.b().c("BMRB041");
        if (JunkRecommendManager.a().c()) {
            this.D = true;
            JunkRecommendManager.a().a(this.f65254c);
        } else {
            UrlParams urlParams = new UrlParams("qb://filesdk/clean/wx?from=cross");
            urlParams.d(true);
            this.f65254c.f68798a.a(urlParams);
        }
    }

    private void setCardBg(QBLinearLayout qBLinearLayout) {
        qBLinearLayout.setBackgroundNormalIds((SkinManager.s().o() == 3 || SkinManager.s().o() == 2) ? BrowserBusinessBaseRes.m : SkinManager.s().l() ? BrowserBusinessBaseRes.s : BrowserBusinessBaseRes.t, 0);
    }

    public void a() {
        QBLinearLayout qBLinearLayout = new QBLinearLayout(this.q);
        qBLinearLayout.setOrientation(1);
        ViewGroup.MarginLayoutParams marginLayoutParams = new ViewGroup.MarginLayoutParams(-1, -2);
        marginLayoutParams.setMargins(MttResources.s(5), 0, MttResources.s(5), 0);
        setCardBg(qBLinearLayout);
        this.f65255d.addView(qBLinearLayout, marginLayoutParams);
        FunctionItemManager.a().c(-1);
        List<FunctionItemDataHolder> list = FunctionItemManager.a().e;
        int i = 0;
        for (FunctionItemDataHolder functionItemDataHolder : list) {
            i++;
            ArrowFunctionItemView arrowFunctionItemView = i == list.size() ? new ArrowFunctionItemView(this.q, true, false) : new ArrowFunctionItemView(this.q, true, true);
            arrowFunctionItemView.setListener(this);
            arrowFunctionItemView.a(functionItemDataHolder);
            qBLinearLayout.addView(arrowFunctionItemView);
            if (functionItemDataHolder.e == 5) {
                this.x = arrowFunctionItemView;
            } else if (functionItemDataHolder.e == 1) {
                this.r = arrowFunctionItemView;
            } else if (functionItemDataHolder.e == 2) {
                this.t = arrowFunctionItemView;
            } else if (functionItemDataHolder.e == 6) {
                this.s = arrowFunctionItemView;
            } else if (functionItemDataHolder.e == 7) {
                this.u = arrowFunctionItemView;
            } else if (functionItemDataHolder.e == 8) {
                this.v = arrowFunctionItemView;
            } else if (functionItemDataHolder.e == 9) {
                this.w = arrowFunctionItemView;
            } else if (functionItemDataHolder.e == 10) {
                this.y = arrowFunctionItemView;
            } else if (functionItemDataHolder.e == 11) {
                this.z = arrowFunctionItemView;
            }
        }
        FunctionItemManager.a().c();
        List<FunctionItemDataHolder> list2 = FunctionItemManager.a().f65990b;
        if (list2.isEmpty()) {
            return;
        }
        a(list2);
    }

    @Override
    public void a(int i) {
        String a2 = JunkEventHelper.a(JunkEventHelper.b(), IComicService.SCROLL_TO_PAGE_INDEX, String.valueOf(c(i)));
        switch (i) {
            case 1:
                a(Constants.VIA_SHARE_TYPE_INFO);
                s();
                return;
            case 2:
                a("7");
                r();
                return;
            case 3:
                e();
                return;
            case 4:
                f();
                return;
            case 5:
                a("1");
                d(a2);
                return;
            case 6:
                a("3");
                q();
                return;
            case 7:
                a("2");
                c(a2);
                return;
            case 8:
                a("8");
                b(a2);
                return;
            case 9:
                a("5");
                p();
                return;
            case 10:
                a("4");
                c();
                return;
            case 11:
                ImageCleanManager.getInstance().gotoImageCleanPage();
                return;
            default:
                return;
        }
    }

    public void a(List<FunctionItemDataHolder> list) {
        QBLinearLayout qBLinearLayout = new QBLinearLayout(this.q);
        qBLinearLayout.setOrientation(1);
        ViewGroup.MarginLayoutParams marginLayoutParams = new ViewGroup.MarginLayoutParams(-1, -2);
        marginLayoutParams.setMargins(MttResources.s(5), 0, MttResources.s(5), 0);
        setCardBg(qBLinearLayout);
        this.f65255d.addView(qBLinearLayout, marginLayoutParams);
        qBLinearLayout.addView(new FunctionDividerView(this.q, "更多服务", false, true), new ViewGroup.LayoutParams(-1, -2));
        int i = 0;
        for (FunctionItemDataHolder functionItemDataHolder : list) {
            i++;
            BtnFunctionItemView btnFunctionItemView = i == list.size() ? new BtnFunctionItemView(this.q, true, false) : new BtnFunctionItemView(this.q, true, true);
            btnFunctionItemView.setListener(this);
            btnFunctionItemView.a(functionItemDataHolder);
            qBLinearLayout.addView(btnFunctionItemView);
            if (functionItemDataHolder.e != 3) {
                int i2 = functionItemDataHolder.e;
            }
        }
    }
}