TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c
以下内容为反编译后的 QQFriendProfileCardActivity.java 源代码,内容仅作参考
package com.tencent.mobileqq.activity;
import FileUpload.UploadUpsInfoRsp;
import SecurityAccountServer.RespondQueryQQBindingStat;
import android.app.Activity;
import android.app.Dialog;
import android.content.BroadcastReceiver;
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.graphics.BitmapFactory;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.support.v4.util.MQLruCache;
import android.text.ClipboardManager;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Pair;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.qq.jce.wup.UniAttribute;
import com.tencent.av.VideoClientReportConstants;
import com.tencent.av.VideoConstants;
import com.tencent.av.app.PstnSessionInfo;
import com.tencent.biz.bmqq.util.BmqqSegmentUtil;
import com.tencent.biz.qqstory.support.report.StoryReportor;
import com.tencent.biz.qrcode.activity.QRDisplayActivity;
import com.tencent.biz.webviewplugin.NewerGuidePlugin;
import com.tencent.common.app.BaseApplicationImpl;
import com.tencent.mobileqq.activity.ProfileActivity;
import com.tencent.mobileqq.activity.aio.AIOUtils;
import com.tencent.mobileqq.activity.aio.ForwardUtils;
import com.tencent.mobileqq.activity.contact.addcontact.AddContactsActivity;
import com.tencent.mobileqq.activity.contact.troop.ShowExternalTroopListActivity;
import com.tencent.mobileqq.activity.photo.PhotoConst;
import com.tencent.mobileqq.activity.photo.PhotoUtils;
import com.tencent.mobileqq.app.AppConstants;
import com.tencent.mobileqq.app.BaseActivity;
import com.tencent.mobileqq.app.CardHandler;
import com.tencent.mobileqq.app.CardObserver;
import com.tencent.mobileqq.app.FriendListHandler;
import com.tencent.mobileqq.app.FriendListObserver;
import com.tencent.mobileqq.app.FriendsManager;
import com.tencent.mobileqq.app.LBSHandler;
import com.tencent.mobileqq.app.LogTag;
import com.tencent.mobileqq.app.PhoneContactManagerImp;
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.app.ThreadManager;
import com.tencent.mobileqq.app.TroopHandler;
import com.tencent.mobileqq.app.TroopManager;
import com.tencent.mobileqq.app.TroopObserver;
import com.tencent.mobileqq.app.message.QQMessageFacade;
import com.tencent.mobileqq.businessCard.BusinessCardManager;
import com.tencent.mobileqq.data.Card;
import com.tencent.mobileqq.data.ContactCard;
import com.tencent.mobileqq.data.Friends;
import com.tencent.mobileqq.data.MessageRecord;
import com.tencent.mobileqq.data.PhoneContact;
import com.tencent.mobileqq.data.ShowExternalTroop;
import com.tencent.mobileqq.data.TroopInfo;
import com.tencent.mobileqq.emosm.DataFactory;
import com.tencent.mobileqq.fpsreport.OnDrawCompleteListener;
import com.tencent.mobileqq.gesturelock.GesturePWDUtils;
import com.tencent.mobileqq.hitrate.PreloadProcHitPluginSession;
import com.tencent.mobileqq.hitrate.PreloadProcHitSession;
import com.tencent.mobileqq.model.PhoneContactManager;
import com.tencent.mobileqq.msf.core.NetConnInfoCenter;
import com.tencent.mobileqq.musicgene.MusicGeneQQBrowserActivity;
import com.tencent.mobileqq.musicgene.MusicGeneWebViewPlugin;
import com.tencent.mobileqq.musicpendant.MusicPendantManager;
import com.tencent.mobileqq.observer.GameCenterObserver;
import com.tencent.mobileqq.phonecontact.ContactBindObserver;
import com.tencent.mobileqq.profile.DataTag;
import com.tencent.mobileqq.profile.ProfileBusiEntry;
import com.tencent.mobileqq.profile.ProfileCardInfo;
import com.tencent.mobileqq.profile.ProfileCardTemplate;
import com.tencent.mobileqq.profile.ProfileShoppingPhotoInfo;
import com.tencent.mobileqq.profile.view.ProfileBaseView;
import com.tencent.mobileqq.profile.view.ProfileGameView;
import com.tencent.mobileqq.profile.view.ProfileHeaderView;
import com.tencent.mobileqq.profile.view.ProfilePhotoView;
import com.tencent.mobileqq.profile.view.ProfileShoppingView;
import com.tencent.mobileqq.profile.view.VipProfileSimpleView;
import com.tencent.mobileqq.qcall.PstnCardInfo;
import com.tencent.mobileqq.qcall.PstnManager;
import com.tencent.mobileqq.qcall.QCallCardHandler;
import com.tencent.mobileqq.qcall.QCallCardInfo;
import com.tencent.mobileqq.qcall.UinUtils;
import com.tencent.mobileqq.richstatus.IIconListener;
import com.tencent.mobileqq.richstatus.StatusManager;
import com.tencent.mobileqq.statistics.ReportController;
import com.tencent.mobileqq.statistics.StatisticCollector;
import com.tencent.mobileqq.statistics.StatisticHitRateCollector;
import com.tencent.mobileqq.theme.ThemeUtil;
import com.tencent.mobileqq.transfile.TransProcessorHandler;
import com.tencent.mobileqq.unifiedebug.UnifiedTraceRouter;
import com.tencent.mobileqq.unifiedname.MQQName;
import com.tencent.mobileqq.unifiedname.MQQProfileName;
import com.tencent.mobileqq.unifiedname.MQQProfileNameTranslator;
import com.tencent.mobileqq.util.AccessibilityUtil;
import com.tencent.mobileqq.util.ProfileCardUtil;
import com.tencent.mobileqq.util.ThreadPriorityManager;
import com.tencent.mobileqq.util.Utils;
import com.tencent.mobileqq.utils.Base64Util;
import com.tencent.mobileqq.utils.CacheKeyHelper;
import com.tencent.mobileqq.utils.ContactUtils;
import com.tencent.mobileqq.utils.DialogUtil;
import com.tencent.mobileqq.utils.ImageUtil;
import com.tencent.mobileqq.utils.NetworkUtil;
import com.tencent.mobileqq.utils.QQCustomDialog;
import com.tencent.mobileqq.utils.StringUtil;
import com.tencent.mobileqq.utils.TimeTraceUtil;
import com.tencent.mobileqq.utils.VipUtils;
import com.tencent.mobileqq.utils.kapalaiadapter.KapalaiAdapterUtil;
import com.tencent.mobileqq.utils.kapalaiadapter.MobileIssueSettings;
import com.tencent.mobileqq.vas.ClubContentJsonTask;
import com.tencent.mobileqq.vas.IndividuationUrlHelper;
import com.tencent.mobileqq.webprocess.WebProcessManager;
import com.tencent.mobileqq.widget.IndexView;
import com.tencent.mobileqq.widget.OnGetPhotoWallListener;
import com.tencent.mobileqq.widget.PerfRelativeLayout;
import com.tencent.mobileqq.widget.ProfileCardMoreInfoView;
import com.tencent.mobileqq.widget.QQProgressDialog;
import com.tencent.mobileqq.widget.QQToastNotifier;
import com.tencent.pb.getbusiinfo.BusinessInfoCheckUpdate;
import com.tencent.qidian.QidianProfileCardActivity;
import com.tencent.qphone.base.util.BaseApplication;
import com.tencent.qphone.base.util.QLog;
import com.tencent.tim.R;
import com.tencent.upload.uinterface.data.UpsImageUploadResult;
import com.tencent.util.ProfilePerformanceReport;
import com.tencent.util.WeakReferenceHandler;
import com.tencent.widget.AbsListView;
import com.tencent.widget.ActionSheet;
import com.tencent.widget.ActionSheetHelper;
import com.tencent.widget.ListView;
import com.tencent.widget.PullToZoomListView;
import com.tencent.widget.XListView;
import com.tencent.widget.XSimpleListAdapter;
import com.tencent.widget.immersive.ImmersiveTitleBar2;
import cooperation.peak.PeakConstants;
import cooperation.qzone.QZoneClickReport;
import cooperation.qzone.QZoneHelper;
import cooperation.qzone.QzonePluginProxyActivity;
import cooperation.qzone.video.QzoneVideoBeaconReport;
import friendlist.EAddFriendSourceID;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Observable;
import java.util.Observer;
import java.util.concurrent.atomic.AtomicInteger;
import mqq.manager.TicketManager;
import org.json.JSONException;
import org.json.JSONObject;
public class QQFriendProfileCardActivity extends ProfileActivity implements XListView.MotionEventInterceptor, Observer {
private static final String C = "QQFriendProfileCardActivity";
public static final float f85288a = 16.0f;
public static final int f10672a = 30;
public static long f10673a = 0;
public static final String f10674a = "Vip_SummaryCard";
public static final float f85289b = 0.125f;
public static final int f10675b = 5;
private static final int cX = 1;
private static final int cY = 0;
private static final int cZ = 1;
private static final int dA = 7;
private static final int dB = 8;
private static final int dC = 9;
private static final int dD = 10;
private static final int dE = 11;
private static final int dF = 12;
private static final int dG = 13;
private static final int da = 2;
private static final int db = 3;
private static final int dc = 4;
private static final int dd = 5;
private static final int de = 6;
private static final int df = 7;
private static final int dg = 8;
private static final int dh = 9;
private static final int di = 10;
private static final int dj = 11;
private static final int dk = 3;
private static final int dl = 4;
private static final int dm = 5;
private static final int dn = 6;
private static final int f10676do = 10;
private static final int dp = 12;
private static final int dq = 13;
private static final int dr = 100;
private static final int ds = 5;
private static final int du = 1;
private static final int dv = 2;
private static final int dw = 3;
private static final int dx = 4;
private static final int dy = 5;
private static final int dz = 6;
static long g = 0;
public static final int h = 3;
public static long f10677h = 2000;
public static final String z = "is_binding_shop";
public String A;
Dialog f10678a;
public Intent f10681a;
private Bitmap f10682a;
public Drawable f10683a;
public Uri f10684a;
public View f10688a;
public ViewGroup f10689a;
public ImageView f10691a;
public TextView f10693a;
public PstnSessionInfo f10694a;
public ProfileActivity.CardContactInfo f10695a;
public ProfileBusiEntry f10704a;
public ProfileShoppingPhotoInfo f10706a;
public ProfileHeaderView f10707a;
public PstnCardInfo f10708a;
public PstnManager f10709a;
protected QQCustomDialog f10712a;
public TimeTraceUtil f10713a;
public OnGetPhotoWallListener f10714a;
public ProfileCardMoreInfoView f10715a;
public QQProgressDialog f10716a;
public BusinessInfoCheckUpdate.AppInfo f10717a;
public WeakReferenceHandler f10718a;
ActionSheet f10720a;
public PullToZoomListView f10722a;
public ArrayList f10724a;
public HashMap f10725a;
public String[] f10728a;
private long av;
public long f10729b;
public Uri f10731b;
View f10733b;
public LinearLayout f10734b;
public TextView f10735b;
protected QQCustomDialog f10737b;
public QQProgressDialog f10738b;
private QQToastNotifier f10739b;
public WeakReferenceHandler f10740b;
public ImmersiveTitleBar2 f10741b;
public int[] f10745b;
protected float f85290c;
public long f10747c;
public View f10749c;
public AlphaAnimation f10750c;
public TextView f10751c;
public boolean f10752c;
protected int[] f10753c;
protected int cT;
protected int cU;
long f10754d;
View f10756d;
public AlphaAnimation f10757d;
public TextView f10758d;
public boolean f10759d;
private int dt;
public int e;
long f10760e;
public View f10761e;
public ImageView f10762e;
public int f;
long f10763f;
private View f10764f;
protected boolean f10768h;
public int i;
long f10769i;
protected boolean f10770i;
public int j;
private boolean f10771l;
private boolean f10772m;
private boolean n;
private boolean o;
public String w;
public String x;
boolean f10727a = false;
public ProfileCardInfo f10705a = new ProfileCardInfo();
public RelativeLayout f10692a = null;
public String f10743b = "";
public int f10746c = 0;
public int d = 0;
public boolean f10744b = true;
public int f10766g = 0;
public String y = z;
public int k = -1;
AtomicInteger f10726a = new AtomicInteger(0);
boolean f10765f = false;
public int l = -1;
protected TroopObserver f10698a = new kwo(this);
public int m = 0;
Runnable f10723a = new kyh(this);
PreloadProcHitPluginSession f10700a = new PreloadProcHitPluginSession("qzone_friendprofile", orh.f75334a, QzonePluginProxyActivity.a());
private PreloadProcHitSession f10701a = new PreloadProcHitSession("profile_card", "com.tencent.tim:tool");
private CardObserver f10696a = new kyk(this);
private CardObserver f10736b = new kyo(this);
private ContactBindObserver f10703a = new kyq(this);
public boolean f10767g = false;
private FriendListObserver f10697a = new kwp(this);
private GameCenterObserver f10702a = new kwq(this);
BroadcastReceiver f10679a = new kww(this);
public int cV = -1;
private View.OnLongClickListener f10687a = new kxb(this);
private View.OnClickListener f10686a = new kxh(this);
private Handler.Callback f10732b = new kxo(this);
private IIconListener f10710a = new kxq(this);
Handler.Callback f10685a = new kxr(this);
private Animation.AnimationListener f10690a = new kxu(this);
public int cW = 30000;
public DialogInterface.OnClickListener f10680a = new kxv(this);
public DialogInterface.OnClickListener f10730b = new kxw(this);
public Runnable f10742b = new kxx(this);
public DialogInterface.OnClickListener f10748c = new kxy(this);
public DialogInterface.OnClickListener f10755d = new kxz(this);
public String B = null;
OnDrawCompleteListener f10699a = new kyb(this);
ListView.OnScrollChangeListener f10721a = new kyc(this);
AbsListView.OnScrollListener f10719a = new kyd(this);
private TransProcessorHandler f10711a = new kyf(this);
public void a(ShowExternalTroop showExternalTroop) {
if (showExternalTroop != null) {
this.A = showExternalTroop.troopUin;
this.f10704a = new ProfileBusiEntry();
this.f10704a.f91403a = 1024;
this.f10704a.f26268b = getString(R.string.f61055name_res_0x7f0a0a5c);
this.f10704a.f91404c = showExternalTroop.troopName;
this.f10704a.f26267a = showExternalTroop.strFaceUrl;
if (this.f10705a.f26283a != null) {
this.f10705a.f26283a.addOrUpdateBuisEntry(this.f10704a);
G();
if (this.f10705a.f26282a.f10517a == 0) {
ReportController.b(this.app, "dc01332", "Grp_join", "", StoryReportor.f, "exp", 0, 0, this.A, "1", "", "");
} else {
ReportController.b(this.app, "dc01332", "Grp_join", "", StoryReportor.f, "exp", 0, 0, this.A, "0", "", "");
}
}
}
}
@Override
public boolean doOnCreate(Bundle bundle) {
ProfilePerformanceReport profilePerformanceReport = ProfilePerformanceReport.f68059a;
if (profilePerformanceReport != null && profilePerformanceReport.m10271b()) {
profilePerformanceReport.b(0);
profilePerformanceReport.a(1);
profilePerformanceReport.a(2);
}
this.f10713a = new TimeTraceUtil(C);
Intent intent = getIntent();
this.mActNeedImmersive = false;
super.doOnCreate(bundle);
this.f10713a.a("initSuperOnCreate", false);
if (this.app == null || TextUtils.isEmpty(this.app.getAccount()) || intent == null) {
finish();
return false;
}
this.f10705a.f91411a = this.f10686a;
this.f10705a.f26281a = this.f10687a;
this.f10705a.f26282a = (ProfileActivity.AllInOne) intent.getParcelableExtra(ProfileActivity.f10494t);
if (!m2738a(this.f10705a)) {
finish();
return false;
} else if (BmqqSegmentUtil.c(this.f10705a.f26282a.f10519a)) {
Intent intent2 = new Intent(this, QidianProfileCardActivity.class);
intent2.putExtra(ProfileActivity.f10494t, this.f10705a.f26282a);
super.startActivity(intent2);
super.finish();
return false;
} else {
if (this.f10705a.f26282a.f10517a == 41 && !TextUtils.isEmpty(this.f10705a.f26282a.f10519a) && this.f10705a.f26282a.f10519a.equals("0")) {
this.f10744b = false;
}
try {
if (this.f10705a.f26282a.f10517a != 53 && this.app.getCurrentAccountUin().equals(this.f10705a.f26282a.f10519a)) {
this.f10705a.f26282a.f10517a = 0;
}
this.f10718a = new WeakReferenceHandler(ThreadManager.b(), this.f10685a);
this.f10740b = new WeakReferenceHandler(Looper.getMainLooper(), this.f10732b);
m2746b();
addObserver(this.f10696a);
addObserver(this.f10697a);
this.app.registObserver(this.f10703a);
addObserver(this.f10698a);
CardHandler cardHandler = (CardHandler) this.app.getBusinessHandler(2);
if (cardHandler != null) {
cardHandler.a(this.app, this.f10711a);
}
this.y += this.f10705a.f26282a.f10519a;
StatusManager statusManager = (StatusManager) this.app.getManager(14);
if (statusManager != null) {
statusManager.a(this.f10710a);
}
if (this.f10705a.f26282a.g == 6 && this.app.m4635a() != null) {
this.app.m4635a().addObserver(this);
}
try {
if (MusicPendantManager.a() != null && this.f10705a != null && this.f10705a.f26282a != null && this.f10705a.f26282a.f10517a != 53) {
MusicPendantManager.a().a(this.f10705a.f26282a.f10519a, this.app, this);
}
b(false);
if (ClubContentJsonTask.f34148a == null) {
ThreadManager.a(new kxg(this), 5, null, true);
}
this.f10705a.f26289a = new String[7];
ThreadManager.a(new kxt(this), 8, null, true);
E();
if (this.f10705a.f26282a.f10517a != 33) {
m2740a();
} else {
a(this.f10705a.f26283a, false, false);
}
H();
if (this.f10705a.f26282a.f10517a != 0) {
String format = new SimpleDateFormat("yyyyMMdd").format(new Date(System.currentTimeMillis()));
String string = this.app.getPreferences().getString(AppConstants.Preferences.bi, "");
if (!string.equals(format)) {
ThreadManager.a(new kys(this), 5, null, true);
}
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "get custom profile today = " + format + ", lastDay = " + string);
}
} else {
this.app.registObserver(this.f10702a);
this.f10740b.post(new kye(this));
}
AccessibilityUtil.a((View) this.f10735b, "返回按钮");
AccessibilityUtil.b(this.f10735b);
if (this.f10705a.f26282a.f10517a == 0) {
ReportController.b(this.app, "dc01332", f10674a, "", "0X8005134", "0X8005134", 0, 0, "", "", "", "");
} else {
ReportController.b(this.app, "dc01332", f10674a, "", "0X8005135", "0X8005135", 0, 0, "", "", "", "");
}
this.f10713a.a("doOnCreate", false);
this.f10709a = (PstnManager) this.app.getManager(142);
this.f10708a = this.f10709a.m7425a(this.app.getCurrentAccountUin());
return true;
} catch (Exception e) {
if (QLog.isColorLevel()) {
QLog.e(ProfileCardUtil.f33517c, 2, "doOnCreate exception msg=" + e.toString());
}
e.printStackTrace();
finish();
return false;
}
} catch (Exception e2) {
if (QLog.isColorLevel()) {
QLog.e(ProfileCardUtil.f33517c, 2, "", e2);
}
finish();
return false;
}
}
}
@Override
public void doOnWindowFocusChanged(boolean z2) {
super.doOnWindowFocusChanged(z2);
if (z2) {
this.f10713a.a("doOnWindowFocusChanged", false);
ProfilePerformanceReport profilePerformanceReport = ProfilePerformanceReport.f68059a;
if (profilePerformanceReport != null && profilePerformanceReport.m10271b()) {
profilePerformanceReport.b(2);
}
if (!this.f10770i || this.f10768h) {
this.f10740b.removeMessages(100);
this.f10740b.sendEmptyMessageDelayed(100, 100L);
this.f10768h = false;
this.f10770i = true;
}
}
}
public void m2740a() {
if (!this.f10771l) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "send async message to init card in db");
}
ProfilePerformanceReport profilePerformanceReport = ProfilePerformanceReport.f68059a;
if (profilePerformanceReport != null && profilePerformanceReport.m10271b()) {
profilePerformanceReport.a(4);
}
this.f10771l = true;
if (this.f10718a != null) {
Message message = null;
if (this.f10705a.f26282a.f10517a != 33) {
if (this.f10705a.f26282a.f10517a == 80) {
message = this.f10718a.obtainMessage();
message.what = 9;
message.obj = this.f10705a.f26282a.f10519a;
} else if (ProfileActivity.AllInOne.f(this.f10705a.f26282a)) {
message = this.f10718a.obtainMessage();
message.what = 1;
message.obj = this.f10705a.f26282a.f10519a;
} else {
message = this.f10718a.obtainMessage();
message.what = 2;
message.obj = this.f10705a.f26282a.f10519a;
}
}
if (message != null) {
this.f10718a.sendMessage(message);
}
}
if (this.f10705a.f26282a.f10517a == 71 || this.f10705a.f26282a.f10517a == 71) {
ReportController.b(this.app, "dc01331", "", "", "Network_circle", "Network_circle_prof", a(this.f10705a.f26282a.g), 0, Integer.toString(a(this.f10705a.f26282a)), Integer.toString(this.f10705a.f26282a.j), "", "");
}
}
}
@Override
public void doOnStart() {
super.doOnStart();
if (this.f10740b != null) {
this.f10740b.removeCallbacks(this.f10723a);
this.f10740b.postDelayed(this.f10723a, 2000L);
}
}
private void B() {
TroopHandler troopHandler;
String str;
if (this.f10704a == null) {
if (QLog.isColorLevel()) {
QLog.e(ProfileCardUtil.f33517c, 2, "requestJoinedTroopThirdPartAppEntrance");
}
if (this.f10705a.f26283a != null && this.f10705a.f26283a.shouldShowJoinedTroop() && (troopHandler = (TroopHandler) this.app.getBusinessHandler(20)) != null && this.f10705a.f26283a != null) {
try {
if (this.f10705a.f26283a.uin == null || Long.parseLong(this.f10705a.f26283a.uin) == 0) {
str = this.f10705a.f26282a.f10519a;
} else {
str = this.f10705a.f26283a.uin;
}
troopHandler.a(str, 0, 1);
} catch (NumberFormatException e) {
if (QLog.isColorLevel()) {
QLog.e(C, 2, "NumberFormatException");
}
}
}
}
}
private boolean m2738a(ProfileCardInfo profileCardInfo) {
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, "checkParamValidate() cardInfo.allinone = " + profileCardInfo.f26282a);
}
if (profileCardInfo.f26282a == null || TextUtils.isEmpty(profileCardInfo.f26282a.f10519a)) {
return false;
}
if (ProfileActivity.AllInOne.f(profileCardInfo.f26282a)) {
try {
UinUtils.b(profileCardInfo.f26282a.f10519a);
} catch (NumberFormatException e) {
return false;
}
} else if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, "通讯录陌生人: cardInfo.allinone.uin = " + profileCardInfo.f26282a.f10519a);
}
if (profileCardInfo.f26282a.f10517a == 56 || profileCardInfo.f26282a.f10517a == 55) {
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, "rich statuc profile, ricthStatus id = " + profileCardInfo.f26282a.j + ", entry = " + profileCardInfo.f26282a.g);
}
} else {
profileCardInfo.f26282a.j = 0;
}
return true;
}
public synchronized void a(Card card, boolean z2, int i) {
boolean z3;
boolean z4;
long j;
if (card != null) {
if (i == 1 || i == 8) {
if (card.lCurrentBgId >= 0) {
ReportController.b(this.app, "dc01331", "", "", "card_mall", "Prof_in_client", a(this.f10705a.f26282a.g), 0, Integer.toString(a(this.f10705a.f26282a)), Long.toString(card.lCurrentBgId), "", "");
}
}
ProfilePerformanceReport profilePerformanceReport = ProfilePerformanceReport.f68059a;
if (profilePerformanceReport != null && profilePerformanceReport.m10271b()) {
profilePerformanceReport.a(7);
}
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "onCardUpdate isHeaderViewInited=" + this.f10772m + ",isNetCard=" + z2 + ",msgType=" + i + ",card=" + card.getProfileCardDesc());
}
a(card, z2);
m2736a(this.f10705a);
boolean z5 = false;
if (i == 8 && this.f10705a.f26282a.f10517a == 0) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "onCardUpdate: SUBTHREAD_MSG_NET_CARD cardInfo.card.lCurrentStyleId = " + this.f10705a.f26283a.lCurrentStyleId + "card.lCurrentStyleId = " + card.lCurrentStyleId);
}
if (this.f10705a.f26283a.lCurrentStyleId != card.lCurrentStyleId) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "onCardUpdate styleId change");
}
z5 = true;
}
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "onCardUpdate: SUBTHREAD_MSG_NET_CARD cardInfo.bgurl = " + this.f10705a.f26283a.backgroundUrl + "card.bgurl = " + card.backgroundUrl);
}
if (TextUtils.isEmpty(this.f10705a.f26283a.backgroundUrl)) {
if (!TextUtils.isEmpty(card.backgroundUrl)) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "onCardUpdate bgurl empty change");
}
z3 = z5;
z4 = true;
this.f10705a.f26283a = card;
if (this.f10772m || z4) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "onCardUpdate: isHeaderViewInited = " + this.f10772m + " updateBG = " + z4);
}
j = card.lCurrentStyleId;
int i2 = card.templateRet;
String str = card.backgroundUrl;
long j2 = card.backgroundColor;
if (j < 0 || !NetworkUtil.h(this) || z2) {
this.f10713a.a("initValidTemplateStart", true);
ProfileCardTemplate a2 = ProfileCardUtil.a(this.app, j, true);
this.f10713a.a("initValidTemplateEnd", "initValidTemplateStart", false);
if (j > 0 || a2 == null || TextUtils.isEmpty(str) || i2 != 0) {
this.f10705a.f26285a = null;
} else {
boolean m9036a = ProfileCardUtil.m9036a(this.app);
boolean m9035a = ProfileCardUtil.m9035a((Context) this.app.getApp(), str);
if (m9036a && m9035a) {
this.f10713a.a("initTemplateConfigStart", true);
boolean a3 = a2.a(this.app, j2, j);
this.f10713a.a("initTemplateConfigEnd", "initTemplateConfigStart", false);
this.f10713a.a("initTemplateBackgroundStart", true);
boolean m2745a = m2745a(str);
this.f10713a.a("initTemplateBackgroundEnd", "initTemplateBackgroundStart", false);
if (a3 && m2745a) {
this.f10705a.f26285a = a2;
} else {
this.f10705a.f26285a = null;
}
} else if (m2747b(str)) {
ThreadManager.a(new kyt(this, a2, str), 5, null, true);
} else {
this.f10705a.f26285a = null;
}
}
}
}
Message obtainMessage = this.f10740b.obtainMessage();
obtainMessage.what = 5;
obtainMessage.obj = card;
obtainMessage.arg1 = z2 ? 1 : 0;
obtainMessage.arg2 = i;
if (!z4 && z3) {
obtainMessage.arg2 = 13;
} else if (z4) {
obtainMessage.arg2 = 11;
} else if (z3) {
obtainMessage.arg2 = 12;
}
this.f10740b.sendMessage(obtainMessage);
if (profilePerformanceReport != null && profilePerformanceReport.m10271b()) {
profilePerformanceReport.b(7);
}
}
} else if (!this.f10705a.f26283a.backgroundUrl.equals(card.backgroundUrl)) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "onCardUpdate bgurl change");
}
z3 = z5;
z4 = true;
this.f10705a.f26283a = card;
if (this.f10772m) {
}
if (QLog.isColorLevel()) {
}
j = card.lCurrentStyleId;
int i22 = card.templateRet;
String str2 = card.backgroundUrl;
long j22 = card.backgroundColor;
if (j < 0) {
}
this.f10713a.a("initValidTemplateStart", true);
ProfileCardTemplate a22 = ProfileCardUtil.a(this.app, j, true);
this.f10713a.a("initValidTemplateEnd", "initValidTemplateStart", false);
if (j > 0) {
}
this.f10705a.f26285a = null;
Message obtainMessage2 = this.f10740b.obtainMessage();
obtainMessage2.what = 5;
obtainMessage2.obj = card;
obtainMessage2.arg1 = z2 ? 1 : 0;
obtainMessage2.arg2 = i;
if (!z4) {
}
if (z4) {
}
this.f10740b.sendMessage(obtainMessage2);
if (profilePerformanceReport != null) {
profilePerformanceReport.b(7);
}
}
}
z3 = z5;
z4 = false;
this.f10705a.f26283a = card;
if (this.f10772m) {
}
if (QLog.isColorLevel()) {
}
j = card.lCurrentStyleId;
int i222 = card.templateRet;
String str22 = card.backgroundUrl;
long j222 = card.backgroundColor;
if (j < 0) {
}
this.f10713a.a("initValidTemplateStart", true);
ProfileCardTemplate a222 = ProfileCardUtil.a(this.app, j, true);
this.f10713a.a("initValidTemplateEnd", "initValidTemplateStart", false);
if (j > 0) {
}
this.f10705a.f26285a = null;
Message obtainMessage22 = this.f10740b.obtainMessage();
obtainMessage22.what = 5;
obtainMessage22.obj = card;
obtainMessage22.arg1 = z2 ? 1 : 0;
obtainMessage22.arg2 = i;
if (!z4) {
}
if (z4) {
}
this.f10740b.sendMessage(obtainMessage22);
if (profilePerformanceReport != null) {
}
}
}
protected void m2746b() {
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(QQBrowserActivity.aj);
intentFilter.addAction(QQBrowserActivity.ak);
intentFilter.setPriority(Integer.MAX_VALUE);
try {
registerReceiver(this.f10679a, intentFilter);
this.f10727a = true;
} catch (Exception e) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, e.toString());
}
}
}
public void a(Card card, String str) {
byte[] bArr;
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, "onSwitchedToFriend, uin: " + str + ", card = " + card);
}
if (this.f10705a.f26282a.f10517a == 33) {
if (this.f10707a instanceof ProfileBaseView) {
((ProfileBaseView) this.f10707a).b();
}
a(this.f10734b);
}
this.f10705a.f26282a.f10517a = 1;
this.f10705a.f26282a.f10519a = str;
b(true);
long j = 0;
if (card != null) {
j = card.feedPreviewTime;
bArr = card.vSeed;
this.f10705a.f26283a = card;
a(card, false, false);
} else {
E();
bArr = null;
}
a(j, bArr, (this.f10705a.f26282a.f10517a == 56 || this.f10705a.f26282a.f10517a == 57) ? this.f10705a.f26282a.f10526b : null, true);
}
@Override
public boolean isWrapContent() {
return false;
}
@Override
public void doOnDestroy() {
((CardHandler) this.app.getBusinessHandler(2)).a(this.f10711a);
if (this.f10740b != null) {
this.f10740b.removeCallbacksAndMessages(null);
this.f10740b.removeMessages(0);
}
if (this.f10718a != null) {
this.f10718a.removeCallbacksAndMessages(null);
this.f10718a.removeMessages(0);
this.f10718a = null;
}
super.doOnDestroy();
if (this.app != null) {
this.app.removeHandler(getClass());
}
try {
if (this.f10727a) {
unregisterReceiver(this.f10679a);
this.f10727a = false;
}
} catch (Exception e) {
if (QLog.isDevelopLevel()) {
e.printStackTrace();
}
}
removeObserver(this.f10697a);
removeObserver(this.f10696a);
removeObserver(this.f10698a);
this.app.unRegistObserver(this.f10703a);
this.app.unRegistObserver(this.f10702a);
StatusManager statusManager = this.app != null ? (StatusManager) this.app.getManager(14) : null;
if (statusManager != null) {
statusManager.b(this.f10710a);
}
if (this.app != null && this.app.m4635a() != null) {
this.app.m4635a().deleteObserver(this);
}
if (this.f10707a != null) {
this.f10707a.d();
}
if (this.f10689a != null) {
int childCount = this.f10689a.getChildCount();
for (int i = 0; i < childCount; i++) {
View childAt = this.f10689a.getChildAt(i);
if (childAt instanceof ProfileHeaderView) {
((ProfileHeaderView) childAt).d();
}
}
}
if (this.f10678a != null && this.f10678a.isShowing()) {
this.f10678a.dismiss();
this.f10678a = null;
}
J();
if (MusicPendantManager.a() != null) {
MusicPendantManager.a().e();
}
if (this.f10700a != null) {
this.f10700a.end();
}
}
@Override
public void doOnPause() {
super.doOnPause();
if (this.f10707a != null) {
this.f10707a.c();
}
if (!this.f10752c) {
if (this.f10713a != null) {
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, "QQFriendProfileCardActivity time trace:" + this.f10713a.toString());
}
StatisticCollector.a((Context) this.app.getApp()).a(this.app.getCurrentAccountUin(), ProfileCardUtil.f33490G, true, 0L, 0L, this.f10713a.a(), "", false);
}
this.f10752c = true;
}
if (this.f10740b != null) {
this.f10740b.removeCallbacks(this.f10723a);
}
QQAppInterface qQAppInterface = this.app;
if (qQAppInterface != null) {
StatisticHitRateCollector.a().b(qQAppInterface.getCurrentAccountUin(), StatisticHitRateCollector.f92890c);
}
this.f10701a.end();
}
@Override
public void doOnResume() {
if (QLog.isColorLevel()) {
QLog.d(C, 2, "friend profile card activity doOnResume");
}
super.doOnResume();
if (this.av > 0) {
long currentTimeMillis = System.currentTimeMillis() - this.av;
if (QLog.isColorLevel() && currentTimeMillis > 500) {
QLog.i(LogTag.y, 2, "QQFriendProfileCardActivity Ui render used:" + currentTimeMillis);
}
this.av = 0L;
}
if (this.f10707a != null) {
this.f10707a.a();
}
if (this.f10705a.f26282a.g == 6) {
p();
}
addObserver(this.f10736b);
if (this.f10510e) {
this.f10704a = null;
B();
}
if (this.app != null) {
WebProcessManager webProcessManager = (WebProcessManager) this.app.getManager(12);
if (webProcessManager != null) {
webProcessManager.a(-1, new kyj(this));
}
QZoneHelper.a(this.app, this.f10700a);
}
}
@Override
public void doOnStop() {
super.doOnStop();
removeObserver(this.f10736b);
ProfilePerformanceReport profilePerformanceReport = ProfilePerformanceReport.f68059a;
if (profilePerformanceReport != null && profilePerformanceReport.a(true)) {
profilePerformanceReport.a(this.app.getCurrentAccountUin());
}
}
@Override
protected void onRestart() {
if (QLog.isColorLevel()) {
QLog.d(C, 2, "friend profile card activity onRestart");
}
super.onRestart();
if (this.f10705a != null && this.f10705a.f26282a != null && this.f10705a.f26282a.f10517a != 33) {
this.f10713a = new TimeTraceUtil();
this.f10772m = false;
this.f10752c = false;
if (this.f10725a != null) {
this.f10725a.clear();
}
if (this.f10718a != null) {
Message obtainMessage = this.f10718a.obtainMessage();
if (ProfileActivity.AllInOne.f(this.f10705a.f26282a)) {
obtainMessage.what = 1;
obtainMessage.obj = this.f10705a.f26282a.f10519a;
this.f10718a.sendMessage(obtainMessage);
}
}
}
}
public void C() {
}
@Override
public void doOnNewIntent(Intent intent) {
super.doOnNewIntent(intent);
ArrayList<String> stringArrayListExtra = intent.getStringArrayListExtra("PhotoConst.PHOTO_PATHS");
if (stringArrayListExtra != null && stringArrayListExtra.size() > 0) {
if (!NetworkUtil.e(BaseApplication.getContext())) {
a(R.string.f64129name_res_0x7f0a1660, 2);
return;
}
CardHandler cardHandler = (CardHandler) this.app.getBusinessHandler(2);
if (intent.getBooleanExtra(ProfileActivity.f10493s, false)) {
cardHandler.b(stringArrayListExtra.get(0));
x();
this.f10740b.postDelayed(this.f10742b, this.cW);
return;
}
cardHandler.a((ArrayList) stringArrayListExtra);
x();
} else if (intent.getBooleanExtra(AutoRemarkActivity.d, false)) {
doOnActivityResult(1000, -1, intent);
} else {
String stringExtra = intent.getStringExtra("PhotoConst.SINGLE_PHOTO_PATH");
if (stringExtra != null) {
if (ProfileCardUtil.m9037a(this.app, stringExtra)) {
if (this.f10707a != null) {
this.f10707a.a(this.f10705a.f26282a);
return;
}
return;
}
a(R.string.f66530name_res_0x7f0a1fc6, 2);
}
}
}
@Override
public void doOnActivityResult(int i, int i2, Intent intent) {
Object obj;
super.doOnActivityResult(i, i2, intent);
if (QLog.isColorLevel()) {
QLog.d(C, 2, "onActivityResult, resultCode : " + i + ", resultCode : " + i2 + ", data : " + intent);
}
CardHandler cardHandler = (CardHandler) this.app.getBusinessHandler(2);
if (i2 == -1 && intent != null) {
if (!NetworkUtil.e(BaseApplication.getContext())) {
a(R.string.f64129name_res_0x7f0a1660, 2);
return;
} else if (i == 1019) {
ArrayList<String> stringArrayListExtra = intent.getStringArrayListExtra(QZoneHelper.QZoneAlbumConstants.C);
if (stringArrayListExtra != null && stringArrayListExtra.size() > 0) {
if (QLog.isColorLevel()) {
QLog.d(C, 2, "pick photo from qzone size:" + stringArrayListExtra.size());
}
cardHandler.a((ArrayList) stringArrayListExtra);
x();
}
} else if (i == 1020) {
String stringExtra = intent.getStringExtra(QZoneHelper.QZoneAlbumConstants.C);
if (!TextUtils.isEmpty(stringExtra)) {
e(stringExtra);
}
}
}
if (i == 1022) {
cardHandler.a(this.f10705a.f26282a.f10519a, "");
FriendsManager friendsManager = (FriendsManager) this.app.getManager(50);
Card m4319a = friendsManager == null ? null : friendsManager.m4319a(this.f10705a.f26282a.f10519a);
if (m4319a != null && this.f10707a != null && intent != null && intent.getBooleanExtra(FriendProfileMoreInfoActivity.f9757a, false)) {
this.k = intent.getIntExtra(InterestSwitchEditActivity.e, -1);
byte[] bArr = null;
if (this.f10705a.f26282a.f10517a == 56 || this.f10705a.f26282a.f10517a == 57) {
bArr = this.f10705a.f26282a.f10526b;
} else if (this.f10705a.f26282a.f10517a == 35 || this.f10705a.f26282a.f10517a == 37 || this.f10705a.f26282a.f10517a == 36) {
bArr = this.f10705a.f26282a.f10526b;
}
a(m4319a.feedPreviewTime, m4319a.vSeed, bArr, true);
}
}
if (i == 1021 && i2 == -1) {
e(ImageUtil.c(this, this.f10731b));
}
if (i == 1015 && intent != null) {
this.f10510e = intent.getBooleanExtra(ShowExternalTroopListActivity.h, false);
}
if (i == 4 && i2 == -1 && intent != null) {
if (intent.hasExtra("result")) {
String stringExtra2 = intent.getStringExtra("result");
if (QLog.isColorLevel()) {
QLog.d(C, 2, "onActivityResult, resultStr : " + stringExtra2);
}
if (!TextUtils.isEmpty(stringExtra2)) {
try {
JSONObject jSONObject = new JSONObject(stringExtra2);
if (jSONObject != null && (obj = jSONObject.get("payState")) != null && "0".equals(String.valueOf(obj))) {
a(0L, (byte[]) null, (byte[]) null, false);
}
} catch (JSONException e) {
e.printStackTrace();
if (QLog.isColorLevel()) {
QLog.e(C, 2, "onActivityResult, JSONException : " + e.getMessage());
}
} catch (Exception e2) {
e2.printStackTrace();
if (QLog.isColorLevel()) {
QLog.e(C, 2, "onActivityResult, Exception : " + e2.getMessage());
}
}
}
} else if (QLog.isColorLevel()) {
QLog.e(C, 2, "onActivityResult, data contain no result key.");
}
}
if (i == 1019 && i2 == -1 && intent != null && intent.getBooleanExtra(NewerGuidePlugin.v, false)) {
this.f10681a = intent;
}
if (i == 1010) {
if (this.f10705a.f26282a.f == 101 && i2 == -1) {
finish();
}
} else if (i == 1007) {
if (this.f10705a.f26282a.f10517a == 0) {
FriendsManager friendsManager2 = (FriendsManager) this.app.getManager(50);
Card m4319a2 = friendsManager2 == null ? null : friendsManager2.m4319a(this.f10705a.f26282a.f10519a);
if (m4319a2 != null && this.f10707a != null) {
this.f10705a.f26283a = m4319a2;
this.f10705a.f26287a.f94354a.f33305a = m4319a2.strNick;
this.f10705a.f26289a[0] = m4319a2.strNick;
this.f10705a.f26289a[4] = "";
this.f10707a.a(this.f10705a.f26282a);
this.f10707a.d(this.f10705a);
this.f10715a.m9806a(m4319a2.getRichStatus());
this.f10707a.i(this.f10705a);
if (intent != null && intent.getBooleanExtra(FriendProfileMoreInfoActivity.f9757a, false)) {
this.k = intent.getIntExtra(InterestSwitchEditActivity.e, -1);
byte[] bArr2 = null;
if (this.f10705a.f26282a.f10517a == 56 || this.f10705a.f26282a.f10517a == 57) {
bArr2 = this.f10705a.f26282a.f10526b;
} else if (this.f10705a.f26282a.f10517a == 35 || this.f10705a.f26282a.f10517a == 37 || this.f10705a.f26282a.f10517a == 36) {
bArr2 = this.f10705a.f26282a.f10526b;
}
a(m4319a2.feedPreviewTime, m4319a2.vSeed, bArr2, true);
}
}
setResult(-1, intent);
}
} else if (i2 == -1) {
switch (i) {
case 5:
String c2 = ImageUtil.c(this, this.f10684a);
int min = Math.min((int) ProfileCardUtil.f94449c, ProfileCardUtil.a((Activity) this));
Intent intent2 = new Intent();
intent2.putExtra(PhotoConst.e, 100);
PhotoUtils.a(intent2, this, QQFriendProfileCardActivity.class.getName(), min, min, 640, 640, c2, ProfileCardUtil.m9022a());
return;
case 21:
intent.putExtra(AppConstants.leftViewText.f87223b, getString(R.string.f63415name_res_0x7f0a1396));
Intent a2 = AIOUtils.a(new Intent(this, SplashActivity.class), (int[]) null);
a2.putExtras(new Bundle(intent.getExtras()));
ForwardUtils.a(this.app, this, ForwardUtils.a(a2), a2);
return;
case 800:
if (!NetworkUtil.e(BaseApplication.getContext())) {
a(R.string.f64129name_res_0x7f0a1660, 2);
return;
}
boolean z2 = false;
if (intent != null) {
z2 = intent.getBooleanExtra("avatar_changed", false);
}
if (z2) {
if (ProfileCardUtil.m9037a(this.app, intent.getStringExtra("avatar_filepath"))) {
if (this.f10707a != null) {
this.f10707a.a(this.f10705a.f26282a);
return;
}
return;
}
a(R.string.f66530name_res_0x7f0a1fc6, 2);
return;
}
return;
case 1000:
setResult(-1);
finish();
return;
case 1004:
Card m4319a3 = ((FriendsManager) this.app.getManager(50)).m4319a(this.app.getCurrentAccountUin());
if (m4319a3 != null && this.f10707a != null && this.f10715a != null) {
this.f10705a.f26283a = m4319a3;
this.f10715a.m9804a(this.f10705a.f26283a);
this.f10707a.o(this.f10705a);
return;
}
return;
case 1012:
if (intent != null) {
if (intent.getBooleanExtra("finchat", false)) {
finish();
return;
}
String stringExtra3 = intent.getStringExtra("remark");
if (!Utils.a((Object) this.f10705a.f26282a.f10534i, (Object) stringExtra3)) {
d(stringExtra3);
return;
}
return;
}
return;
case 1018:
this.f10705a.f26282a.d = 1;
return;
default:
return;
}
}
}
public void a(ProfileActivity.CardContactInfo cardContactInfo) {
String str = cardContactInfo != null ? cardContactInfo.f85254c : null;
if (str != null && str.length() > 0) {
Intent intent = new Intent("android.intent.action.CALL", Uri.parse("tel:" + str));
if (!MobileIssueSettings.f34131a && KapalaiAdapterUtil.a().m9528a()) {
KapalaiAdapterUtil.a().a(intent);
}
startActivity(intent);
this.app.m4652a().b(str);
} else {
a(R.string.f64737name_res_0x7f0a18c0, 2);
}
ReportController.b(this.app, "dc01331", "", "", "P_prof", "call", a(this.f10705a.f26282a.g), 0, Integer.toString(a(this.f10705a.f26282a)), "", "", "");
}
public void b(ProfileActivity.CardContactInfo cardContactInfo) {
String str = cardContactInfo != null ? cardContactInfo.f85254c : null;
if (str != null && str.length() > 0) {
Intent intent = new Intent();
intent.setAction("android.intent.action.SENDTO");
intent.setData(Uri.parse("smsto:" + str));
startActivity(intent);
} else {
a(R.string.f64737name_res_0x7f0a18c0, 2);
}
ReportController.b(this.app, "dc01331", "", "", "P_prof", "send_sms", a(this.f10705a.f26282a.g), 0, Integer.toString(a(this.f10705a.f26282a)), "", "", "");
}
public void c(ProfileActivity.CardContactInfo cardContactInfo) {
String str = cardContactInfo == null ? null : cardContactInfo.f85252a;
if (str != null && str.length() > 0) {
if (NetworkUtil.e(BaseApplication.getContext())) {
if (!"".equals(str) && !str.equals(this.f10705a.f26282a.f10534i)) {
FriendListHandler friendListHandler = (FriendListHandler) this.app.getBusinessHandler(1);
if (friendListHandler != null) {
friendListHandler.a(this.f10705a.f26282a.f10519a, str, false);
this.f |= 1;
d(str);
} else {
a(R.string.f64741name_res_0x7f0a18c4, 2);
}
} else {
a(R.string.f64740name_res_0x7f0a18c3, 2);
}
} else {
a(R.string.f64128name_res_0x7f0a165f, 2);
}
}
ReportController.b(this.app, "dc01331", "", "", "P_prof", "Edit_name", a(this.f10705a.f26282a.g), 0, Integer.toString(a(this.f10705a.f26282a)), "", "", "");
}
public void m2743a(String str) {
long currentTimeMillis = System.currentTimeMillis();
if (ProfileActivity.a(this.f10763f, currentTimeMillis)) {
this.f10763f = currentTimeMillis;
String str2 = this.f10705a.f26282a.f10519a;
if (ProfileActivity.AllInOne.i(this.f10705a.f26282a)) {
str2 = b();
}
if (TextUtils.isEmpty(str)) {
str = String.format(ProfileActivity.k, str2);
}
Intent intent = new Intent(this, MusicGeneQQBrowserActivity.class);
intent.putExtra("uin", this.app.getCurrentAccountUin());
intent.putExtra("url", str);
if (this.f10705a.f26282a.f10517a == 0) {
intent.putExtra(MusicGeneWebViewPlugin.r, true);
} else {
intent.putExtra(MusicGeneWebViewPlugin.r, false);
}
Calendar calendar = Calendar.getInstance();
if (calendar != null && QLog.isColorLevel()) {
String format = new SimpleDateFormat("yyyy-MM-dd-hh-mm-ss").format(calendar.getTime());
if (QLog.isDevelopLevel()) {
QLog.d(C, 4, "musicgene123 startactivity " + format);
}
}
startActivity(intent);
ReportController.b(this.app, "dc01331", "", "", "0X8004182 ", "0X8004182", a(this.f10705a.f26282a.g), 0, Integer.toString(a(this.f10705a.f26282a)), "", "", "");
}
}
public void b(String str) {
if (str != null) {
if (Build.VERSION.SDK_INT < 11) {
((ClipboardManager) getSystemService("clipboard")).setText(str);
} else {
((android.content.ClipboardManager) getSystemService("clipboard")).setText(str);
}
}
}
public void c() {
ActionSheet actionSheet = (ActionSheet) ActionSheetHelper.a(this, (View) null);
actionSheet.m10333a(R.string.f65251name_res_0x7f0a1ac7);
actionSheet.c(R.string.f64757name_res_0x7f0a18d4);
actionSheet.c(R.string.f64759name_res_0x7f0a18d6);
actionSheet.c(R.string.f64758name_res_0x7f0a18d5);
actionSheet.d(R.string.f63203cancel);
actionSheet.a(new kws(this, actionSheet));
try {
if (!isFinishing()) {
actionSheet.show();
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void d() {
PhoneContactManagerImp phoneContactManagerImp = (PhoneContactManagerImp) this.app.getManager(10);
PhoneContact c2 = phoneContactManagerImp.c(b(this.f10705a.f26282a));
ActionSheet actionSheet = (ActionSheet) ActionSheetHelper.a(this, (View) null);
if (this.f10705a.f26282a.f10517a == 53) {
ReportController.b(this.app, "dc01331", "", "", "0X8007015", "0X8007015", 0, 0, "", "", "", "");
} else {
ReportController.b(this.app, "dc01331", "", "", "0X8007167", "0X8007167", 0, 0, "", "", "", "");
if (!TextUtils.isEmpty(b()) && c2 != null) {
actionSheet.c(c2.isHiden ? R.string.f64756name_res_0x7f0a18d3 : R.string.f64754name_res_0x7f0a18d1);
}
}
boolean z2 = c2 != null ? c2.isHiden : false;
actionSheet.d(R.string.f63203cancel);
actionSheet.a(new kwt(this, phoneContactManagerImp, z2, actionSheet));
try {
if (!isFinishing()) {
actionSheet.show();
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void a(int[] iArr) {
if (this.f10728a == null) {
this.f10728a = getResources().getStringArray(R.array.f37773name_res_0x7f080004);
}
ActionSheet actionSheet = (ActionSheet) ActionSheetHelper.a(this, (View) null);
int i = 0;
while (true) {
int i2 = i;
if (i2 >= iArr.length) {
break;
}
if (iArr[i2] == 16) {
actionSheet.d(this.f10728a[iArr[i2]]);
} else if (iArr[i2] == 19) {
actionSheet.m10333a(R.string.f66306name_res_0x7f0a1ee6);
if (this.f10708a != null && this.f10708a.pstn_c2c_call_time > 0) {
this.m = 1;
actionSheet.a(getResources().getString(R.string.f66304name_res_0x7f0a1ee4), getResources().getDrawable(R.drawable.f42961name_res_0x7f020760), 0);
ReportController.b(this.app, "dc01331", "", "", "0X80063FD", "0X80063FD", 1, 0, "", "", "", "");
} else if (this.f10708a != null && this.f10709a.b() == 1 && this.f10708a.pstn_c2c_try_status == 0) {
this.m = 2;
actionSheet.a(getResources().getString(R.string.f66304name_res_0x7f0a1ee4), getResources().getDrawable(R.drawable.f42960name_res_0x7f02075f), 0);
ReportController.b(this.app, "dc01331", "", "", "0X80063FD", "0X80063FD", 3, 0, "", "", "", "");
} else {
this.m = 5;
actionSheet.a(getResources().getString(R.string.f66304name_res_0x7f0a1ee4), getResources().getDrawable(R.drawable.f42959name_res_0x7f02075e), 0);
ReportController.b(this.app, "dc01331", "", "", "0X80063FD", "0X80063FD", 2, 0, "", "", "", "");
}
} else if (iArr[i2] >= 0 && iArr[i2] < this.f10728a.length) {
actionSheet.a(this.f10728a[iArr[i2]], 1);
}
if (iArr[i2] == 20) {
actionSheet.m10333a(R.string.f65780name_res_0x7f0a1cd8);
}
i = i2 + 1;
}
actionSheet.a(new kwu(this, actionSheet));
try {
if (!isFinishing()) {
actionSheet.show();
}
} catch (Exception e) {
e.printStackTrace();
}
}
private void a(int i, UpsImageUploadResult upsImageUploadResult, String str) {
if (upsImageUploadResult != null && upsImageUploadResult != null) {
UploadUpsInfoRsp uploadUpsInfoRsp = upsImageUploadResult != null ? new UploadUpsInfoRsp(upsImageUploadResult.dataType, upsImageUploadResult.vBusiNessData, upsImageUploadResult.url, upsImageUploadResult.rawWidth, upsImageUploadResult.rawHeight, upsImageUploadResult.photoType, null) : null;
UniAttribute uniAttribute = new UniAttribute();
uniAttribute.setEncodeName("utf8");
uniAttribute.put("ReplyCode", Integer.valueOf(i == 0 ? 0 : -1));
uniAttribute.put("StrResult", i == 0 ? "success" : "fail");
if (upsImageUploadResult != null) {
uniAttribute.put(DataFactory.f21827c, uploadUpsInfoRsp);
}
}
}
private void f(String str) {
boolean z2;
boolean z3 = true;
if (this.f10705a.f26282a.f10517a == 0) {
this.f10758d.setText(R.string.f64716name_res_0x7f0a18ab);
} else {
this.f10758d.setText(R.string.f64715name_res_0x7f0a18aa);
}
if (this.f10705a.f26282a.g == 6) {
p();
} else {
this.f10735b.setText(getString(R.string.f63667button_back));
}
this.f10735b.setOnClickListener(new kwx(this));
if (this.f10705a.f26282a.f10517a == 0) {
z2 = true;
} else if (this.f10705a.f26282a.f10517a == 72 || this.f10705a.f26282a.f10517a == 71) {
z2 = true;
} else if (this.f10705a.f26282a.f10517a == 70) {
z2 = true;
} else if (ProfileActivity.AllInOne.b(this.f10705a.f26282a)) {
z2 = true;
} else if (this.f10705a.f26282a.f10517a == 21 || this.f10705a.f26282a.f10517a == 58 || this.f10705a.f26282a.f10517a == 22) {
z2 = true;
} else if (this.f10705a.f26282a.f10517a == 46 || this.f10705a.f26282a.f10517a == 47) {
z2 = true;
} else if (this.f10705a.f26282a.f10517a == 41 || this.f10705a.f26282a.f10517a == 42) {
z2 = true;
} else if (this.f10705a.f26282a.f10517a == 56 || this.f10705a.f26282a.f10517a == 57) {
z2 = true;
} else if (this.f10705a.f26282a.f10517a == 80) {
z2 = false;
} else if (this.f10705a.f26282a.f10517a == 36) {
z2 = false;
} else if (this.f10705a.f26282a.f10517a == 3) {
z2 = this.f10705a.f26282a.d != 0;
} else if (this.f10705a.f26282a.f10517a == 2) {
z2 = true;
} else if (this.f10705a.f26282a.f10517a == 74) {
z2 = true;
} else {
z2 = ProfileActivity.AllInOne.a(this.f10705a.f26282a);
}
if (this.f10705a.f26282a.f10517a != 32 && this.f10705a.f26282a.f10517a != 31 && this.f10705a.f26282a.f10517a != 50 && this.f10705a.f26282a.f10517a != 51 && this.f10705a.f26282a.f10517a != 34) {
if (this.f10705a.f26282a.f10517a != 53) {
z3 = false;
} else if (this.f10705a.f26284a != null && TextUtils.equals(this.f10705a.f26284a.uin, this.app.getCurrentAccountUin())) {
z3 = false;
}
}
if (z2) {
this.f10751c.setVisibility(0);
this.f10751c.setTag(new DataTag(16, null));
this.f10751c.setOnClickListener(this.f10686a);
this.f10751c.setEnabled(this.f10744b);
if (this.f10705a.f26282a.f10517a == 0) {
this.f10751c.setText(R.string.f64103name_res_0x7f0a1646);
} else {
this.f10751c.setText(R.string.f65422name_res_0x7f0a1b72);
}
} else {
this.f10751c.setVisibility(8);
}
if (z3) {
this.f10691a.setVisibility(0);
this.f10691a.setTag(new DataTag(44, null));
this.f10691a.setOnClickListener(this.f10686a);
this.f10691a.setEnabled(this.f10744b);
return;
}
this.f10691a.setVisibility(8);
}
@Override
public boolean onBackEvent() {
K();
return super.onBackEvent();
}
private void a(View view, int i, int i2, int i3, int i4) {
if (view != null) {
DataTag dataTag = new DataTag(i, null);
view.setVisibility(0);
Button button = (Button) view.findViewById(R.id.cjl);
button.setTag(dataTag);
button.setOnClickListener(this.f10686a);
button.setContentDescription(getString(i4));
button.setText(i2);
if (!d(i) || this.f10744b) {
button.setTextColor(getResources().getColor(i3 == 2 ? R.color.f39351name_res_0x7f0b03b6 : R.color.f39235name_res_0x7f0b0342));
} else {
button.setTextColor(getResources().getColor(R.color.f39374name_res_0x7f0b03cd));
}
button.setEnabled(this.f10744b);
}
}
private void a(int i) {
boolean z2;
switch (i) {
case 1:
View childAt = this.f10734b.getChildAt(0);
if (childAt != null) {
childAt.setVisibility(8);
}
a(this.f10734b.getChildAt(1), 23, R.string.f65399name_res_0x7f0a1b5b, 0, R.string.f58644name_res_0x7f0a00ee);
a(this.f10734b.getChildAt(2), 57, R.string.f64221name_res_0x7f0a16bc, 2, R.string.f64221name_res_0x7f0a16bc);
z2 = true;
break;
case 2:
a(this.f10734b.getChildAt(0), 7, R.string.f64735name_res_0x7f0a18be, 0, R.string.f58607name_res_0x7f0a00c9);
a(this.f10734b.getChildAt(1), 20, R.string.f64744name_res_0x7f0a18c7, 1, R.string.f58612name_res_0x7f0a00ce);
a(this.f10734b.getChildAt(2), 8, R.string.f63608name_res_0x7f0a1457, 2, R.string.f58608name_res_0x7f0a00ca);
if (this.f10734b.getChildAt(3) != null && this.f10734b.getChildAt(4) != null) {
this.f10734b.getChildAt(3).setVisibility(8);
this.f10734b.getChildAt(4).setVisibility(8);
}
if (this.f10705a.f26283a != null && this.f10705a.f26283a.lCurrentStyleId == ProfileCardTemplate.h && (this.f10707a instanceof ProfileShoppingView)) {
a(this.f10734b.getChildAt(0), 7, R.string.f64735name_res_0x7f0a18be, 0, R.string.f58607name_res_0x7f0a00c9);
a(this.f10734b.getChildAt(1), 20, R.string.f64744name_res_0x7f0a18c7, 1, R.string.f58612name_res_0x7f0a00ce);
if (this.f10734b.getChildAt(2) != null) {
this.f10734b.getChildAt(2).setVisibility(8);
}
a(this.f10734b.getChildAt(3), 8, R.string.f63608name_res_0x7f0a1457, 0, R.string.f58608name_res_0x7f0a00ca);
a(this.f10734b.getChildAt(4), 41, R.string.f63609name_res_0x7f0a1458, 2, R.string.f58609name_res_0x7f0a00cb);
z2 = true;
break;
}
z2 = true;
break;
case 3:
a(this.f10734b.getChildAt(0), 7, R.string.f64735name_res_0x7f0a18be, 0, R.string.f58607name_res_0x7f0a00c9);
if (this.f10734b.getChildAt(1) != null) {
this.f10734b.getChildAt(1).setVisibility(8);
}
a(this.f10734b.getChildAt(2), 8, R.string.f63608name_res_0x7f0a1457, 2, R.string.f58608name_res_0x7f0a00ca);
if (this.f10734b.getChildAt(3) != null && this.f10734b.getChildAt(4) != null) {
this.f10734b.getChildAt(3).setVisibility(8);
this.f10734b.getChildAt(4).setVisibility(8);
}
if (this.f10705a.f26283a != null && this.f10705a.f26283a.lCurrentStyleId == ProfileCardTemplate.h && (this.f10707a instanceof ProfileShoppingView)) {
a(this.f10734b.getChildAt(0), 7, R.string.f64735name_res_0x7f0a18be, 0, R.string.f58607name_res_0x7f0a00c9);
if (this.f10734b.getChildAt(1) != null) {
this.f10734b.getChildAt(1).setVisibility(8);
}
if (this.f10734b.getChildAt(2) != null) {
this.f10734b.getChildAt(2).setVisibility(8);
}
a(this.f10734b.getChildAt(3), 8, R.string.f63608name_res_0x7f0a1457, 0, R.string.f58608name_res_0x7f0a00ca);
a(this.f10734b.getChildAt(4), 41, R.string.f63609name_res_0x7f0a1458, 2, R.string.f58609name_res_0x7f0a00cb);
z2 = true;
break;
}
z2 = true;
break;
case 4:
a(this.f10734b.getChildAt(0), 20, R.string.f64744name_res_0x7f0a18c7, 0, R.string.f58612name_res_0x7f0a00ce);
if (this.f10734b.getChildAt(1) != null) {
this.f10734b.getChildAt(1).setVisibility(8);
}
a(this.f10734b.getChildAt(2), 8, R.string.f63608name_res_0x7f0a1457, 2, R.string.f58608name_res_0x7f0a00ca);
if (this.f10734b.getChildAt(3) != null && this.f10734b.getChildAt(4) != null) {
this.f10734b.getChildAt(3).setVisibility(8);
this.f10734b.getChildAt(4).setVisibility(8);
}
if (this.f10705a.f26283a != null && this.f10705a.f26283a.lCurrentStyleId == ProfileCardTemplate.h && (this.f10707a instanceof ProfileShoppingView)) {
a(this.f10734b.getChildAt(0), 20, R.string.f64744name_res_0x7f0a18c7, 0, R.string.f58612name_res_0x7f0a00ce);
if (this.f10734b.getChildAt(1) != null) {
this.f10734b.getChildAt(1).setVisibility(8);
}
if (this.f10734b.getChildAt(2) != null) {
this.f10734b.getChildAt(2).setVisibility(8);
}
a(this.f10734b.getChildAt(3), 8, R.string.f63608name_res_0x7f0a1457, 0, R.string.f58608name_res_0x7f0a00ca);
a(this.f10734b.getChildAt(4), 41, R.string.f63609name_res_0x7f0a1458, 2, R.string.f58609name_res_0x7f0a00cb);
z2 = true;
break;
}
z2 = true;
break;
case 5:
a(this.f10734b.getChildAt(0), 7, R.string.f64735name_res_0x7f0a18be, 0, R.string.f58607name_res_0x7f0a00c9);
a(this.f10734b.getChildAt(1), 20, R.string.f64744name_res_0x7f0a18c7, 1, R.string.f58612name_res_0x7f0a00ce);
if (this.f10734b.getChildAt(2) != null) {
this.f10734b.getChildAt(2).setVisibility(8);
}
if (this.f10734b.getChildAt(3) != null && this.f10734b.getChildAt(4) != null) {
this.f10734b.getChildAt(3).setVisibility(8);
this.f10734b.getChildAt(4).setVisibility(8);
}
if (this.f10705a.f26283a != null && this.f10705a.f26283a.lCurrentStyleId == ProfileCardTemplate.h && (this.f10707a instanceof ProfileShoppingView)) {
a(this.f10734b.getChildAt(0), 7, R.string.f64735name_res_0x7f0a18be, 0, R.string.f58607name_res_0x7f0a00c9);
a(this.f10734b.getChildAt(1), 20, R.string.f64744name_res_0x7f0a18c7, 1, R.string.f58612name_res_0x7f0a00ce);
if (this.f10734b.getChildAt(2) != null) {
this.f10734b.getChildAt(2).setVisibility(8);
}
if (this.f10734b.getChildAt(3) != null) {
this.f10734b.getChildAt(3).setVisibility(8);
}
a(this.f10734b.getChildAt(4), 41, R.string.f63609name_res_0x7f0a1458, 2, R.string.f58609name_res_0x7f0a00cb);
z2 = true;
break;
}
z2 = true;
break;
case 6:
a(this.f10734b.getChildAt(0), 7, R.string.f64735name_res_0x7f0a18be, 0, R.string.f58607name_res_0x7f0a00c9);
if (this.f10734b.getChildAt(1) != null) {
this.f10734b.getChildAt(1).setVisibility(8);
}
if (this.f10734b.getChildAt(2) != null) {
this.f10734b.getChildAt(2).setVisibility(8);
}
if (this.f10734b.getChildAt(3) != null && this.f10734b.getChildAt(4) != null) {
this.f10734b.getChildAt(3).setVisibility(8);
this.f10734b.getChildAt(4).setVisibility(8);
}
if (this.f10705a.f26283a != null && this.f10705a.f26283a.lCurrentStyleId == ProfileCardTemplate.h && (this.f10707a instanceof ProfileShoppingView)) {
a(this.f10734b.getChildAt(0), 7, R.string.f64735name_res_0x7f0a18be, 0, R.string.f58607name_res_0x7f0a00c9);
if (this.f10734b.getChildAt(1) != null) {
this.f10734b.getChildAt(1).setVisibility(8);
}
if (this.f10734b.getChildAt(2) != null) {
this.f10734b.getChildAt(2).setVisibility(8);
}
if (this.f10734b.getChildAt(3) != null) {
this.f10734b.getChildAt(3).setVisibility(8);
}
a(this.f10734b.getChildAt(4), 41, R.string.f63609name_res_0x7f0a1458, 2, R.string.f58609name_res_0x7f0a00cb);
z2 = true;
break;
}
z2 = true;
break;
case 7:
this.f10734b.getChildAt(0).setVisibility(8);
if (this.f10734b.getChildAt(1) != null) {
this.f10734b.getChildAt(1).setVisibility(8);
}
a(this.f10734b.getChildAt(2), 8, R.string.f63608name_res_0x7f0a1457, 2, R.string.f58608name_res_0x7f0a00ca);
if (this.f10734b.getChildAt(3) != null && this.f10734b.getChildAt(4) != null) {
this.f10734b.getChildAt(3).setVisibility(8);
this.f10734b.getChildAt(4).setVisibility(8);
}
if (this.f10705a.f26283a != null && this.f10705a.f26283a.lCurrentStyleId == ProfileCardTemplate.h && (this.f10707a instanceof ProfileShoppingView)) {
this.f10734b.getChildAt(0).setVisibility(8);
if (this.f10734b.getChildAt(1) != null) {
this.f10734b.getChildAt(1).setVisibility(8);
}
if (this.f10734b.getChildAt(2) != null) {
this.f10734b.getChildAt(2).setVisibility(8);
}
a(this.f10734b.getChildAt(3), 8, R.string.f63608name_res_0x7f0a1457, 0, R.string.f58608name_res_0x7f0a00ca);
a(this.f10734b.getChildAt(4), 41, R.string.f63609name_res_0x7f0a1458, 2, R.string.f58609name_res_0x7f0a00cb);
z2 = true;
break;
}
z2 = true;
break;
case 8:
a(this.f10734b.getChildAt(0), 20, R.string.f64744name_res_0x7f0a18c7, 0, R.string.f58612name_res_0x7f0a00ce);
if (this.f10734b.getChildAt(1) != null) {
this.f10734b.getChildAt(1).setVisibility(8);
}
if (this.f10734b.getChildAt(2) != null) {
this.f10734b.getChildAt(2).setVisibility(8);
}
if (this.f10734b.getChildAt(3) != null && this.f10734b.getChildAt(4) != null) {
this.f10734b.getChildAt(3).setVisibility(8);
this.f10734b.getChildAt(4).setVisibility(8);
}
if (this.f10705a.f26283a != null && this.f10705a.f26283a.lCurrentStyleId == ProfileCardTemplate.h && (this.f10707a instanceof ProfileShoppingView)) {
a(this.f10734b.getChildAt(0), 20, R.string.f64744name_res_0x7f0a18c7, 0, R.string.f58612name_res_0x7f0a00ce);
if (this.f10734b.getChildAt(1) != null) {
this.f10734b.getChildAt(1).setVisibility(8);
}
if (this.f10734b.getChildAt(2) != null) {
this.f10734b.getChildAt(2).setVisibility(8);
}
if (this.f10734b.getChildAt(3) != null) {
this.f10734b.getChildAt(3).setVisibility(8);
}
a(this.f10734b.getChildAt(4), 41, R.string.f63609name_res_0x7f0a1458, 2, R.string.f58609name_res_0x7f0a00cb);
z2 = true;
break;
}
z2 = true;
break;
case 9:
a(this.f10734b.getChildAt(0), 20, R.string.f64744name_res_0x7f0a18c7, 0, R.string.f58612name_res_0x7f0a00ce);
if (this.f10734b.getChildAt(1) != null) {
this.f10734b.getChildAt(1).setVisibility(8);
}
if (this.f10734b.getChildAt(2) != null) {
this.f10734b.getChildAt(2).setVisibility(8);
}
if (this.f10734b.getChildAt(3) != null && this.f10734b.getChildAt(4) != null) {
this.f10734b.getChildAt(3).setVisibility(8);
this.f10734b.getChildAt(4).setVisibility(8);
}
if (this.f10705a.f26283a != null && this.f10705a.f26283a.lCurrentStyleId == ProfileCardTemplate.h && (this.f10707a instanceof ProfileShoppingView)) {
a(this.f10734b.getChildAt(0), 20, R.string.f64744name_res_0x7f0a18c7, 0, R.string.f58612name_res_0x7f0a00ce);
if (this.f10734b.getChildAt(1) != null) {
this.f10734b.getChildAt(2).setVisibility(8);
}
if (this.f10734b.getChildAt(2) != null) {
this.f10734b.getChildAt(2).setVisibility(8);
}
if (this.f10734b.getChildAt(3) != null && this.f10734b.getChildAt(4) != null) {
this.f10734b.getChildAt(3).setVisibility(8);
z2 = true;
break;
}
}
z2 = true;
break;
default:
z2 = false;
break;
}
findViewById(R.id.f53094name_res_0x7f091783).setVisibility(z2 ? 0 : 8);
this.f10734b.setVisibility(z2 ? 0 : 8);
}
public void D() {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "update buttons");
}
if (this.f10705a.f26282a.f10517a == 0) {
a(1);
} else if (this.f10705a.f26282a.f10517a == 80) {
a(9);
} else if (this.f10705a.f26282a.f10517a == 53) {
this.cV = 3;
a(10);
ReportController.b(this.app, "dc01331", "", "", "0X800716B", "0X800716B", this.cV, 0, "", "", "", "");
} else {
boolean d = ProfileActivity.AllInOne.d(this.f10705a.f26282a);
boolean e = ProfileActivity.AllInOne.e(this.f10705a.f26282a);
boolean c2 = ProfileActivity.AllInOne.c(this.f10705a.f26282a);
if (!ProfileActivity.AllInOne.b(this.f10705a.f26282a)) {
c2 = false;
}
if (d && e && c2) {
a(2);
} else if (d && e) {
a(3);
} else if (e && c2) {
a(4);
} else if (d && c2) {
a(5);
} else if (d) {
a(6);
} else if (e) {
a(7);
} else if (c2) {
a(5);
} else {
a(0);
}
}
}
public void d(String str) {
this.f10705a.f26282a.f10534i = str;
a(this.f10705a, 4, str);
if (this.f10705a.f26287a == null) {
this.f10705a.f26287a = new MQQProfileName();
}
m2736a(this.f10705a);
switch (((MQQProfileName) this.f10705a.f26287a.clone()).a(this.f10705a.f26287a)) {
case 0:
default:
return;
case 1:
this.f10715a.a(this.f10705a.f26287a);
return;
case 2:
if (this.f10707a != null) {
this.f10707a.i(this.f10705a);
return;
}
return;
case 3:
if (this.f10707a != null) {
this.f10707a.i(this.f10705a);
}
this.f10715a.a(this.f10705a.f26287a);
return;
}
}
private void a(LinearLayout linearLayout) {
linearLayout.removeAllViews();
this.f10764f = null;
int dimensionPixelSize = getResources().getDimensionPixelSize(R.dimen.f40114name_res_0x7f0c02bc);
int dimensionPixelSize2 = getResources().getDimensionPixelSize(R.dimen.f40114name_res_0x7f0c02bc);
if (this.f10705a != null && this.f10705a.f26282a != null && this.f10705a.f26282a.f10517a != 33) {
this.f10764f = View.inflate(this, R.layout.f57595name_res_0x7f0304e2, null);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(0, -2);
layoutParams.weight = 1.0f;
layoutParams.rightMargin = dimensionPixelSize2;
linearLayout.addView(this.f10764f, layoutParams);
if (this.f10705a.f26282a.f10517a == 0 && !TextUtils.isEmpty(this.f10705a.f26282a.f10519a)) {
this.f10764f = View.inflate(this, R.layout.f57741name_res_0x7f030574, null);
LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(0, -2);
layoutParams2.weight = 1.0f;
layoutParams2.rightMargin = dimensionPixelSize2;
linearLayout.addView(this.f10764f, layoutParams2);
this.f10764f = View.inflate(this, R.layout.f57574name_res_0x7f0304cd, null);
LinearLayout.LayoutParams layoutParams3 = new LinearLayout.LayoutParams(0, -2);
layoutParams3.weight = 1.0f;
layoutParams3.rightMargin = dimensionPixelSize;
linearLayout.addView(this.f10764f, layoutParams3);
}
if (this.f10705a.f26282a.f10517a != 0) {
this.f10764f = View.inflate(this, R.layout.f57595name_res_0x7f0304e2, null);
LinearLayout.LayoutParams layoutParams4 = new LinearLayout.LayoutParams(0, -2);
layoutParams4.weight = 1.0f;
layoutParams4.rightMargin = dimensionPixelSize2;
linearLayout.addView(this.f10764f, layoutParams4);
this.f10764f = View.inflate(this, R.layout.f57574name_res_0x7f0304cd, null);
LinearLayout.LayoutParams layoutParams5 = new LinearLayout.LayoutParams(0, -2);
layoutParams5.weight = 1.0f;
layoutParams5.rightMargin = dimensionPixelSize2;
linearLayout.addView(this.f10764f, layoutParams5);
this.f10764f = View.inflate(this, R.layout.f57595name_res_0x7f0304e2, null);
LinearLayout.LayoutParams layoutParams6 = new LinearLayout.LayoutParams(0, -2);
layoutParams6.weight = 1.0f;
layoutParams6.rightMargin = dimensionPixelSize2;
linearLayout.addView(this.f10764f, layoutParams6);
this.f10764f = View.inflate(this, R.layout.f57574name_res_0x7f0304cd, null);
LinearLayout.LayoutParams layoutParams7 = new LinearLayout.LayoutParams(0, -2);
layoutParams7.weight = 1.0f;
layoutParams7.rightMargin = dimensionPixelSize2;
linearLayout.addView(this.f10764f, layoutParams7);
}
}
}
@Override
public void requestWindowFeature(Intent intent) {
requestWindowFeature(1);
getWindow().setFormat(-3);
}
private void E() {
this.f10713a.a("initCardLayoutStart", true);
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "initInfoCardCommonLayout");
}
Resources resources = getResources();
DisplayMetrics displayMetrics = resources.getDisplayMetrics();
this.e = (resources.getDimensionPixelSize(R.dimen.f39637name_res_0x7f0c00df) - resources.getDimensionPixelSize(R.dimen.f39450title_bar_height)) - ((int) (displayMetrics.density * 66.0f));
this.f10750c = new AlphaAnimation(0.0f, 1.0f);
this.f10750c.setDuration(300L);
this.f10750c.setInterpolator(this, 17432581);
this.f10750c.setAnimationListener(this.f10690a);
this.f10757d = new AlphaAnimation(1.0f, 0.0f);
this.f10757d.setDuration(300L);
this.f10757d.setInterpolator(this, 17432581);
this.f10757d.setAnimationListener(this.f10690a);
this.f10761e = View.inflate(this, R.layout.f57593name_res_0x7f0304e0, null);
if (this.f10761e instanceof PerfRelativeLayout) {
((PerfRelativeLayout) this.f10761e).setOnDrawCompleteListener(this.f10699a);
}
this.f10733b = this.f10761e.findViewById(R.id.f49684name_res_0x7f090a30);
this.f10722a = (PullToZoomListView) this.f10761e.findViewById(R.id.f49234common_xlistview);
this.f10722a.setVerticalScrollBarEnabled(false);
this.f10722a.setMotionEventInterceptor(this);
this.f10722a.setNeedCheckSpringback(true);
this.f10722a.setOverScrollDistance(0);
this.f10722a.setOnScrollChangeListener(this.f10721a);
this.f10722a.setOnScrollListener(this.f10719a);
this.f10756d = new View(this);
this.f10722a.b(this.f10756d);
this.f10749c = this.f10761e.findViewById(R.id.f53097name_res_0x7f091786);
this.f10735b = (TextView) this.f10761e.findViewById(R.id.f47677ivTitleBtnLeft);
this.f10751c = (TextView) this.f10761e.findViewById(R.id.f48299ivTitleBtnRightText);
this.f10751c.setTextColor(getResources().getColor(R.color.f39302name_res_0x7f0b0385));
this.f10691a = (ImageView) this.f10761e.findViewById(R.id.f48300ivTitleBtnRightImage);
this.f10758d = (TextView) this.f10761e.findViewById(R.id.f48292ivTitleName);
this.f10741b = (ImmersiveTitleBar2) this.f10761e.findViewById(R.id.f48310name_res_0x7f0904d2);
if (this.f10705a.f26282a.f10517a == 33) {
this.f10758d.setVisibility(0);
this.f10741b.setVisibility(0);
} else {
this.f10758d.setVisibility(8);
this.f10741b.setVisibility(4);
}
this.f10688a = View.inflate(this, R.layout.f57579name_res_0x7f0304d2, null);
View inflate = View.inflate(this, R.layout.f57576name_res_0x7f0304cf, null);
this.f10722a.a(inflate);
this.f10689a = (ViewGroup) inflate.findViewById(R.id.f53045name_res_0x7f091752);
this.f10689a.setTag(new DataTag(29, null));
this.f10689a.setOnClickListener(this.f10686a);
ImageView imageView = (ImageView) this.f10688a.findViewById(R.id.f53046name_res_0x7f091753);
if (imageView != null) {
try {
Animatable animatable = (Animatable) imageView.getDrawable();
if (!animatable.isRunning()) {
animatable.start();
}
} catch (Exception e) {
e.printStackTrace();
}
}
this.f10715a = (ProfileCardMoreInfoView) this.f10688a.findViewById(R.id.f53059name_res_0x7f091760);
this.f10715a.a(this.f10705a, this.app, this);
this.f10715a.setVisibility(0);
if (Build.VERSION.SDK_INT >= 11) {
this.f10715a.addOnLayoutChangeListener(new kwy(this));
}
this.f10762e = (ImageView) this.f10688a.findViewById(R.id.f53060name_res_0x7f091761);
this.f10693a = (TextView) this.f10761e.findViewById(R.id.f53095name_res_0x7f091784);
this.f10734b = (LinearLayout) this.f10761e.findViewById(R.id.f49235name_res_0x7f09086f);
a(this.f10734b);
this.f10734b.setVisibility(8);
if (this.f10740b != null) {
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, "initContentView add timeout msg");
}
this.f10740b.sendMessageDelayed(this.f10740b.obtainMessage(10), 10000L);
}
this.f10722a.setAdapter((ListAdapter) new XSimpleListAdapter(this.f10688a));
super.setContentView(this.f10761e);
getWindow().setBackgroundDrawable(null);
f((String) null);
this.f10713a.a("initCardLayoutEnd", "initCardLayoutStart", false);
}
public void a(View view) {
SharedPreferences sharedPreferences;
ViewStub viewStub;
if (this.f10705a.f26282a.f10517a == 0 && this.f10705a.f26282a != null && this.app.getCurrentAccountUin().equals(this.f10705a.f26282a.f10519a) && (sharedPreferences = this.app.getApp().getSharedPreferences(this.app.getCurrentAccountUin(), 0)) != null && !sharedPreferences.getBoolean(AppConstants.Preferences.be, false) && (viewStub = (ViewStub) view.findViewById(R.id.f51670name_res_0x7f0911f2)) != null) {
View inflate = viewStub.inflate();
DataTag dataTag = new DataTag(57, null);
this.f10692a = (RelativeLayout) inflate.findViewById(R.id.f53732newer_mask_layout);
this.f10692a.setTag(dataTag);
((Button) inflate.findViewById(R.id.f53734name_res_0x7f091a03)).setOnClickListener(new kxa(this, sharedPreferences));
TextView textView = (TextView) inflate.findViewById(R.id.f53736name_res_0x7f091a05);
textView.setTag(dataTag);
textView.setOnClickListener(this.f10686a);
}
}
private synchronized void b(ProfileCardInfo profileCardInfo) {
boolean z2;
this.f10713a.a("initHeaderViewStart", true);
if (!this.f10772m && !profileCardInfo.f26282a.f10519a.equals("0")) {
if (profileCardInfo.f26283a != null) {
((CardHandler) this.app.getBusinessHandler(2)).m4162a(profileCardInfo.f26283a.uin);
}
if (profileCardInfo.f26283a != null) {
try {
} catch (Exception e) {
if (QLog.isColorLevel()) {
QLog.d(C, 2, e.toString());
}
e.printStackTrace();
}
if (profileCardInfo.f26285a != null) {
long j = profileCardInfo.f26283a.lCurrentStyleId;
this.f10715a.f35700a = profileCardInfo.f26285a;
if (j == ProfileCardTemplate.f91413b || j == ProfileCardTemplate.f91414c || j == ProfileCardTemplate.d) {
this.f10707a = new ProfileGameView(this, profileCardInfo);
} else if (j == ProfileCardTemplate.f26297e) {
this.f10707a = new ProfilePhotoView(this, profileCardInfo);
} else if (j != ProfileCardTemplate.f26298f) {
if (j == ProfileCardTemplate.f26299g) {
this.f10707a = new VipProfileSimpleView(this, profileCardInfo);
} else if (j == ProfileCardTemplate.h) {
if (getSharedPreferences(z, 0).getBoolean(this.y, true)) {
this.f10707a = new ProfileShoppingView(this, profileCardInfo);
} else {
profileCardInfo.f26285a = null;
this.f10715a.f35700a = null;
this.f10707a = new ProfileBaseView(this, profileCardInfo, this.f10722a, this.f10693a);
}
} else {
profileCardInfo.f26285a = null;
this.f10715a.f35700a = null;
this.f10707a = new ProfileBaseView(this, profileCardInfo, this.f10722a, this.f10693a);
}
}
this.f10724a = profileCardInfo.f26283a.getBgTypeArray();
a(this.f10707a, profileCardInfo.f26283a.lCurrentStyleId, profileCardInfo.f26283a.lCurrentBgId);
I();
z2 = true;
if (!z2) {
profileCardInfo.f26285a = null;
this.f10715a.f35700a = null;
this.f10707a = new ProfileBaseView(this, profileCardInfo, this.f10722a, this.f10693a);
a(this.f10707a, 0L, 0L);
I();
}
}
z2 = false;
if (!z2) {
}
} else if (profileCardInfo.f26284a != null || profileCardInfo.f26282a.f10517a == 33) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "create headerView by contactCard");
}
this.f10715a.f35700a = null;
profileCardInfo.f26285a = null;
this.f10707a = new ProfileBaseView(this, profileCardInfo, this.f10722a, this.f10693a);
a(this.f10707a, 0L, 0L);
I();
} else if (profileCardInfo.f26286a != null || profileCardInfo.f26282a.f10517a == 80) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "create headerView by qCallCardInfo");
}
this.f10715a.f35700a = null;
profileCardInfo.f26285a = null;
this.f10707a = new ProfileBaseView(this, profileCardInfo, this.f10722a, this.f10693a);
a(this.f10707a, 0L, 0L);
I();
}
this.f10713a.a("initHeaderViewEnd", "initHeaderViewStart", false);
}
}
public void a(View view, long j, long j2) {
if (this.f10689a != null && view != null) {
if (this.f10740b != null) {
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, "changeProfileHeaderView success remove timeout msg");
}
this.f10740b.removeMessages(10);
}
ImageView imageView = (ImageView) this.f10688a.findViewById(R.id.f53046name_res_0x7f091753);
if (imageView != null) {
try {
Animatable animatable = (Animatable) imageView.getDrawable();
if (animatable != null && animatable.isRunning()) {
animatable.stop();
}
} catch (Exception e) {
e.printStackTrace();
}
}
int childCount = this.f10689a.getChildCount();
for (int i = 0; i < childCount; i++) {
View childAt = this.f10689a.getChildAt(i);
if (childAt instanceof ProfileHeaderView) {
((ProfileHeaderView) childAt).d();
}
}
this.f10689a.removeAllViews();
this.f10689a.addView(view);
this.f10772m = true;
this.f10747c = j;
this.f10754d = j2;
}
this.f10715a.f35701a = this.f10707a;
if (!(this.f10707a instanceof ProfileBaseView) && this.f10733b != null) {
this.f10733b.setVisibility(8);
}
this.f10713a.a("headerViewLoadingEnd", false);
}
public boolean m2745a(String str) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "initProfileCardBackground url=" + str + ",thread=" + Thread.currentThread().getName());
}
if (!TextUtils.isEmpty(str)) {
try {
String a2 = ProfileCardUtil.a((Context) this, str);
String str2 = CacheKeyHelper.f94503b + a2;
Pair pair = (Pair) BaseApplicationImpl.f6969a.get(str2);
if (pair != null && pair.first != null) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "get background form sImageCache filePath=" + a2);
}
Drawable newDrawable = ((Drawable.ConstantState) pair.first).newDrawable();
this.f10743b = str;
this.f10683a = newDrawable;
return true;
}
File file = new File(a2);
if (file.isFile() && file.exists()) {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
Resources resources = this.app.getApp().getResources();
BitmapFactory.decodeFile(a2, options);
int i = options.outHeight;
int i2 = options.outWidth;
if (i <= 0 || i2 <= 0) {
file.delete();
return false;
}
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
float min = Math.min(displayMetrics.widthPixels, displayMetrics.heightPixels) / Math.max(displayMetrics.widthPixels, displayMetrics.heightPixels);
int min2 = Math.min(i2, (int) ((i * min) + 0.5f));
int i3 = (int) (min2 / min);
Bitmap decodeStream = BitmapFactory.decodeStream(new BufferedInputStream(new FileInputStream(a2)), null, new BitmapFactory.Options());
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "background info imageWidth=" + min2 + ",imageHeight=" + i3);
}
if (decodeStream != null) {
if (i2 != min2 || i != i3) {
Bitmap createBitmap = Bitmap.createBitmap(decodeStream, 0, 0, min2, i3);
decodeStream.recycle();
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "Background size not match screen size, create a new one to resize");
}
decodeStream = createBitmap;
}
if (decodeStream != null) {
int a3 = Utils.a(decodeStream);
BitmapDrawable bitmapDrawable = new BitmapDrawable(resources, decodeStream);
bitmapDrawable.setTargetDensity(resources.getDisplayMetrics());
BaseApplicationImpl.f6969a.put((MQLruCache) str2, (String) new Pair(bitmapDrawable.getConstantState(), Integer.valueOf(a3)));
this.f10743b = str;
this.f10683a = bitmapDrawable;
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "background info url=" + str + ",backgroundDrawableSize=" + a3);
}
return true;
}
}
}
} catch (Exception e) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "initProfileCardBackground exception and msg=" + e.getMessage());
}
e.printStackTrace();
} catch (OutOfMemoryError e2) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "initProfileCardBackground oom error and msg=" + e2.getMessage());
}
e2.printStackTrace();
}
}
return false;
}
public void a(ProfileCardInfo profileCardInfo, boolean z2, boolean z3) {
View childAt = this.f10689a.getChildAt(0);
if ((childAt instanceof ProfileHeaderView) && !profileCardInfo.f26282a.f10519a.equals("0")) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "updateHeaderView headerView update");
}
if (z3 || profileCardInfo.f26285a != null) {
b(profileCardInfo);
} else {
((ProfileHeaderView) childAt).a(profileCardInfo, z2);
}
} else {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "updateHeaderView headerView is loading");
}
b(profileCardInfo);
if ((childAt instanceof ProfileHeaderView) && profileCardInfo.f26282a.f10517a == 53) {
ProfileHeaderView profileHeaderView = (ProfileHeaderView) childAt;
profileHeaderView.d(profileCardInfo);
profileHeaderView.a(profileCardInfo.f26282a);
}
}
this.f10722a.requestLayout();
}
public void a(Card card, boolean z2, boolean z3) {
this.f10713a.a("initUpdateInfoStart", true);
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, "updateInfo Card=" + (card != null ? card.getProfileCardDesc() : AppConstants.dF) + " isNetRet = " + z2 + " updateStyle = " + z3);
}
f((String) null);
a(this.f10705a, z2, z3);
if (this.k != 1 && z2) {
if (this.f10704a != null && card != null) {
card.addOrUpdateBuisEntry(this.f10704a);
} else {
B();
}
}
this.f10715a.m9805a(card, z2);
D();
e();
a(this.f10761e);
this.f10713a.a("initUpdateInfoEnd", "initUpdateInfoStart", false);
}
public void m2741a(ContactCard contactCard, boolean z2) {
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, "updateInfo ContactCard card = " + contactCard + ", isNetRet = " + String.valueOf(z2));
}
f((String) null);
if (a(contactCard, z2)) {
m2736a(this.f10705a);
}
a(this.f10705a, z2, false);
this.f10715a.m9805a((Card) null, z2);
D();
e();
}
public void m2742a(QCallCardInfo qCallCardInfo, boolean z2) {
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, "updateInfo QCallCardInfo card = " + qCallCardInfo + ", isNetRet = " + String.valueOf(z2));
}
if (a(qCallCardInfo, z2)) {
m2736a(this.f10705a);
}
a(this.f10705a, z2, false);
this.f10715a.m9805a((Card) null, z2);
D();
e();
}
public void e() {
Resources resources = getResources();
DisplayMetrics displayMetrics = resources.getDisplayMetrics();
int max = Math.max(displayMetrics.widthPixels, displayMetrics.heightPixels);
int height = this.f10715a != null ? this.f10715a.getHeight() : 0;
int height2 = this.f10707a != null ? this.f10707a.getHeight() : 0;
int i = (max - height2) - height;
int dimensionPixelOffset = (this.f10693a.getVisibility() == 0 ? resources.getDimensionPixelOffset(R.dimen.f39644name_res_0x7f0c00e6) : 0) + resources.getDimensionPixelSize(R.dimen.f39643name_res_0x7f0c00e5);
int min = Math.min(Math.max(i, dimensionPixelOffset), max / 3);
View findViewById = this.f10688a.findViewById(R.id.f53061name_res_0x7f091762);
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "updatePlaceHolder mScreenHeight=" + max + ",moreInfoViewHeight=" + height + ",headerViewHeight=" + height2 + ",minHeight=" + dimensionPixelOffset + ",placeHolderViewHeight=" + min);
}
if (findViewById != null) {
findViewById.setLayoutParams(new LinearLayout.LayoutParams(-1, min));
if (this.f10707a != null && !(this.f10707a instanceof ProfileBaseView)) {
ProfileCardTemplate.a(findViewById, "background", this.f10705a.f26285a, "commonMaskBackground");
} else {
findViewById.setBackgroundResource(R.drawable.f44430name_res_0x7f020d1e);
}
}
}
public static String a(ProfileCardInfo profileCardInfo) {
int a2 = ProfileCardUtil.a(profileCardInfo.f26282a);
String str = profileCardInfo.f26289a[4];
if (TextUtils.isEmpty(str)) {
str = profileCardInfo.f26282a.f10534i;
}
String str2 = profileCardInfo.f26289a[1];
if (TextUtils.isEmpty(str2)) {
str2 = profileCardInfo.f26282a.m;
}
if (a2 != 0 || TextUtils.isEmpty(str)) {
if ((a2 == 1000 || a2 == 1020) && !TextUtils.isEmpty(str2)) {
return str2;
}
String str3 = profileCardInfo.f26289a[0];
if (ProfileActivity.AllInOne.i(profileCardInfo.f26282a)) {
str3 = profileCardInfo.f26289a[3];
}
if (TextUtils.isEmpty(str3)) {
return profileCardInfo.f26282a.f10533h;
}
return str3;
}
return str;
}
public static void a(QQAppInterface qQAppInterface, BaseActivity baseActivity, ProfileCardInfo profileCardInfo) {
String b2;
String str;
int i;
String str2;
String str3;
int a2 = ProfileCardUtil.a(profileCardInfo.f26282a);
String a3 = a(profileCardInfo);
String str4 = null;
if (ProfileActivity.AllInOne.f(profileCardInfo.f26282a)) {
b2 = null;
str = profileCardInfo.f26282a.f10519a;
i = a2;
} else {
if (profileCardInfo.f26282a.f10517a == 53 && profileCardInfo.f26284a != null && !TextUtils.isEmpty(profileCardInfo.f26284a.uin)) {
str4 = profileCardInfo.f26284a.uin;
a2 = 0;
}
b2 = b(profileCardInfo.f26282a);
str = str4;
i = a2;
}
if (i == 1000) {
str2 = profileCardInfo.f26282a.f10529d;
} else if (i != 1004) {
str2 = null;
} else {
str2 = profileCardInfo.f26282a.f10530e;
}
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, "free call click");
}
ReportController.b(qQAppInterface, "dc01331", "", "", "Two_call", VideoClientReportConstants.S, a(profileCardInfo.f26282a.g), 0, Integer.toString(a(profileCardInfo.f26282a)), "", "", "");
ChatActivityUtils.a(qQAppInterface, baseActivity, i, str, a3, b2, true, str2, true, true, null, VideoConstants.f770aZ);
switch (profileCardInfo.f26282a.f10517a) {
case 1:
str3 = "4";
break;
case 20:
case 21:
case 22:
str3 = "5";
break;
case 30:
case 31:
case 32:
case 33:
case 34:
str3 = "7";
break;
case 45:
case 46:
case 47:
str3 = "6";
break;
default:
str3 = "4";
break;
}
ReportController.b(qQAppInterface, "dc01331", "", "", "Two_call", VideoClientReportConstants.G, 0, 0, str3, "", "", "");
}
public void F() {
String str;
String str2;
if (this.f10705a.f26282a.f10517a == 40 || this.f10705a.f26282a.f10517a == 41 || this.f10705a.f26282a.f10517a == 58) {
str = "mvip.pingtai.mobileqq.androidziliaoka.fromfujinderen";
str2 = "qita";
} else if (this.f10705a.f26282a.f10517a == 1 || this.f10705a.f26282a.f10517a == 0) {
str = "mvip.pingtai.mobileqq.androidziliaoka.fromqita";
str2 = "geren";
} else if (this.f10705a.f26282a.f10517a == 20 || this.f10705a.f26282a.f10517a == 21) {
str = "mvip.pingtai.mobileqq.androidziliaoka.fromqqqun";
str2 = "qun";
} else if (this.f10705a.f26282a.f10517a == 46) {
str = "mvip.pingtai.mobileqq.androidziliaoka.fromtaolunzu";
str2 = "taolunzu";
} else if (ProfileActivity.AllInOne.h(this.f10705a.f26282a)) {
str = "mvip.pingtai.mobileqq.androidziliaoka.fromlinshihuihua";
str2 = "qita";
} else {
str = "mvip.pingtai.mobileqq.androidziliaoka.fromqita";
str2 = "qita";
}
String str3 = "";
String str4 = "0";
if (ClubContentJsonTask.f34148a != null) {
if (this.f10705a.f26282a.f10517a == 0 || this.app.getCurrentAccountUin().equals(this.f10705a.f26282a.f10519a)) {
str3 = IndividuationUrlHelper.a(IndividuationUrlHelper.UrlId.P);
} else {
str3 = IndividuationUrlHelper.a(IndividuationUrlHelper.UrlId.Q);
}
}
if (!this.app.getCurrentAccountUin().equals(this.f10705a.f26282a.f10519a)) {
str4 = this.f10705a.f26282a.f10519a;
}
StringBuilder sb = new StringBuilder(str3);
if (str3.contains("?")) {
sb.append("&platform=1");
} else {
sb.append("?platform=1");
}
sb.append("&qq=" + str4);
sb.append("&adtag=" + str2);
sb.append("&aid=" + str);
String sb2 = sb.toString();
long currentTimeMillis = System.currentTimeMillis();
if (ProfileActivity.a(this.f10760e, currentTimeMillis)) {
this.f10760e = currentTimeMillis;
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "gotoQQVipWeb() url = " + sb2);
}
Intent intent = new Intent(this, QQBrowserActivity.class);
intent.putExtra("uin", this.app.getCurrentAccountUin());
intent.putExtra("url", sb2);
intent.putExtra("hide_more_button", true);
startActivity(intent);
ReportController.b(this.app, "dc01331", "", "", VipUtils.f33999a, "logo_in", this.f10705a.f26282a.f10517a == 0 ? 23 : 24, 0, "", "", "", "");
}
}
public void f() {
long currentTimeMillis = System.currentTimeMillis();
if (ProfileActivity.a(this.f10763f, currentTimeMillis)) {
this.f10763f = currentTimeMillis;
if (this.f10705a.f26282a.f10517a == 0) {
TicketManager ticketManager = (TicketManager) this.app.getManager(2);
String stweb = ticketManager == null ? null : ticketManager.getStweb(this.app.getCurrentAccountUin());
if (stweb == null || stweb.length() == 0) {
a(R.string.f64743name_res_0x7f0a18c6, 2);
return;
}
String format = String.format("http://ptlogin2.qq.com/mlevel?clientuin=%s&clientkey=%s&keyindex=%s&sid=%s&ADTAG=LEVEL.MLEVEL.master_page.fromziliaoka", this.f10705a.f26282a.f10519a, stweb, QzoneVideoBeaconReport.Y, "");
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "gotoQQLevelWeb() url = " + format);
}
Intent intent = new Intent(this, QQBrowserActivity.class);
intent.putExtra("uin", this.app.getCurrentAccountUin());
intent.putExtra("url", format);
intent.putExtra("hide_more_button", true);
startActivity(intent);
ReportController.b(this.app, "dc01331", "", "", "QQ_rank", "click_qrank_in", 23, 0, "", "", "", "");
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, "getClientKey() time = " + System.currentTimeMillis());
return;
}
return;
}
String format2 = String.format("http://m.vip.qq.com/redirect/?go=androidqlevel&qq=%s&aid=mvip.pingtai.mobileqq.androidziliaoka.fromkerentaiQQlevelicon", this.f10705a.f26282a.f10519a);
Intent intent2 = new Intent(this, QQBrowserActivity.class);
intent2.putExtra("uin", this.app.getCurrentAccountUin());
intent2.putExtra("url", format2);
intent2.putExtra("hide_more_button", true);
startActivity(intent2);
ReportController.b(this.app, "dc01331", "", "", "QQ_rank", "click_qrank_in", 24, 0, "", "", "", "");
}
}
public void g() {
long currentTimeMillis = System.currentTimeMillis();
if (ProfileActivity.a(this.f10763f, currentTimeMillis)) {
this.f10763f = currentTimeMillis;
if (this.f10705a.f26282a.f10517a == 0) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "gotoXmanWeb() url = http://ti.qq.com/xman/self.html?_wv=1027&adtag=card&_bid=297");
}
Intent intent = new Intent(this, QQBrowserActivity.class);
intent.putExtra("uin", this.app.getCurrentAccountUin());
intent.putExtra("url", "http://ti.qq.com/xman/self.html?_wv=1027&adtag=card&_bid=297");
intent.putExtra("hide_more_button", true);
startActivity(intent);
ReportController.b(this.app, "dc01331", "", "", "0X8004880", "0X8004880", 0, 0, "", "", "", "");
return;
}
String format = String.format("http://ti.qq.com/xman/view.html?_wv=1027&uin=%s&_bid=297", this.f10705a.f26282a.f10519a);
Intent intent2 = new Intent(this, QQBrowserActivity.class);
intent2.putExtra("uin", this.app.getCurrentAccountUin());
intent2.putExtra("url", format);
intent2.putExtra("hide_more_button", true);
startActivity(intent2);
ReportController.b(this.app, "dc01331", "", "", "0X800489C", "0X800489C", 0, 0, "", "", "", "");
}
}
public void h() {
long currentTimeMillis = System.currentTimeMillis();
if (ProfileActivity.a(this.f10763f, currentTimeMillis)) {
this.f10763f = currentTimeMillis;
if (this.f10705a.f26283a != null && this.f10705a.f26283a.lightalkNick != null) {
String format = String.format(ProfileActivity.l, this.f10705a.f26283a.lightalkId, Base64Util.encodeToString(this.f10705a.f26283a.lightalkNick.getBytes(), 0));
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "gotoLightalkWeb() url = " + format);
}
Intent intent = new Intent(this, QQBrowserActivity.class);
intent.putExtra("uin", this.app.getCurrentAccountUin());
intent.putExtra("url", format);
intent.putExtra("hide_more_button", true);
startActivity(intent);
ReportController.b(this.app, "dc01331", "", "", "0X800510A", "0X800510A", 0, 0, "", "", "", "");
}
}
}
public void j() {
Intent intent = new Intent(this, QRDisplayActivity.class);
String currentAccountUin = this.app.getCurrentAccountUin();
intent.putExtra("title", getString(R.string.f60640name_res_0x7f0a08bc));
intent.putExtra("nick", ContactUtils.i(this.app, currentAccountUin));
intent.putExtra("uin", currentAccountUin);
intent.putExtra("type", 1);
intent.putExtra("reportFlag", 1);
startActivity(intent);
}
public void k() {
a(this.app, this, this.f10705a, this.f10678a);
}
public static void a(QQAppInterface qQAppInterface, BaseActivity baseActivity, ProfileCardInfo profileCardInfo, Dialog dialog) {
int i = EAddFriendSourceID.N;
int i2 = 0;
switch (profileCardInfo.f26282a.f10517a) {
case 2:
i = 3008;
break;
case 3:
i = 3002;
break;
case 4:
case 77:
i = 3003;
break;
case 21:
case 22:
i = 3004;
break;
case 23:
i = EAddFriendSourceID.af;
i2 = 1;
break;
case 24:
int i3 = EAddFriendSourceID.ak;
if (profileCardInfo.f26282a.k == 10000) {
i3 = EAddFriendSourceID.af;
}
i2 = 1;
i = i3;
break;
case 25:
case 27:
i = EAddFriendSourceID.aj;
break;
case 31:
case 34:
i = 3006;
break;
case 32:
i = 3009;
break;
case 35:
i = 3001;
i2 = 1;
break;
case 36:
i = 3014;
i2 = 1;
break;
case 37:
i = 3020;
i2 = profileCardInfo.f26282a.k;
break;
case 41:
case 42:
i = 3007;
i2 = 2;
break;
case 46:
case 47:
i = 3005;
i2 = 1;
break;
case 50:
i = 3006;
i2 = 1;
break;
case 51:
i = 3009;
i2 = 1;
break;
case 52:
i = 3003;
i2 = 1;
break;
case 53:
i = EAddFriendSourceID.ao;
i2 = 1;
break;
case 56:
case 57:
i = 3013;
break;
case 58:
i = 3007;
i2 = 1;
break;
case 61:
i = 3011;
break;
case 70:
i = EAddFriendSourceID.ar;
i2 = 1;
break;
case 71:
case 72:
i = 3003;
i2 = 2;
break;
case 74:
i = 3008;
break;
case 75:
i = 3017;
i2 = 1;
break;
case 78:
i = 3022;
break;
case 81:
i = EAddFriendSourceID.an;
i2 = 2;
break;
case 82:
i = EAddFriendSourceID.an;
i2 = 1;
break;
case 83:
i = EAddFriendSourceID.an;
i2 = 3;
break;
case 84:
i = EAddFriendSourceID.an;
i2 = 4;
break;
}
if (i == 3007 && !LBSHandler.a(qQAppInterface, profileCardInfo.f26282a.f10519a)) {
if (dialog == null) {
dialog = LBSHandler.a(baseActivity, baseActivity.getString(R.string.f65934name_res_0x7f0a1d72), new kxk(qQAppInterface, baseActivity, profileCardInfo), new kxl());
}
if (dialog != null && !dialog.isShowing() && !baseActivity.isFinishing()) {
dialog.show();
}
} else if (profileCardInfo.f26282a.f10517a == 32 || profileCardInfo.f26282a.f10517a == 31 || profileCardInfo.f26282a.f10517a == 51 || profileCardInfo.f26282a.f10517a == 50 || profileCardInfo.f26282a.f10517a == 34 || profileCardInfo.f26282a.f10517a == 36 || profileCardInfo.f26282a.f10517a == 53) {
ProfileActivity.CardContactInfo a2 = a(profileCardInfo.f26282a);
if (a2 != null && a2.f85254c != null && a2.f85254c.length() > 0) {
String str = a2.f85253b + a2.f85254c;
String str2 = a2.f85252a;
if (TextUtils.isEmpty(a2.f85252a)) {
if (!TextUtils.isEmpty(profileCardInfo.f26289a[3])) {
str2 = profileCardInfo.f26289a[3];
} else if (!TextUtils.isEmpty(profileCardInfo.f26289a[0])) {
str2 = profileCardInfo.f26289a[0];
} else if (!TextUtils.isEmpty(profileCardInfo.f26287a.f94354a.f33305a)) {
str2 = profileCardInfo.f26287a.f94354a.f33305a;
}
}
Intent a3 = AddFriendLogicActivity.a(baseActivity, 2, str, null, i, i2, str2, null, QQFriendProfileCardActivity.class.getName(), baseActivity.getString(R.string.f63667button_back), null);
a3.putExtra(AutoRemarkActivity.e, profileCardInfo.f26282a.f10517a);
boolean booleanExtra = baseActivity.getIntent().getBooleanExtra(NewerGuidePlugin.u, false);
if (booleanExtra) {
a3.putExtra(NewerGuidePlugin.u, booleanExtra);
a3.removeExtra(AutoRemarkActivity.f8275c);
baseActivity.startActivityForResult(a3, 1019);
return;
}
baseActivity.startActivity(a3);
}
} else {
String str3 = null;
if (3004 == i && profileCardInfo.f26282a.f10529d != null && profileCardInfo.f26282a.f10529d.length() != 0) {
str3 = profileCardInfo.f26282a.f10529d;
}
String str4 = null;
if (profileCardInfo.f26282a.f10517a == 71 || profileCardInfo.f26282a.f10517a == 72) {
str4 = profileCardInfo.f26289a[2];
} else if (profileCardInfo.f26282a.f10517a == 77 || profileCardInfo.f26282a.f10517a == 82 || profileCardInfo.f26282a.f10517a == 81 || profileCardInfo.f26282a.f10517a == 83 || profileCardInfo.f26282a.f10517a == 84) {
str4 = profileCardInfo.f26289a[5];
}
String str5 = TextUtils.isEmpty(str4) ? profileCardInfo.f26289a[0] : str4;
String stringExtra = baseActivity.getIntent().getStringExtra(AutoRemarkActivity.f8275c);
baseActivity.getIntent().getBundleExtra(ProfileActivity.f10496v);
if (stringExtra != null) {
String name = AddContactsActivity.class.getName();
if (!stringExtra.equals(QidianProfileCardActivity.class.getName())) {
stringExtra = name;
}
Intent a4 = AddFriendLogicActivity.a(baseActivity, 1, profileCardInfo.f26282a.f10519a, str3, i, i2, str5, null, stringExtra, baseActivity.getString(R.string.f63667button_back), null);
a4.putExtra(AutoRemarkActivity.e, profileCardInfo.f26282a.f10517a);
baseActivity.startActivity(a4);
return;
}
Intent a5 = AddFriendLogicActivity.a(baseActivity, 1, profileCardInfo.f26282a.f10519a, str3, i, i2, str5, null, QQFriendProfileCardActivity.class.getName(), baseActivity.getString(R.string.f63667button_back), null);
a5.putExtra(AutoRemarkActivity.e, profileCardInfo.f26282a.f10517a);
baseActivity.startActivityForResult(a5, 1000);
}
}
public void l() {
b(this.app, this, this.f10705a);
}
public static void b(QQAppInterface qQAppInterface, BaseActivity baseActivity, ProfileCardInfo profileCardInfo) {
String str;
int i;
ThreadPriorityManager.a(true);
ProfileActivity.AllInOne allInOne = profileCardInfo.f26282a;
int a2 = ProfileCardUtil.a(allInOne);
if (allInOne.f10531f != null && allInOne.f10531f.length() > 0 && allInOne.e != 3000 && allInOne.e != 1 && allInOne.e != 2 && allInOne.f10531f.equals(allInOne.f10519a)) {
Intent intent = new Intent();
intent.putExtra("finchat", true);
baseActivity.setResult(0, intent);
baseActivity.finish();
return;
}
String str2 = allInOne.f10519a;
if (ProfileActivity.AllInOne.i(allInOne)) {
if (allInOne.f10517a == 53) {
if (profileCardInfo.f26284a != null && !TextUtils.isEmpty(profileCardInfo.f26284a.uin)) {
i = 0;
str = profileCardInfo.f26284a.uin;
} else {
i = 1006;
str = str2;
}
} else {
str = b(allInOne);
i = a2;
}
} else if (allInOne.f10517a == 3) {
ReportController.b(qQAppInterface, "dc01331", "", "", "WPA", "OpenAIO_scan", 0, 0, "", "", "", "");
str = str2;
i = a2;
} else if (allInOne.f == 102) {
ReportController.b(qQAppInterface, "dc01332", "Svip", "", "Vip_maproam", "vip_maproam_RandomConversation", 0, 0, "", "", "", "");
str = str2;
i = a2;
} else {
if (allInOne.f == 103) {
ReportController.b(qQAppInterface, "dc01332", "Svip", "", "Vip_maproam", "vip_maproam_superConversation", 0, 0, "", "", "", "");
}
str = str2;
i = a2;
}
a(qQAppInterface, baseActivity, profileCardInfo, str, i);
}
private static void a(QQAppInterface qQAppInterface, BaseActivity baseActivity, ProfileCardInfo profileCardInfo, String str, int i) {
Intent intent;
Friends m4355c;
if (baseActivity.getIntent().getBooleanExtra(NewerGuidePlugin.u, false)) {
intent = new Intent(baseActivity, ChatActivity.class);
} else {
intent = new Intent(baseActivity, SplashActivity.class);
}
Intent a2 = AIOUtils.a(intent, (int[]) null);
a2.putExtra("PREVIOUS_WINDOW", QQFriendProfileCardActivity.class.getName());
a2.putExtra("PREVIOUS_UIN", profileCardInfo.f26282a.f10519a);
a2.putExtra(AppConstants.Key.aJ, baseActivity.getIntent().getExtras().getInt(AppConstants.Key.aJ));
a2.putExtra("uin", str);
a2.putExtra("uintype", i);
a2.putExtra(ChatActivityConstants.f8564Z, 3);
if (profileCardInfo.f26282a.i != 0) {
a2.putExtra("entrance", profileCardInfo.f26282a.i);
}
String str2 = profileCardInfo.f26289a[4];
if (TextUtils.isEmpty(str2)) {
str2 = profileCardInfo.f26282a.f10534i;
}
String str3 = profileCardInfo.f26289a[1];
if (TextUtils.isEmpty(str3)) {
str3 = profileCardInfo.f26282a.m;
}
if (i == 0 && !TextUtils.isEmpty(str2)) {
a2.putExtra(AppConstants.Key.h, profileCardInfo.f26282a.f10534i);
} else if ((i == 1000 || i == 1020) && !TextUtils.isEmpty(str3)) {
a2.putExtra(AppConstants.Key.h, str3);
} else if (i == 1004) {
String c2 = profileCardInfo.f26282a.f10529d != null ? ContactUtils.c(qQAppInterface, profileCardInfo.f26282a.f10529d, profileCardInfo.f26282a.f10519a) : null;
if (TextUtils.isEmpty(c2)) {
c2 = profileCardInfo.f26282a.f10533h;
}
a2.putExtra(AppConstants.Key.h, c2);
} else {
String str4 = profileCardInfo.f26289a[0];
if (ProfileActivity.AllInOne.i(profileCardInfo.f26282a)) {
str4 = profileCardInfo.f26289a[3];
}
if (TextUtils.isEmpty(str4)) {
str4 = profileCardInfo.f26282a.f10533h;
}
a2.putExtra(AppConstants.Key.h, str4);
}
if (!TextUtils.isEmpty(profileCardInfo.f26282a.f10529d)) {
a2.putExtra("troop_uin", profileCardInfo.f26282a.f10529d);
} else if (!TextUtils.isEmpty(profileCardInfo.f26282a.f10530e)) {
a2.putExtra("troop_uin", profileCardInfo.f26282a.f10530e);
}
if (!TextUtils.isEmpty(profileCardInfo.f26282a.f10528c)) {
a2.putExtra("troop_code", profileCardInfo.f26282a.f10528c);
}
if (i == 1009) {
a2.putExtra(AppConstants.Key.cn, profileCardInfo.f26282a.f10526b);
}
if (i == 1001) {
a2.putExtra(AppConstants.Key.cq, profileCardInfo.f26282a.f10526b);
if (QLog.isDevelopLevel()) {
QLog.d("fight_accost", 4, "资料卡accost_uin = " + profileCardInfo.f26282a.f10519a + "accost_sig = " + profileCardInfo.f26282a.f10526b);
}
}
FriendsManager friendsManager = (FriendsManager) qQAppInterface.getManager(50);
if (friendsManager != null && (m4355c = friendsManager.m4355c(profileCardInfo.f26282a.f10519a)) != null && m4355c.cSpecialFlag == 1) {
a2.putExtra(ChatActivityConstants.f8568ad, 1);
}
if (profileCardInfo.f26282a.f10517a == 70 && profileCardInfo.f26282a.f == 101) {
a2.putExtra("is_from_manage_stranger", true);
baseActivity.startActivityForResult(a2, 1010);
return;
}
baseActivity.startActivity(a2);
}
public void m() {
QZoneHelper.UserInfo a2 = QZoneHelper.UserInfo.a();
a2.f70173a = this.app.getCurrentAccountUin();
String currentNickname = this.app.getCurrentNickname();
if (StringUtil.m9422c(currentNickname)) {
currentNickname = this.app.getCurrentNickname();
}
a2.f98380b = currentNickname;
QZoneHelper.a(this, a2, Long.valueOf(Long.parseLong(this.f10705a.f26282a.f10519a)), 1, this.f10705a.f26282a.f, -1, this.f10700a);
}
public void n() {
ThreadManager.a(new kxm(this), 8, null, true);
}
public void b(int i) {
if (i == 7) {
this.f10740b.post(new kxn(this));
return;
}
QZoneHelper.UserInfo a2 = QZoneHelper.UserInfo.a();
a2.f70173a = this.app.getCurrentAccountUin();
String currentNickname = this.app.getCurrentNickname();
if (StringUtil.m9422c(currentNickname)) {
currentNickname = this.app.getCurrentNickname();
}
a2.f98380b = currentNickname;
QZoneHelper.a(this, a2, this.f10705a.f26282a.f10519a, this.f10705a.f26282a.f, -1, 5, this.f10700a);
QZoneClickReport.ReportInfo reportInfo = new QZoneClickReport.ReportInfo();
reportInfo.f70068c = "1";
reportInfo.d = "0";
reportInfo.f98321b = 4;
reportInfo.k = "3";
reportInfo.l = QZoneClickReport.ClickReportConfig.f70052t;
reportInfo.m = QZoneClickReport.ClickReportConfig.f70058z;
QZoneClickReport.startReportImediately(this.app.getAccount(), reportInfo);
HashMap hashMap = new HashMap();
hashMap.put("source_type", "3");
hashMap.put("source_from", QZoneClickReport.ClickReportConfig.f70052t);
hashMap.put("source_to", QZoneClickReport.ClickReportConfig.f70058z);
StatisticCollector.a((Context) BaseApplicationImpl.getContext()).a(this.app.getAccount(), StatisticCollector.bN, true, 0L, 0L, hashMap, null);
}
private void a(Intent intent) {
if (intent != null) {
intent.putExtra("qzone_uin", this.app.getCurrentAccountUin());
String currentNickname = this.app.getCurrentNickname();
if (StringUtil.m9422c(currentNickname)) {
currentNickname = ContactUtils.i(this.app, this.app.getCurrentAccountUin());
}
intent.putExtra("nickname", currentNickname);
}
}
public void G() {
if (this.f10715a != null && this.f10705a != null && this.f10705a.f26282a != null) {
this.f10715a.a(this.f10705a.f26283a, false, this.f10705a.f26282a.f10520a);
this.f10715a.m9802a();
}
}
@Override
public boolean a(View view, MotionEvent motionEvent) {
if (this.f10707a != null) {
return this.f10707a.a(view, motionEvent);
}
return false;
}
public static void a(QQAppInterface qQAppInterface, ProfileCardInfo profileCardInfo) {
Exception exc;
String str;
Error error;
String str2;
String str3;
ProfileActivity.CardContactInfo a2;
String str4;
String str5;
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "initNameList");
}
String str6 = profileCardInfo.f26282a.f10533h;
String str7 = profileCardInfo.f26282a.f10534i;
String str8 = profileCardInfo.f26282a.m;
String str9 = profileCardInfo.f26282a.l;
String str10 = profileCardInfo.f26282a.f10536k;
String str11 = profileCardInfo.f26282a.f10535j;
try {
if (ProfileActivity.AllInOne.b(profileCardInfo.f26282a)) {
FriendsManager friendsManager = (FriendsManager) qQAppInterface.getManager(50);
Friends m4355c = friendsManager == null ? null : friendsManager.m4355c(profileCardInfo.f26282a.f10519a);
if (m4355c != null) {
if (!TextUtils.isEmpty(m4355c.name)) {
str6 = m4355c.name;
}
if (!TextUtils.isEmpty(m4355c.remark)) {
str4 = m4355c.remark;
str5 = str6;
str3 = str4;
str2 = str5;
}
}
str4 = str7;
str5 = str6;
str3 = str4;
str2 = str5;
} else if (profileCardInfo.f26282a.f10517a == 0) {
str2 = ContactUtils.i(qQAppInterface, profileCardInfo.f26282a.f10519a);
str3 = str7;
} else {
if (TextUtils.isEmpty(str6) && ProfileActivity.AllInOne.f(profileCardInfo.f26282a)) {
str6 = ContactUtils.a(qQAppInterface, profileCardInfo.f26282a.f10519a, 0);
if (Utils.a((Object) str6, (Object) profileCardInfo.f26282a.f10519a)) {
str2 = null;
str3 = str7;
}
}
str2 = str6;
str3 = str7;
}
try {
TroopManager troopManager = (TroopManager) qQAppInterface.getManager(51);
String str12 = profileCardInfo.f26282a.f10528c;
if (TextUtils.isEmpty(str12) && !TextUtils.isEmpty(profileCardInfo.f26282a.f10529d) && troopManager != null) {
str12 = troopManager.m4873c(profileCardInfo.f26282a.f10529d);
}
String m4860b = (TextUtils.isEmpty(str12) || troopManager == null) ? str8 : troopManager.m4860b(str12, profileCardInfo.f26282a.f10519a);
try {
str10 = (!TextUtils.isEmpty(str10) || (a2 = a(profileCardInfo.f26282a)) == null) ? str10 : a2.f85252a;
str = m4860b;
str7 = str3;
str6 = str2;
} catch (Error e) {
str = m4860b;
str7 = str3;
str6 = str2;
error = e;
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, error.toString());
}
synchronized (profileCardInfo.f26289a) {
}
} catch (Exception e2) {
str = m4860b;
str7 = str3;
str6 = str2;
exc = e2;
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, exc.toString());
}
synchronized (profileCardInfo.f26289a) {
}
}
} catch (Error e3) {
str7 = str3;
str6 = str2;
error = e3;
str = str8;
} catch (Exception e4) {
str7 = str3;
str6 = str2;
exc = e4;
str = str8;
}
} catch (Error e5) {
error = e5;
str = str8;
} catch (Exception e6) {
exc = e6;
str = str8;
}
synchronized (profileCardInfo.f26289a) {
if (TextUtils.isEmpty(profileCardInfo.f26289a[0])) {
profileCardInfo.f26289a[0] = str6;
}
if (TextUtils.isEmpty(profileCardInfo.f26289a[4])) {
profileCardInfo.f26289a[4] = str7;
}
if (TextUtils.isEmpty(profileCardInfo.f26289a[3])) {
profileCardInfo.f26289a[3] = str10;
}
if (TextUtils.isEmpty(profileCardInfo.f26289a[5])) {
profileCardInfo.f26289a[5] = str9;
}
if (TextUtils.isEmpty(profileCardInfo.f26289a[1])) {
profileCardInfo.f26289a[1] = str;
}
if (TextUtils.isEmpty(profileCardInfo.f26289a[6])) {
profileCardInfo.f26289a[6] = str11;
}
}
if (QLog.isColorLevel()) {
StringBuilder sb = new StringBuilder();
sb.append("initNameList()").append(", strNick = ").append(Utils.b(str6)).append(", strRemark = ").append(Utils.b(str7)).append(", strContactName = ").append(Utils.b(str10)).append(", strRecommenName = ").append(Utils.b(str9)).append(", strTroopNickName = ").append(Utils.b(str)).append(", strAutoRemark = ").append(Utils.b(str9));
QLog.i(ProfileCardUtil.f33517c, 2, sb.toString());
}
}
public boolean a(ContactCard contactCard, boolean z2) {
boolean z3;
boolean z4 = false;
if (contactCard == null) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "updateNameList by ContactCard");
return false;
}
return false;
}
if (z2 || !TextUtils.isEmpty(contactCard.nickName)) {
z3 = !Utils.a((Object) this.f10705a.f26289a[0], (Object) contactCard.nickName);
this.f10705a.f26289a[0] = contactCard.nickName;
} else {
z3 = false;
}
if (TextUtils.isEmpty(contactCard.strContactName)) {
return z3;
}
if (z3 || !Utils.a((Object) this.f10705a.f26289a[3], (Object) contactCard.strContactName)) {
z4 = true;
}
this.f10705a.f26289a[3] = contactCard.strContactName;
return z4;
}
private boolean a(QCallCardInfo qCallCardInfo, boolean z2) {
if (qCallCardInfo == null) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "updateQCallCardName by QCallCardInfo");
}
} else if (z2 || !TextUtils.isEmpty(qCallCardInfo.nickname)) {
r0 = Utils.a((Object) this.f10705a.f26286a.nickname, (Object) qCallCardInfo.nickname) ? false : true;
this.f10705a.f26286a.nickname = qCallCardInfo.nickname;
}
return r0;
}
private boolean a(Card card, boolean z2) {
boolean z3;
if (card == null) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "updateNameList by Card");
return false;
}
return false;
}
if (z2 || !TextUtils.isEmpty(card.strNick)) {
z3 = !Utils.a((Object) this.f10705a.f26289a[0], (Object) card.strNick);
this.f10705a.f26289a[0] = card.strNick;
} else {
z3 = false;
}
if (z2 || !TextUtils.isEmpty(card.strReMark)) {
z3 = z3 || !Utils.a((Object) this.f10705a.f26289a[4], (Object) card.strReMark);
this.f10705a.f26289a[4] = card.strReMark;
}
if (z2 || !TextUtils.isEmpty(card.strAutoRemark)) {
z3 = z3 || !Utils.a((Object) this.f10705a.f26289a[6], (Object) card.strAutoRemark);
this.f10705a.f26289a[6] = card.strAutoRemark;
}
if (z2 || !TextUtils.isEmpty(card.strTroopNick)) {
z3 = z3 || !Utils.a((Object) this.f10705a.f26289a[1], (Object) card.strTroopNick);
this.f10705a.f26289a[1] = card.strTroopNick;
}
if (!TextUtils.isEmpty(card.strContactName)) {
z3 = z3 || !Utils.a((Object) this.f10705a.f26289a[3], (Object) card.strContactName);
this.f10705a.f26289a[3] = card.strContactName;
}
if (!TextUtils.isEmpty(card.strAutoRemark)) {
z3 = z3 || !Utils.a((Object) this.f10705a.f26289a[2], (Object) card.strAutoRemark);
this.f10705a.f26289a[2] = card.strAutoRemark;
}
if (QLog.isColorLevel()) {
StringBuilder sb = new StringBuilder();
sb.append("updateNameList()").append(", bRet = ").append(z3).append(", strNick = ");
sb.append(Utils.b(this.f10705a.f26289a[0])).append(", strRemark = ");
sb.append(Utils.b(this.f10705a.f26289a[4])).append(", strContactName = ");
sb.append(Utils.b(this.f10705a.f26289a[3])).append(", strCircleName = ");
sb.append(Utils.b(this.f10705a.f26289a[2])).append(", strRecommenName = ");
sb.append(Utils.b(this.f10705a.f26289a[5])).append(", strTroopNickName = ");
sb.append(Utils.b(this.f10705a.f26289a[1])).append(", strAutoRemark = ");
sb.append(Utils.b(this.f10705a.f26289a[6]));
QLog.d(ProfileCardUtil.f33517c, 2, sb.toString());
}
return z3;
}
public static boolean a(ProfileCardInfo profileCardInfo, int i, String str) {
if (i < 0 && i > 6) {
return false;
}
profileCardInfo.f26289a[i] = str;
return true;
}
public static void m2736a(ProfileCardInfo profileCardInfo) {
int i;
int i2 = 1;
if (profileCardInfo.f26287a == null) {
profileCardInfo.f26287a = new MQQProfileName();
}
switch (profileCardInfo.f26282a.f10517a) {
case 0:
i = 1;
i2 = 2;
break;
case 1:
case 60:
i2 = 2;
i = 2;
break;
case 4:
case 77:
case 81:
case 82:
case 83:
case 84:
i = 11;
break;
case 20:
i2 = 2;
i = 3;
break;
case 21:
case 22:
case 58:
i = 3;
break;
case 25:
case 26:
case 27:
case 28:
i = 10;
break;
case 30:
i = 6;
i2 = 2;
break;
case 31:
case 32:
case 33:
case 34:
case 36:
case 53:
i = 6;
break;
case 40:
i = 7;
i2 = 2;
break;
case 41:
case 42:
i = 7;
break;
case 46:
case 47:
i = 4;
break;
case 50:
case 51:
i = 8;
break;
case 52:
i = 9;
break;
case 71:
case 72:
i = 5;
break;
default:
i = 0;
break;
}
MQQProfileNameTranslator.a(i, i2, profileCardInfo.f26289a, profileCardInfo.f26287a);
if (profileCardInfo.f26282a.f10517a == 53) {
MQQName mQQName = new MQQName();
mQQName.f94353a = 0;
mQQName.f33305a = profileCardInfo.f26289a[0];
profileCardInfo.f26287a.f33306a.add(mQQName);
MQQName mQQName2 = new MQQName();
mQQName2.f94353a = 3;
mQQName2.f33305a = profileCardInfo.f26282a.f10536k;
profileCardInfo.f26287a.f33306a.add(mQQName2);
if (TextUtils.isEmpty(profileCardInfo.f26282a.f10534i) || profileCardInfo.f26282a.f10517a == 53) {
profileCardInfo.f26287a.f94354a.f94353a = 3;
profileCardInfo.f26287a.f94354a.f33305a = profileCardInfo.f26282a.f10536k;
} else {
profileCardInfo.f26287a.f94354a.f94353a = 4;
profileCardInfo.f26287a.f94354a.f33305a = profileCardInfo.f26282a.f10534i;
}
}
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "updateProfileName profileName=" + profileCardInfo.f26287a.toString());
}
}
private void b(boolean z2) {
PhoneContactManager phoneContactManager;
PhoneContact c2;
PhoneContact phoneContact;
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "initCardContactInfoList");
}
if (ProfileActivity.AllInOne.b(this.f10705a.f26282a) || this.f10705a.f26282a.f10517a == 33 || this.f10705a.f26282a.f10517a == 32 || this.f10705a.f26282a.f10517a == 31 || this.f10705a.f26282a.f10517a == 34 || this.f10705a.f26282a.f10517a == 51 || this.f10705a.f26282a.f10517a == 50 || this.f10705a.f26282a.f10517a == 36 || this.f10705a.f26282a.f10517a == 53) {
if (this.f10705a.f26282a.f10520a == null) {
this.f10705a.f26282a.f10520a = new ArrayList();
}
if (this.f10705a.f26282a.f10520a.size() == 0 && (phoneContactManager = (PhoneContactManager) this.app.getManager(10)) != null) {
if (ProfileActivity.AllInOne.b(this.f10705a.f26282a)) {
c2 = phoneContactManager.mo4524a(this.f10705a.f26282a.f10519a);
if (!z2) {
FriendListHandler friendListHandler = (FriendListHandler) this.app.getBusinessHandler(1);
if (!friendListHandler.m4307b() && !friendListHandler.m4309c()) {
friendListHandler.c(this.f10705a.f26282a.f10519a, false);
}
phoneContact = c2;
if (this.f10705a.f26282a.f10517a != 53) {
this.f10705a.f26282a.f10520a.add(new ProfileActivity.CardContactInfo(this.f10705a.f26282a.f10536k, this.f10705a.f26282a.f10519a, ""));
return;
} else if (phoneContact != null) {
this.f10705a.f26282a.f10520a.add(new ProfileActivity.CardContactInfo(phoneContact.name, phoneContact.mobileCode, phoneContact.nationCode));
return;
} else if (this.f10705a.f26282a.f10517a == 33 || this.f10705a.f26282a.f10517a == 32 || this.f10705a.f26282a.f10517a == 31 || this.f10705a.f26282a.f10517a == 34 || this.f10705a.f26282a.f10517a == 51 || this.f10705a.f26282a.f10517a == 50 || this.f10705a.f26282a.f10517a == 36) {
this.f10705a.f26282a.f10520a.add(new ProfileActivity.CardContactInfo("", this.f10705a.f26282a.f10519a, ""));
return;
} else {
return;
}
}
} else {
c2 = phoneContactManager.c(this.f10705a.f26282a.f10519a);
if (c2 == null && (c2 = phoneContactManager.mo4535b(this.f10705a.f26282a.f10519a)) != null && !TextUtils.isEmpty(c2.mobileCode)) {
this.f10705a.f26282a.f10519a = c2.mobileCode;
}
if (c2 != null) {
FriendListHandler friendListHandler2 = (FriendListHandler) this.app.getBusinessHandler(1);
if (!friendListHandler2.m4309c()) {
friendListHandler2.c(this.f10705a.f26282a.f10519a, true);
}
}
}
phoneContact = c2;
if (this.f10705a.f26282a.f10517a != 53) {
}
}
}
}
public static ProfileActivity.CardContactInfo a(ProfileActivity.AllInOne allInOne) {
if (allInOne == null || allInOne.f10520a == null || allInOne.f10520a.size() <= 0) {
return null;
}
return (ProfileActivity.CardContactInfo) allInOne.f10520a.get(0);
}
protected QCallCardInfo a() {
if (this.f10705a.f26286a == null) {
return null;
}
return this.f10705a.f26286a;
}
public String a(String str) {
RespondQueryQQBindingStat mo4523a;
if (!str.startsWith(IndexView.f95330c) && (mo4523a = ((PhoneContactManager) this.app.getManager(10)).mo4523a()) != null && !TextUtils.isEmpty(mo4523a.nationCode)) {
return mo4523a.nationCode + str.trim();
}
return str;
}
public void a(long j, byte[] bArr, byte[] bArr2, boolean z2) {
CardHandler cardHandler;
boolean z3;
String str;
TroopInfo troopInfo;
int i;
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, "requestUpdateCard() mHasTriedCount = " + this.dt);
}
if ((this.dt <= 5 || z2) && (cardHandler = (CardHandler) this.app.getBusinessHandler(2)) != null) {
this.dt++;
byte[] bArr3 = bArr == null ? new byte[]{0} : bArr;
byte[] bArr4 = bArr2 == null ? new byte[]{0} : bArr2;
int i2 = 12;
byte b2 = 0;
BusinessCardManager businessCardManager = (BusinessCardManager) this.app.getManager(111);
if (businessCardManager == null) {
z3 = false;
} else {
z3 = businessCardManager.m5429a(1);
}
long a2 = a(this.f10705a.f26282a, z3);
switch (this.f10705a.f26282a.f10517a) {
case 0:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 0, j, (byte) 1, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 1:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 1, j, (byte) 1, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 2:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 10, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 3:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 21, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 4:
case 77:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 25, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
case 29:
case 33:
case 38:
case 39:
case 43:
case 44:
case 45:
case 48:
case 49:
case 54:
case 59:
case 62:
case 63:
case 64:
case 65:
case 66:
case 67:
case 68:
case 69:
case 76:
case 79:
default:
return;
case 19:
case 23:
case 24:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 12, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 20:
case 21:
case 22:
case 58:
long a3 = ProfileCardUtil.a(this.app, this.f10705a.f26282a);
if (this.f10705a.f26282a.f10517a == 20) {
i2 = 2;
b2 = 1;
} else if (this.f10705a.f26282a.f10517a == 21 || this.f10705a.f26282a.f10517a == 58) {
i2 = 5;
b2 = 0;
} else if (this.f10705a.f26282a.f10517a == 22) {
i2 = 7;
b2 = 0;
}
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, i2, j, b2, a3, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 25:
case 26:
case 27:
case 28:
if (this.f10705a.f26282a.h == 3004 || this.f10705a.f26282a.h == 2004) {
if (!TextUtils.isEmpty(this.f10705a.f26282a.f10528c)) {
str = this.f10705a.f26282a.f10528c;
} else if (TextUtils.isEmpty(this.f10705a.f26282a.f10529d) || (troopInfo = (TroopInfo) this.app.getEntityManagerFactory().createEntityManager().a(TroopInfo.class, "troopcode=?", new String[]{this.f10705a.f26282a.f10529d})) == null) {
str = "0";
} else {
str = troopInfo.troopuin;
}
if (str == null) {
str = "0";
}
} else if (this.f10705a.f26282a.h != 3005 && this.f10705a.f26282a.h != 2005) {
str = "0";
} else {
str = this.f10705a.f26282a.f10528c;
}
long j2 = 0;
try {
j2 = Long.parseLong(str);
} catch (Exception e) {
if (QLog.isColorLevel()) {
QLog.e(ProfileCardUtil.f33517c, 2, e.toString());
}
}
int i3 = 11;
if (this.f10705a.f26282a.f10517a == 27) {
i3 = 35;
}
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, i3, j, (byte) 0, j2, 0L, bArr3, "", a2, this.f10705a.f26282a.h, bArr4);
return;
case 30:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 15, j, (byte) 1, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 31:
case 32:
case 34:
case 50:
case 51:
case 53:
int i4 = 16;
if (this.f10705a.f26282a.f10517a == 34) {
i4 = 17;
}
cardHandler.a(this.app.getCurrentAccountUin(), "0", this.f10705a.f26282a.f10517a == 53 ? 50 : i4, j, (byte) 0, 0L, 0L, bArr3, a(b(this.f10705a.f26282a)), a2, 10004, null);
return;
case 35:
case 37:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 31, j, (byte) 0, 0L, 0L, bArr3, "", a2, 3001, bArr4);
return;
case 36:
cardHandler.a(this.app.getCurrentAccountUin(), "0", 32, j, (byte) 0, 0L, 0L, bArr3, b(this.f10705a.f26282a), a2, 3014, bArr4);
return;
case 40:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 1, j, (byte) 1, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 41:
int i5 = 6;
String str2 = "";
if (TextUtils.isEmpty(this.f10705a.f26282a.f10519a) || this.f10705a.f26282a.f10519a.equals("0")) {
i5 = 37;
str2 = this.f10705a.f26282a.o;
}
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, i5, j, (byte) 0, 0L, 0L, bArr3, str2, a2, 10004, bArr4);
return;
case 42:
case 73:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 8, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 46:
case 47:
if (this.f10705a.f26282a.f10530e != null) {
long j3 = 0;
try {
j3 = Long.valueOf(this.f10705a.f26282a.f10530e).longValue();
} catch (Exception e2) {
if (QLog.isColorLevel()) {
QLog.i(ProfileCardUtil.f33517c, 2, e2.toString());
}
}
if (this.f10705a.f26282a.f10517a == 46) {
i = 4;
} else {
i = 14;
}
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, i, j, (byte) 0, j3, 0L, bArr3, "", a2, 10004, bArr4);
return;
}
return;
case 52:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 24, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 55:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 28, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 56:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 29, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 57:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 30, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 60:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 26, j, (byte) 1, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 61:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 27, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 70:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 36, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 71:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 33, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 72:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 34, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 74:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 10, j, (byte) 0, 0L, 0L, bArr3, "", a2, 10004, bArr4);
return;
case 75:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 38, j, (byte) 0, 0L, 0L, bArr3, "", a2, 3017, bArr4);
return;
case 78:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 24, j, (byte) 1, 0L, 0L, bArr3, "", a2, 3022, bArr4);
return;
case 80:
((QCallCardHandler) this.app.getBusinessHandler(79)).a(this.f10705a.f26282a.f10519a);
return;
case 81:
case 82:
case 83:
case 84:
cardHandler.a(this.app.getCurrentAccountUin(), this.f10705a.f26282a.f10519a, 25, j, (byte) 0, 0L, 0L, bArr3, "", a2, EAddFriendSourceID.an, bArr4);
return;
}
}
}
public void a(int i, int i2) {
if (this.f10739b == null) {
this.f10739b = new QQToastNotifier(this);
}
this.f10739b.a(i, getTitleBarHeight(), 0, i2);
}
public void a(String str, int i) {
if (this.f10739b == null) {
this.f10739b = new QQToastNotifier(this);
}
this.f10739b.a(str, getTitleBarHeight(), 0, i);
}
public Card a(String str, String str2) {
FriendsManager friendsManager = (FriendsManager) this.app.getManager(50);
ContactCard m4320a = friendsManager.m4320a(str2);
if (m4320a == null) {
return null;
}
Card m4345b = friendsManager.m4345b(str);
m4345b.strContactName = m4320a.strContactName;
m4345b.strMobile = m4320a.mobileNo;
m4345b.age = m4320a.bAge;
m4345b.shAge = m4320a.bAge;
m4345b.shGender = m4320a.bSex;
m4345b.strProvince = m4320a.strProvince;
m4345b.strCity = m4320a.strCity;
m4345b.strCountry = m4320a.strCountry;
friendsManager.a(m4345b);
return m4345b;
}
public static String b(ProfileActivity.AllInOne allInOne) {
ProfileActivity.CardContactInfo a2 = a(allInOne);
String str = a2 != null ? a2.f85253b + a2.f85254c : "";
if (TextUtils.isEmpty(str)) {
return allInOne.f10519a;
}
return str;
}
private void H() {
if (this.f10705a.f26282a.f == 100 && GesturePWDUtils.getJumpLock(getActivity(), this.app.getCurrentAccountUin())) {
startUnlockActivity();
}
}
public void p() {
QQMessageFacade m4635a = this.app.m4635a();
if (m4635a != null) {
int e = m4635a.e();
if (e > 0) {
if (e > 99) {
this.f10735b.setText(getString(R.string.f63415name_res_0x7f0a1396) + "(99+)");
return;
} else {
this.f10735b.setText(getString(R.string.f63415name_res_0x7f0a1396) + UnifiedTraceRouter.e + e + UnifiedTraceRouter.f);
return;
}
}
getIntent().putExtra(AppConstants.leftViewText.f87222a, getString(R.string.f63415name_res_0x7f0a1396));
this.f10735b.setText(getString(R.string.f63415name_res_0x7f0a1396));
}
}
@Override
public void update(Observable observable, Object obj) {
if (obj instanceof MessageRecord) {
runOnUiThread(new kxp(this));
}
}
private String b() {
String str;
try {
PhoneContact c2 = ((PhoneContactManagerImp) this.app.getManager(10)).c(b(this.f10705a.f26282a));
if (c2 == null) {
str = null;
} else {
str = c2.uin;
}
return str;
} catch (Exception e) {
if (!QLog.isColorLevel()) {
return null;
}
QLog.e(ProfileCardUtil.f33517c, 2, e.toString());
return null;
}
}
@Override
public void onPostThemeChanged() {
if (ThemeUtil.isInNightMode(this.app)) {
if (this.f10749c != null) {
this.f10749c.setVisibility(0);
}
} else if (this.f10749c != null) {
this.f10749c.setVisibility(8);
}
}
public void I() {
try {
FrameLayout frameLayout = (FrameLayout) findViewById(16908290);
if (this.f10705a.f26285a != null) {
frameLayout.setForeground(null);
this.f10722a.setBackgroundResource(0);
this.f10688a.setBackgroundResource(0);
ProfileCardTemplate.a(this.f10688a, "background", this.f10705a.f26285a, "background");
if (this.f10705a.f26283a.lCurrentStyleId == ProfileCardTemplate.h) {
ProfileCardTemplate.a(this.f10715a, "background", this.f10705a.f26285a, "shoppingUserInfoBackground");
} else {
ProfileCardTemplate.a(this.f10715a, "background", this.f10705a.f26285a, "commonMaskBackground");
}
if (Build.VERSION.SDK_INT >= 11) {
if (this.f10705a.f26283a != null && ((this.f10705a.f26283a.lCurrentStyleId == ProfileCardTemplate.f26298f || this.f10705a.f26283a.lCurrentStyleId == ProfileCardTemplate.h) && (this.f10683a instanceof BitmapDrawable))) {
ThreadManager.a(new kyr(this.f10740b, ((BitmapDrawable) this.f10683a).getBitmap()), 5, null, true);
} else {
View childAt = frameLayout.getChildAt(0);
if (childAt != null && childAt.getBackground() != null) {
childAt.setBackgroundDrawable(null);
}
}
}
frameLayout.setBackgroundDrawable(this.f10683a);
if (ThemeUtil.isInNightMode(this.app)) {
if (this.f10749c != null) {
this.f10749c.setVisibility(0);
}
} else if (this.f10749c != null) {
this.f10749c.setVisibility(8);
}
} else {
frameLayout.setForeground(getResources().getDrawable(R.drawable.f46567skin_header_bar_shadow));
this.f10722a.setBackgroundResource(R.drawable.f41323name_res_0x7f0200f5);
if (this.f10705a.f26282a.f10517a == 33) {
this.f10758d.setVisibility(0);
this.f10741b.setVisibility(0);
} else {
this.f10758d.setVisibility(8);
this.f10741b.setVisibility(4);
}
this.f10688a.setBackgroundResource(R.drawable.f41323name_res_0x7f0200f5);
if (this.f10749c != null) {
this.f10749c.setVisibility(8);
}
this.f10715a.setBackgroundResource(0);
}
if (!this.f10715a.a(this.f10705a.f26285a)) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "update item style");
}
this.f10715a.a(this.f10705a.f26283a, false, this.f10705a.f26282a.f10520a);
this.f10715a.m9802a();
}
} catch (Exception e) {
if (QLog.isColorLevel()) {
QLog.d(ProfileCardUtil.f33517c, 2, "updateTheme exception msg=" + e.getMessage());
}
e.printStackTrace();
}
}
public void q() {
if (Build.VERSION.SDK_INT >= 11 && this.f10705a.f26283a != null && (this.f10683a instanceof BitmapDrawable)) {
ThreadManager.a(new kxs(this, ((BitmapDrawable) this.f10683a).getBitmap()), 5, null, true);
}
}
public boolean d(int i) {
switch (i) {
case 7:
case 8:
case 20:
return true;
default:
return false;
}
}
public void r() {
if (this.f10715a != null && this.f10762e != null) {
this.f10715a.setDrawingCacheQuality(524288);
this.f10715a.setDrawingCacheEnabled(true);
this.f10715a.setVisibility(8);
this.f10682a = this.f10715a.getDrawingCache();
this.f10688a.findViewById(R.id.f53061name_res_0x7f091762).setVisibility(8);
if (this.f10682a != null && !this.f10682a.isRecycled()) {
this.f10762e.setBackgroundDrawable(new BitmapDrawable(getResources(), this.f10682a));
this.f10762e.setVisibility(0);
}
}
}
public void s() {
if (this.f10715a != null && this.f10762e != null) {
this.f10762e.setBackgroundDrawable(null);
this.f10762e.setVisibility(8);
this.f10715a.destroyDrawingCache();
this.f10715a.setDrawingCacheEnabled(false);
this.f10715a.setVisibility(0);
this.f10682a = null;
this.f10688a.findViewById(R.id.f53061name_res_0x7f091762).setVisibility(0);
}
}
public void t() {
this.f10722a.e(0);
}
protected void a(long j, long j2) {
w();
v();
ProfileCardUtil.a(this.app, j, j2);
this.f10740b.postDelayed(this.f10742b, this.cW);
}
public void u() {
if (this.f10712a != null) {
this.f10712a.dismiss();
this.f10712a = null;
}
}
public void v() {
try {
if (!isFinishing()) {
this.f10716a = new QQProgressDialog(this, getTitleBarHeight());
this.f10716a.setCancelable(false);
this.f10716a.b(R.string.f65423name_res_0x7f0a1b73);
this.f10716a.show();
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void w() {
if (this.f10716a != null && this.f10716a.isShowing()) {
try {
this.f10716a.dismiss();
} catch (Exception e) {
}
}
this.f10716a = null;
}
public void x() {
try {
if (!isFinishing()) {
this.f10738b = new QQProgressDialog(this, getTitleBarHeight());
this.f10738b.setCancelable(false);
this.f10738b.b(R.string.f63606name_res_0x7f0a1455);
this.f10738b.show();
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void y() {
if (this.f10738b != null && this.f10738b.isShowing()) {
try {
this.f10738b.dismiss();
} catch (Exception e) {
}
}
this.f10738b = null;
}
public boolean m2747b(String str) {
if (str == null) {
return false;
}
if (this.f10725a == null) {
this.f10725a = new HashMap();
}
if (this.f10725a.get(str) == null) {
this.f10725a.put(str, 1);
return true;
}
int intValue = ((Integer) this.f10725a.get(str)).intValue();
if (intValue > 3) {
return false;
}
this.f10725a.put(str, Integer.valueOf(intValue + 1));
return true;
}
public boolean c(String str) {
if (this.f10725a == null || this.f10725a.get(str) == null) {
return false;
}
return ((Integer) this.f10725a.get(str)).intValue() > 3;
}
public boolean a(long j, int i, String str, int i2, int i3) {
FriendsManager friendsManager = (FriendsManager) this.app.getManager(50);
Card m4319a = friendsManager.m4319a(this.app.getCurrentAccountUin());
if (m4319a == null || j < 0) {
return false;
}
m4319a.lCurrentStyleId = j;
m4319a.lCurrentBgId = i;
m4319a.strCurrentBgUrl = str;
m4319a.backgroundColor = i2;
m4319a.templateRet = i3;
if (!friendsManager.a(m4319a)) {
if (QLog.isDevelopLevel()) {
QLog.d(C, 4, "save card in db failed ");
}
return false;
}
return true;
}
public void z() {
String string;
String str;
if (!isFinishing()) {
A();
if (this.f10766g == 1) {
string = getString(R.string.f65402name_res_0x7f0a1b5e);
str = "成为会员之后,即可使用该名片";
} else {
string = getString(R.string.f65401name_res_0x7f0a1b5d);
str = "成为超级会员之后,即可使用该名片";
}
this.f10737b = DialogUtil.a((Context) this, 0, string, str, (int) R.string.f65414name_res_0x7f0a1b6a, (int) R.string.f65415name_res_0x7f0a1b6b, this.f10748c, this.f10755d);
this.f10737b.show();
}
}
public void A() {
if (this.f10737b != null) {
this.f10737b.dismiss();
this.f10737b = null;
}
}
private void J() {
if (this.f10683a != null && (this.f10683a instanceof BitmapDrawable)) {
BitmapDrawable bitmapDrawable = (BitmapDrawable) this.f10683a;
Pair pair = (Pair) BaseApplicationImpl.f6969a.get(CacheKeyHelper.f94503b + ProfileCardUtil.a((Context) this, this.f10743b));
if (pair != null && pair.first != null && bitmapDrawable.getConstantState() != pair.first) {
bitmapDrawable.getBitmap().recycle();
this.f10683a = null;
}
}
}
public String m2739a() {
if (!TextUtils.isEmpty(this.B)) {
return this.B;
}
ThreadManager.a(new kya(this), 8, null, true);
return "-1";
}
@Override
public void onActivityResult(int i, int i2, Intent intent) {
super.onActivityResult(i, i2, intent);
if (i == 10000 && MusicPendantManager.a() != null && this.f10705a != null && this.f10705a.f26282a != null) {
MusicPendantManager.a().a(this.f10705a.f26282a.f10519a, this.app, this);
}
}
public void a(OnGetPhotoWallListener onGetPhotoWallListener) {
this.f10714a = onGetPhotoWallListener;
}
public void a(boolean z2) {
if (z2) {
this.f10769i = NetConnInfoCenter.getServerTime();
} else {
this.f10769i = 0L;
}
}
public boolean m2744a() {
if (this.f10769i != 0) {
r0 = Math.abs(this.f10769i - NetConnInfoCenter.getServerTime()) < 60;
if (!r0) {
this.f10769i = 0L;
}
}
return r0;
}
protected void e(String str) {
Intent intent = new Intent();
intent.putExtra(PhotoConst.e, 101);
intent.putExtra(ProfileActivity.f10493s, true);
intent.putExtra(PeakConstants.ba, true);
PhotoUtils.a(intent, this, getClass().getName(), ProfileCardUtil.b((Activity) this), ProfileCardUtil.c((Activity) this), ProfileCardUtil.b((Activity) this), ProfileCardUtil.c((Activity) this), str, ProfileCardUtil.c());
}
public void K() {
if (getIntent().getBooleanExtra(NewerGuidePlugin.u, false)) {
if (this.f10705a.f26282a.f10517a == 0) {
Intent intent = new Intent(this, SplashActivity.class);
intent.putExtra(AppConstants.MainTabIndex.f17427a, 1);
intent.setFlags(603979776);
startActivity(intent);
return;
}
if (this.f10681a == null) {
this.f10681a = new Intent();
this.f10681a.putExtra("uin", this.f10705a.f26282a.f10519a);
}
setResult(-1, this.f10681a);
}
}
@Override
public void i() {
}
}