TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c
以下内容为反编译后的 Leba.java 源代码,内容仅作参考
package com.tencent.mobileqq.activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Rect;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.widget.ImageView;
import android.widget.ListAdapter;
import android.widget.TextView;
import com.tencent.biz.qrcode.activity.QRDisplayActivity;
import com.tencent.common.config.AppSetting;
import com.tencent.lottieNew.LottieAnimationView;
import com.tencent.mobileqq.activity.ProfileActivity;
import com.tencent.mobileqq.activity.main.CommonLoadingView;
import com.tencent.mobileqq.app.CardHandler;
import com.tencent.mobileqq.app.CardObserver;
import com.tencent.mobileqq.app.Frame;
import com.tencent.mobileqq.app.FrameHelperActivity;
import com.tencent.mobileqq.app.IphoneTitleBarActivity;
import com.tencent.mobileqq.app.LebaHelper;
import com.tencent.mobileqq.app.ThreadExcutor;
import com.tencent.mobileqq.app.ThreadManager;
import com.tencent.mobileqq.config.struct.LebaViewItem;
import com.tencent.mobileqq.fpsreport.FPSXListView;
import com.tencent.mobileqq.grayversion.ShareAppLogActivity;
import com.tencent.mobileqq.mvp.me.MeContract;
import com.tencent.mobileqq.mvp.me.MePresenter;
import com.tencent.mobileqq.mvp.reddot.MeRedDotPresenter;
import com.tencent.mobileqq.mvp.reddot.RedDotContract;
import com.tencent.mobileqq.reddot.RemindInfo;
import com.tencent.mobileqq.service.report.ReportConstants;
import com.tencent.mobileqq.statistics.ReportUtils;
import com.tencent.mobileqq.troop.widget.RedDotImageView;
import com.tencent.mobileqq.utils.ImageUtil;
import com.tencent.mobileqq.utils.PerformanceReportUtils;
import com.tencent.mobileqq.widget.QQToast;
import com.tencent.qphone.base.util.QLog;
import com.tencent.tim.R;
import com.tencent.widget.immersive.ImmersiveUtils;
import cooperation.dingdong.DingdongPluginHelper;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import mqq.os.MqqHandler;
public class Leba extends Frame implements View.OnClickListener, ViewStub.OnInflateListener, CommonLoadingView.OnFirstDrawListener, MeContract.View, RedDotContract.View {
public static String f85134a = "https://tim.qq.com/htdocs/vip/index.html?_wv=16777216&_wwv=12&isvip=";
public static final int f85135b = 1688001;
private static final long f10017b = 1000;
private static final String f10018b = "Leba";
private View f10021a;
private ImageView f10022a;
private TextView f10023a;
private LottieAnimationView f10024a;
private TransitionValueHolder f10025a;
private MeListAdapter f10026a;
private FPSXListView f10028a;
public MeContract.Presenter f10029a;
public RedDotContract.Presenter f10030a;
private RedDotImageView f10031a;
private View f10033b;
private ImageView f10034b;
private TextView f10035b;
private LottieAnimationView f10036b;
private boolean f10037b;
private int f85136c;
private View f10038c;
private TextView f10039c;
private LottieAnimationView f10040c;
private int d;
private View f10042d;
private View e;
long f10020a = 0;
int f10019a = 0;
boolean f10032a = true;
private CardObserver f10027a = new kku(this);
private boolean f10041c = true;
@Override
public View a(LayoutInflater layoutInflater) {
this.f10021a = layoutInflater.inflate(R.layout.f56773name_res_0x7f0301ac, (ViewGroup) null);
return this.f10021a;
}
@Override
public void mo2471a() {
super.mo2471a();
n();
this.f17759a.addObserver(this.f10027a);
CardHandler cardHandler = (CardHandler) this.f17759a.getBusinessHandler(2);
if (cardHandler != null) {
cardHandler.e(this.f17759a.getCurrentAccountUin());
}
}
@Override
public boolean mo2473a() {
return this.f10037b;
}
@Override
public void onInflate(ViewStub viewStub, View view) {
p();
mo2472a(true);
}
@Override
public void mo2472a(boolean z) {
super.mo2472a(z);
this.f10029a.a(this.f10037b);
this.f10029a.e();
if (this.f10030a != null) {
this.f10030a.e();
}
q();
this.f10037b = true;
s();
this.f10025a = new TransitionValueHolder();
j();
}
private void j() {
if (this.f10034b != null) {
this.f10034b.setVisibility(4);
}
if (this.f10035b != null) {
this.f10035b.getViewTreeObserver().addOnGlobalLayoutListener(new kks(this));
}
if (this.f10042d != null) {
this.f10042d.getViewTreeObserver().addOnGlobalLayoutListener(new kkt(this));
}
d();
}
public void d() {
ThreadManager.a((Runnable) new kkv(this), (ThreadExcutor.IThreadListener) null, true);
}
@Override
public void e() {
super.e();
}
@Override
public void e(boolean z) {
if (z) {
this.f10030a.mo7143a(8L);
ReportUtils.a(this.f17759a, ReportConstants.o, ReportConstants.P, ReportConstants.S, "0X8007658");
}
}
@Override
public void h() {
super.h();
this.f10037b = false;
if (this.f10026a != null) {
this.f10026a.a(this.f17759a);
this.f10026a.a((List) null);
}
if (this.f10030a != null) {
this.f10030a.a(new ArrayList());
}
mo2472a(true);
}
private void n() {
o();
((ViewStub) a(R.id.f49546name_res_0x7f0909a6)).setOnInflateListener(this);
((CommonLoadingView) a(R.id.f48766name_res_0x7f09069a)).setOnFirstDrawListener(this);
}
private void o() {
View a2 = a(R.id.f48310name_res_0x7f0904d2);
IphoneTitleBarActivity.setLayerType(a2);
this.f10033b = this.f10021a.findViewById(R.id.f47584name_res_0x7f0901fc);
this.f10038c = this.f10021a.findViewById(R.id.f49544name_res_0x7f0909a4);
this.f85136c = mo2471a().getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height);
if (ImmersiveUtils.isSupporImmersive() == 1) {
this.d = ImmersiveUtils.a((Context) mo2471a());
this.f10033b.getLayoutParams().height = this.d + this.f85136c;
a2.getLayoutParams().height = this.d;
}
IphoneTitleBarActivity.setLayerType((ViewGroup) a(R.id.f48290rlCommenTitle));
this.f10023a = (TextView) a(R.id.f48292ivTitleName);
this.f10023a.setText(R.string.f66466name_res_0x7f0a1f86);
this.f10023a.setOnClickListener(this);
this.f10031a = (RedDotImageView) a(R.id.f49237name_res_0x7f090871);
this.f10031a.setOnClickListener(this);
this.f10031a.setReddotXOffsetDp(10);
this.f10031a.setReddotYOffsetDp(10);
}
private void p() {
this.f10028a = (FPSXListView) a(R.id.f49491lebasv);
this.f10028a.setActTAG(PerformanceReportUtils.f33747d);
this.f10028a.setNeedCheckSpringback(true);
this.f10026a = new MeListAdapter(mo2471a(), this.f17759a, new kkx(this));
this.f10042d = this.f10021a.findViewById(R.id.f49548name_res_0x7f0909a8);
if (AppSetting.f7081k) {
this.f10042d.setContentDescription("进入我的资料卡");
}
this.f10022a = (ImageView) this.f10042d.findViewById(R.id.f47988head);
this.f10022a.setOnClickListener(this);
this.f10035b = (TextView) this.f10042d.findViewById(R.id.f47911nickname);
this.f10035b.setTypeface(null, 1);
View inflate = mo2471a().getLayoutInflater().inflate(R.layout.f58280name_res_0x7f03078f, (ViewGroup) null);
this.f10024a = (LottieAnimationView) this.f10042d.findViewById(R.id.f49556name_res_0x7f0909b0);
this.f10024a.d(false);
this.f10024a.setAnimation("LottieTimVipAccount/advanced_account_avatar_circle.json");
this.e = this.f10042d.findViewById(R.id.f49554name_res_0x7f0909ae);
this.e.setOnClickListener(this);
this.f10036b = (LottieAnimationView) this.f10042d.findViewById(R.id.f49555name_res_0x7f0909af);
this.f10036b.d(false);
this.f10036b.setAnimation("LottieTimVipAccount/advanced_account_avatar_background.json");
this.f10040c = (LottieAnimationView) inflate.findViewById(R.id.f56030name_res_0x7f0922fb);
this.f10040c.d(false);
this.f10040c.setAnimation("LottieTimVipUpGradeLevel/upgrade_advanced_account.json");
this.f10040c.setOnClickListener(this);
this.f10039c = (TextView) this.f10042d.findViewById(R.id.f49551name_res_0x7f0909ab);
this.f10034b = (ImageView) this.f10042d.findViewById(R.id.f49550name_res_0x7f0909aa);
this.f10034b.setOnClickListener(this);
this.f10028a.a(inflate);
this.f10028a.setAdapter((ListAdapter) this.f10026a);
}
public boolean m2631d() {
if (this.f10028a == null) {
return false;
}
boolean z = this.f10041c;
if (this.f10041c) {
this.f10041c = false;
this.f10028a.postDelayed(new kky(this), 1000L);
} else if (QLog.isColorLevel()) {
QLog.d("Leba", 2, "clickAction is dismiss,click too frequently.");
}
return z;
}
private void q() {
this.f10020a = 0L;
this.f10019a = 0;
}
private void r() {
a(new Intent(mo2471a(), ShareAppLogActivity.class));
}
@Override
public boolean i_() {
return this.h;
}
public class TransitionValueHolder implements Parcelable {
public static final Parcelable.Creator CREATOR = new kld();
public Rect f85137a;
public String f10043a;
public Rect f85138b;
public Rect f85139c;
public Rect d;
public Rect e;
public TransitionValueHolder() {
this.f85137a = new Rect();
this.f85138b = new Rect();
this.d = new Rect();
this.e = new Rect();
this.f85139c = new Rect();
}
public TransitionValueHolder(Parcel parcel) {
this.f85137a = (Rect) parcel.readParcelable(Rect.class.getClassLoader());
this.f85138b = (Rect) parcel.readParcelable(Rect.class.getClassLoader());
this.f85139c = (Rect) parcel.readParcelable(Rect.class.getClassLoader());
this.d = (Rect) parcel.readParcelable(Rect.class.getClassLoader());
this.e = (Rect) parcel.readParcelable(Rect.class.getClassLoader());
this.f10043a = parcel.readString();
}
@Override
public void writeToParcel(Parcel parcel, int i) {
parcel.writeParcelable(this.f85137a, i);
parcel.writeParcelable(this.f85138b, i);
parcel.writeParcelable(this.d, i);
parcel.writeParcelable(this.f85139c, i);
parcel.writeParcelable(this.e, i);
parcel.writeString(this.f10043a);
}
@Override
public int describeContents() {
return 0;
}
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.f47988head:
ProfileActivity.AllInOne allInOne = new ProfileActivity.AllInOne(this.f17759a.getCurrentAccountUin(), 0);
allInOne.f10533h = this.f17759a.getCurrentNickname();
if (this.f10025a != null) {
ProfileActivity.a(this.f10028a.getContext(), allInOne, this.f10025a);
} else {
ProfileActivity.b(this.f10028a.getContext(), allInOne);
}
this.f10030a.mo7143a(9L);
ReportUtils.a(this.f17759a, ReportConstants.o, ReportConstants.P, ReportConstants.S, "0X8007659");
return;
case R.id.f48292ivTitleName:
if (this.f10019a == 0) {
this.f10020a = System.currentTimeMillis();
} else if (this.f10019a >= 1 && System.currentTimeMillis() - this.f10020a > 1000) {
this.f10020a = System.currentTimeMillis();
this.f10019a = 0;
}
this.f10019a++;
if (this.f10019a == 3 && this.f10032a) {
QQToast.a(mo2471a(), "连续点击5次,可以跳转到发送日志页面。", 0).b(mo2471a().getTitleBarHeight());
}
if (System.currentTimeMillis() - this.f10020a < 1500 && this.f10019a == 5) {
q();
r();
return;
}
return;
case R.id.f49237name_res_0x7f090871:
a(new Intent(mo2471a(), QQSettingSettingActivity.class));
this.f10030a.mo7143a(26L);
ReportUtils.a(this.f17759a, ReportConstants.o, ReportConstants.P, ReportConstants.S, "0X8007662");
return;
case R.id.f49550name_res_0x7f0909aa:
Intent intent = new Intent(mo2471a(), QRDisplayActivity.class);
String currentAccountUin = this.f17759a.getCurrentAccountUin();
intent.putExtra("title", mo2471a().getString(R.string.f60640name_res_0x7f0a08bc));
intent.putExtra("nick", this.f10035b.getText());
intent.putExtra("uin", currentAccountUin);
intent.putExtra("type", 1);
intent.putExtra("reportFlag", 1);
a(intent);
return;
case R.id.f49554name_res_0x7f0909ae:
b(true);
ReportUtils.a(this.f17759a, ReportConstants.o, ReportConstants.u, ReportConstants.v, "0X80087F7");
return;
case R.id.f56030name_res_0x7f0922fb:
b(false);
ReportUtils.a(this.f17759a, ReportConstants.o, ReportConstants.u, ReportConstants.v, "0X80087F4");
return;
default:
return;
}
}
public void b(boolean z) {
String str;
if (z) {
str = f85134a + "1";
} else {
str = f85134a + "0";
}
Intent intent = new Intent(mo2471a(), QQBrowserActivity.class);
intent.putExtra("uin", this.f17759a.getCurrentAccountUin());
a(intent.putExtra("url", str));
}
@Override
public void L_() {
new MqqHandler().post(new kkz(this));
}
@Override
public void a(String str) {
if (TextUtils.isEmpty(str)) {
if (this.f10022a != null) {
this.f10022a.setImageDrawable(ImageUtil.m9214b());
return;
}
return;
}
String a2 = this.f17759a.a(1, str, (byte) 3, 0);
Bitmap m4616a = this.f17759a.m4616a(a2);
if (m4616a != null) {
b(new kla(this, m4616a));
} else {
ThreadManager.m4810a().post(new klb(this, str));
}
if (QLog.isDevelopLevel()) {
QLog.i("Leba", 4, "updateFace, " + a2 + "," + m4616a);
}
}
@Override
public void b(String str) {
if (this.f10035b != null) {
this.f10035b.setText(str);
}
if (this.f10039c != null) {
this.f10039c.setText(this.f17759a.getCurrentAccountUin());
}
if (AppSetting.f7081k) {
StringBuilder sb = new StringBuilder();
sb.setLength(0);
sb.append(str);
if (this.f10042d != null) {
this.f10042d.setContentDescription(sb.toString());
}
}
}
@Override
public void b(List list) {
if (this.f10026a != null) {
this.f10026a.a(list);
}
if (this.f10030a != null) {
ArrayList arrayList = new ArrayList();
Iterator it = list.iterator();
while (it.hasNext()) {
LebaViewItem lebaViewItem = (LebaViewItem) it.next();
if (lebaViewItem.f21610a != null) {
arrayList.add(Long.valueOf(lebaViewItem.f21610a.uiResId));
}
}
this.f10030a.a(arrayList);
}
}
@Override
public void g() {
super.g();
q();
if (this.f10024a != null) {
this.f10024a.i();
this.f10024a.setVisibility(8);
}
if (this.f10036b != null) {
this.f10036b.i();
this.f10036b.setVisibility(8);
}
if (this.f10040c != null) {
this.f10040c.i();
this.f10040c.setVisibility(8);
}
this.f17759a.removeObserver(this.f10027a);
}
@Override
public void a(List list) {
Iterator it = list.iterator();
boolean z = false;
while (it.hasNext()) {
RemindInfo remindInfo = (RemindInfo) it.next();
if (remindInfo.f26933a == 9) {
if (this.f10035b != null) {
if (remindInfo.f26935a) {
this.f10035b.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.f46712name_res_0x7f021608, 0);
} else {
this.f10035b.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
}
}
} else if (remindInfo.f26933a == 26) {
if (this.f10031a != null) {
this.f10031a.a(remindInfo.f26935a);
}
} else {
z = true;
}
z = z;
}
if (z && this.f10026a != null) {
this.f10026a.notifyDataSetChanged();
}
}
@Override
public List initPresenter() {
this.f10029a = new MePresenter(this.f17759a, this);
this.f10030a = new MeRedDotPresenter(this.f17759a, this, Arrays.asList(9L, 26L));
return Arrays.asList(this.f10029a, this.f10030a);
}
private void s() {
int count = this.f10026a != null ? this.f10026a.getCount() : 0;
for (int i = 0; i < count; i++) {
LebaViewItem lebaViewItem = (LebaViewItem) this.f10026a.getItem(i);
if (lebaViewItem != null && TextUtils.isEmpty(lebaViewItem.f21611b) && lebaViewItem.f21610a != null && LebaHelper.f17996i.equals(lebaViewItem.f21610a.strPkgName)) {
DingdongPluginHelper.a("0X8007E32", 0, 1);
}
}
}
@Override
public boolean mo2474c() {
if (QLog.isColorLevel()) {
QLog.d("Leba", 2, "Leba on key down");
}
if (FrameHelperActivity.d()) {
FrameHelperActivity.r();
return true;
}
return super.mo2474c();
}
}