TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c
以下内容为反编译后的 PublicAccountChatPie.java 源代码,内容仅作参考
package com.tencent.mobileqq.activity.aio.rebuild;
import NS_MOBILE_FEEDS.e_attribute;
import android.animation.Animator;
import android.animation.ValueAnimator;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.SystemClock;
import android.support.v4.app.FragmentActivity;
import android.text.Editable;
import android.text.SpannableString;
import android.text.TextUtils;
import android.text.style.ImageSpan;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.view.animation.AnimationSet;
import android.view.animation.LinearInterpolator;
import android.view.animation.TranslateAnimation;
import android.view.inputmethod.InputMethodManager;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.tencent.biz.common.offline.HtmlOffline;
import com.tencent.biz.pubaccount.PublicAccountManager;
import com.tencent.biz.pubaccount.PublicAccountServlet;
import com.tencent.biz.pubaccount.assistant.PubAccountTipsManager;
import com.tencent.biz.pubaccount.readinjoy.engine.KandianMergeManager;
import com.tencent.biz.pubaccount.serviceAccountFolder.ServiceAccountFolderManager;
import com.tencent.biz.pubaccount.subscript.SubscriptRecommendController;
import com.tencent.biz.pubaccount.troopbarassit.TroopBarAssistantManager;
import com.tencent.biz.pubaccount.util.PAReportUtil;
import com.tencent.biz.pubaccount.util.PublicAccountUtil;
import com.tencent.biz.ui.CustomMenuBar;
import com.tencent.biz.ui.MenuItem;
import com.tencent.common.app.BaseApplicationImpl;
import com.tencent.mobileqq.activity.BaseChatPie;
import com.tencent.mobileqq.activity.ChatActivityUtils;
import com.tencent.mobileqq.activity.QQBrowserActivity;
import com.tencent.mobileqq.activity.aio.AIOInputTypeHelper;
import com.tencent.mobileqq.activity.aio.AIOUtils;
import com.tencent.mobileqq.activity.aio.ChatContext;
import com.tencent.mobileqq.activity.aio.item.PAWeatherItemBuilder;
import com.tencent.mobileqq.app.AppConstants;
import com.tencent.mobileqq.app.EnterpriseQQHandler;
import com.tencent.mobileqq.app.FriendListObserver;
import com.tencent.mobileqq.app.LogTag;
import com.tencent.mobileqq.app.MessageObserver;
import com.tencent.mobileqq.app.PublicAccountDataManager;
import com.tencent.mobileqq.app.PublicAccountHandler;
import com.tencent.mobileqq.app.PublicAccountObserver;
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.app.ThreadExcutor;
import com.tencent.mobileqq.app.ThreadManager;
import com.tencent.mobileqq.app.TroopManager;
import com.tencent.mobileqq.app.message.AddMessageHelper;
import com.tencent.mobileqq.app.message.QQMessageFacade;
import com.tencent.mobileqq.app.proxy.RecentUserProxy;
import com.tencent.mobileqq.app.soso.SosoInterface;
import com.tencent.mobileqq.ark.ArkAppCenter;
import com.tencent.mobileqq.bubble.ChatXListView;
import com.tencent.mobileqq.data.AccountDetail;
import com.tencent.mobileqq.data.ChatMessage;
import com.tencent.mobileqq.data.MessageForPic;
import com.tencent.mobileqq.data.MessageForStructing;
import com.tencent.mobileqq.data.MessageRecord;
import com.tencent.mobileqq.data.PublicAccountInfo;
import com.tencent.mobileqq.data.RecentUser;
import com.tencent.mobileqq.data.TroopInfo;
import com.tencent.mobileqq.hitrate.PreloadProcHitSession;
import com.tencent.mobileqq.mp.mobileqq_mp;
import com.tencent.mobileqq.msf.core.NetConnInfoCenter;
import com.tencent.mobileqq.openapi.sdk.ApiConstants;
import com.tencent.mobileqq.persistence.Entity;
import com.tencent.mobileqq.persistence.EntityManager;
import com.tencent.mobileqq.shortvideo.ShortVideoUtils;
import com.tencent.mobileqq.statistics.ReportController;
import com.tencent.mobileqq.statistics.StatisticCollector;
import com.tencent.mobileqq.structmsg.AbsStructMsg;
import com.tencent.mobileqq.structmsg.StructMsgForGeneralShare;
import com.tencent.mobileqq.theme.ThemeDownloader;
import com.tencent.mobileqq.transfile.NetworkCenter;
import com.tencent.mobileqq.transfile.StructLongMessageDownloadProcessor;
import com.tencent.mobileqq.troop.activity.TroopBarReplyActivity;
import com.tencent.mobileqq.troop.data.TroopEntranceBar;
import com.tencent.mobileqq.troop.utils.HttpWebCgiAsyncTask;
import com.tencent.mobileqq.troop.utils.HttpWebCgiAsyncTask2;
import com.tencent.mobileqq.troop.utils.TroopBindPublicAccountMgr;
import com.tencent.mobileqq.util.FaceDrawable;
import com.tencent.mobileqq.utils.DialogUtil;
import com.tencent.mobileqq.utils.NetworkUtil;
import com.tencent.mobileqq.utils.PAStartupTracker;
import com.tencent.mobileqq.utils.QQCustomDialog;
import com.tencent.mobileqq.webprocess.WebProcessManager;
import com.tencent.mobileqq.widget.PublicMenuBar;
import com.tencent.mobileqq.widget.QQProgressDialog;
import com.tencent.qidian.QidianManager;
import com.tencent.qidian.controller.QidianBusinessObserver;
import com.tencent.qphone.base.util.BaseApplication;
import com.tencent.qphone.base.util.QLog;
import com.tencent.tim.R;
import com.tencent.util.VersionUtils;
import com.tencent.widget.AbsListView;
import com.tencent.widget.ActionSheet;
import com.tencent.widget.ActionSheetHelper;
import com.tencent.widget.ListView;
import com.tencent.widget.PatchedButton;
import com.tencent.widget.XListView;
import cooperation.comic.PluginPreloader;
import cooperation.comic.QQComicPreloadManager;
import cooperation.readinjoy.ReadInJoyHelper;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Observable;
import java.util.concurrent.atomic.AtomicBoolean;
import mqq.app.NewIntent;
import mqq.manager.TicketManager;
import mqq.observer.BusinessObserver;
import org.json.JSONObject;
public class PublicAccountChatPie extends BaseChatPie {
public static final String aC = "has_unread_msg";
public static final String aD = "jump_from";
private static final String aK = "2632129500";
private static final String aL = "3105932915";
private static final String aN = "actPublicAccountWebviewPreload";
public static final String an = "shouldreport";
public static final String ao = "qd_wpa_key";
public static final String ap = "qd_kfuin";
public static final String aq = "assign_type";
public static final String ar = "assign_key";
public static final String as = "assign_ext";
public static final String at = "rkey";
public static final String au = "strurt_msgid";
public static final String av = "struct_uin";
public static final String aw = "from_web";
public static final String ax = "struct_url";
public static final String ay = "StructingMsgItemBuildertime";
public static final String az = "source_puin";
public static final int eC = 1;
public static final int eD = 2;
public static final int eE = 3;
public static final int eF = 4;
public static final int eK = 0;
public static final int eL = 1;
public static final int eM = 2;
private static final int eN = 1;
private static final int eO = 2;
private static final int eP = 3;
private static final int eQ = 4;
private static final int eR = 6;
private static final int eS = 7;
private static final int eT = 9;
private static final int eU = 0;
private static final int eV = 1;
private static final int eW = 2;
private static final int eX = 3;
private static final int eY = 4;
private static final int eZ = 5;
public static final int ew = 1001;
public static final int ex = 10;
private static final int fg = 0;
private static final int fh = 1;
private static final int fi = 2;
public boolean W;
public boolean X;
public boolean Y;
public boolean Z;
public Handler f85994a;
protected SpannableString f13408a;
private ProgressBar f13409a;
public PublicAccountManager f13410a;
public PubAccountTipsManager f13411a;
public CustomMenuBar f13412a;
private FriendListObserver f13413a;
protected MessageObserver f13414a;
public PublicAccountHandler f13415a;
public PublicAccountObserver f13416a;
private AccountDetail f13417a;
public MessageForPic f13418a;
public MessageForStructing f13419a;
public PublicAccountInfo f13420a;
public PreloadProcHitSession f13421a;
public AbsStructMsg f13422a;
public TroopEntranceBar f13423a;
PublicMenuBar f13424a;
QidianManager f13425a;
public QidianBusinessObserver f13426a;
public ActionSheet f13427a;
protected PatchedButton f13428a;
private XListView.DrawFinishedListener f13429a;
private AtomicBoolean f13430a;
private NewIntent f13431a;
private BusinessObserver f13432a;
private myw f13433a;
public int[] f13434a;
public String aA;
private boolean f13435aA;
public String aB;
private boolean f13436aB;
private boolean f13437aC;
private boolean f13438aD;
public String aE;
public String aF;
public String aG;
public String aH;
public String aI;
String aJ;
private String aM;
public boolean aa;
public boolean ab;
public boolean ac;
public boolean ad;
public boolean ae;
public boolean af;
boolean ag;
boolean ah;
boolean ai;
public boolean aj;
public boolean ak;
public boolean al;
public boolean am;
boolean f13439an;
boolean f13440ao;
public boolean f13441ap;
public boolean f13442aq;
public boolean f13443ar;
public boolean f13444as;
boolean f13445at;
public boolean f13446au;
public boolean f13447av;
private boolean f13448aw;
private boolean f13449ax;
private boolean f13450ay;
private boolean f13451az;
protected SpannableString f85995b;
private QQCustomDialog f13452b;
private PublicMenuBar f13453b;
protected PatchedButton f13454b;
List f13455b;
private NewIntent f13456b;
private BusinessObserver f13457b;
private LinearLayout f85996c;
List f13458c;
private NewIntent f13459c;
public QQProgressDialog d;
public int eA;
public int eB;
public int eG;
public int eH;
public int eI;
public int eJ;
public int ey;
public int ez;
private int fa;
private int fb;
private int fc;
private int fd;
private int fe;
private int ff;
private int fj;
private int fk;
private int fl;
public Dialog g;
private TextView f13460g;
private Dialog h;
private TextView f13461h;
long i;
long j;
long k;
public View f13462k;
long l;
public View f13463l;
protected ImageView f13464l;
private long m;
View f13465m;
protected ImageView f13466m;
private long n;
View f13467n;
public ImageView f13468n;
private long o;
View f13469o;
private ImageView f13470o;
private View p;
private ImageView f13471p;
private View q;
private View r;
private View s;
public static int b(PublicAccountChatPie publicAccountChatPie) {
int i = publicAccountChatPie.fk - 1;
publicAccountChatPie.fk = i;
return i;
}
public PublicAccountChatPie(QQAppInterface qQAppInterface, ViewGroup viewGroup, FragmentActivity fragmentActivity, Context context) {
super(qQAppInterface, viewGroup, fragmentActivity, context);
this.f13462k = null;
this.f13424a = null;
this.W = false;
this.X = false;
this.aM = "";
this.aA = "";
this.aB = "";
this.ez = -1;
this.eA = 0;
this.eB = 3;
this.Z = false;
this.aa = false;
this.ab = false;
this.f13430a = new AtomicBoolean(false);
this.i = -1L;
this.f13455b = new ArrayList();
this.f13458c = new ArrayList();
this.j = -1L;
this.k = -1L;
this.m = Long.MAX_VALUE;
this.l = 0L;
this.ag = false;
this.ah = false;
this.ff = -1;
this.f13421a = new PreloadProcHitSession("web_public_account", "com.tencent.tim:tool");
this.f85994a = new mwl(this);
this.f13432a = new mxb(this);
this.ai = false;
this.aj = false;
this.f13414a = new myu(this);
this.ak = false;
this.al = false;
this.f13416a = new myg(this);
this.f13439an = false;
this.f13440ao = false;
this.f13429a = new myk(this);
this.f13443ar = false;
this.f13444as = false;
this.f13445at = false;
this.f13446au = false;
this.f13447av = false;
this.f13419a = null;
this.f13426a = new myn(this);
}
@Override
public void a(int i, int i2, Intent intent) {
super.a(i, i2, intent);
this.f13450ay = true;
}
@Override
public void W() {
boolean z;
if (this.f13435aA && TroopBarAssistantManager.a().m1398a(this.f8371a, this.f8349a.f12447a) > 0) {
TroopBarAssistantManager.a().m1405a(this.f8371a, this.f8349a.f12447a);
}
super.W();
if (PAWeatherItemBuilder.a(this.f8349a.f12447a)) {
if (this.f13415a == null) {
this.f13415a = (PublicAccountHandler) this.f8371a.getBusinessHandler(11);
}
this.f13415a.a(2, new mxo(this));
List a2 = this.f8346a.a();
if (a2 != null) {
int size = a2.size();
for (int i = 0; i < size; i++) {
ChatMessage chatMessage = (ChatMessage) a2.get(i);
if (chatMessage != null && (chatMessage.msgtype == -5008 || chatMessage.msgtype == -3006)) {
z = false;
break;
}
}
z = true;
if (z) {
this.f13415a.a(0, 0, 0, 0);
}
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "first time fetch newest weather :" + z);
}
}
}
PublicAccountDataManager publicAccountDataManager = (PublicAccountDataManager) this.f8371a.getManager(55);
if (publicAccountDataManager != null) {
publicAccountDataManager.a(this.f8349a.f12447a, NetConnInfoCenter.getServerTimeMillis());
}
}
@Override
public void C() {
super.C();
this.f8410a.sendEmptyMessageDelayed(39, 500L);
if (this.f13423a.f32177a) {
this.f13423a.a(this.f8371a);
this.f13423a.c();
}
if (PAWeatherItemBuilder.a(this.f8349a.f12447a) && this.f8401a != null) {
this.f8401a.setHint("输城市名查天气");
}
if (!this.f13449ax && this.f13450ay) {
this.f13450ay = false;
ThreadManager.a((Runnable) new myb(this), (ThreadExcutor.IThreadListener) null, true);
}
this.k = NetConnInfoCenter.getServerTime() * 1000;
if (ChatActivityUtils.b(this.f8371a, this.f8349a)) {
this.f8453d.setVisibility(0);
this.f8453d.setOnClickListener(this);
return;
}
this.f8453d.setVisibility(8);
}
@Override
public void a(QQMessageFacade.Message message) {
boolean z;
if (message != null) {
if (this.f13423a != null) {
for (TroopInfo troopInfo : this.f13423a.f32174a) {
if (troopInfo.troopuin.equals(message.frienduin)) {
z = true;
break;
}
}
}
z = false;
if (message.istroop != 1 || !z) {
super.a(message);
}
}
}
@Override
public boolean mo2341a(boolean z) {
WebProcessManager webProcessManager;
QQComicPreloadManager qQComicPreloadManager;
this.f8371a.setHandler(getClass(), this.f8410a);
this.f13433a = new myw(this, null);
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("android.intent.action.CLOSE_SYSTEM_DIALOGS");
intentFilter.addAction("android.intent.action.SCREEN_OFF");
this.f8330a.registerReceiver(this.f13433a, intentFilter);
this.f8315K = false;
this.f8312H = false;
aV();
this.f13410a = PublicAccountManager.a();
aO();
super.mo2341a(z);
if (this.f13443ar) {
aQ();
}
if (this.f8371a.m4632a().a(this.f8349a.f12447a, this.f8349a.f85624a) > 0) {
this.am = true;
}
this.f8377a.setDrawFinishedListener(this.f13429a);
this.f13423a = new TroopEntranceBar();
this.f13423a.a(this.f8371a, mo2338a(), this, this.f8349a, this.f8341a, this.f8346a, this.f8377a);
this.f13423a.addObserver(this);
Intent intent = this.f8332a.getIntent();
this.n = System.currentTimeMillis();
this.fd = intent.getIntExtra(SubscriptRecommendController.f5060e, 0);
String stringExtra = intent.getStringExtra("from");
this.ai = intent.getBooleanExtra(an, false);
this.o = System.currentTimeMillis();
this.eH = 0;
this.eJ = 0;
this.eG = 0;
this.eI = 0;
this.fe = this.fd;
if (!this.f8332a.isFinishing()) {
PublicAccountInfo m4572b = ((PublicAccountDataManager) this.f8371a.getManager(55)).m4572b(this.f8349a.f12447a);
if (m4572b != null && PublicAccountUtil.a(m4572b.accountFlag) == -2) {
this.f13435aA = true;
aG();
this.f13423a.f();
if (this.f13423a.h <= 0) {
this.f13423a.a(Long.valueOf(this.f8349a.f12447a).longValue(), 1);
} else {
int a2 = ((TroopBindPublicAccountMgr) this.f8371a.getManager(131)).a(this.f8349a.f12447a);
if (a2 == -1) {
this.f13423a.a(Long.valueOf(this.f8349a.f12447a).longValue(), 2);
} else {
boolean z2 = (a2 & 15) == 0;
boolean z3 = (a2 >> 4) == 1;
if (z2 && z3) {
this.f13436aB = true;
} else {
this.f13423a.e();
this.f13423a.b();
}
aU();
}
}
} else {
aU();
}
PublicAccountHandler.f18324c = null;
this.ag = this.f8332a.getIntent().getBooleanExtra(aC, false);
}
if (stringExtra != null && stringExtra.equals("starShortcut")) {
PublicAccountManager.a(this.f8332a, this.f8371a, intent.getStringExtra("starhomeurl"), intent.getStringExtra("uin"), stringExtra);
return true;
}
if (NetworkUtil.b(this.f8332a.getApplicationContext()) == 1 && this.f8349a.f12447a != null && this.f8349a.f12447a.equals("2632129500")) {
HtmlOffline.b("108", this.f8371a, true, new myo(this));
}
if (aL.equals(this.f8349a.f12447a) && (qQComicPreloadManager = (QQComicPreloadManager) this.f8371a.getManager(141)) != null) {
PluginPreloader.a(qQComicPreloadManager.a(5));
}
if (this.f8355a != null) {
this.f8355a.setCustomHeight(0);
}
this.ac = PublicAccountUtil.m1487b(this.f8371a, this.f8349a.f12447a);
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "doOnCreate, isMediaAndOtherSubscript = " + this.ac);
}
this.j = NetConnInfoCenter.getServerTime() * 1000;
if (PublicAccountUtil.b(this.f8349a.f12447a) && (webProcessManager = (WebProcessManager) this.f8371a.getManager(12)) != null) {
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "doOnCreate, preload web process");
}
webProcessManager.m9581f();
}
if (this.ac) {
bc();
aL();
aN();
}
if (this.ac) {
if (this.ad) {
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", "", "0X8005A22", "0X8005A22", 0, 0, this.f8349a.f12447a, "new", "", "");
} else {
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", "", "0X8005A22", "0X8005A22", 0, 0, this.f8349a.f12447a, "old", "", "");
}
} else {
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", "", "0X8005A22", "0X8005A22", 0, 0, this.f8349a.f12447a, "", "", "");
}
if (((PublicAccountDataManager) this.f8371a.getManager(55)).m4576b(this.f8349a.f12447a)) {
this.Y = true;
}
return true;
}
private void aU() {
ThreadManager.a((Runnable) new myr(this), (ThreadExcutor.IThreadListener) null, true);
}
@Override
public boolean mo2338a() {
return false;
}
@Override
public void mo2348e() {
super.mo2348e();
this.f13428a = (PatchedButton) this.f8470f.findViewById(R.id.f48349fun_btn);
this.f13428a.setContentDescription("发送");
this.f13428a.setOnClickListener(this);
this.f85996c = (LinearLayout) this.f8470f.findViewById(R.id.f48338name_res_0x7f0904ee);
this.f85996c.setVisibility(0);
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) this.f13428a.getLayoutParams();
layoutParams.bottomMargin = 0;
layoutParams.topMargin = 1;
this.f13428a.setLayoutParams(layoutParams);
LinearLayout.LayoutParams layoutParams2 = (LinearLayout.LayoutParams) this.f8401a.getLayoutParams();
layoutParams2.bottomMargin = 0;
layoutParams2.topMargin = 1;
this.f8401a.setLayoutParams(layoutParams2);
if (CustomMenuBar.a()) {
this.f85996c.setBackgroundColor(-1);
} else {
y(80);
}
this.f13468n = (ImageView) this.f85996c.findViewById(R.id.f49858audio_btn);
this.f13468n.setOnClickListener(this);
this.f13466m = (ImageView) this.f85996c.findViewById(R.id.f49857plus_btn);
this.f13466m.setOnClickListener(this);
this.f13464l = (ImageView) this.f85996c.findViewById(R.id.f48984emo_btn);
this.f13464l.setOnClickListener(this);
if (!CustomMenuBar.a()) {
this.f13464l.setImageResource(R.drawable.f45332name_res_0x7f0210a4);
this.f13466m.setImageResource(R.drawable.f41158name_res_0x7f020050);
}
if (this.f8401a != null) {
this.f8401a.setBackgroundResource(R.drawable.f46470name_res_0x7f021516);
if (CustomMenuBar.a()) {
this.f8424b.setBackgroundColor(this.f8332a.getResources().getColor(R.color.f38745name_res_0x7f0b0158));
} else {
int a2 = AIOUtils.a(3.0f, this.f8332a.getResources());
this.f8424b.setPadding(0, a2, 0, a2);
}
}
this.f85996c = (LinearLayout) this.f8470f.findViewById(R.id.f48338name_res_0x7f0904ee);
this.f85996c.setVisibility(0);
}
@Override
public void b(Intent intent) {
super.b(intent);
if (PublicAccountUtil.m1482a(this.f8371a)) {
this.f8427b.setText(this.f8349a.f12447a);
}
}
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
this.aj = true;
return super.onTouch(view, motionEvent);
}
@Override
public boolean mo2347d() {
PublicAccountInfo m4572b = ((PublicAccountDataManager) this.f8371a.getManager(55)).m4572b(this.f8349a.f12447a);
return m4572b == null || (m4572b.accountFlag & e_attribute._IsFrdCommentFamousFeed) == 0;
}
@Override
public void A() {
super.A();
long serverTime = NetConnInfoCenter.getServerTime() * 1000;
if (!this.f13455b.isEmpty()) {
int size = this.f13455b.size() - 1;
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", this.f8349a.f12447a, "0X8005C35", "0X8005C35", 0, 1, 0, (String) this.f13455b.get(size), String.valueOf(this.i), String.valueOf(serverTime), (String) this.f13458c.get(size));
}
if (this.ac) {
if (this.ad) {
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", this.f8349a.f12447a, "0X8005D16", "0X8005D16", 0, 1, 0, "new", String.valueOf(serverTime - this.k), "", "");
} else {
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", this.f8349a.f12447a, "0X8005D16", "0X8005D16", 0, 1, 0, "old", String.valueOf(serverTime - this.k), "", "");
}
}
}
public void aC() {
String str;
if (this.f8346a.getCount() >= 1) {
ChatMessage chatMessage = (ChatMessage) this.f8346a.a().get(this.f8346a.getCount() - 1);
String str2 = "0";
if (chatMessage != null) {
String extInfoFromExtStr = chatMessage.getExtInfoFromExtStr("gdt_msgClick");
if (!TextUtils.isEmpty(extInfoFromExtStr)) {
try {
JSONObject jSONObject = new JSONObject(extInfoFromExtStr);
if (jSONObject.has("ad_id")) {
str2 = jSONObject.getString("ad_id");
}
str = str2;
} catch (Exception e) {
str = "0";
}
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", "" + chatMessage.frienduin, "0X8005C38", "0X8005C38", 0, 1, 0, chatMessage.getExtInfoFromExtStr("pa_msgId"), String.valueOf(NetConnInfoCenter.getServerTime() * 1000), "", str);
}
}
}
if (this.ac) {
long serverTime = NetConnInfoCenter.getServerTime() * 1000;
if (this.ad) {
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", this.f8349a.f12447a, "0X8005D17", "0X8005D17", 0, 1, 0, "new", String.valueOf(serverTime - this.j), "", "");
} else {
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", this.f8349a.f12447a, "0X8005D17", "0X8005D17", 0, 1, 0, "old", String.valueOf(serverTime - this.j), "", "");
}
}
}
@Override
public void w() {
if (this.f8377a != null) {
this.f8377a.setDrawFinishedListener(null);
}
if (this.f8315K) {
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "hasDestory = true return");
return;
}
return;
}
PublicAccountUtil.m1477a();
if (this.f13433a != null) {
try {
this.f8330a.unregisterReceiver(this.f13433a);
} catch (Exception e) {
}
this.f13433a = null;
}
if (this.f13456b != null) {
PublicAccountManager.a().a(this.f13456b);
}
if (this.f13459c != null) {
this.f13459c.setObserver(null);
}
if (this.f13413a != null) {
this.f8332a.removeObserver(this.f13413a);
this.f13413a = null;
}
super.w();
if (this.f13410a != null) {
this.f13410a.m1066a(mo2338a());
this.f13410a.a(this.f8330a);
}
for (ChatMessage chatMessage : this.f8346a.a()) {
if (MessageForStructing.class.isInstance(chatMessage)) {
AbsStructMsg absStructMsg = ((MessageForStructing) chatMessage).structingMsg;
if (StructMsgForGeneralShare.class.isInstance(absStructMsg)) {
((StructMsgForGeneralShare) absStructMsg).unInitPay();
}
}
}
if (this.d != null && this.d.isShowing()) {
this.d.dismiss();
this.d = null;
}
if (this.h != null && this.h.isShowing()) {
this.h.dismiss();
this.h = null;
}
if (this.f85994a.hasMessages(10)) {
this.f85994a.removeMessages(10);
}
if (this.f13452b != null && this.f13452b.isShowing()) {
this.f13452b.dismiss();
this.f13452b = null;
}
if (this.f13423a != null) {
this.f13423a.a();
}
if (this.f13415a != null) {
this.f13415a.e();
}
aC();
aY();
if (this.n != 0) {
this.n = System.currentTimeMillis() - this.n;
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", "" + this.f8349a.f12447a, "0X80064D5", "0X80064D5", 0, 0, "", "" + this.n, "" + this.fl, "");
this.n = 0L;
this.fd = 0;
}
if (this.am) {
ThreadManager.b(new myt(this));
}
PublicAccountDataManager publicAccountDataManager = (PublicAccountDataManager) this.f8371a.getManager(55);
if (publicAccountDataManager != null) {
publicAccountDataManager.a(this.f8349a.f12447a, NetConnInfoCenter.getServerTimeMillis());
}
aP();
}
@Override
public void g(Intent intent) {
aV();
if (this.f8349a.f12447a != null) {
if (!this.f8349a.f12447a.equals(intent.getStringExtra("uin"))) {
aY();
this.o = System.currentTimeMillis();
}
}
if (this.f8371a.m4632a().a(this.f8349a.f12447a, this.f8349a.f85624a) > 0) {
this.am = true;
}
aO();
if (this.f13443ar) {
this.f8402a.m10593a();
if (this.f13412a != null) {
this.f13412a.setVisibility(8);
}
if (this.f8424b != null) {
this.f8424b.setVisibility(8);
}
if (this.f8482h != null) {
this.f8482h.setVisibility(8);
}
if (this.f8487i != null) {
this.f8487i.setVisibility(8);
}
}
super.g(intent);
if (this.f13443ar) {
this.f8371a.addObserver(this.f13426a);
aQ();
}
if (!this.f8332a.isFinishing() && !this.f13443ar) {
if (this.f8371a != null && !this.f8371a.getAccount().equals(this.f13410a.m1063a())) {
this.f13410a.m1066a(mo2338a());
}
List m1064a = this.f13410a.m1064a(this.f8371a, mo2338a());
c(m1064a);
this.f13431a = this.f13410a.a((Context) this.f8332a, this.f8371a, mo2338a(), this.f13432a, false);
if (m1064a != null && !m1064a.isEmpty()) {
n(true);
}
}
String stringExtra = intent.getStringExtra("from");
if (stringExtra != null && stringExtra.equals("starShortcut")) {
PublicAccountManager.a(this.f8332a, this.f8371a, intent.getStringExtra("starhomeurl"), intent.getStringExtra("uin"), stringExtra);
}
this.f13437aC = false;
}
@Override
public void E() {
super.E();
this.f13449ax = false;
this.f13450ay = false;
}
@Override
public void ah() {
super.ah();
this.f8371a.addObserver(this.f13414a);
this.f8371a.m4635a().addObserver(this);
this.f8371a.addObserver(this.f13416a);
if (this.f13443ar) {
this.f8371a.addObserver(this.f13426a);
}
}
@Override
public void ai() {
super.ai();
this.f8371a.removeObserver(this.f13414a);
if (this.f8371a.m4635a() != null) {
this.f8371a.m4635a().deleteObserver(this);
}
this.f8371a.removeObserver(this.f13416a);
if (this.f13443ar) {
this.f8371a.removeObserver(this.f13426a);
}
}
private void aV() {
if (this.f8332a.getIntent().getExtras() == null) {
x();
}
}
public void s(int i) {
if (this.d == null) {
this.d = new QQProgressDialog(this.f8341a.getContext(), this.f8332a.getTitleBarHeight());
}
if (!this.f8332a.isFinishing() && this.d != null) {
this.d.b(i);
if (!this.d.isShowing()) {
this.d.show();
}
}
}
public void aD() {
if (!this.f8332a.isFinishing() && this.d != null && this.d.isShowing()) {
this.d.dismiss();
}
}
private void a(View view, int i, int i2, Animator.AnimatorListener animatorListener) {
ValueAnimator ofInt = ValueAnimator.ofInt(1, 100);
ofInt.addUpdateListener(new myv(this, view, i, i2));
ofInt.addListener(animatorListener);
ofInt.setDuration(500L).start();
}
public void b(View view) {
view.getLayoutParams().height = 0;
view.requestLayout();
}
public void a(View view, int i) {
view.getLayoutParams().height = i;
view.requestLayout();
}
public void aE() {
if (Build.VERSION.SDK_INT < 11) {
this.f8341a.post(new mwo(this));
this.f8377a.a(this.q);
this.f13448aw = true;
this.f85994a.sendEmptyMessage(1);
return;
}
a(this.q, this.q.getHeight(), 0, new mwp(this));
this.f13462k.setTranslationY(0.0f);
TranslateAnimation translateAnimation = new TranslateAnimation(0.0f, 0.0f, 0.0f, -this.f13462k.getHeight());
translateAnimation.setDuration(500L);
translateAnimation.setFillAfter(true);
translateAnimation.setAnimationListener(new mwq(this));
this.f13462k.startAnimation(translateAnimation);
}
@Override
public int i() {
View childAt = this.f8377a.getChildAt(0);
if (this.s != null && childAt != this.s) {
this.fa = 0;
this.s = childAt;
} else {
r0 = childAt != null ? -childAt.getTop() : 0;
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "ScrollY: " + String.valueOf(r0) + " OldScrollY: " + String.valueOf(this.fa));
}
this.s = childAt;
}
return r0;
}
@Override
public void a(AbsListView absListView, int i, int i2, int i3) {
super.a(absListView, i, i2, i3);
if (this.f13462k != null && this.q != null && this.eB != 5) {
if (this.fc > i3) {
this.eB = 4;
} else if (this.fc < i3) {
this.eB = 3;
}
this.fc = i3;
switch (this.eB) {
case 3:
if (i3 > i2 && !this.f13448aw) {
this.fb = this.q.getLayoutParams().height;
b(this.q);
this.f13448aw = true;
}
this.eB = 2;
this.ak = true;
break;
case 4:
if (i3 == i2 && this.f13448aw) {
if (this.fb != 0) {
a(this.q, this.fb);
}
this.f13448aw = false;
this.aa = true;
}
this.eB = 2;
this.ak = true;
break;
}
if (this.f13448aw || this.aa) {
if (this.ak && !this.aa) {
this.ak = false;
return;
}
if (this.f13462k.getHeight() != 0) {
this.fb = this.f13462k.getHeight();
}
int i4 = this.fa - i();
this.fa = i();
if (this.fj * i4 < 0) {
this.fj = i4;
return;
}
this.fj = i4;
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "Move = " + String.valueOf(i4));
}
switch (this.eA) {
case 0:
if (((i4 > 5 && this.aj) || (i == this.f8377a.m() && i4 > 0 && this.aj)) && !this.Z) {
this.Z = true;
TranslateAnimation translateAnimation = new TranslateAnimation(0.0f, 0.0f, 0.0f, -this.fb);
translateAnimation.setFillAfter(true);
translateAnimation.setDuration(250L);
translateAnimation.setAnimationListener(new mws(this));
this.f13462k.startAnimation(translateAnimation);
return;
}
return;
case 1:
if (((i4 < -5 && this.aj) || this.aa || (i + i2 == i3 && i4 < 0 && this.aj)) && !this.Z) {
this.Z = true;
TranslateAnimation translateAnimation2 = new TranslateAnimation(0.0f, 0.0f, -this.fb, 0.0f);
translateAnimation2.setFillAfter(true);
translateAnimation2.setDuration(250L);
translateAnimation2.setAnimationListener(new mwt(this));
this.f13462k.startAnimation(translateAnimation2);
return;
}
return;
default:
return;
}
}
}
}
void b(List list) {
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "saveReadedToDB");
}
ThreadManager.a((Runnable) new mwu(this, list), (ThreadExcutor.IThreadListener) null, false);
}
void a(AbsListView absListView) {
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
ArrayList arrayList3 = new ArrayList();
ArrayList arrayList4 = new ArrayList();
List<ChatMessage> arrayList5 = new ArrayList();
int s = absListView.s();
while (true) {
int i = s;
if (i > absListView.t()) {
break;
}
ChatMessage chatMessage = (ChatMessage) this.f8346a.getItem(i);
if (chatMessage != null) {
try {
if (!chatMessage.getExtInfoFromExtStr("pa_msgHasRead").equals("") && !chatMessage.getExtInfoFromExtStr("pa_msgHasRead").equals("true")) {
arrayList5.add(chatMessage);
String extInfoFromExtStr = chatMessage.getExtInfoFromExtStr("pa_msgId");
if (TextUtils.isEmpty(extInfoFromExtStr)) {
extInfoFromExtStr = "0";
}
long parseLong = Long.parseLong(extInfoFromExtStr);
if (chatMessage.getExtInfoFromExtStr("pa_should_report").equals("true")) {
arrayList.add(Long.valueOf(parseLong));
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "Report message at index: " + String.valueOf(i) + ". MessageId is " + parseLong);
}
}
chatMessage.saveExtInfoToExtStr("pa_msgHasRead", "true");
String extInfoFromExtStr2 = chatMessage.getExtInfoFromExtStr("msg_template_id");
if (extInfoFromExtStr2 == null) {
extInfoFromExtStr2 = "";
}
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", this.f8349a.f12447a, "0X80057C4", "0X80057C4", 0, 0, this.f8349a.f12447a, String.valueOf(parseLong), extInfoFromExtStr2, "");
}
if (chatMessage.getExtInfoFromExtStr("ad_msgHasRead").equals("false")) {
chatMessage.saveExtInfoToExtStr("ad_msgHasRead", "true");
String extInfoFromExtStr3 = chatMessage.getExtInfoFromExtStr("pa_msgId");
String extInfoFromExtStr4 = chatMessage.getExtInfoFromExtStr("gdt_msgClick");
String str = "0";
String extInfoFromExtStr5 = chatMessage.getExtInfoFromExtStr("gdt_view_id");
try {
JSONObject jSONObject = new JSONObject(extInfoFromExtStr4);
if (jSONObject.has("ad_id")) {
str = jSONObject.getString("ad_id");
}
} catch (Exception e) {
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, " parse ad_id error");
}
}
arrayList2.add(extInfoFromExtStr3);
this.f13458c.add(str);
arrayList3.add(extInfoFromExtStr4);
arrayList4.add(extInfoFromExtStr5);
if (!arrayList5.contains(chatMessage)) {
arrayList5.add(chatMessage);
}
}
} catch (Exception e2) {
}
}
s = i + 1;
}
b(arrayList5);
if (!arrayList.isEmpty()) {
try {
this.f13410a.a(BaseApplication.getContext(), this.f8371a, 0L, 0L, Long.parseLong(this.f8349a.f12447a), Long.parseLong(this.f8371a.getCurrentAccountUin()), 2, arrayList);
} catch (Exception e3) {
return;
}
}
for (ChatMessage chatMessage2 : arrayList5) {
if ("1".equals(chatMessage2.getExtInfoFromExtStr("is_AdArrive_Msg"))) {
if (this.i == -1) {
this.i = NetConnInfoCenter.getServerTime() * 1000;
}
this.f13455b = arrayList2;
PAReportUtil.a(this.f8371a, "", "", this.f8349a.f12447a, arrayList3, arrayList2, arrayList4);
return;
}
}
}
@Override
public void a(AbsListView absListView, int i) {
super.a(absListView, i);
if (i == 0) {
this.f8410a.sendEmptyMessage(39);
}
}
public void aF() {
ListAdapter listAdapter;
AccountDetail a2;
if (this.f8341a != null && this.f8377a != null) {
this.f13462k = LayoutInflater.from(this.f8332a.getBaseContext()).inflate(R.layout.f56405name_res_0x7f03003c, (ViewGroup) this.f8341a, false);
if (this.f13462k != null) {
this.f13462k.setClickable(true);
this.f13462k.findViewById(R.id.f47668icon).setOnClickListener(new mwv(this));
if (this.ey == 2) {
this.f13462k.findViewById(R.id.f47967name_res_0x7f09037b).setVisibility(8);
this.f13462k.findViewById(R.id.f47970name_res_0x7f09037e).setVisibility(8);
} else if (this.f13443ar) {
this.f13462k.findViewById(R.id.f47967name_res_0x7f09037b).setVisibility(8);
this.f13462k.findViewById(R.id.f47970name_res_0x7f09037e).setVisibility(8);
}
this.f8341a.addView(this.f13462k);
this.q = LayoutInflater.from(this.f8332a.getBaseContext()).inflate(R.layout.f56404name_res_0x7f03003b, (ViewGroup) this.f8377a, false);
if (this.q != null) {
if (this.ey == 2) {
this.q.getLayoutParams().height = (int) this.f8332a.getResources().getDimension(R.dimen.f39966name_res_0x7f0c0228);
} else if (this.f13443ar) {
this.q.getLayoutParams().height = (int) this.f8332a.getResources().getDimension(R.dimen.f39966name_res_0x7f0c0228);
}
ChatXListView chatXListView = this.f8377a;
listAdapter = ChatXListView.f88368b;
this.f8377a.setAdapter((ListAdapter) null);
this.f8377a.a(this.q);
this.f8377a.setAdapter(listAdapter);
PublicAccountDataManager publicAccountDataManager = (PublicAccountDataManager) this.f8371a.getManager(55);
if (publicAccountDataManager != null && (a2 = publicAccountDataManager.a(this.f8349a.f12447a)) != null && this.X) {
c(a2);
this.X = false;
}
this.f13424a = (PublicMenuBar) this.f13462k.findViewById(R.id.f47971name_res_0x7f09037f);
this.f13424a.setOnMenuItemClickListener(new mww(this));
this.f13424a.a();
if (!this.f13443ar) {
MenuItem menuItem = new MenuItem("DO_NOT_FOLLOW", this.f8332a.getString(this.f13436aB ? R.string.f64990name_res_0x7f0a19c2 : R.string.f64992name_res_0x7f0a19c4), mo2338a().getResources().getDrawable(R.drawable.f42665name_res_0x7f020638), 0);
MenuItem menuItem2 = new MenuItem("DO_FOLLOW", this.f8332a.getString(R.string.f64991name_res_0x7f0a19c3), mo2338a().getResources().getDrawable(R.drawable.f42632name_res_0x7f020617), 1);
this.f13424a.a(menuItem, R.layout.f57071name_res_0x7f0302d6);
this.f13424a.a(menuItem2, R.layout.f57071name_res_0x7f0302d6);
} else {
MenuItem menuItem3 = new MenuItem("DO_CANCEL", this.f8332a.getString(R.string.f64121name_res_0x7f0a1658), mo2338a().getResources().getDrawable(R.drawable.f42665name_res_0x7f020638), 0);
MenuItem menuItem4 = new MenuItem("DO_FOLLOW", this.f8332a.getString(R.string.f64991name_res_0x7f0a19c3), mo2338a().getResources().getDrawable(R.drawable.f42632name_res_0x7f020617), 1);
MenuItem menuItem5 = new MenuItem("DO_NOT_FOLLOW", this.f8332a.getString(R.string.f64990name_res_0x7f0a19c2), mo2338a().getResources().getDrawable(R.drawable.f42665name_res_0x7f020638), 0);
this.f13467n = this.f13424a.a(menuItem3, R.layout.f57071name_res_0x7f0302d6);
this.f13465m = this.f13424a.a(menuItem5, R.layout.f57071name_res_0x7f0302d6);
this.f13469o = this.f13424a.a(menuItem4, R.layout.f57071name_res_0x7f0302d6);
}
this.f13424a.setSwitchButtonVisibility(false);
this.f13424a.setVisibility(0);
}
}
}
}
public void aG() {
this.f8377a.setOnScrollListener(this);
this.f8402a.m10593a();
if (this.f8424b != null) {
this.f8424b.setVisibility(8);
}
if (this.f8482h != null) {
this.f8482h.setVisibility(8);
}
if (this.f8487i != null) {
this.f8487i.setVisibility(8);
}
}
public void aH() {
if (this.f13427a == null) {
this.f13427a = (ActionSheet) ActionSheetHelper.a(this.f8332a, (View) null);
this.f13427a.m10334a((CharSequence) "确定后你将不再收到通知消息");
this.f13427a.a("确定", 3);
this.f13427a.d(R.string.f63203cancel);
this.f13427a.setOnDismissListener(new mwz(this));
this.f13427a.a(new mxa(this));
}
if (!this.f13427a.isShowing()) {
this.al = false;
this.f13427a.show();
}
}
public void aW() {
String m4704d = this.f8371a.m4704d();
TicketManager ticketManager = (TicketManager) this.f8371a.getManager(2);
String skey = ticketManager != null ? ticketManager.getSkey(m4704d) : null;
HashMap hashMap = new HashMap();
Bundle bundle = new Bundle();
bundle.putString(ApiConstants.Provider.J, "0");
bundle.putString("puin", "" + this.f8349a.f12447a);
bundle.putString("Cookie", "uin=" + m4704d + ";skey=" + skey);
bundle.putString("Referer", "http://buluo.qq.com");
hashMap.put(HttpWebCgiAsyncTask.e, bundle);
hashMap.put(HttpWebCgiAsyncTask.d, this.f8371a.getApp().getApplicationContext());
new HttpWebCgiAsyncTask2("http://buluo.qq.com/cgi-bin/bar/extra/clean_temp_follow_state", "", new mxc(this), 1000, null).a(hashMap);
aE();
}
public void e(String str) {
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, PublicAccountManager.f4076i);
}
x(R.string.f60667name_res_0x7f0a08d7);
NewIntent newIntent = new NewIntent(BaseApplicationImpl.getContext(), PublicAccountServlet.class);
newIntent.putExtra("cmd", PublicAccountManager.f4076i);
mobileqq_mp.UnFollowRequest unFollowRequest = new mobileqq_mp.UnFollowRequest();
unFollowRequest.uin.set((int) Long.parseLong(str));
newIntent.putExtra("data", unFollowRequest.toByteArray());
this.f13457b = new mxd(this, str);
newIntent.setObserver(this.f13457b);
this.f8371a.startServlet(newIntent);
this.fk++;
PublicAccountUtil.b(this.f8371a, str);
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "unfollow exit");
}
}
private void x(int i) {
this.f8410a.postDelayed(new mxe(this, i), 500L);
}
public void a(AccountDetail accountDetail) {
ThreadManager.m4814b().postDelayed(new mxf(this, accountDetail), 10L);
}
public void b(AccountDetail accountDetail) {
if (accountDetail != null) {
EntityManager createEntityManager = this.f8371a.getEntityManagerFactory().createEntityManager();
createEntityManager.m7248b((Entity) accountDetail);
createEntityManager.m7241a();
}
}
public void aI() {
if (!this.f13449ax && this.f8341a != null) {
Resources resources = this.f8332a.getResources();
this.f13470o = (ImageView) this.f8470f.findViewById(R.id.f47182name_res_0x7f090061);
if (this.f13453b != null) {
this.f8341a.removeView(this.f13453b);
}
if (this.f13462k != null) {
this.f8341a.removeView(this.f13462k);
this.f13462k = null;
}
if (this.q != null) {
this.f8377a.a(this.q);
}
this.f13412a = (CustomMenuBar) this.f8341a.findViewById(R.id.f47976name_res_0x7f090384);
if (this.f13412a == null) {
this.f8332a.getLayoutInflater().inflate(R.layout.f56406name_res_0x7f03003d, this.f8341a);
this.f13412a = (CustomMenuBar) this.f8341a.findViewById(R.id.f47976name_res_0x7f090384);
} else {
this.f13412a.setVisibility(8);
}
if (this.f13412a != null) {
this.f13412a.setMenuType(this.f13410a.b(mo2338a()));
if (CustomMenuBar.a()) {
this.f13412a.setBackgroundColor(this.f8332a.getResources().getColor(R.color.f38745name_res_0x7f0b0158));
this.f13412a.setMinimumHeight(AIOUtils.a(48.0f, this.f8332a.getResources()));
}
if (this.f8377a != null) {
ViewGroup.LayoutParams layoutParams = this.f8377a.getLayoutParams();
ViewGroup.LayoutParams layoutParams2 = this.f13412a.getLayoutParams();
if (layoutParams != null && layoutParams2 != null && (layoutParams instanceof RelativeLayout.LayoutParams) && (layoutParams2 instanceof RelativeLayout.LayoutParams)) {
RelativeLayout.LayoutParams layoutParams3 = (RelativeLayout.LayoutParams) layoutParams;
int[] rules = layoutParams3.getRules();
if (rules.length > 2 && rules[2] == R.id.f48336inputBar) {
layoutParams3.addRule(2, R.id.f47976name_res_0x7f090384);
this.f8377a.setLayoutParams(layoutParams3);
RelativeLayout.LayoutParams layoutParams4 = (RelativeLayout.LayoutParams) layoutParams2;
layoutParams4.addRule(2, R.id.f48336inputBar);
this.f13412a.setLayoutParams(layoutParams4);
}
}
}
if (this.ab) {
TranslateAnimation translateAnimation = new TranslateAnimation(0.0f, 0.0f, AIOUtils.a(34.0f, resources), 0.0f);
translateAnimation.setDuration(250L);
translateAnimation.setFillAfter(true);
translateAnimation.setAnimationListener(new mxh(this));
this.f13412a.startAnimation(translateAnimation);
}
View findViewById = this.f8341a.findViewById(R.id.f47972name_res_0x7f090380);
findViewById.setOnClickListener(new mxj(this));
this.f13412a.setCoverView(findViewById);
this.p = this.f8341a.findViewById(R.id.f47973name_res_0x7f090381);
aX();
SharedPreferences sharedPreferences = this.f8332a.getSharedPreferences(PublicAccountManager.f4069b, 0);
if (!sharedPreferences.contains(this.f8349a.f12447a)) {
SharedPreferences.Editor edit = sharedPreferences.edit();
edit.putInt(this.f8349a.f12447a, 0);
edit.commit();
}
this.f13470o.setOnClickListener(this);
this.f13412a.setOnMenuItemClickListener(new mxk(this));
this.f13412a.setOnBackClickListner(new mxl(this));
List m1064a = this.f13410a.m1064a(this.f8371a, mo2338a());
c(m1064a);
this.f13431a = this.f13410a.a((Context) this.f8332a, this.f8371a, mo2338a(), this.f13432a, false);
if (m1064a != null && !m1064a.isEmpty()) {
n(true);
}
this.f13449ax = true;
}
}
}
public void c(List list) {
if (this.f13412a != null) {
this.f13412a.m1772a();
this.f13412a.setMenuType(this.f13410a.b(mo2338a()));
if (list == null || list.isEmpty()) {
if (this.f8424b != null) {
this.f8424b.setVisibility(0);
}
if (this.f8482h != null) {
this.f8482h.setVisibility(0);
}
if (this.f8487i != null) {
this.f8487i.setVisibility(0);
}
if (this.f13470o != null) {
this.f13470o.setVisibility(8);
return;
}
return;
}
if (this.f13470o != null) {
this.f13470o.setVisibility(0);
}
int size = list.size();
for (int i = 0; i < size && i <= 2; i++) {
mobileqq_mp.ButtonInfo buttonInfo = (mobileqq_mp.ButtonInfo) list.get(i);
MenuItem menuItem = new MenuItem(buttonInfo.key.has() ? buttonInfo.key.get() : "", buttonInfo.name.has() ? buttonInfo.name.get() : "", null, buttonInfo.id.has() ? buttonInfo.id.get() : 0);
menuItem.a(buttonInfo);
List<mobileqq_mp.ButtonInfo> list2 = buttonInfo.sub_button.has() ? buttonInfo.sub_button.get() : null;
if (list2 != null && list2.size() > 0) {
for (mobileqq_mp.ButtonInfo buttonInfo2 : list2) {
MenuItem menuItem2 = new MenuItem(buttonInfo2.key.has() ? buttonInfo2.key.get() : "", buttonInfo2.name.has() ? buttonInfo2.name.get() : "", null, buttonInfo2.id.has() ? buttonInfo2.id.get() : 0);
menuItem2.a(buttonInfo2);
menuItem.a(menuItem2);
}
}
this.f13412a.m1773a(menuItem, mo2338a());
}
}
}
public void n(boolean z) {
if (z) {
this.f8402a.m10593a();
if (this.f13412a != null) {
this.f13412a.setVisibility(0);
}
if (this.f8424b != null) {
this.f8424b.setVisibility(4);
}
if (this.f8482h != null) {
this.f8482h.setVisibility(4);
}
if (this.f8487i != null) {
this.f8487i.setVisibility(4);
}
ap();
}
}
private void aX() {
SharedPreferences sharedPreferences = this.f8332a.getSharedPreferences("public_aio_setting", 0);
String str = "firstOpen_" + this.f8349a.f12447a;
if (!sharedPreferences.getBoolean(str, false)) {
PublicAccountInfo m4572b = ((PublicAccountDataManager) this.f8371a.getManager(55)).m4572b(this.f8349a.f12447a);
if (m4572b != null && (m4572b.accountFlag & 65536) != 0) {
this.f13410a.a((Context) this.f8332a, this.f8371a, this.f8349a.f12447a, "0x9e370001hd", false, 0.0d, 0.0d, (BusinessObserver) null);
}
ThreadManager.b(new mxm(this, sharedPreferences, str));
}
}
@Override
public void r() {
if (this.f8423b != null) {
this.f8423b.setImageResource(R.drawable.f46583name_res_0x7f021587);
this.f8423b.setContentDescription(this.f8332a.getText(R.string.f60752name_res_0x7f0a092d));
}
}
@Override
public void o() {
Intent intent = new Intent();
intent.putExtra(PublicAccountUtil.f5266j, true);
intent.putExtra("uin", this.f8349a.f12447a);
intent.putExtra(AppConstants.Key.h, this.f8349a.f12450d);
intent.putExtra("uintype", this.f8349a.f85624a);
if (this.f13443ar) {
intent.putExtra("qidian_chat", true);
}
if (this.f13422a != null) {
intent.putExtra(AppConstants.Key.eu, this.f13422a.msgId);
}
if (1 == this.f8349a.f85624a || 1000 == this.f8349a.f85624a || 1020 == this.f8349a.f85624a || 1004 == this.f8349a.f85624a) {
intent.putExtra("troop_uin", this.f8349a.f12448b);
}
PublicAccountUtil.a(intent, this.f8371a, this.f8332a.getActivity(), this.f8349a.f12447a, -1, 2000, 1);
}
protected void o(boolean z) {
if (this.f13468n != null) {
this.f13468n.clearAnimation();
this.f13468n.setVisibility(z ? 0 : 8);
this.f8401a.setVisibility(z ? 8 : 0);
if (this.f8481g) {
this.f13428a.setVisibility(z ? 4 : 0);
}
if (z) {
if (this.f13408a == null) {
ImageSpan imageSpan = new ImageSpan(this.f8330a, (int) R.drawable.f41174name_res_0x7f020060);
SpannableString spannableString = new SpannableString("文字输入");
spannableString.setSpan(imageSpan, 0, spannableString.length(), 33);
this.f13408a = spannableString;
}
this.f13428a.setText(this.f13408a);
}
}
}
private void aY() {
if (this.o != 0) {
HashMap hashMap = new HashMap();
if (this.f8371a != null) {
String currentAccountUin = this.f8371a.getCurrentAccountUin();
if (currentAccountUin != null) {
hashMap.put("uin", currentAccountUin);
}
if (this.f8349a != null && this.f8349a.f12447a != null) {
hashMap.put("puin", this.f8349a.f12447a);
}
hashMap.put("menu_click", "" + this.eG);
hashMap.put("menu_to_webview", "" + this.eI);
hashMap.put("article_click", "" + this.eH);
hashMap.put("article_to_webview", "" + this.eJ);
hashMap.put(ThemeDownloader.f, "" + NetworkCenter.a().m8569a());
hashMap.put(ApiConstants.Provider.w, "" + this.fe);
long currentTimeMillis = System.currentTimeMillis() - this.o;
boolean z = (this.eJ == 0 && this.eI == 0) ? false : true;
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "public account webview preload data: duration: " + currentTimeMillis + ", entered: " + z + ", exinfo: " + hashMap.toString());
}
StatisticCollector.a((Context) BaseApplication.getContext()).a(null, aN, z, currentTimeMillis, 0L, hashMap, "");
this.o = 0L;
this.fe = 0;
this.eI = 0;
this.eG = 0;
this.eH = 0;
this.eJ = 0;
}
}
}
@Override
public void onClick(View view) {
if (view.getId() == R.id.f47182name_res_0x7f090061) {
n(true);
}
if (R.id.f48300ivTitleBtnRightImage == view.getId()) {
ReportController.b(this.f8371a, "dc01331", "", "", "0X8004EFD", "0X8004EFD", 0, 0, "", "", "", "");
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", "", "0X8004F08", "0X8004F08", 0, 0, "", "", "", "");
PAStartupTracker.a(null, PAStartupTracker.f94591c, "");
}
if (view.getId() == R.id.f48349fun_btn) {
long currentTimeMillis = System.currentTimeMillis();
if (QLog.isColorLevel() && this.f13468n != null) {
QLog.d(BaseChatPie.f84924a, 2, " onClick fun_btn start mInputStat = " + this.s + " text.length " + this.f8401a.getText().length() + "mAudioBtn visibility:" + this.f13468n.getVisibility() + " currentPanel:" + this.f8402a.a() + " currenttime:" + System.currentTimeMillis());
}
if (this.f8401a.getText().length() > 0 && this.f8402a.a() != 2 && this.f13468n != null && this.f13468n.getVisibility() != 0) {
c();
if (PAWeatherItemBuilder.a(this.f8349a.f12447a)) {
if (this.f8402a.a() == 1 && ((InputMethodManager) this.f8330a.getSystemService("input_method")).isActive(this.f8401a)) {
this.f8402a.m10593a();
}
ReportController.b(this.f8371a, "dc01332", "weather_public_account", "", "weather_public_account", "city_search_click", 0, 0, "", "", "", "");
}
}
if (QLog.isColorLevel()) {
long currentTimeMillis2 = System.currentTimeMillis() - currentTimeMillis;
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, " onClick fun_btn end mInputStat = " + this.s + "text.length" + this.f8401a.getText().length() + "cast time :" + currentTimeMillis2);
}
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", "", "0X800584F", "0X800584F", 0, 0, "", "", "", "");
}
}
if (view.getId() == R.id.f48984emo_btn && this.s != 1) {
if (this.f8402a.a() == 3) {
this.f8402a.a(1);
ReportController.b(this.f8371a, "dc01331", "", "", "ep_mall", "0X8005796", 0, 0, "", "", "", "");
} else {
this.f8402a.a(3);
if (this.f13468n != null && this.f13468n.getVisibility() == 0) {
o(false);
}
ReportController.b(this.f8371a, "dc01331", "", "", "ep_mall", "0X8005795", 0, 0, "", "", "", "");
}
}
if (view.getId() == R.id.f49857plus_btn) {
ShortVideoUtils.a(this.f8371a);
if (this.f8402a.a() == 8) {
if (this.f13466m != null) {
this.f13466m.setContentDescription(this.f8371a.getApplication().getString(R.string.f65634name_res_0x7f0a1c46));
}
if (this.f8387a != null && this.f8387a.getVisibility() == 0) {
if (QLog.isColorLevel()) {
QLog.d("fastimage", 2, "BaseCHatPie onClick keybordicon removeFastImage");
}
mo2341a(true);
}
this.f8402a.a(1);
} else {
X();
this.f8402a.a(8);
if (this.f13468n != null && this.f13468n.getVisibility() == 0) {
o(false);
}
if (this.f13466m != null) {
this.f13466m.setContentDescription(this.f8371a.getApplication().getString(R.string.f65635name_res_0x7f0a1c47));
}
k(0);
}
}
if (view.getId() == R.id.f49858audio_btn) {
if (this.f8402a.a() == 2) {
this.f8402a.m10593a();
if (this.f13468n != null) {
this.f13468n.setImageResource(this.p);
this.f13468n.setContentDescription(this.f8371a.getApp().getString(R.string.f63481name_res_0x7f0a13d8));
}
} else {
this.f8402a.a(2);
if (this.f13468n != null) {
this.f13468n.setImageResource(this.q);
this.f13468n.setContentDescription(this.f8371a.getApp().getString(R.string.f63482name_res_0x7f0a13d9));
}
}
}
if (view.getId() == R.id.f47177msgbox) {
af();
}
if (this.ac && view.getId() == R.id.f48349fun_btn) {
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", this.f8349a.f12447a, "0X8005C9C", "0X8005C9C", 0, 1, 0, "", "", "", "");
}
if ((view.getTag() instanceof String) && PubAccountTipsManager.f82507b.equals((String) view.getTag()) && this.f8330a != null && !TextUtils.isEmpty(this.f8349a.f12447a)) {
if (System.currentTimeMillis() - this.l >= 1000) {
this.l = System.currentTimeMillis();
Intent intent = new Intent(this.f8330a, QQBrowserActivity.class);
intent.putExtra("url", "http://gouwu.qq.com/m/html/shop_map.html?_wv=1027&shop_uin=" + this.f8349a.f12447a);
intent.putExtra("hide_more_button", true);
intent.putExtra("webStyle", "noBottomBar");
this.f8330a.startActivity(intent);
ReportController.b(this.f8371a, "dc01332", "Shop_lifeservice", "", "Shop_nearbyiconClk", "Clk_shopnearbyicon", 0, 0, "", "", "", "");
} else {
return;
}
}
super.onClick(view);
}
@Override
public void c(Intent intent) {
super.c(intent);
a(this.f8349a.f12447a, this.f8349a.f85624a, intent);
this.f8402a.post(new mxn(this));
ba();
}
private void a(String str, int i, Intent intent) {
if (intent.getBooleanExtra(AppConstants.Key.y, false)) {
PublicAccountHandler.a(this.f8371a, this.f8349a.f12447a, "Pb_account_lifeservice", "mp_msg_sys_6", "msg_push");
long longExtra = intent.getLongExtra(AppConstants.Key.z, 0L);
long longExtra2 = intent.getLongExtra(AppConstants.Key.A, 0L);
if (longExtra > 0) {
ThreadManager.a(new mxp(this, str, i, longExtra, longExtra2), 5, null, true);
}
}
if (intent.hasExtra(AppConstants.Key.y)) {
intent.removeExtra(AppConstants.Key.y);
}
}
public void aZ() {
PublicAccountDataManager publicAccountDataManager;
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "showEqqLbsEnableDialog(): BEGIN");
}
if (!this.f8332a.getIntent().getBooleanExtra(BusinessCmrTmpChatPie.an, false) && (publicAccountDataManager = (PublicAccountDataManager) this.f8371a.getManager(55)) != null) {
this.f13420a = publicAccountDataManager.m4577c(this.f8349a.f12447a);
}
if (this.f13420a != null) {
a(this.f13420a);
return;
}
NewIntent newIntent = new NewIntent(this.f8332a.getApplicationContext(), PublicAccountServlet.class);
newIntent.putExtra("cmd", PublicAccountManager.f4074g);
mobileqq_mp.GetPublicAccountDetailInfoRequest getPublicAccountDetailInfoRequest = new mobileqq_mp.GetPublicAccountDetailInfoRequest();
getPublicAccountDetailInfoRequest.seqno.set(0);
getPublicAccountDetailInfoRequest.version.set(1);
getPublicAccountDetailInfoRequest.versionInfo.set("6.5.5,3,1834");
try {
getPublicAccountDetailInfoRequest.uin.set((int) Long.parseLong(this.f8349a.f12447a));
} catch (Exception e) {
}
newIntent.putExtra("data", getPublicAccountDetailInfoRequest.toByteArray());
newIntent.setObserver(new mxq(this));
this.f8371a.startServlet(newIntent);
}
@Override
public void m() {
super.m();
aJ();
}
public void aJ() {
if (this.f8349a.f85624a == 1008) {
this.f8453d.setVisibility(8);
}
}
public void a(PublicAccountInfo publicAccountInfo) {
if (publicAccountInfo != null) {
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "showEqqLbsEnableDialog(): eqqPublicAccountInfo.mIsSyncLbsSelected=" + publicAccountInfo.mIsSyncLbsSelected + ", eqqPublicAccountInfo.isSyncLbs=" + publicAccountInfo.isSyncLbs + ", eqqPublicAccountInfo.mIsAgreeSyncLbs=" + publicAccountInfo.mIsAgreeSyncLbs);
}
PublicAccountDataManager publicAccountDataManager = (PublicAccountDataManager) this.f8371a.getManager(55);
if (publicAccountDataManager == null) {
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "showEqqLbsEnableDialog(): pam is null");
return;
}
return;
} else if (publicAccountInfo.isSyncLbs && !publicAccountInfo.mIsSyncLbsSelected && !publicAccountInfo.mIsAgreeSyncLbs && !this.f13451az) {
this.g = DialogUtil.a((Context) this.f8332a, 230, this.f8332a.getString(R.string.f59212name_res_0x7f0a0326), String.format(this.f8332a.getString(R.string.f59213name_res_0x7f0a0327), this.f8349a.f12450d), (int) R.string.f59214name_res_0x7f0a0328, (int) R.string.f59215name_res_0x7f0a0329, (DialogInterface.OnClickListener) new mxs(this, publicAccountInfo, publicAccountDataManager), (DialogInterface.OnClickListener) new mxu(this, publicAccountInfo, publicAccountDataManager));
this.g.setOnDismissListener(new mxv(this));
this.g.setCanceledOnTouchOutside(true);
if (!this.f8332a.isFinishing()) {
this.g.show();
}
this.f13451az = true;
}
} else if (QLog.isColorLevel()) {
QLog.e(BaseChatPie.f84924a, 2, "showEqqLbsEnableDialog(): eqqPublicAccountInfo=NULL, uin=" + this.f8349a.f12447a);
}
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "showEqqLbsEnableDialog(): END");
}
}
public void a(int i, BusinessObserver businessObserver) {
EnterpriseQQHandler enterpriseQQHandler = (EnterpriseQQHandler) this.f8371a.getBusinessHandler(21);
if (enterpriseQQHandler != null) {
enterpriseQQHandler.a(this.f8349a.f12447a, 3, i, 1, businessObserver);
}
}
@Override
public void b(int i) {
String extInfoFromExtStr;
int i2 = (-65536) & i;
super.b(i);
if (this.f8349a != null && this.f8349a.f12447a != null) {
List m5049a = this.f8371a.m4635a().m5049a(this.f8349a.f12447a, this.f8349a.f85624a);
if ((i2 == 196608 || i2 == 131072) && m5049a.size() > 0) {
boolean z = false;
for (int size = m5049a.size() - 1; size >= 0; size--) {
ChatMessage chatMessage = (ChatMessage) m5049a.get(size);
if (!z) {
z = (this.m == Long.MAX_VALUE || chatMessage.uniseq == this.m) ? true : true;
if (this.m != Long.MAX_VALUE) {
}
}
boolean z2 = z;
if (z2) {
if ((chatMessage instanceof MessageForStructing) && StructLongMessageDownloadProcessor.b(chatMessage) && ((extInfoFromExtStr = chatMessage.getExtInfoFromExtStr("longMsg_State")) == null || !"3".equals(extInfoFromExtStr))) {
chatMessage.saveExtInfoToExtStr("longMsg_State", "1");
StructLongMessageDownloadProcessor.a(this.f8371a, (MessageForStructing) chatMessage);
}
this.m = chatMessage.uniseq;
z = z2;
} else {
z = z2;
}
}
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "REFRESH_FLAG_RELOAD to load long message");
}
}
if (i != 131072) {
this.f8410a.sendEmptyMessage(20);
}
this.f8410a.sendEmptyMessage(39);
}
}
private void c(AccountDetail accountDetail) {
if (this.f13462k != null) {
TextView textView = (TextView) this.f13462k.findViewById(R.id.f47968name_res_0x7f09037c);
TextView textView2 = (TextView) this.f13462k.findViewById(R.id.f47969name_res_0x7f09037d);
ImageView imageView = (ImageView) this.f13462k.findViewById(R.id.f47668icon);
if (this.f13436aB) {
if (this.f13423a != null && this.f13423a.h > 0 && this.f13423a.f32174a.size() > 0) {
TroopInfo troopInfo = (TroopInfo) this.f13423a.f32174a.get(0);
textView.setText(troopInfo.troopname);
textView2.setText(String.format(this.f8330a.getString(R.string.f60690name_res_0x7f0a08ee), accountDetail.name));
imageView.setImageDrawable(FaceDrawable.a(this.f8371a, 4, troopInfo.troopuin));
String str = "";
if (this.f13423a.f32174a.size() > 0) {
str = ((TroopInfo) this.f13423a.f32174a.get(0)).troopuin;
}
ReportController.b(this.f8371a, "dc01332", "Grp_public", "", "oper", "exp_temp", 0, 0, str, "" + (this.f8349a == null ? "" : this.f8349a.f12447a), "", "");
}
} else {
textView.setText(accountDetail.name);
if (this.aA != null) {
textView2.setText(this.aA);
}
imageView.setImageDrawable(FaceDrawable.a(this.f8371a, mo2338a().f12447a, (byte) 3));
}
if (this.f13413a == null) {
this.f13413a = new mxw(this, imageView);
this.f8332a.addObserver(this.f13413a);
}
ImageView imageView2 = (ImageView) this.f13462k.findViewById(R.id.f47671name_res_0x7f090253);
if (accountDetail.certifiedGrade == 0) {
imageView2.setVisibility(8);
} else {
imageView2.setVisibility(0);
}
}
}
@Override
public boolean handleMessage(Message message) {
AccountDetail a2;
switch (message.what) {
case 19:
if (this.p != null) {
this.p.setVisibility(0);
this.f8410a.removeMessages(20);
this.f8410a.sendEmptyMessageDelayed(20, 10000L);
break;
}
break;
case 20:
this.f8410a.removeMessages(20);
if (this.p != null && this.p.getVisibility() == 0) {
this.p.setVisibility(8);
break;
}
break;
case 38:
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "ChatActivityConstants.MSG_PUBLICACCOUNT_ACCOUNTDETAIL");
}
PublicAccountDataManager publicAccountDataManager = (PublicAccountDataManager) this.f8371a.getManager(55);
if (publicAccountDataManager != null && (a2 = publicAccountDataManager.a(this.f8349a.f12447a)) != null) {
this.f8427b.setText(a2.name);
if (this.X) {
c(a2);
this.X = false;
}
if (this.g == null) {
}
aJ();
}
if (this.W) {
this.W = false;
this.f13415a.a(this.f13417a);
aD();
break;
}
break;
case 39:
a((AbsListView) this.f8377a);
break;
case 1001:
this.f13412a.b();
break;
}
return super.handleMessage(message);
}
@Override
public void mo2352g() {
}
public boolean u() {
PublicAccountInfo publicAccountInfo;
PublicAccountDataManager publicAccountDataManager = (PublicAccountDataManager) this.f8371a.getManager(55);
if (publicAccountDataManager == null) {
publicAccountInfo = null;
} else {
publicAccountInfo = publicAccountDataManager.m4572b(this.f8349a.f12447a);
}
if (publicAccountInfo == null && PublicAccountUtil.m1474a(this.f8371a, this.f8349a.f12447a) == null) {
PublicAccountUtil.m1477a();
PublicAccountUtil.a(this.f8371a, BaseApplication.getContext(), this.f8410a, this.f8349a.f12447a);
return true;
}
return false;
}
public boolean v() {
QQMessageFacade.Message m5041a;
QQMessageFacade m4635a = this.f8371a.m4635a();
if (m4635a != null && (m5041a = m4635a.m5041a(this.f8349a.f12447a, 1008)) != null) {
if (m5041a.msgtype == -2011) {
MessageForStructing messageForStructing = new MessageForStructing();
MessageForStructing.copyMessageRecordBaseField(messageForStructing, m5041a);
messageForStructing.parse();
if (messageForStructing.structingMsg != null && (messageForStructing.structingMsg.mPromotionType == 1 || messageForStructing.structingMsg.mPromotionType == 2)) {
a(messageForStructing);
return true;
}
} else if (m5041a.msgtype == -2009 && m5041a.isSend()) {
return true;
} else {
if (m5041a.msgtype == -5008 && !m5041a.isSend()) {
this.ey = 1;
return true;
}
}
}
return false;
}
public void a(boolean z, int i) {
ReportController.b(this.f8371a, "dc01331", "", "", "0X8004EF8", "0X8004EF8", 0, 0, Integer.toString(i), "", "", "");
if (this.f13456b != null) {
PublicAccountManager.a().a(this.f13456b);
this.f13456b = null;
}
this.f13456b = PublicAccountManager.a().a(this.f8349a.f12447a, i, z, BaseApplication.getContext(), this.f8371a, new mxx(this));
}
public void t(int i) {
Toast.makeText(this.f8332a.getApplicationContext(), i, 0).show();
}
public void aK() {
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, PublicAccountManager.f4075h);
}
if (this.f13459c != null) {
this.f13459c.setObserver(null);
}
this.f13459c = new NewIntent(this.f8332a.getApplicationContext(), PublicAccountServlet.class);
this.f13459c.putExtra("cmd", PublicAccountManager.f4075h);
mobileqq_mp.FollowRequest followRequest = new mobileqq_mp.FollowRequest();
followRequest.uin.set((int) Long.parseLong(this.f8349a.f12447a));
this.f13459c.putExtra("data", followRequest.toByteArray());
this.f13459c.setObserver(new mxy(this));
this.f8371a.startServlet(this.f13459c);
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "follow exit");
}
}
private void a(MessageForStructing messageForStructing) {
if (messageForStructing.structingMsg != null) {
this.f13422a = messageForStructing.structingMsg;
this.aM = messageForStructing.getExtInfoFromExtStr("msg_template_id");
this.ey = messageForStructing.structingMsg.mPromotionType;
this.aA = messageForStructing.structingMsg.mPromotionMsg;
this.aB = messageForStructing.structingMsg.mPromotionMenus;
this.ez = messageForStructing.structingMsg.mPromotionMenuDestructiveIndex;
try {
if (this.aB != null) {
this.f13438aD = false;
String[] split = this.aB.split(",");
if (split != null) {
int length = split.length;
this.f13434a = new int[length];
for (int i = 0; i < length; i++) {
split[i] = split[i].trim();
this.f13434a[i] = Integer.parseInt(split[i]);
}
}
}
} catch (Exception e) {
this.f13438aD = true;
}
}
}
private void ba() {
PublicAccountDataManager publicAccountDataManager;
if (this.f13420a == null && (publicAccountDataManager = (PublicAccountDataManager) this.f8371a.getManager(55)) != null) {
this.f13420a = publicAccountDataManager.m4577c(this.f8349a.f12447a);
}
if (this.f13420a != null && this.f13420a.isSyncLbs && this.f13420a.mIsAgreeSyncLbs) {
bb();
}
}
public void bb() {
if (!this.f13430a.get()) {
this.f13430a.set(true);
SosoInterface.a(new mxz(this, 1, true, true, 0L, false, false, "PublicAccountChatPie"));
}
}
@Override
public void update(Observable observable, Object obj) {
TroopInfo m4858b;
if (obj instanceof MessageRecord) {
String extInfoFromExtStr = ((MessageRecord) obj).getExtInfoFromExtStr("welcome_msg");
if (!TextUtils.isEmpty(extInfoFromExtStr) && extInfoFromExtStr.equals("true")) {
ThreadManager.a(new mya(this), 8, null, false);
}
this.am = true;
}
if (ReadInJoyHelper.m11170a(this.f8371a) && (obj instanceof MessageRecord)) {
((KandianMergeManager) this.f8371a.getManager(161)).m1207a(this.f8349a.f12447a);
}
super.update(observable, obj);
if (observable instanceof TroopEntranceBar) {
if (obj instanceof Integer) {
int intValue = ((Integer) obj).intValue();
if (intValue == 0) {
this.f13423a.a(this.f8371a);
this.f13423a.b();
} else if (intValue == 1) {
this.f13436aB = true;
}
}
aU();
} else if (observable instanceof QQMessageFacade) {
if (this.f13423a != null) {
TroopManager troopManager = (TroopManager) this.f8332a.app.getManager(51);
QQMessageFacade.Message m5040a = ((QQMessageFacade) observable).m5040a();
if (m5040a != null && (m4858b = troopManager.m4858b(m5040a.frienduin)) != null && m4858b.associatePubAccount == Long.valueOf(this.f8349a.f12447a).longValue()) {
Message obtain = Message.obtain();
obtain.what = 9;
Bundle bundle = new Bundle();
bundle.putString("troopUin", m4858b.troopuin);
obtain.setData(bundle);
this.f85994a.sendMessage(obtain);
}
}
} else if (this.ac) {
ThreadManager.a(new myc(this), 5, null, false);
}
}
public static boolean a(String str, QQAppInterface qQAppInterface) {
PublicAccountInfo publicAccountInfo;
QQMessageFacade m4635a;
QQMessageFacade.Message m5041a;
PublicAccountDataManager publicAccountDataManager = (PublicAccountDataManager) qQAppInterface.getManager(55);
if (publicAccountDataManager == null) {
publicAccountInfo = null;
} else {
publicAccountInfo = publicAccountDataManager.m4572b(str);
}
if (publicAccountInfo == null && (m4635a = qQAppInterface.m4635a()) != null && (m5041a = m4635a.m5041a(str, 1008)) != null && m5041a.msgtype == -2011) {
MessageForStructing messageForStructing = new MessageForStructing();
MessageForStructing.copyMessageRecordBaseField(messageForStructing, m5041a);
messageForStructing.parse();
if (messageForStructing.structingMsg != null && (messageForStructing.structingMsg.mPromotionType == 1 || messageForStructing.structingMsg.mPromotionType == 2)) {
return true;
}
}
return false;
}
@Override
public boolean mo6a(int i, View view, ListView listView) {
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "listView onViewCompleteVisableAndReleased");
}
if (!this.ac) {
return super.mo6a(i, view, listView);
}
if (this.f8346a != null && this.f8346a.getCount() > 0) {
this.ae = true;
c(System.currentTimeMillis());
this.f8419b = SystemClock.uptimeMillis();
if (this.f8374a.f19053a instanceof ChatContext) {
((ChatContext) this.f8374a.f19053a).a(this.f8419b);
}
this.f8374a.f19061e = false;
this.f8374a.f19062f = true;
this.f8371a.m4635a().a(this.f8349a.f12447a, this.f8349a.f85624a, 21, this.f8374a);
}
return true;
}
@Override
public void a(int i, View view, ListView listView) {
if (this.ac) {
u(R.string.f60687name_res_0x7f0a08eb);
}
}
@Override
public void b(int i, View view, ListView listView) {
if (this.ac) {
u(R.string.f60688name_res_0x7f0a08ec);
}
}
public void aL() {
ThreadManager.a(new myd(this), 8, null, true);
}
private void bc() {
}
@Override
public void mo2354h() {
if (!this.ac) {
super.mo2354h();
}
}
@Override
public void afterTextChanged(Editable editable) {
super.afterTextChanged(editable);
a(editable);
if (this.s == 0) {
if (this.f8474f) {
this.f13428a.setSelected(true);
this.f13428a.setText(R.string.f63596name_res_0x7f0a144b);
this.f13428a.setEnabled(editable.length() > 0);
} else if (this.f13468n == null || this.f13468n.getVisibility() != 0) {
this.f13428a.setEnabled(editable.length() > 0);
if (editable.length() > 0) {
this.f13428a.setText(R.string.f63596name_res_0x7f0a144b);
this.f13428a.setSelected(true);
}
}
}
}
private void a(Editable editable) {
if (editable.length() > 0 && this.f8401a.getLineCount() > 1) {
y(80);
} else if (CustomMenuBar.a()) {
y(16);
}
}
private void y(int i) {
if (this.f85996c != null) {
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) this.f85996c.getLayoutParams();
LinearLayout.LayoutParams layoutParams2 = (LinearLayout.LayoutParams) this.f8401a.getLayoutParams();
if (layoutParams.gravity != i) {
layoutParams.gravity = i;
this.f85996c.setLayoutParams(layoutParams);
}
if (layoutParams2.gravity != i) {
layoutParams2.gravity = i;
this.f8401a.setLayoutParams(layoutParams2);
}
LinearLayout.LayoutParams layoutParams3 = (LinearLayout.LayoutParams) this.f13428a.getLayoutParams();
if (layoutParams3.gravity != i) {
layoutParams3.gravity = i;
this.f13428a.setLayoutParams(layoutParams3);
}
}
}
@Override
public void b(int i, int i2) {
super.b(i, i2);
aM();
if (i2 == 8) {
if (this.f13466m != null) {
if (CustomMenuBar.a()) {
this.f13466m.setImageResource(R.drawable.f46447name_res_0x7f0214ff);
} else {
this.f13466m.setImageResource(R.drawable.f46435skin_aio_more_pressed);
}
}
} else if (this.f13466m != null) {
if (CustomMenuBar.a()) {
this.f13466m.setImageResource(R.drawable.f46446name_res_0x7f0214fe);
} else {
this.f13466m.setImageResource(R.drawable.f46434skin_aio_more_nor);
}
}
if (!this.f8474f) {
if (this.f13408a == null) {
ImageSpan imageSpan = new ImageSpan(this.f8330a, (int) R.drawable.f41174name_res_0x7f020060);
SpannableString spannableString = new SpannableString("文字输入");
spannableString.setSpan(imageSpan, 0, spannableString.length(), 33);
this.f13408a = spannableString;
}
if (this.f85995b == null) {
ImageSpan imageSpan2 = new ImageSpan(this.f8330a, (int) R.drawable.f41281name_res_0x7f0200cb);
SpannableString spannableString2 = new SpannableString("语音输入");
spannableString2.setSpan(imageSpan2, 0, spannableString2.length(), 33);
this.f85995b = spannableString2;
}
if (QLog.isColorLevel() && this.f13468n != null) {
QLog.d("doPanelChanged", 2, "oldPanel=" + i + " newPanel=" + i2 + " text.length " + this.f8401a.getText().length() + "mAudioBtn visibility:" + this.f13468n.getVisibility());
}
if (i2 == 2) {
this.f13428a.setSelected(false);
if (this.f8352a != null && i != 2 && AIOInputTypeHelper.m3027a(this.f8371a)) {
this.f8352a.a(false);
return;
}
return;
}
this.f13428a.setSelected(this.f8401a.getText().length() > 0);
if (this.f8401a.getText().length() > 0) {
this.f13428a.setText(R.string.f63596name_res_0x7f0a144b);
} else {
this.f13428a.setSelected(false);
}
}
}
@Override
public void k(int i) {
super.k(i);
if (i != this.s) {
if (i == 1) {
if (this.f13408a == null) {
ImageSpan imageSpan = new ImageSpan(this.f8330a, (int) R.drawable.f41174name_res_0x7f020060);
SpannableString spannableString = new SpannableString("文字输入");
spannableString.setSpan(imageSpan, 0, spannableString.length(), 33);
this.f13408a = spannableString;
}
this.f13428a.setText(this.f13408a);
} else if (i == 2) {
if (this.f85995b == null) {
ImageSpan imageSpan2 = new ImageSpan(this.f8330a, (int) R.drawable.f41281name_res_0x7f0200cb);
SpannableString spannableString2 = new SpannableString("语音输入");
spannableString2.setSpan(imageSpan2, 0, spannableString2.length(), 33);
this.f85995b = spannableString2;
}
this.f13428a.setText(this.f85995b);
if (VersionUtils.e()) {
if (this.f13466m != null) {
this.f13466m.setAlpha(0.6f);
}
this.f8401a.setAlpha(0.6f);
this.f13428a.setAlpha(0.6f);
}
} else {
if (this.f85995b == null) {
ImageSpan imageSpan3 = new ImageSpan(this.f8330a, (int) R.drawable.f41281name_res_0x7f0200cb);
SpannableString spannableString3 = new SpannableString("语音输入");
spannableString3.setSpan(imageSpan3, 0, spannableString3.length(), 33);
this.f85995b = spannableString3;
}
if (this.f8401a.getText().length() > 0) {
this.f13428a.setText(R.string.f63596name_res_0x7f0a144b);
} else {
this.f13428a.setText(this.f85995b);
}
if (VersionUtils.e()) {
if (this.f13466m != null) {
this.f13466m.setAlpha(1.0f);
}
this.f8401a.setAlpha(1.0f);
this.f13428a.setAlpha(1.0f);
}
}
aM();
}
}
protected void aM() {
if (this.f13464l != null) {
if (this.s == 1) {
this.f13464l.setImageResource(R.drawable.f44123name_res_0x7f020beb);
this.f13464l.setVisibility(0);
this.f13464l.setEnabled(true);
if (VersionUtils.e()) {
this.f13464l.setAlpha(1.0f);
}
} else if (this.s == 2) {
this.f13464l.setEnabled(false);
if (VersionUtils.e()) {
this.f13464l.setAlpha(0.6f);
}
if (this.f8402a.a() == 3) {
if (CustomMenuBar.a()) {
this.f13464l.setImageResource(R.drawable.f46440name_res_0x7f0214f8);
} else {
this.f13464l.setImageResource(R.drawable.f46631skin_qz_icon_face_click);
}
this.f13464l.setContentDescription(this.f8330a.getString(R.string.f63476name_res_0x7f0a13d3));
return;
}
if (CustomMenuBar.a()) {
this.f13464l.setImageResource(R.drawable.f46439name_res_0x7f0214f7);
} else {
this.f13464l.setImageResource(R.drawable.f46632skin_qz_icon_face_nor);
}
this.f13464l.setContentDescription(this.f8330a.getString(R.string.f63475name_res_0x7f0a13d2));
} else {
this.f13464l.setEnabled(true);
if (this.f8402a.a() == 3) {
if (CustomMenuBar.a()) {
this.f13464l.setImageResource(R.drawable.f46440name_res_0x7f0214f8);
} else {
this.f13464l.setImageResource(R.drawable.f46631skin_qz_icon_face_click);
}
this.f13464l.setContentDescription(this.f8330a.getString(R.string.f63476name_res_0x7f0a13d3));
} else {
if (CustomMenuBar.a()) {
this.f13464l.setImageResource(R.drawable.f46439name_res_0x7f0214f7);
} else {
this.f13464l.setImageResource(R.drawable.f46632skin_qz_icon_face_nor);
}
this.f13464l.setContentDescription(this.f8330a.getString(R.string.f63475name_res_0x7f0a13d2));
}
if (VersionUtils.e()) {
this.f13464l.setAlpha(1.0f);
}
}
}
}
@Override
public void b(ChatMessage chatMessage) {
RecentUserProxy m5113a;
RecentUser a2;
super.b(chatMessage);
String str = chatMessage.frienduin;
int i = chatMessage.istroop;
if (TroopBarAssistantManager.a().a(this.f8371a, str, i) && (a2 = (m5113a = this.f8371a.m4638a().m5113a()).a(str, i)) != null) {
m5113a.b(a2);
}
}
@Override
public void c(ChatMessage chatMessage) {
ChatMessage chatMessage2;
int a2 = this.f8346a.a(chatMessage) + 1;
if (a2 <= this.f8346a.getCount() - 1 && (chatMessage2 = (ChatMessage) this.f8346a.getItem(a2)) != null && chatMessage2.msgtype == -1048) {
super.c(chatMessage);
j(chatMessage2);
return;
}
super.c(chatMessage);
}
public void j(ChatMessage chatMessage) {
Bitmap bitmap;
TranslateAnimation translateAnimation;
Bitmap bitmap2 = null;
int a2 = this.f8346a.a(chatMessage);
if (QLog.isColorLevel()) {
QLog.d(LogTag.G, 2, "pos is:" + a2);
}
if (a2 >= 0) {
int s = this.f8377a.s();
int i = a2 - s;
this.f13463l = this.f8377a.getChildAt(i);
if (this.f13463l == null) {
if (QLog.isColorLevel()) {
QLog.d(LogTag.G, 2, "horMoveView is null,childIndex is:" + i + ",firstPos is:" + s + ",pos is:" + a2);
}
this.f8346a.m3069a(chatMessage);
return;
}
boolean isDrawingCacheEnabled = this.f13463l.isDrawingCacheEnabled();
boolean willNotCacheDrawing = this.f13463l.willNotCacheDrawing();
this.f13463l.setDrawingCacheEnabled(true);
this.f13463l.setWillNotCacheDrawing(false);
try {
bitmap = this.f13463l.getDrawingCache();
} catch (Exception e) {
bitmap = null;
} catch (OutOfMemoryError e2) {
bitmap = null;
}
if (bitmap != null) {
try {
bitmap2 = Bitmap.createBitmap(bitmap);
} catch (Exception e3) {
} catch (OutOfMemoryError e4) {
}
}
if (QLog.isColorLevel()) {
QLog.d(LogTag.G, 2, "viewShotCopy is:" + bitmap2);
}
if (bitmap2 != null) {
if (this.f8461e != null) {
ImageView imageView = new ImageView(this.f8330a);
imageView.setImageBitmap(bitmap2);
FrameLayout frameLayout = new FrameLayout(this.f8330a);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(this.f13463l.getWidth(), this.f13463l.getHeight());
layoutParams.gravity = 51;
layoutParams.leftMargin = this.f13463l.getLeft();
layoutParams.topMargin = this.f13463l.getTop();
layoutParams.rightMargin = 0;
layoutParams.bottomMargin = 0;
this.f8461e.addView(frameLayout, layoutParams);
frameLayout.addView(imageView, new FrameLayout.LayoutParams(-1, -1));
this.f13463l.setVisibility(4);
LinearInterpolator linearInterpolator = new LinearInterpolator();
AnimationSet animationSet = new AnimationSet(true);
AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, 0.0f);
alphaAnimation.setDuration(400L);
alphaAnimation.setInterpolator(linearInterpolator);
animationSet.addAnimation(alphaAnimation);
if (chatMessage.isSend()) {
translateAnimation = new TranslateAnimation(0.0f, this.f8460e.getRight(), 0.0f, 0.0f);
} else {
translateAnimation = new TranslateAnimation(0.0f, -this.f8460e.getRight(), 0.0f, 0.0f);
}
translateAnimation.setDuration(400L);
translateAnimation.setInterpolator(linearInterpolator);
animationSet.addAnimation(translateAnimation);
imageView.startAnimation(animationSet);
this.f8410a.postDelayed(new mye(this, frameLayout), 400L);
} else {
return;
}
}
this.f13463l.setDrawingCacheEnabled(isDrawingCacheEnabled);
this.f13463l.setWillNotCacheDrawing(willNotCacheDrawing);
if (bitmap2 != null) {
this.f8410a.postDelayed(new myf(this, chatMessage), 200L);
} else {
this.f8346a.m3069a(chatMessage);
}
}
}
@Override
public void e(boolean z) {
if (this.ac) {
if (z) {
if (this.f8377a.c() == null) {
if (this.r == null) {
aN();
}
this.f8377a.setOverScrollHeader(this.r);
return;
}
return;
}
this.f8377a.setOverscrollHeader(null);
this.f8377a.setOverScrollHeader(null);
return;
}
super.e(z);
}
public void aN() {
this.r = LayoutInflater.from(this.f8330a).inflate(R.layout.f56870name_res_0x7f03020d, (ViewGroup) null);
this.f13460g = (TextView) this.r.findViewById(R.id.f49950name_res_0x7f090b3a);
if (!this.ad) {
this.f13460g.setVisibility(8);
}
this.f13461h = (TextView) this.r.findViewById(R.id.f49949name_res_0x7f090b39);
this.f13471p = (ImageView) this.r.findViewById(R.id.f48031name_res_0x7f0903bb);
this.f13409a = (ProgressBar) this.r.findViewById(R.id.f47974name_res_0x7f090382);
}
public void u(int i) {
try {
this.f13461h.setText(i);
this.f13461h.setVisibility(0);
this.f13471p.setVisibility(8);
this.f13409a.setVisibility(8);
} catch (Exception e) {
}
}
public void c(long j) {
try {
this.f13461h.setVisibility(8);
this.f13471p.setVisibility(8);
this.f13409a.setVisibility(0);
} catch (Exception e) {
}
}
public void v(int i) {
try {
this.f13471p.setVisibility(0);
this.f13461h.setVisibility(0);
this.f13409a.setVisibility(8);
switch (i) {
case 0:
this.f13461h.setText(R.string.f64020name_res_0x7f0a15f3);
break;
case 1:
this.f13461h.setText(R.string.f64017name_res_0x7f0a15f0);
break;
case 2:
this.f13461h.setText(R.string.f60689name_res_0x7f0a08ed);
break;
}
this.f85994a.sendEmptyMessage(7);
} catch (Exception e) {
}
}
public boolean m3296w() {
return this.Y;
}
@Override
public void B() {
super.B();
this.f13421a.end();
}
@Override
public void D() {
if (!this.f13436aB || !this.f13437aC) {
ArkAppCenter.a().post(new myh(this));
if (this.f8371a != null) {
super.D();
}
if (!this.f13437aC && this.f8371a != null) {
ThreadManager.a(new myi(this), 5, null, false);
}
this.f13437aC = true;
}
}
@Override
public void a(List list, CharSequence charSequence) {
long j;
int i;
this.f13442aq = true;
super.a(list, charSequence);
if (this.f8516w) {
if (list.size() <= 0) {
j = 0;
i = -1;
} else {
ChatMessage chatMessage = (ChatMessage) list.get(list.size() - 1);
int i2 = chatMessage.msgtype;
long j2 = chatMessage.msgseq;
if (chatMessage instanceof MessageForStructing) {
MessageForStructing messageForStructing = (MessageForStructing) chatMessage;
if (messageForStructing.structingMsg != null) {
j = messageForStructing.structingMsg.msgId;
i = i2;
}
}
j = j2;
i = i2;
}
ReportController.b(this.f8371a, "dc01332", "Pb_account_lifeservice", "" + this.f8349a.f12447a, "0X80064D4", "0X80064D4", 0, 0, "", "" + i, "" + j, "");
}
}
@Override
public boolean mo2367t() {
if (!this.f13439an && this.ac) {
this.f13439an = true;
this.f8377a.setSelection(this.f8346a.getCount() - 1);
return true;
} else if (this.f13440ao || !this.ac) {
return true;
} else {
this.f13440ao = true;
return false;
}
}
public boolean x() {
return this.f8424b == null || this.f8424b.getVisibility() == 8;
}
public boolean y() {
return this.f13412a == null || this.f13412a.getVisibility() == 8;
}
@Override
public void a(boolean z, ChatMessage chatMessage, boolean z2) {
if (z) {
if (!y()) {
this.ff = 2;
} else if (!x()) {
this.ff = 1;
} else {
this.ff = 0;
}
if (this.f8424b != null) {
this.f8424b.setVisibility(8);
}
if (this.f13412a != null) {
this.f13412a.setVisibility(8);
}
super.a(z, chatMessage, z2);
return;
}
super.a(z, chatMessage, z2);
switch (this.ff) {
case 0:
if (this.f8424b != null) {
this.f8424b.setVisibility(8);
}
if (this.f13412a != null) {
this.f13412a.setVisibility(8);
break;
}
break;
case 1:
if (this.f8424b != null) {
this.f8424b.setVisibility(0);
}
if (this.f13412a != null) {
this.f13412a.setVisibility(8);
break;
}
break;
case 2:
if (this.f8424b != null) {
this.f8424b.setVisibility(8);
}
if (this.f13412a != null) {
this.f13412a.setVisibility(0);
break;
}
break;
}
this.ff = -1;
}
@Override
public void ap() {
super.ap();
if (this.f8491j != null) {
try {
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) this.f8491j.getLayoutParams();
if (layoutParams != null) {
if (!y()) {
layoutParams.addRule(2, this.f13412a.getId());
} else if (!x()) {
layoutParams.addRule(2, this.f8424b.getId());
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
@Override
public void Y() {
super.Y();
if (ServiceAccountFolderManager.b(this.f8371a, this.f8349a.f12447a) && ServiceAccountFolderManager.m1357a().m1373a(this.f8349a.f12447a)) {
ServiceAccountFolderManager.m1357a().m1371a(this.f8371a, this.f8349a.f12447a);
}
}
void aO() {
this.f13425a = (QidianManager) this.f8371a.getManager(164);
String stringExtra = this.f8332a.getIntent().getStringExtra("uin");
this.aE = this.f8332a.getIntent().getStringExtra(ao);
if (!TextUtils.isEmpty(this.aE)) {
this.aF = this.f8332a.getIntent().getStringExtra(ap);
this.aG = this.f8332a.getIntent().getStringExtra(aq);
this.aH = this.f8332a.getIntent().getStringExtra(ar);
this.aI = this.f8332a.getIntent().getStringExtra(as);
this.aJ = this.f8332a.getIntent().getStringExtra(at);
this.f13443ar = true;
this.f13444as = false;
this.f13445at = false;
this.f13446au = false;
this.f13447av = false;
this.f13419a = null;
this.f13425a.a(stringExtra, this.aF);
return;
}
this.aF = this.f13425a.c(stringExtra);
if (!TextUtils.isEmpty(this.aF)) {
this.f13443ar = true;
this.f13444as = true;
this.aG = null;
this.aH = null;
this.aI = null;
this.aJ = null;
this.f13445at = true;
this.f13446au = false;
this.f13447av = false;
this.f13419a = null;
return;
}
this.f13443ar = false;
this.f13444as = false;
this.aG = null;
this.aH = null;
this.aI = null;
this.aJ = null;
this.f13445at = false;
this.f13446au = false;
this.f13447av = false;
this.f13419a = null;
}
protected void aP() {
this.f13443ar = false;
this.f13444as = false;
this.aG = null;
this.aH = null;
this.aI = null;
this.aJ = null;
this.f13445at = false;
this.f13446au = false;
this.f13447av = false;
this.f13419a = null;
}
@Override
public void a(Intent intent) {
super.a(intent);
if (this.f13443ar) {
aS();
}
}
public void aQ() {
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "checkQDAccountValid ...");
}
ThreadManager.a(new myl(this), 8, null, false);
}
public void aR() {
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "updateHeader ... " + (this.f13462k != null ? Integer.valueOf(this.f13462k.getVisibility()) : ""));
}
if (this.f13424a != null && this.f13444as) {
if (this.f13446au) {
this.f13467n.setVisibility(0);
this.f13465m.setVisibility(8);
return;
}
this.f13467n.setVisibility(8);
this.f13465m.setVisibility(0);
}
}
public void aS() {
if (QLog.isColorLevel()) {
QLog.d(BaseChatPie.f84924a, 2, "updateWpaUiForQidian: mQidianAccountValid = " + this.f13444as + ", mQidianKefu = " + this.f13445at + ", mQidianShield: " + this.f13446au);
}
if (this.f13444as) {
if (((PublicAccountDataManager) this.f8371a.getManager(55)).m4577c(this.f8349a.f12447a) != null) {
this.f8427b.setVisibility(0);
this.f8423b.setVisibility(0);
this.f8424b.setVisibility(0);
aI();
return;
}
this.f8427b.setVisibility(0);
this.f8423b.setVisibility(0);
this.f8424b.setVisibility(this.f13445at ? 0 : 8);
if (this.f13470o == null) {
this.f13470o = (ImageView) this.f8470f.findViewById(R.id.f47182name_res_0x7f090061);
}
this.f13470o.setVisibility(8);
if (this.f13412a != null) {
this.f13412a.setVisibility(8);
}
if (this.f13462k == null) {
aF();
}
aR();
return;
}
this.f8427b.setVisibility(4);
this.f8423b.setVisibility(4);
this.f8424b.setVisibility(8);
}
public void aT() {
if (this.f13444as && this.f13447av) {
boolean z = ((PublicAccountDataManager) this.f8371a.getManager(55)).m4577c(this.f8349a.f12447a) != null;
if (this.f13446au && !z) {
AddMessageHelper.a(this.f8371a, this.f8349a.f12447a, this.f8371a.getApp().getResources().getString(R.string.f58421name_res_0x7f0a000f), this.f8349a.f85624a, false, true);
} else if (this.f13419a != null) {
this.f8371a.m4635a().a(this.f13419a, this.f8371a.getCurrentAccountUin());
this.f13419a = null;
}
}
}
public void w(int i) {
if (this.h == null) {
this.h = new Dialog(mo2338a(), R.style.f67750qZoneInputDialog);
this.h.setContentView(R.layout.f57404name_res_0x7f030423);
}
TextView textView = (TextView) this.h.findViewById(R.id.f48073title);
TextView textView2 = (TextView) this.h.findViewById(R.id.f49014name_res_0x7f090792);
switch (i) {
case 0:
textView.setText(R.string.f58419name_res_0x7f0a000d);
textView2.setText(R.string.f58420name_res_0x7f0a000e);
break;
case 1:
textView.setText(R.string.f58416name_res_0x7f0a000a);
textView2.setText(R.string.f58418name_res_0x7f0a000c);
break;
case 2:
textView.setText(R.string.f58417name_res_0x7f0a000b);
textView2.setText(R.string.f58418name_res_0x7f0a000c);
break;
}
this.h.setOnCancelListener(new myp(this));
this.h.show();
}
public void d(String str) {
if (!TextUtils.isEmpty(str) && this.f13411a != null && this.f8332a != null) {
if (QLog.isColorLevel()) {
QLog.i("ArkAppSchemeCenter", 2, "args:" + str);
}
try {
JSONObject jSONObject = new JSONObject(str);
JSONObject jSONObject2 = jSONObject.getJSONObject("bidInfo");
this.f8332a.runOnUiThread(new myq(this, jSONObject2.optInt("isshow", 0) == 1, jSONObject2.getString("icon"), jSONObject2.getString("url"), jSONObject.getInt("bid"), jSONObject.getInt(TroopBarReplyActivity.d), jSONObject.getInt("web")));
} catch (Exception e) {
}
}
}
}