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

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


package com.tencent.mtt.fileclean.headsup;

import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
import com.tencent.mtt.ContextHolder;
import com.tencent.mtt.R;
import com.tencent.mtt.base.stat.StatManager;

public class FileHeadsUpPresenter {

    private FileHeadsUpViewInterface f65724a;

    private FileHeadsCleanUpModel f65725b;

    public FileHeadsUpPresenter(FileHeadsCleanUpModel fileHeadsCleanUpModel, FileHeadsUpViewInterface fileHeadsUpViewInterface) {
        this.f65724a = null;
        this.f65725b = null;
        this.f65724a = fileHeadsUpViewInterface;
        this.f65725b = fileHeadsCleanUpModel;
    }

    private SpannableString a(String str, String str2) {
        try {
            SpannableString spannableString = new SpannableString(str2);
            spannableString.setSpan(new ForegroundColorSpan(ContextHolder.getAppContext().getResources().getColor(R.color.rj)), str2.indexOf(str), str2.indexOf(str) + str.length(), 34);
            return spannableString;
        } catch (Exception unused) {
            return null;
        }
    }

    private HeadsUpShowBean a(float f) {
        HeadsUpShowBean headsUpShowBean = new HeadsUpShowBean();
        headsUpShowBean.e = "mttbrowser://url=qb://filesdk/clean/scan?callFrom=headsup_junk&entry=true,loginType=,ChannelID=TBS-Headsup,PosID=66112";
        headsUpShowBean.f65734a = "https://rmpad.imtt.qq.com/rmpreal/RMP_1600168542272.png";
        headsUpShowBean.f65736c = R.drawable.l2;
        headsUpShowBean.f65737d = "释放空间";
        float f2 = f * 100.0f;
        String str = (f2 >= 1.0f ? (int) f2 : 1) + "%";
        String str2 = "手机空间不足 " + str + ",将影响手机使用";
        SpannableString a2 = a(str, str2);
        if (a2 == null) {
            a2 = new SpannableString(str2);
        }
        headsUpShowBean.f65735b = a2;
        return headsUpShowBean;
    }

    private HeadsUpShowBean b(float f) {
        HeadsUpShowBean headsUpShowBean = new HeadsUpShowBean();
        headsUpShowBean.e = "mttbrowser://url=qb://filesdk/clean/wx?callFrom=headsup_junk&entry=true,loginType=,ChannelID=TBS-Headsup,PosID=66113";
        headsUpShowBean.f65734a = "https://rmpad.imtt.qq.com/rmpreal/RMP_1600168542272.png";
        headsUpShowBean.f65736c = R.drawable.l3;
        headsUpShowBean.f65737d = "微信专清";
        String str = ((int) f) + "GB";
        String str2 = "微信空间占用达到 " + str + ",急需清理";
        SpannableString a2 = a(str, str2);
        if (a2 == null) {
            a2 = new SpannableString(str2);
        }
        headsUpShowBean.f65735b = a2;
        return headsUpShowBean;
    }

    private HeadsUpShowBean c(float f) {
        HeadsUpShowBean headsUpShowBean = new HeadsUpShowBean();
        headsUpShowBean.e = "mttbrowser://url=qb://filesdk/clean/qq?callFrom=headsup_junk&entry=true,loginType=,ChannelID=TBS-Headsup,PosID=66114";
        headsUpShowBean.f65734a = "https://rmpad.imtt.qq.com/rmpreal/RMP_1600168542272.png";
        headsUpShowBean.f65736c = R.drawable.l2;
        headsUpShowBean.f65737d = "QQ专清";
        String str = ((int) f) + "GB";
        String str2 = "QQ空间占用达到 " + str + ",急需清理";
        SpannableString a2 = a(str, str2);
        if (a2 == null) {
            a2 = new SpannableString(str2);
        }
        headsUpShowBean.f65735b = a2;
        return headsUpShowBean;
    }

    private HeadsUpShowBean d(float f) {
        HeadsUpShowBean headsUpShowBean = new HeadsUpShowBean();
        headsUpShowBean.e = "mttbrowser://url=qb://filesdk/clean/accelerate?callFrom=headsup_junk&entry=true,loginType=,ChannelID=TBS-Headsup,PosID=66115";
        headsUpShowBean.f65734a = "https://rmpad.imtt.qq.com/rmpreal/RMP_1600168573407.png";
        headsUpShowBean.f65736c = R.drawable.l2;
        headsUpShowBean.f65737d = "一键加速";
        String str = ((int) (f * 100.0f)) + "%";
        String str2 = "内存占用达到 " + str + ",手机将卡慢";
        SpannableString a2 = a(str, str2);
        if (a2 == null) {
            a2 = new SpannableString(str2);
        }
        headsUpShowBean.f65735b = a2;
        return headsUpShowBean;
    }

    private HeadsUpShowBean e(float f) {
        String str;
        HeadsUpShowBean headsUpShowBean = new HeadsUpShowBean();
        headsUpShowBean.e = "mttbrowser://url=qb://filesdk/clean/scan?callFrom=headsup_junk&entry=true,loginType=,ChannelID=TBS-Headsup,PosID=66112";
        headsUpShowBean.f65734a = "https://rmpad.imtt.qq.com/rmpreal/RMP_1600168542272.png";
        headsUpShowBean.f65736c = R.drawable.l2;
        headsUpShowBean.f65737d = "立即清理";
        if (f > 1.07374182E9f) {
            str = ((int) (f / 1.07374182E9f)) + "GB";
        } else {
            str = ((int) (f / 1048576.0f)) + "MB";
        }
        String str2 = "垃圾达到 " + str + ",将拖慢手机速度";
        SpannableString a2 = a(str, str2);
        if (a2 == null) {
            a2 = new SpannableString(str2);
        }
        headsUpShowBean.f65735b = a2;
        return headsUpShowBean;
    }

    public int a() {
        FileHeadsCleanUpModel fileHeadsCleanUpModel;
        if (this.f65724a == null || (fileHeadsCleanUpModel = this.f65725b) == null) {
            return 0;
        }
        if (fileHeadsCleanUpModel.f65720a > 0.0f) {
            StatManager.b().c("BZHeadsupFunc001_1");
            this.f65724a.a(a(this.f65725b.f65720a));
            return 1;
        }
        if (this.f65725b.f65721b > 0.0f) {
            StatManager.b().c("BZHeadsupFunc001_2");
            this.f65724a.a(d(this.f65725b.f65721b));
            return 2;
        }
        if (this.f65725b.e > 0.0f) {
            StatManager.b().c("BZHeadsupFunc001_3");
            this.f65724a.a(b(this.f65725b.e));
            return 3;
        }
        if (this.f65725b.f65723d > 0.0f) {
            StatManager.b().c("BZHeadsupFunc001_4");
            this.f65724a.a(c(this.f65725b.f65723d));
            return 4;
        }
        StatManager.b().c("BZHeadsupFunc001_5");
        this.f65724a.a(e(this.f65725b.f65722c));
        return 5;
    }
}