TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c
以下内容为反编译后的 BannerManager.java 源代码,内容仅作参考
package com.tencent.mobileqq.activity.recent;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.Html;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.tencent.av.gaudio.AVNotifyCenter;
import com.tencent.av.smallscreen.SmallScreenUtils;
import com.tencent.av.utils.UITools;
import com.tencent.biz.qrcode.activity.QRLoginActivity;
import com.tencent.common.config.AppSetting;
import com.tencent.kingkong.Constant;
import com.tencent.mobileqq.app.AppConstants;
import com.tencent.mobileqq.app.BaseActivity;
import com.tencent.mobileqq.app.ConfigHandler;
import com.tencent.mobileqq.app.PhoneContactManagerImp;
import com.tencent.mobileqq.app.PhoneUnityBannerData;
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.app.ThreadManager;
import com.tencent.mobileqq.app.automator.StepFactory;
import com.tencent.mobileqq.app.upgrade.UpgradeController;
import com.tencent.mobileqq.app.upgrade.UpgradeDetailWrapper;
import com.tencent.mobileqq.ark.ArkTipsManager;
import com.tencent.mobileqq.config.Config;
import com.tencent.mobileqq.config.ConfigManager;
import com.tencent.mobileqq.data.RecentUser;
import com.tencent.mobileqq.filemanager.fileviewer.FileViewMusicService;
import com.tencent.mobileqq.managers.TroopAssistantManager;
import com.tencent.mobileqq.model.PhoneContactManager;
import com.tencent.mobileqq.music.QQPlayerService;
import com.tencent.mobileqq.music.SongInfo;
import com.tencent.mobileqq.qcall.QCallFacade;
import com.tencent.mobileqq.service.report.ReportConstants;
import com.tencent.mobileqq.statistics.ReportController;
import com.tencent.mobileqq.statistics.ReportUtils;
import com.tencent.mobileqq.struct.PushBanner;
import com.tencent.mobileqq.troop.utils.TroopBarUtils;
import com.tencent.mobileqq.util.CommonUtil;
import com.tencent.mobileqq.util.TroopReportor;
import com.tencent.mobileqq.utils.CustomHandler;
import com.tencent.mobileqq.utils.ImageUtil;
import com.tencent.mobileqq.utils.JumpParser;
import com.tencent.mobileqq.widget.ADView;
import com.tencent.mobileqq.widget.TipsBar;
import com.tencent.qphone.base.util.QLog;
import com.tencent.tim.R;
import com.tencent.widget.AbsListView;
import com.tencent.widget.XListView;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
import mqq.os.MqqHandler;
public class BannerManager implements Handler.Callback {
public static final int A = 21;
public static final int B = 22;
public static final int C = 23;
public static final int D = 23;
public static final int E = 24;
public static final int F = 24;
public static final int G = 25;
public static final int H = 26;
public static final int I = 26;
public static final int J = 26;
public static final int K = 4;
public static final int L = 0;
public static final int M = 2;
public static final int N = 3;
public static final int O = 1;
public static final int P = 900000;
public static final int R = 0;
public static final int S = 1;
public static final int T = 4;
public static final int U = 6;
public static final int V = 7;
public static final int W = 10;
public static final int X = 12;
private static final int Y = 11;
private static final int Z = 13;
public static final int f86498a = 1;
public static final String f15133a = "0X8004028";
public static final boolean f15134a = AppSetting.f7081k;
private static final int aa = 14;
private static final int ab = 15;
private static final int ac = 101;
public static final int f86499b = 1;
public static final String f15135b = "0X8004029";
public static final int f86500c = 1;
public static final String f15136c = "Q.recent.banner";
public static final int d = 2;
public static final int e = 3;
public static final int f = 4;
private static final boolean f15137f = false;
public static final int g = 5;
public static final int h = 6;
public static final int i = 7;
private static final String f15138i = "0X80040AA";
public static final int j = 8;
public static final int k = 9;
public static final int l = 10;
public static final int m = 11;
public static final int n = 12;
public static final int o = 13;
public static final int p = 14;
public static final int q = 15;
public static final int r = 16;
public static final int s = 17;
public static final int t = 18;
public static final int u = 18;
public static final int v = 19;
public static final int w = 19;
public static final int x = 19;
public static final int y = 20;
public static final int z = 20;
public int Q;
public long f15139a;
private SparseArray f15140a;
private PollBanner f15141a;
public RecentCallHelper f15142a;
private BaseActivity f15143a;
private PhoneContactManager.IPhoneContactListener f15144a;
private XListView f15145a;
public long f15148b;
private SparseArray f15149b;
public boolean f15150b;
public String f15152d;
public String f15154e;
private boolean f15155e;
public String f15156f;
public String f15157g;
private boolean f15153d = true;
private String f15159h = "";
boolean f15151c = false;
private boolean f15158g = true;
private MqqHandler f15146a = new CustomHandler(this);
private Banner[] f15147a = new Banner[27];
public BannerManager(BaseActivity baseActivity, XListView xListView, RecentCallHelper recentCallHelper) {
this.f15143a = baseActivity;
this.f15145a = xListView;
this.f15142a = recentCallHelper;
this.f15141a = new PollBanner(this.f15143a);
}
public void a(int i2, int i3) {
if (QLog.isColorLevel()) {
QLog.d(f15136c, 4, "updateBanerState|[" + i2 + "," + i3 + StepFactory.f18879b);
}
if (i2 >= 1 && i2 <= 26) {
if (this.f15147a[i2] != null) {
this.f15147a[i2].e = i3;
} else if (this.f15147a[i2] == null && Banner.a(i3)) {
this.f15147a[i2] = new Banner(i2, i3);
}
}
}
public boolean m3672a(int i2) {
Banner banner = null;
if (i2 >= 0 && i2 < this.f15147a.length) {
banner = this.f15147a[i2];
}
return banner != null && banner.a();
}
public int a(int i2) {
Banner banner = null;
if (i2 >= 0 && i2 < this.f15147a.length) {
banner = this.f15147a[i2];
}
if (banner == null) {
return 0;
}
return banner.e;
}
public void a(int i2, int i3, int i4, Object obj, long j2) {
Message obtain = Message.obtain();
obtain.what = i2;
obtain.arg1 = i3;
obtain.arg2 = i4;
obtain.obj = obj;
if (j2 > 0) {
this.f15146a.sendMessageDelayed(obtain, j2);
} else {
this.f15146a.sendMessage(obtain);
}
}
public void m3670a() {
if (this.f15143a.app != null) {
if (this.f15143a.app.m4621a().m427b() > 0) {
a(24, 2);
} else if (this.f15143a.app.m4707d()) {
int g2 = this.f15143a.app.m4621a().g();
if (g2 == 3) {
if (this.f15143a.app.m4621a().m428b() > 0) {
a(24, 2);
} else {
a(24, 0);
}
} else if (g2 == 1) {
a(24, 2);
} else if (g2 == 2) {
a(24, 2);
} else if (g2 == 5) {
a(24, 2);
}
} else {
a(24, 0);
}
}
}
public void a(int i2, Message message) {
boolean z2;
boolean z3;
boolean z4;
if (QLog.isDevelopLevel()) {
QLog.d(f15136c, 4, "refreshBanner");
}
if (this.f15149b == null) {
this.f15149b = new SparseArray(4);
}
for (int i3 = 0; i3 < 4; i3++) {
ArrayList arrayList = (ArrayList) this.f15149b.get(i3);
if (arrayList == null) {
this.f15149b.put(i3, new ArrayList(1));
} else {
arrayList.clear();
}
}
if (this.f15140a == null) {
this.f15140a = new SparseArray(4);
}
int i4 = 1;
while (true) {
if (i4 > 18) {
break;
} else if (this.f15147a[i4] == null || !this.f15147a[i4].a()) {
i4++;
} else {
ArrayList arrayList2 = (ArrayList) this.f15149b.get(0);
if (this.f15149b != null) {
arrayList2.add(Integer.valueOf(i4));
}
}
}
int i5 = 20;
while (true) {
int i6 = i5;
if (i6 > 23) {
break;
}
if (this.f15147a[i6] != null && this.f15147a[i6].a()) {
ArrayList arrayList3 = (ArrayList) this.f15149b.get(2);
if (this.f15149b != null) {
arrayList3.add(Integer.valueOf(i6));
}
}
i5 = i6 + 1;
}
int i7 = 24;
while (true) {
int i8 = i7;
if (i8 > 26) {
break;
} else if (this.f15147a[i8] == null || !this.f15147a[i8].a()) {
i7 = i8 + 1;
} else {
ArrayList arrayList4 = (ArrayList) this.f15149b.get(3);
if (arrayList4 != null) {
arrayList4.add(Integer.valueOf(i8));
}
}
}
int i9 = 19;
while (true) {
if (i9 > 19) {
break;
} else if (this.f15147a[i9] == null || !this.f15147a[i9].a()) {
i9++;
} else {
ArrayList arrayList5 = (ArrayList) this.f15149b.get(1);
if (arrayList5 != null) {
arrayList5.add(Integer.valueOf(i9));
}
}
}
a(this.f15149b);
int i10 = 0;
boolean z5 = true;
int i11 = 0;
int i12 = 0;
while (i10 < 4) {
int a2 = a(this.f15149b, i10);
int a3 = a(this.f15140a, i10);
int i13 = i12 + a2;
int i14 = i11 + a3;
if (2 == i10) {
if (a2 != a3) {
z4 = false;
} else {
ArrayList arrayList6 = (ArrayList) this.f15149b.get(2);
ArrayList arrayList7 = (ArrayList) this.f15140a.get(2);
if (arrayList6 != null) {
Iterator it = arrayList6.iterator();
while (it.hasNext()) {
Integer num = (Integer) it.next();
if (arrayList7 != null && !arrayList7.contains(num)) {
z4 = false;
break;
}
}
z4 = z5;
} else {
return;
}
}
} else {
if (a2 != a3) {
z4 = false;
}
z4 = z5;
}
i10++;
z5 = z4;
i11 = i14;
i12 = i13;
}
if (i12 != 0 || i11 != 0) {
if (i12 == 0 && i11 != 0) {
m3668l();
return;
}
int a4 = a(this.f15149b, 2) - a(this.f15140a, 2);
if (!z5) {
m3668l();
for (int i15 = 0; i15 < 4; i15++) {
ArrayList arrayList8 = (ArrayList) this.f15149b.get(i15);
if (arrayList8 != null) {
this.f15140a.put(i15, (ArrayList) arrayList8.clone());
}
}
}
for (int i16 = 0; i16 < 4; i16++) {
ArrayList arrayList9 = (ArrayList) this.f15140a.get(i16);
if (arrayList9 != null && arrayList9.size() != 0) {
Iterator it2 = arrayList9.iterator();
boolean z6 = false;
while (it2.hasNext()) {
Banner banner = this.f15147a[((Integer) it2.next()).intValue()];
if (banner != null) {
a(banner);
try {
if (banner.f15130a != null && !banner.f15131a) {
if (i16 != 2) {
this.f15145a.a(banner.f15130a);
} else if (a4 > 0) {
if (banner.d == a4) {
z3 = true;
this.f15141a.a(banner, z3);
if (!this.f15141a.m3702b()) {
this.f15145a.a(this.f15141a.a());
}
}
z3 = false;
this.f15141a.a(banner, z3);
if (!this.f15141a.m3702b()) {
}
} else {
if (!z6) {
z3 = true;
z6 = true;
this.f15141a.a(banner, z3);
if (!this.f15141a.m3702b()) {
}
}
z3 = false;
this.f15141a.a(banner, z3);
if (!this.f15141a.m3702b()) {
}
}
banner.f15131a = true;
}
z2 = z6;
} catch (Exception e2) {
if (QLog.isDevelopLevel()) {
QLog.d(f15136c, 4, "initBanner|" + e2.toString());
}
z2 = z6;
}
if (message == null || i2 != banner.d) {
a(banner, (Message) null);
} else if (i2 == banner.d) {
a(banner, message);
}
z6 = z2;
}
}
}
}
}
}
public void m3673b() {
if (m3672a(19)) {
a(19, 0);
this.f15154e = null;
this.f15156f = null;
this.f15139a = 0L;
a(-1, (Message) null);
}
}
public void m3674c() {
ADView aDView;
ViewGroup a2;
boolean z2;
Banner banner = this.f15147a[16];
if (banner != null && banner.f15130a != null && (a2 = (aDView = (ADView) banner.f15130a.findViewById(R.id.f50005name_res_0x7f090b71)).a(0)) != null) {
boolean z3 = false;
int childCount = a2.getChildCount() - 1;
while (childCount >= 0) {
View childAt = a2.getChildAt(childCount);
PushBanner pushBanner = (PushBanner) childAt.getTag();
String str = pushBanner.f92921c;
int indexOf = str.indexOf("|");
if (CommonUtil.a(Long.parseLong(str.substring(0, indexOf)), Long.parseLong(str.substring(indexOf + 1)))) {
z2 = z3;
} else {
aDView.a(0, childCount, childAt);
Config.f21496a.b(pushBanner.l);
z2 = true;
}
childCount--;
z3 = z2;
}
if (z3) {
if (a2.getChildCount() == 0) {
this.f15143a.getSharedPreferences(AppConstants.f17367Y, 0).edit().putBoolean(AppConstants.Preferences.aP + this.f15143a.getAppRuntime().getAccount(), false).commit();
aDView.g();
a(16, 0);
a(-1, (Message) null);
this.f15150b = false;
} else {
m3666j();
}
ConfigManager configManager = new ConfigManager(this.f15143a.getApplicationContext(), this.f15143a.app.m4704d());
if (configManager != null) {
configManager.b();
configManager.c();
return;
}
return;
}
m3666j();
}
}
private void m3666j() {
this.f15146a.removeMessages(101);
Calendar calendar = Calendar.getInstance();
calendar.add(5, 1);
calendar.set(11, 0);
calendar.clear(12);
calendar.clear(13);
calendar.clear(14);
long timeInMillis = (calendar.getTimeInMillis() - (System.currentTimeMillis() - 10)) + 300000;
if (QLog.isColorLevel()) {
QLog.d("PushBanner", 2, "Check banner delay: " + timeInMillis);
}
this.f15146a.sendEmptyMessageDelayed(101, timeInMillis);
}
public void m3675d() {
this.f15146a.removeMessages(101);
a(9, 0);
a(11, 0);
Banner banner = this.f15147a[16];
if (banner != null && banner.f15130a != null) {
RelativeLayout relativeLayout = (RelativeLayout) banner.f15130a.findViewById(R.id.f50003name_res_0x7f090b6f);
ADView aDView = (ADView) banner.f15130a.findViewById(R.id.f50005name_res_0x7f090b71);
if (aDView != null) {
aDView.i();
aDView.g();
}
if (relativeLayout != null) {
relativeLayout.setPadding(0, -1, 0, 0);
}
}
this.f15150b = false;
m3673b();
a(13, 0);
this.f15153d = true;
this.f15155e = false;
this.f15159h = "";
a(6, 0);
a(14, 0);
a(5, 0);
m3670a();
m3679h();
a(-1, (Message) null);
a(false);
}
public void m3676e() {
try {
if (QLog.isColorLevel()) {
QLog.d(f15136c, 2, "onDestroy");
}
this.f15151c = true;
if (this.f15144a != null) {
((PhoneContactManagerImp) this.f15143a.app.getManager(10)).b(this.f15144a);
this.f15144a = null;
}
this.f15146a.removeCallbacksAndMessages(null);
} catch (Exception e2) {
if (QLog.isColorLevel()) {
QLog.d(f15136c, 2, "onDestroy", e2);
}
}
}
public void m3677f() {
m3667k();
}
private void m3667k() {
a(12, 0);
this.f15146a.removeMessages(11);
if (this.f15144a != null) {
((PhoneContactManagerImp) this.f15143a.app.getManager(10)).b(this.f15144a);
this.f15144a = null;
}
}
public void a(boolean z2) {
if (this.f15147a[12] != null) {
a(12, 0);
}
this.f15146a.removeMessages(11);
if (z2) {
PhoneContactManagerImp phoneContactManagerImp = (PhoneContactManagerImp) this.f15143a.app.getManager(10);
if (phoneContactManagerImp != null) {
int c2 = phoneContactManagerImp.c();
if (c2 == 0) {
this.f15146a.sendEmptyMessageDelayed(11, 1000L);
return;
}
if (this.f15144a == null && !this.f15151c) {
this.f15144a = new nqy(this);
phoneContactManagerImp.a(this.f15144a);
}
boolean z3 = this.f15143a.getSharedPreferences(AppConstants.Preferences.bl + this.f15143a.app.getAccount(), 0).getBoolean(AppConstants.Preferences.bA, true);
if (QLog.isColorLevel()) {
QLog.d(f15136c, 2, "checkContactBanner, state = " + c2 + ", isFirstShow = " + z3);
}
if (c2 == 1 && z3) {
if (this.f15147a[12] != null && this.f15147a[12].e != 2) {
ReportController.b(this.f15143a.app, "dc01331", "", "", "0X80053D8", "0X80053D8", 0, 0, "", "", "", "");
}
a(12, 2);
return;
}
a(12, 0);
return;
}
return;
}
this.f15146a.removeMessages(11);
this.f15146a.sendEmptyMessageDelayed(11, 1000L);
}
private void m3668l() {
if (this.f15140a != null) {
for (int i2 = 0; i2 < 4; i2++) {
ArrayList arrayList = (ArrayList) this.f15140a.get(i2);
if (arrayList != null && arrayList.size() != 0) {
Iterator it = arrayList.iterator();
while (it.hasNext()) {
Banner banner = this.f15147a[((Integer) it.next()).intValue()];
if (banner != null && banner.f15130a != null && banner.f15131a) {
if (i2 != 2) {
this.f15145a.a(banner.f15130a);
} else if (!this.f15141a.m3701a()) {
this.f15141a.b();
this.f15145a.a(this.f15141a.a());
}
banner.f15131a = false;
if (!banner.a()) {
banner.f15130a = null;
}
}
}
}
}
}
}
private void a(Banner banner, Message message) {
if (QLog.isDevelopLevel()) {
QLog.d(f15136c, 4, "updateBanner| banner = " + banner + ", msg = " + message);
}
if (banner != null && banner.f15130a != null) {
try {
switch (banner.d) {
case 1:
b(banner.f15130a);
break;
case 2:
a(banner.f15130a, message);
break;
case 3:
b(banner.f15130a, message, banner.e);
break;
case 5:
a(banner.f15130a, message, banner.e);
break;
case 6:
f(banner.f15130a, message);
break;
case 7:
d(banner.f15130a, message);
break;
case 8:
a(banner.f15130a);
break;
case 9:
banner.f15130a.findViewById(R.id.f56175name_res_0x7f09238c).setVisibility(0);
break;
case 10:
banner.f15130a.findViewById(R.id.f56175name_res_0x7f09238c).setVisibility(0);
break;
case 11:
i(banner.f15130a, message);
break;
case 15:
banner.f15130a.findViewById(R.id.f55791name_res_0x7f09220c).setVisibility(0);
break;
case 16:
f(banner.f15130a);
break;
case 17:
h(banner.f15130a);
break;
case 18:
b(banner.f15130a, message);
break;
case 19:
c(banner.f15130a);
break;
case 20:
e(banner.f15130a);
break;
case 23:
h(banner.f15130a, message);
break;
case 24:
j(banner.f15130a, message);
break;
case 25:
e(banner.f15130a, message);
break;
case 26:
c(banner.f15130a, message);
break;
}
} catch (Throwable th) {
th.printStackTrace();
}
}
}
private void a(View view, Message message) {
if (message != null && message.obj != null) {
((TipsBar) view).setTipsText((String) message.obj);
view.setOnClickListener(new nrj(this));
}
}
private void b(View view, Message message) {
view.findViewById(R.id.f49616name_res_0x7f0909ec).setVisibility(0);
TextView textView = (TextView) view.findViewById(R.id.f48906name_res_0x7f090726);
textView.setText(R.string.f66206name_res_0x7f0a1e82);
if ((this.f15143a != null ? this.f15143a.app : null) != null && message != null && message.obj != null) {
textView.setOnClickListener(new nrw(this, (String) message.obj));
}
}
private void a(View view, Message message, int i2) {
if (message != null && message.obj != null && (message.obj instanceof PhoneUnityBannerData)) {
ReportController.b(this.f15143a.app, "dc01331", "", "", "0X8005B72", "0X8005B72", 0, 0, "", "", "", "");
view.findViewById(R.id.f52413name_res_0x7f0914d9).setVisibility(0);
PhoneUnityBannerData phoneUnityBannerData = (PhoneUnityBannerData) message.obj;
((TextView) view.findViewById(R.id.f52415name_res_0x7f0914db)).setText(phoneUnityBannerData.f18247b);
view.setOnClickListener(new nrx(this, phoneUnityBannerData));
}
}
public View a() {
View inflate = View.inflate(this.f15143a, R.layout.f57447name_res_0x7f03044e, null);
inflate.findViewById(R.id.f52413name_res_0x7f0914d9).setVisibility(8);
return inflate;
}
private void c(View view, Message message) {
View findViewById = view.findViewById(R.id.f49600name_res_0x7f0909dc);
TextView textView = (TextView) view.findViewById(R.id.f49602name_res_0x7f0909de);
if (this.f15143a != null && this.f15143a.app != null) {
if (FileViewMusicService.a().m6432a()) {
String string = this.f15143a.getString(R.string.f65184name_res_0x7f0a1a84);
String m6430a = FileViewMusicService.a().m6430a();
if (m6430a != null) {
textView.setText(Html.fromHtml(string + TroopBarUtils.y + m6430a));
findViewById.setVisibility(0);
return;
}
findViewById.setVisibility(8);
return;
}
findViewById.setVisibility(8);
return;
}
findViewById.setVisibility(8);
}
private void d(View view, Message message) {
String str;
if (message == null || message.arg1 == 0) {
if (QLog.isColorLevel()) {
QLog.d(f15136c, 2, "updateNetNeedSignOn return, msg == null || msg.arg1==HIDE");
return;
}
return;
}
if (message != null && (message.obj instanceof String)) {
str = String.valueOf(message.obj);
} else {
str = "http://qq.com";
}
View findViewById = view.findViewById(R.id.f49616name_res_0x7f0909ec);
if (findViewById.getVisibility() != 0) {
findViewById.setVisibility(0);
}
findViewById.setOnClickListener(new nry(this, str));
ReportController.a(this.f15143a.app, "dc01331", "", "", f15133a, f15133a, 0, 0, "", "", "", "");
}
private void a(Banner banner) {
if (banner != null && banner.f15130a == null) {
try {
switch (banner.d) {
case 1:
banner.f15130a = g();
break;
case 2:
banner.f15130a = b();
break;
case 3:
banner.f15130a = i();
break;
case 5:
banner.f15130a = a();
break;
case 6:
banner.f15130a = j();
break;
case 7:
banner.f15130a = h();
break;
case 8:
banner.f15130a = g();
break;
case 9:
banner.f15130a = k();
break;
case 10:
banner.f15130a = k();
break;
case 11:
banner.f15130a = p();
break;
case 12:
banner.f15130a = t();
break;
case 13:
banner.f15130a = m();
break;
case 14:
banner.f15130a = r();
break;
case 15:
banner.f15130a = e();
break;
case 16:
banner.f15130a = s();
break;
case 17:
banner.f15130a = u();
break;
case 18:
banner.f15130a = c();
break;
case 19:
banner.f15130a = l();
break;
case 20:
banner.f15130a = n();
break;
case 23:
banner.f15130a = o();
break;
case 24:
banner.f15130a = q();
break;
case 25:
banner.f15130a = f();
break;
case 26:
banner.f15130a = d();
break;
}
} catch (Throwable th) {
th.printStackTrace();
}
if (QLog.isDevelopLevel()) {
QLog.d(f15136c, 4, "initBannerView | banner = " + banner);
}
}
}
private View b() {
return ArkTipsManager.a().a((Context) this.f15143a);
}
private View c() {
View inflate = View.inflate(this.f15143a, R.layout.f56792name_res_0x7f0301bf, null);
((TextView) inflate.findViewById(R.id.f48906name_res_0x7f090726)).setText(this.f15143a.getString(R.string.f66206name_res_0x7f0a1e82));
inflate.findViewById(R.id.f49616name_res_0x7f0909ec).setVisibility(8);
return inflate;
}
private View d() {
View inflate = View.inflate(this.f15143a, R.layout.f56790name_res_0x7f0301bd, null);
inflate.setOnClickListener(new nrz(this, inflate));
inflate.findViewById(R.id.f49600name_res_0x7f0909dc).setVisibility(8);
return inflate;
}
private View e() {
View inflate = View.inflate(this.f15143a, R.layout.f58188name_res_0x7f030733, null);
((TextView) inflate.findViewById(R.id.f55792name_res_0x7f09220d)).setText(this.f15152d);
inflate.setOnClickListener(new nsa(this));
inflate.findViewById(R.id.f55791name_res_0x7f09220c).setVisibility(8);
return inflate;
}
private void a(SparseArray sparseArray) {
if (sparseArray != null) {
int a2 = a(sparseArray, 0);
int a3 = a(sparseArray, 2);
int a4 = a(sparseArray, 3);
if (a3 >= 20 && a2 >= 1) {
switch (a2) {
case 9:
case 13:
case 16:
((ArrayList) sparseArray.get(0)).clear();
break;
}
}
if (a4 >= 24 && a2 >= 1) {
switch (a2) {
case 9:
case 13:
case 16:
((ArrayList) sparseArray.get(0)).clear();
return;
default:
return;
}
}
}
}
private View f() {
View inflate = View.inflate(this.f15143a, R.layout.f57419name_res_0x7f030432, null);
inflate.setOnClickListener(new nsb(this));
inflate.findViewById(R.id.f52315name_res_0x7f091477).setVisibility(8);
return inflate;
}
private View g() {
View inflate = View.inflate(this.f15143a, R.layout.f56792name_res_0x7f0301bf, null);
((TextView) inflate.findViewById(R.id.f48906name_res_0x7f090726)).setText(this.f15143a.getString(R.string.f64846name_res_0x7f0a1932));
inflate.setOnClickListener(new nsc(this));
inflate.findViewById(R.id.f49616name_res_0x7f0909ec).setVisibility(8);
return inflate;
}
private View h() {
View inflate = View.inflate(this.f15143a, R.layout.f56792name_res_0x7f0301bf, null);
((TextView) inflate.findViewById(R.id.f48906name_res_0x7f090726)).setText(this.f15143a.getString(R.string.f63381name_res_0x7f0a1374));
inflate.findViewById(R.id.f49616name_res_0x7f0909ec).setVisibility(8);
return inflate;
}
private View i() {
if (QLog.isColorLevel()) {
QLog.d(f15136c, 2, "initMissedCallBar");
}
View inflate = View.inflate(this.f15143a, R.layout.f57446name_res_0x7f03044d, null);
((TextView) inflate.findViewById(R.id.f52412name_res_0x7f0914d8)).setText(this.f15143a.getString(R.string.f65579name_res_0x7f0a1c0f));
inflate.setOnClickListener(new nqz(this));
inflate.findViewById(R.id.f52411name_res_0x7f0914d7).setVisibility(8);
return inflate;
}
private void b(View view, Message message, int i2) {
if (QLog.isColorLevel()) {
QLog.d(f15136c, 2, "updateMissedCallBar state: " + i2);
}
QCallFacade qCallFacade = (QCallFacade) this.f15143a.app.getManager(37);
int m7454a = qCallFacade != null ? qCallFacade.m7454a() : 0;
if (m7454a != 0) {
if (i2 == 0) {
if (view.getVisibility() == 0) {
view.setVisibility(8);
return;
}
return;
}
view.findViewById(R.id.f52411name_res_0x7f0914d7).setVisibility(0);
((TextView) view.findViewById(R.id.f52412name_res_0x7f0914d8)).setText(String.format(this.f15143a.getString(R.string.f65579name_res_0x7f0a1c0f), Integer.valueOf(m7454a)));
if (m7454a <= 0) {
this.f15146a.sendEmptyMessage(7);
}
}
}
private void e(View view, Message message) {
View findViewById = view.findViewById(R.id.f52315name_res_0x7f091477);
TextView textView = (TextView) view.findViewById(R.id.f52317name_res_0x7f091479);
if (this.f15143a != null && this.f15143a.app != null) {
int a2 = this.f15143a.app.m4659a().a();
if (a2 != 0) {
findViewById.setVisibility(0);
int i2 = this.f15143a.app.m4659a().m10718a().mMode;
String str = "传输";
if (1 == i2) {
str = "发送";
} else if (2 == i2) {
str = "接收";
}
textView.setText(this.f15143a.getString(R.string.f62377name_res_0x7f0a0f86) + str + String.valueOf(a2) + this.f15143a.getString(R.string.f62378name_res_0x7f0a0f87));
return;
}
findViewById.setVisibility(8);
return;
}
findViewById.setVisibility(8);
}
private void a(View view) {
view.findViewById(R.id.f49616name_res_0x7f0909ec).setVisibility(0);
((TextView) view.findViewById(R.id.f48906name_res_0x7f090726)).setText(R.string.f64847name_res_0x7f0a1933);
}
private void b(View view) {
view.findViewById(R.id.f49616name_res_0x7f0909ec).setVisibility(0);
((TextView) view.findViewById(R.id.f48906name_res_0x7f090726)).setText(R.string.f64846name_res_0x7f0a1932);
}
private View j() {
View inflate = View.inflate(this.f15143a, R.layout.f57394name_res_0x7f030419, null);
inflate.findViewById(R.id.f52148name_res_0x7f0913d0).setOnClickListener(new nra(this));
inflate.findViewById(R.id.f52147name_res_0x7f0913cf).setVisibility(8);
return inflate;
}
private void f(View view, Message message) {
TextView textView = (TextView) view.findViewById(R.id.f52148name_res_0x7f0913d0);
if (message != null) {
if (message.arg1 == 1) {
textView.setText(R.string.f58726name_res_0x7f0a0140);
} else if (message.arg1 == 2) {
textView.setText(R.string.f58725name_res_0x7f0a013f);
}
}
view.findViewById(R.id.f52147name_res_0x7f0913cf).setVisibility(0);
}
private void c(View view) {
if (this.f15157g != null && QRLoginActivity.f83264c.equals(this.f15157g.trim())) {
view.findViewById(R.id.f49702name_res_0x7f090a42).setVisibility(8);
view.findViewById(R.id.f49705name_res_0x7f090a45).setVisibility(0);
return;
}
view.findViewById(R.id.f49705name_res_0x7f090a45).setVisibility(8);
view.findViewById(R.id.f49702name_res_0x7f090a42).setVisibility(0);
ReportUtils.a(this.f15143a.app, ReportConstants.l, "Msg", ReportConstants.y, "0X80084C3");
}
private View k() {
View inflate = View.inflate(this.f15143a, R.layout.f58341name_res_0x7f0307cc, null);
TextView textView = (TextView) inflate.findViewById(R.id.f56176name_res_0x7f09238d);
textView.setOnClickListener(new nrb(this));
textView.setText(this.f15143a.getString(R.string.f63737name_res_0x7f0a14d8));
((ImageView) inflate.findViewById(R.id.f56177name_res_0x7f09238e)).setOnClickListener(new nrc(this));
inflate.findViewById(R.id.f56175name_res_0x7f09238c).setVisibility(8);
return inflate;
}
private View l() {
String str;
View inflate = View.inflate(this.f15143a, R.layout.f56805name_res_0x7f0301cc, null);
TextView textView = (TextView) inflate.findViewById(R.id.f49704name_res_0x7f090a44);
if (this.f15139a == 77313) {
str = "TIM PC版";
} else if (this.f15139a == 65793) {
str = "QQ PC版";
} else if (this.f15139a == 66831) {
str = "QQ Mac版";
} else {
str = "电脑版";
}
textView.setText(this.f15143a.getString(R.string.f64654name_res_0x7f0a186d, new Object[]{str}));
inflate.findViewById(R.id.f49702name_res_0x7f090a42).setOnClickListener(new nrd(this));
inflate.findViewById(R.id.f49702name_res_0x7f090a42).setVisibility(8);
inflate.findViewById(R.id.f49705name_res_0x7f090a45).setVisibility(8);
return inflate;
}
private View m() {
View inflate = View.inflate(this.f15143a, R.layout.f56585name_res_0x7f0300f0, null);
View findViewById = inflate.findViewById(R.id.f48908name_res_0x7f090728);
inflate.setOnClickListener(new nre(this));
findViewById.setVisibility(8);
return inflate;
}
private void d(View view) {
view.findViewById(R.id.f48908name_res_0x7f090728).setVisibility(0);
if (this.f15153d) {
TroopAssistantManager.a().b(this.f15143a.app, this.f15159h);
ReportController.b(this.f15143a.app, "dc01332", TroopReportor.e, "", "Msglist", "exp_setmsg", 0, 0, "", "", "", "");
}
this.f15153d = false;
this.f15155e = true;
}
private View n() {
View inflate = View.inflate(this.f15143a, R.layout.f56790name_res_0x7f0301bd, null);
inflate.setOnClickListener(new nrf(this));
inflate.findViewById(R.id.f49600name_res_0x7f0909dc).setVisibility(8);
return inflate;
}
private void e(View view) {
if (QQPlayerService.m7028a()) {
view.findViewById(R.id.f49600name_res_0x7f0909dc).setVisibility(0);
TextView textView = (TextView) view.findViewById(R.id.f49602name_res_0x7f0909de);
SongInfo m7020a = QQPlayerService.m7020a();
if (m7020a != null) {
textView.setText(Html.fromHtml(this.f15143a.getString(R.string.f65184name_res_0x7f0a1a84) + TroopBarUtils.y + m7020a.f25180b));
return;
}
return;
}
view.findViewById(R.id.f49600name_res_0x7f0909dc).setVisibility(8);
a(20, 0);
a(-1, (Message) null);
}
private void g(View view, Message message) {
if (message == null || message.what != 1134027) {
if (QLog.isColorLevel()) {
QLog.d("ReaderBar", 2, "updateReaderBar msg " + message);
return;
}
return;
}
if (QLog.isColorLevel()) {
QLog.d("ReaderBar", 2, "updateReaderBar msg.obj = " + message.obj);
}
TextView textView = (TextView) view.findViewById(R.id.f48009name_res_0x7f0903a5);
if ((message.obj instanceof String) && textView != null) {
String[] split = ((String) message.obj).split("@#");
if (split.length == 2) {
String str = split[0];
long parseLong = Long.parseLong(split[1]);
textView.setText("正在阅读《" + str + "》");
view.setOnClickListener(new nrg(this, parseLong));
view.findViewById(R.id.f48006name_res_0x7f0903a2).setVisibility(0);
this.f15146a.removeMessages(13);
this.f15146a.sendEmptyMessageDelayed(13, Constant.f7508a);
}
}
}
private View o() {
if (QLog.isColorLevel()) {
QLog.d("BrowserBar", 2, "initBrowserBar");
}
View inflate = LayoutInflater.from(this.f15143a).inflate(R.layout.f56410name_res_0x7f030041, (ViewGroup) null);
inflate.findViewById(R.id.f48002name_res_0x7f09039e).setVisibility(8);
return inflate;
}
private void h(View view, Message message) {
if (message == null || (message.what != 1134041 && message.what != 1134042)) {
if (QLog.isColorLevel()) {
QLog.d("BrowserBar", 2, "updateBrowserBar msg " + message);
return;
}
return;
}
if (QLog.isColorLevel()) {
QLog.d("BrowserBar", 2, "updateBrowserBar msg.obj = " + message.obj);
}
if (message.what == 1134042) {
view.setVisibility(8);
return;
}
TextView textView = (TextView) view.findViewById(R.id.f48005name_res_0x7f0903a1);
if ((message.obj instanceof Bundle) && textView != null) {
Bundle bundle = (Bundle) message.obj;
String str = (String) bundle.getCharSequence("tips");
int i2 = bundle.getInt("icon");
if (i2 != -1) {
((ImageView) view.findViewById(R.id.f48003name_res_0x7f09039f)).setImageResource(i2);
}
if (!TextUtils.isEmpty(str)) {
textView.setText(str);
view.setOnClickListener(new nrh(this, bundle));
view.findViewById(R.id.f48002name_res_0x7f09039e).setVisibility(0);
this.f15146a.removeMessages(15);
this.f15146a.sendEmptyMessageDelayed(15, bundle.getInt("timeout", 120000));
}
}
}
private View p() {
View inflate = View.inflate(this.f15143a, R.layout.f58341name_res_0x7f0307cc, null);
TextView textView = (TextView) inflate.findViewById(R.id.f56176name_res_0x7f09238d);
textView.setOnClickListener(new nri(this));
textView.setText("");
if (AppSetting.f7081k) {
textView.setContentDescription(this.f15143a.getString(R.string.f63743name_res_0x7f0a14de));
}
((ImageView) inflate.findViewById(R.id.f56177name_res_0x7f09238e)).setOnClickListener(new nrk(this));
inflate.findViewById(R.id.f56175name_res_0x7f09238c).setVisibility(8);
return inflate;
}
private void i(View view, Message message) {
view.findViewById(R.id.f56175name_res_0x7f09238c).setVisibility(0);
TextView textView = (TextView) view.findViewById(R.id.f56176name_res_0x7f09238d);
if (message != null) {
if (!ConfigHandler.m4198a(this.f15143a.app)) {
String str = "新版本TIM ";
UpgradeDetailWrapper m5177a = UpgradeController.a().m5177a();
if (m5177a != null && m5177a.f19226a != null && m5177a.f19226a.f19229a != null) {
str = m5177a.f19226a.f19229a + TroopBarUtils.y;
}
textView.setText(String.format("已下载%s,点击安装", str));
} else {
textView.setText("已通过Wi-Fi下载手机新版本,点击安装");
}
}
ReportUtils.a(this.f15143a.app, ReportConstants.o, ReportConstants.P, ReportConstants.Q, "0X8008A2A");
}
private View q() {
View inflate = View.inflate(this.f15143a, R.layout.f56789name_res_0x7f0301bc, null);
inflate.setOnClickListener(new nrl(this));
inflate.findViewById(R.id.f49594name_res_0x7f0909d6).setVisibility(8);
return inflate;
}
protected Bitmap a(String str, QQAppInterface qQAppInterface) {
Bitmap a2 = qQAppInterface.a(1, str, (byte) 2, true, 0);
if (a2 == null) {
return ImageUtil.a();
}
return a2;
}
private void j(View view, Message message) {
String str;
int d2;
QQAppInterface qQAppInterface = this.f15143a != null ? this.f15143a.app : null;
if (qQAppInterface != null && this.f15143a != null) {
View findViewById = view.findViewById(R.id.f49594name_res_0x7f0909d6);
TextView textView = (TextView) view.findViewById(R.id.f49596name_res_0x7f0909d8);
ImageView imageView = (ImageView) view.findViewById(R.id.f49595name_res_0x7f0909d7);
if (message != null && message.obj != null) {
long longValue = ((Long) message.obj).longValue();
int b2 = qQAppInterface.m4621a().b(longValue);
LinearLayout linearLayout = (LinearLayout) view.findViewById(R.id.f49598name_res_0x7f0909da);
if (b2 == 2) {
Vector m413a = qQAppInterface.m4621a().m413a(longValue);
linearLayout.setVisibility(0);
ImageView[] imageViewArr = {(ImageView) view.findViewById(R.id.f47953name_res_0x7f09036d), (ImageView) view.findViewById(R.id.f47954name_res_0x7f09036e), (ImageView) view.findViewById(R.id.f47955name_res_0x7f09036f)};
if (m413a == null || m413a.size() == 0) {
for (ImageView imageView2 : imageViewArr) {
imageView2.setVisibility(8);
}
} else if (m413a.size() == 1) {
imageViewArr[0].setVisibility(0);
imageViewArr[1].setVisibility(8);
imageViewArr[2].setVisibility(8);
imageViewArr[0].setImageBitmap(a(String.valueOf(((AVNotifyCenter.UserInfo) m413a.get(0)).f81344a), qQAppInterface));
} else if (m413a.size() == 2) {
imageViewArr[0].setVisibility(0);
imageViewArr[1].setVisibility(0);
imageViewArr[2].setVisibility(8);
imageViewArr[0].setImageBitmap(a(String.valueOf(((AVNotifyCenter.UserInfo) m413a.get(0)).f81344a), qQAppInterface));
imageViewArr[1].setImageBitmap(a(String.valueOf(((AVNotifyCenter.UserInfo) m413a.get(1)).f81344a), qQAppInterface));
} else {
int i2 = 0;
while (true) {
int i3 = i2;
if (i3 >= imageViewArr.length) {
break;
}
imageViewArr[i3].setVisibility(0);
imageViewArr[i3].setImageBitmap(a(String.valueOf(((AVNotifyCenter.UserInfo) m413a.get(i3)).f81344a), qQAppInterface));
i2 = i3 + 1;
}
}
} else {
linearLayout.setVisibility(0);
}
}
int g2 = qQAppInterface.m4621a().g();
int m427b = qQAppInterface.m4621a().m427b();
long m438c = qQAppInterface.m4621a().m438c();
if (QLog.isColorLevel()) {
QLog.d(f15136c, 2, "updateMultiVideoBar randomstatus:" + m427b + ", session:" + g2);
}
boolean z2 = qQAppInterface.m4621a().i() == 2;
if (m438c > 0) {
if (qQAppInterface.m4621a().d() < 2) {
textView.setText(R.string.f63705name_res_0x7f0a14b8);
} else {
String m429b = qQAppInterface.m4621a().m429b();
textView.setText(String.format(this.f15143a.getString(m429b != null && m429b.equals("1") ? R.string.f60038name_res_0x7f0a0662 : R.string.f60034name_res_0x7f0a065e), Integer.valueOf(d2)) + TroopBarUtils.y + qQAppInterface.m4621a().m453h());
}
SmallScreenUtils.a(findViewById, z2, this.f15143a.isResume());
} else if (m427b == 6) {
textView.setText(this.f15143a.getString(R.string.f60035name_res_0x7f0a065f));
SmallScreenUtils.a(findViewById, z2, this.f15143a.isResume());
} else if (m427b >= 5) {
textView.setText((this.f15143a.getString(R.string.f60034name_res_0x7f0a065e) + TroopBarUtils.y) + qQAppInterface.m4621a().m453h());
SmallScreenUtils.a(findViewById, z2, this.f15143a.isResume());
} else if (m427b >= 1 && m427b < 5) {
textView.setText(this.f15143a.getString(R.string.f60039name_res_0x7f0a0663));
SmallScreenUtils.a(findViewById, z2, this.f15143a.isResume());
} else if (g2 == 3) {
long m428b = this.f15143a.app.m4621a().m428b();
int b3 = this.f15143a.app.m4621a().b(m428b);
int h2 = this.f15143a.app.m4621a().h();
if (qQAppInterface.m4621a().m448e()) {
textView.setText(R.string.f63705name_res_0x7f0a14b8);
if (b3 == 2 && !qQAppInterface.m4621a().m426a(String.valueOf(m428b))) {
imageView.setImageDrawable(null);
}
} else {
long m428b2 = this.f15143a.app.m4621a().m428b();
int a2 = this.f15143a.app.m4621a().a();
String m453h = qQAppInterface.m4621a().m453h();
if (h2 == 3000) {
str = this.f15143a.getString(R.string.f63703name_res_0x7f0a14b6);
if (b3 == 2) {
str = str.replace(qQAppInterface.getApp().getString(R.string.f63762name_res_0x7f0a14f1), qQAppInterface.getApp().getString(R.string.f63763name_res_0x7f0a14f2));
}
} else if (h2 == 1) {
String string = this.f15143a.getString(R.string.f63704name_res_0x7f0a14b7);
if (b3 == 2) {
String replace = string.replace(qQAppInterface.getApp().getString(R.string.f63762name_res_0x7f0a14f1), qQAppInterface.getApp().getString(R.string.f63763name_res_0x7f0a14f2));
imageView.setImageDrawable(null);
str = replace;
} else {
str = string;
}
} else if (QLog.isColorLevel()) {
QLog.e(f15136c, 2, "updateMultiVideoBar-->wrong type of UinType.uintype=" + h2);
return;
} else {
return;
}
long a3 = qQAppInterface.m4621a().a(a2, m428b2);
if (findViewById != null && a3 == 0) {
SmallScreenUtils.a(findViewById, false, this.f15143a.isResume());
return;
} else if (findViewById == null) {
if (QLog.isColorLevel()) {
QLog.d(f15136c, 2, "updateMultiVideoBar-->multiVideoBar is null");
return;
}
return;
} else {
textView.setText(String.format(str, Long.valueOf(a3)) + TroopBarUtils.y + m453h);
}
}
if (h2 == 1) {
String string2 = this.f15143a.getString(R.string.f59760name_res_0x7f0a054c);
if (b3 == 2) {
string2 = string2.replace(qQAppInterface.getApp().getString(R.string.f63762name_res_0x7f0a14f1), qQAppInterface.getApp().getString(R.string.f63763name_res_0x7f0a14f2));
}
UITools.a(findViewById, string2);
} else if (h2 == 3000) {
String string3 = this.f15143a.getString(R.string.f59759name_res_0x7f0a054b);
if (b3 == 2) {
string3 = string3.replace(qQAppInterface.getApp().getString(R.string.f63762name_res_0x7f0a14f1), qQAppInterface.getApp().getString(R.string.f63763name_res_0x7f0a14f2));
}
UITools.a(findViewById, string3);
}
SmallScreenUtils.a(findViewById, z2, this.f15143a.isResume());
} else if (g2 == 1) {
if (qQAppInterface.m4621a().m448e()) {
textView.setText(R.string.f59881name_res_0x7f0a05c5);
} else {
textView.setText(this.f15143a.getString(R.string.f59881name_res_0x7f0a05c5) + TroopBarUtils.y + qQAppInterface.m4621a().m453h());
}
UITools.a(findViewById, this.f15143a.getString(R.string.f59751name_res_0x7f0a0543));
SmallScreenUtils.a(findViewById, z2, this.f15143a.isResume());
} else if (g2 == 5) {
textView.setText(R.string.f60182name_res_0x7f0a06f2);
UITools.a(findViewById, this.f15143a.getString(R.string.f60183name_res_0x7f0a06f3));
SmallScreenUtils.a(findViewById, z2, this.f15143a.isResume());
} else if (g2 == 2) {
if (qQAppInterface.m4621a().m448e()) {
textView.setText(R.string.f59882name_res_0x7f0a05c6);
} else {
textView.setText(this.f15143a.getString(R.string.f59882name_res_0x7f0a05c6) + TroopBarUtils.y + qQAppInterface.m4621a().m453h());
}
UITools.a(findViewById, this.f15143a.getString(R.string.f59751name_res_0x7f0a0543));
SmallScreenUtils.a(findViewById, z2, this.f15143a.isResume());
} else {
SmallScreenUtils.a(findViewById, false, this.f15143a.isResume());
}
}
}
private View r() {
View inflate = View.inflate(this.f15143a, R.layout.f56584name_res_0x7f0300ef, null);
inflate.setOnClickListener(new nrm(this));
return inflate;
}
private View s() {
View inflate = this.f15143a.getLayoutInflater().inflate(R.layout.f56883name_res_0x7f03021a, (ViewGroup) null);
inflate.setLayoutParams(new AbsListView.LayoutParams(-1, -2));
inflate.findViewById(R.id.f50004name_res_0x7f090b70).setVisibility(8);
((LinearLayout) inflate.findViewById(R.id.f47791close)).setOnClickListener(new nro(this));
return inflate;
}
private void f(View view) {
view.findViewById(R.id.f50004name_res_0x7f090b70).setVisibility(0);
RelativeLayout relativeLayout = (RelativeLayout) view.findViewById(R.id.f50003name_res_0x7f090b6f);
ADView aDView = (ADView) view.findViewById(R.id.f50005name_res_0x7f090b71);
if (m3663b()) {
relativeLayout.setPadding(0, 0, 0, 0);
aDView.h();
return;
}
relativeLayout.setPadding(0, -1, 0, 0);
}
private View t() {
View inflate = LayoutInflater.from(this.f15143a).inflate(R.layout.f57475name_res_0x7f03046a, (ViewGroup) this.f15145a, false);
inflate.setOnClickListener(new nrq(this));
return inflate;
}
private View u() {
View inflate = View.inflate(this.f15143a, R.layout.f57671name_res_0x7f03052e, null);
inflate.setOnClickListener(new nrr(this));
((ImageView) inflate.findViewById(R.id.f53482name_res_0x7f091907)).setOnClickListener(new nrs(this));
return inflate;
}
private void g(View view) {
view.findViewById(R.id.f48833name_res_0x7f0906dd).setVisibility(0);
}
private void h(View view) {
view.findViewById(R.id.f53480name_res_0x7f091905).setVisibility(0);
((TextView) view.findViewById(R.id.f53481name_res_0x7f091906)).setText("当前有免费的QQ WiFi,点击连接");
}
private boolean m3663b() {
return this.f15143a.getResources().getConfiguration().orientation == 1;
}
public boolean m3671a() {
boolean z2 = true;
boolean m3664c = m3664c();
if (!this.f15150b || m3664c) {
if (m3665d()) {
if (this.f15147a[16] == null) {
this.f15147a[16] = new Banner(16, 0);
}
a(this.f15147a[16]);
View view = this.f15147a[16].f15130a;
boolean m3660a = view != null ? m3660a(view) : false;
if (m3660a) {
view.findViewById(R.id.f50004name_res_0x7f090b70).setVisibility(0);
this.f15150b = true;
this.f15143a.getSharedPreferences(AppConstants.f17367Y, 0).edit().putBoolean(AppConstants.Preferences.aX + this.f15143a.app.getAccount(), false).commit();
}
z2 = m3660a;
} else {
z2 = false;
}
}
if (QLog.isDevelopLevel()) {
QLog.i(f15136c, 4, "isNeedShowPushBanner, isNeedShow = " + z2);
}
return z2;
}
private boolean m3664c() {
return this.f15143a.getSharedPreferences(AppConstants.f17367Y, 0).getBoolean(AppConstants.Preferences.aX + this.f15143a.app.getAccount(), false);
}
private boolean m3665d() {
return this.f15143a.getSharedPreferences(AppConstants.f17367Y, 0).getBoolean(AppConstants.Preferences.aP + this.f15143a.app.getAccount(), true);
}
private boolean m3660a(View view) {
int a2 = this.f15143a.app.m4687b(this.f15143a.app.getCurrentAccountUin()).a(0);
if (a2 > 0) {
((ADView) view.findViewById(R.id.f50005name_res_0x7f090b71)).g();
int i2 = 0;
for (int i3 = 0; i3 < a2; i3++) {
if (a(i3, view)) {
i2++;
}
}
if (QLog.isDevelopLevel()) {
QLog.i(f15136c, 4, "loadPushBanner, addnum = " + i2);
}
if (i2 > 0) {
m3666j();
return true;
}
}
return false;
}
private boolean a(int i2, View view) {
Config m4687b = this.f15143a.app.m4687b(this.f15143a.app.getCurrentAccountUin());
PushBanner pushBanner = new PushBanner(m4687b.a(0, i2), m4687b.c(0, i2), m4687b.m5796a(0, i2));
String b2 = m4687b.b(0, i2);
pushBanner.l = b2;
pushBanner.m = m4687b.d(0, i2);
boolean a2 = pushBanner.a(m4687b.b(0, i2));
if ((pushBanner.f92921c == null || !pushBanner.f92921c.contains("|") || CommonUtil.a(Long.parseLong(pushBanner.f92921c.substring(0, pushBanner.f92921c.indexOf("|"))), Long.parseLong(pushBanner.f92921c.substring(pushBanner.f92921c.indexOf("|") + 1)))) && a2 && !"".equals(pushBanner.j)) {
pushBanner.f29438a = JumpParser.a(this.f15143a.app, this.f15143a, pushBanner.j);
if (pushBanner.f29438a != null) {
Bitmap m5794a = m4687b.m5794a(0, i2);
if (QLog.isDevelopLevel()) {
QLog.i("PUSH BANNER", 4, "addPushBanner, bannerPic = " + m5794a);
}
if (m5794a != null) {
FrameLayout frameLayout = (FrameLayout) this.f15143a.getLayoutInflater().inflate(R.layout.f56884name_res_0x7f03021b, (ViewGroup) null);
ImageView imageView = (ImageView) frameLayout.findViewById(R.id.f50007name_res_0x7f090b73);
imageView.setScaleType(ImageView.ScaleType.FIT_XY);
imageView.setImageBitmap(m5794a);
DisplayMetrics displayMetrics = this.f15143a.getResources().getDisplayMetrics();
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) imageView.getLayoutParams();
layoutParams.height = Math.max((int) (30.0f * displayMetrics.density), Math.min((Math.min(displayMetrics.widthPixels, displayMetrics.heightPixels) * 68) / 320, (m5794a.getHeight() * Math.min(displayMetrics.widthPixels, displayMetrics.heightPixels)) / m5794a.getWidth()));
imageView.setLayoutParams(layoutParams);
ImageView imageView2 = (ImageView) frameLayout.findViewById(R.id.f50008name_res_0x7f090b74);
imageView2.setTag(pushBanner);
imageView2.setContentDescription("图片推广位");
imageView2.setOnClickListener(new nrt(this, view, i2, frameLayout, b2));
frameLayout.setTag(pushBanner);
((ADView) view.findViewById(R.id.f50005name_res_0x7f090b71)).a(frameLayout, i2);
return true;
}
}
}
return false;
}
@Override
public boolean handleMessage(Message message) {
switch (message.what) {
case 1:
a(13, 0);
this.f15159h = "";
a(13, message);
break;
case 4:
a(14, 0);
a(14, message);
break;
case 6:
a(3, 2);
a(3, message);
break;
case 7:
a(3, 0);
a(3, message);
break;
case 11:
a(true);
break;
case 12:
a(18, 0);
a(18, message);
break;
case 15:
a(23, 0);
a(23, message);
break;
case 101:
try {
if (QLog.isColorLevel()) {
QLog.d("PushBanner", 2, "checkAndClosePushBanner");
}
m3674c();
break;
} catch (Exception e2) {
if (QLog.isColorLevel()) {
QLog.d("PushBanner", 2, "checkAndClosePushBanner Exception:", e2);
break;
}
}
break;
}
return true;
}
public void m3678g() {
if (QLog.isColorLevel()) {
QLog.d(f15136c, 2, "checkIsShowTroopTip");
}
QQAppInterface qQAppInterface = this.f15143a != null ? this.f15143a.app : null;
if (qQAppInterface != null) {
if (TroopAssistantManager.a().m6942c(qQAppInterface, this.f15159h) || this.f15155e) {
List a2 = qQAppInterface.m4638a().m5113a().a(false);
int size = a2 == null ? 0 : a2.size();
for (int i2 = 0; i2 < size; i2++) {
if (((RecentUser) a2.get(i2)).type == 5000) {
if (this.f15155e) {
this.f15146a.sendEmptyMessage(1);
return;
} else {
return;
}
}
}
for (int i3 = 0; i3 < size; i3++) {
RecentUser recentUser = (RecentUser) a2.get(i3);
if (recentUser.type == 1 && !TextUtils.isEmpty(recentUser.uin) && !TroopAssistantManager.a().m6940b(qQAppInterface, recentUser.uin) && TroopAssistantManager.a().m6930a(qQAppInterface, recentUser.uin) == 1) {
if (qQAppInterface.m4632a().a(recentUser.uin, recentUser.type) > 99) {
if (!this.f15155e || TextUtils.isEmpty(this.f15159h) || !this.f15159h.equals(recentUser.uin)) {
this.f15159h = recentUser.uin;
if (!this.f15153d || TroopAssistantManager.a().m6942c(qQAppInterface, this.f15159h)) {
}
return;
}
return;
} else if (!TextUtils.isEmpty(this.f15159h) && this.f15159h.equals(recentUser.uin)) {
this.f15146a.sendEmptyMessage(1);
return;
}
}
}
if (this.f15155e && !TextUtils.isEmpty(this.f15159h)) {
this.f15146a.sendEmptyMessage(1);
}
}
}
}
public void a(String str) {
if (m3672a(13) && !TextUtils.isEmpty(this.f15159h) && !TextUtils.isEmpty(str) && this.f15159h.equals(str)) {
this.f15159h = "";
this.f15146a.sendEmptyMessageDelayed(1, 1000L);
}
}
public void m3679h() {
if (this.f15143a != null) {
boolean z2 = this.f15143a.app.f18470m;
if (z2) {
if (QLog.isColorLevel()) {
QLog.d(f15136c, 2, "checkShowMissedCall, isShowMissedCallBanner=" + z2);
return;
}
return;
}
ThreadManager.a(new nrv(this), 8, null, false);
}
}
public void m3680i() {
this.f15146a.sendEmptyMessageDelayed(7, 0L);
}
public MqqHandler m3669a() {
return this.f15146a;
}
public int a(SparseArray sparseArray, int i2) {
ArrayList arrayList;
int i3 = 0;
if (sparseArray != null && (arrayList = (ArrayList) sparseArray.get(i2)) != null && arrayList.size() > 0) {
Iterator it = arrayList.iterator();
while (it.hasNext()) {
i3 = ((Integer) it.next()).intValue() + i3;
}
}
return i3;
}
}