QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 JunkInstallHeaderOldView.java 源代码,内容仅作参考
package com.tencent.mtt.fileclean.install;
import android.animation.Animator;
import android.content.Context;
import android.graphics.Bitmap;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
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.mtt.base.skin.MttResources;
import com.tencent.mtt.fileclean.JunkConsts;
import com.tencent.mtt.fileclean.install.JunkInstallHeaderBaseView;
import com.tencent.mtt.fileclean.utils.JunkFileUtils;
import com.tencent.mtt.fileclean.utils.LottieAnimHelper;
import com.tencent.mtt.lottie.LottieAnimationView;
import com.tencent.mtt.setting.PublicSettingManager;
import com.tencent.mtt.view.common.QBImageView;
import com.tencent.mtt.view.common.QBTextView;
import com.tencent.mtt.view.common.QBView;
import com.tencent.mtt.view.layout.QBLinearLayout;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import java.io.File;
import java.util.Random;
public class JunkInstallHeaderOldView extends JunkInstallHeaderBaseView {
public static final int h = MttResources.s(200);
LottieAnimationView f65800a;
QBImageView f65801b;
RollingNumberTextView f65802c;
QBTextView f65803d;
JunkInstallHeaderBaseView.InstallFinishListener e;
QBLinearLayout f;
boolean g;
public JunkInstallHeaderOldView(Context context) {
super(context);
c();
}
private void c() {
setBgColor(JunkConsts.l);
this.f65800a = new LottieAnimationView(this.i);
this.f65800a.loop(false);
ViewGroup.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
addView(this.f65800a, layoutParams);
this.f65801b = new QBImageView(this.i);
this.f65801b.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
this.f65801b.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
addView(this.f65801b, layoutParams);
this.f65800a.addAnimatorListener(new Animator.AnimatorListener() {
@Override
public void onAnimationCancel(Animator animator) {
}
@Override
public void onAnimationEnd(Animator animator) {
JunkInstallHeaderOldView.this.d();
}
@Override
public void onAnimationRepeat(Animator animator) {
}
@Override
public void onAnimationStart(Animator animator) {
}
});
this.f = new QBLinearLayout(this.i);
this.f.setOrientation(0);
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(-2, -2);
layoutParams2.topMargin = MttResources.s(75);
layoutParams2.addRule(14);
this.f.setVisibility(8);
addView(this.f, layoutParams2);
this.f65802c = new RollingNumberTextView(this.i);
this.f65802c.setTextSize(MttResources.s(48));
this.f65802c.setTextHeight(MttResources.s(72));
this.f65802c.setTextColor(-263173);
this.f.addView(this.f65802c, new LinearLayout.LayoutParams(-2, -2));
this.f65803d = new QBTextView(this.i);
this.f65803d.setTextSize(MttResources.s(20));
this.f65803d.setText("MB");
this.f65803d.setTextColor(-263173);
this.f65803d.setAlpha(0.6f);
LinearLayout.LayoutParams layoutParams3 = new LinearLayout.LayoutParams(-2, -2);
layoutParams3.leftMargin = MttResources.s(4);
layoutParams3.topMargin = MttResources.s(40);
this.f.addView(this.f65803d, layoutParams3);
QBLinearLayout qBLinearLayout = new QBLinearLayout(this.i);
RelativeLayout.LayoutParams layoutParams4 = new RelativeLayout.LayoutParams(-1, MttResources.s(36));
layoutParams4.setMargins(MttResources.s(16), 0, MttResources.s(16), MttResources.s(14));
layoutParams4.addRule(12);
addView(qBLinearLayout, layoutParams4);
QBView qBView = new QBView(this.i);
LinearLayout.LayoutParams layoutParams5 = new LinearLayout.LayoutParams(-1, -1);
layoutParams5.weight = 1.0f;
qBView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
EventCollector.getInstance().onViewClickedBefore(view);
if (JunkInstallHeaderOldView.this.e != null) {
JunkInstallHeaderOldView.this.e.e();
}
EventCollector.getInstance().onViewClicked(view);
}
});
qBLinearLayout.addView(qBView, layoutParams5);
QBView qBView2 = new QBView(this.i);
LinearLayout.LayoutParams layoutParams6 = new LinearLayout.LayoutParams(-1, -1);
layoutParams6.weight = 1.0f;
qBView2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
EventCollector.getInstance().onViewClickedBefore(view);
if (JunkInstallHeaderOldView.this.e != null) {
JunkInstallHeaderOldView.this.e.f();
}
EventCollector.getInstance().onViewClicked(view);
}
});
qBLinearLayout.addView(qBView2, layoutParams6);
}
public void d() {
long j = PublicSettingManager.a().getLong("key_last_scan_done_size", 0L);
if (((float) j) < 1.048576E8f) {
j = (new Random().nextInt(200) * 1048576.0f) + 1.048576E8f;
}
String b2 = JunkFileUtils.b(j);
String c2 = JunkFileUtils.c(j);
this.f.setVisibility(0);
this.f65802c.setNumber(b2);
this.f65803d.setText(c2);
}
@Override
public void a() {
if (this.g) {
return;
}
if (LottieAnimHelper.a().a("file_apk_install_finish_anim_new")) {
String b2 = LottieAnimHelper.a().b("file_apk_install_finish_anim_new");
LottieAnimHelper.a().a(this.f65800a, b2 + File.separator + "junk_install_clean_new.json");
} else {
ImageHub.a().a("https://static.res.qq.com/nav/file/apk_install_default_animation.png", new ImageRequestCallBack() {
@Override
public void onRequestFailure(ImageRequester imageRequester, Throwable th) {
}
@Override
public void onRequestSuccess(ImageRequester imageRequester, CImage cImage) {
Bitmap b3;
if (cImage == null || (b3 = cImage.b()) == null) {
return;
}
JunkInstallHeaderOldView.this.f65801b.setImageBitmap(b3);
JunkInstallHeaderOldView.this.d();
}
});
}
this.g = true;
this.f65800a.playAnimation();
}
@Override
public void setListener(JunkInstallHeaderBaseView.InstallFinishListener installFinishListener) {
this.e = installFinishListener;
}
}