TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c

以下内容为反编译后的 QCallDetailActivity.java 源代码,内容仅作参考


package com.tencent.mobileqq.qcall;

import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.tencent.av.VideoClientReportConstants;
import com.tencent.av.VideoConstants;
import com.tencent.av.VideoUtils;
import com.tencent.av.app.PstnSessionInfo;
import com.tencent.av.gaudio.AVPhoneUserInfo;
import com.tencent.av.utils.PstnUtils;
import com.tencent.av.utils.VideoActionSheet;
import com.tencent.biz.eqq.CrmUtils;
import com.tencent.biz.pubaccount.AccountDetail.activity.EqqAccountDetailActivity;
import com.tencent.biz.pubaccount.AccountDetailActivity;
import com.tencent.common.app.AppInterface;
import com.tencent.image.URLDrawable;
import com.tencent.mobileqq.activity.ChatActivityUtils;
import com.tencent.mobileqq.activity.DiscussionInfoCardActivity;
import com.tencent.mobileqq.activity.MainFragment;
import com.tencent.mobileqq.activity.ProfileActivity;
import com.tencent.mobileqq.activity.QQBrowserActivity;
import com.tencent.mobileqq.activity.SplashActivity;
import com.tencent.mobileqq.activity.aio.AIOUtils;
import com.tencent.mobileqq.app.AppConstants;
import com.tencent.mobileqq.app.DiscussionManager;
import com.tencent.mobileqq.app.DiscussionObserver;
import com.tencent.mobileqq.app.FriendListHandler;
import com.tencent.mobileqq.app.FriendListObserver;
import com.tencent.mobileqq.app.FriendsManager;
import com.tencent.mobileqq.app.IphoneTitleBarActivity;
import com.tencent.mobileqq.app.SVIPHandler;
import com.tencent.mobileqq.app.ThreadManager;
import com.tencent.mobileqq.data.DiscussionInfo;
import com.tencent.mobileqq.data.Friends;
import com.tencent.mobileqq.data.PhoneContact;
import com.tencent.mobileqq.data.QCallRecent;
import com.tencent.mobileqq.data.QCallRecord;
import com.tencent.mobileqq.jumplightalk.CLJumpLightalkConfig;
import com.tencent.mobileqq.managers.ShieldMsgManger;
import com.tencent.mobileqq.model.PhoneContactManager;
import com.tencent.mobileqq.phone.PhoneNumberInfo;
import com.tencent.mobileqq.phone.PhoneNumberUtil;
import com.tencent.mobileqq.statistics.ReportController;
import com.tencent.mobileqq.theme.ThemeUtil;
import com.tencent.mobileqq.unifiedebug.UnifiedTraceRouter;
import com.tencent.mobileqq.util.FaceDrawable;
import com.tencent.mobileqq.utils.ContactUtils;
import com.tencent.mobileqq.utils.HexUtil;
import com.tencent.mobileqq.utils.NetworkUtil;
import com.tencent.mobileqq.vas.IndividuationUrlHelper;
import com.tencent.mobileqq.vaswebviewplugin.VasWebviewConstants;
import com.tencent.mobileqq.vaswebviewplugin.VasWebviewUtil;
import com.tencent.mobileqq.vipav.VipFunCallManager;
import com.tencent.mobileqq.vipav.VipFunCallObserver;
import com.tencent.mobileqq.widget.QQToast;
import com.tencent.mobileqq.widget.QQToastNotifier;
import com.tencent.qphone.base.util.QLog;
import com.tencent.tim.R;
import com.tencent.widget.ActionSheet;
import com.tencent.widget.ActionSheetHelper;
import com.tencent.widget.XListView;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Observable;
import java.util.Observer;
import mqq.app.AppRuntime;
public class QCallDetailActivity extends IphoneTitleBarActivity implements View.OnClickListener, Observer {
    public static final int f91604a = 3;
    private static final String f26846a = "0X8004069";
    public static final int f91605b = 1;
    private static final String f26847b = "0X8004068";
    public static final int f91606c = 2;
    private static final String f26848c = "QCallDetailActivity";
    public static final int d = 3;
    private View f26849a;
    private Button f26850a;
    private ImageView f26851a;
    private LinearLayout f26852a;
    private RelativeLayout f26853a;
    private TextView f26854a;
    public PstnSessionInfo f26855a;
    private FriendListHandler f26857a;
    private Friends f26859a;
    private CLJumpLightalkConfig f26860a;
    private LightalkShieldHandler f26861a;
    private LightalkShieldManager f26862a;
    private LightalkSwitchHanlder f26864a;
    private LightalkSwitchManager f26865a;
    private PstnCardInfo f26866a;
    private PstnManager f26867a;
    private QCallFacade f26869a;
    private QQToastNotifier f26871a;
    private XListView f26872a;
    private tca f26874a;
    private boolean f26875a;
    private byte[] f26876a;
    private int[] f26877a;
    private ImageView f26878b;
    private LinearLayout f26879b;
    private RelativeLayout f26880b;
    private TextView f26881b;
    private PstnManager f26882b;
    private LinearLayout f26884c;
    private RelativeLayout f26885c;
    private TextView f26886c;
    private RelativeLayout f26887d;
    private TextView f26888d;
    private String f26889d;
    private int e;
    private TextView f26890e;
    private String f26891e;
    private int f;
    private TextView f26892f;
    private String f26893f;
    private int g;
    private TextView f26894g;
    private String f26895g;
    private int h;
    private String f26896h;
    private String f26897i;
    private int j;
    private String f26898j;
    private String k;
    private String l;
    private FriendListObserver f26858a = new tbb(this);
    private DiscussionObserver f26856a = new tbr(this);
    private LightalkShieldObserver f26863a = new tbs(this);
    private int i = -1;
    Runnable f26873a = new tbu(this);
    private byte[] f26883b = new byte[0];
    VipFunCallObserver f26870a = new tbe(this);
    PstnObserver f26868a = new tbq(this);

    @Override
    public boolean doOnCreate(Bundle bundle) {
        super.doOnCreate(bundle);
        super.setContentView(R.layout.f57465name_res_0x7f030460);
        ThreadManager.a(new tbt(this), 5, null, true);
        this.f26871a = new QQToastNotifier(this);
        this.rightViewImg.setImageResource(R.drawable.f42288name_res_0x7f0204bb);
        this.rightViewImg.setOnClickListener(this);
        this.rightViewImg.setVisibility(0);
        this.rightViewImg.setContentDescription("更多按钮,点击进入");
        String string = getString(R.string.f65551name_res_0x7f0a1bf3);
        setTitle(string, string + getString(R.string.f60148name_res_0x7f0a06d0));
        setLeftViewName(R.string.f65552name_res_0x7f0a1bf4);
        this.f26869a = (QCallFacade) this.app.getManager(37);
        this.f26865a = (LightalkSwitchManager) this.app.getManager(85);
        this.f26864a = (LightalkSwitchHanlder) this.app.getBusinessHandler(52);
        this.f26862a = (LightalkShieldManager) this.app.getManager(138);
        this.f26867a = (PstnManager) this.app.getManager(142);
        a(getIntent());
        c();
        f();
        g();
        this.f26869a.addObserver(this);
        addObserver(this.f26858a);
        addObserver(this.f26856a);
        addObserver(this.f26863a);
        addObserver(this.f26868a);
        this.f26857a = (FriendListHandler) this.app.getBusinessHandler(1);
        if (this.e == 0 && !this.f26857a.m4307b() && !this.f26857a.m4309c()) {
            this.f26857a.c(this.f26889d, false);
        }
        this.f26861a = (LightalkShieldHandler) this.app.getBusinessHandler(78);
        this.f26861a.a();
        this.f26877a = new int[3];
        if (this.e == 25) {
            ReportController.b(null, "dc01331", "", "", "0X800624F", "0X800624F", 0, 0, "", "", "", "");
        } else if (this.e == 24 || this.g == 2 || this.g == 3) {
            ReportController.b(null, "dc01331", "", "", "0X800624E", "0X800624E", 0, 0, "", "", "", "");
        }
        this.f26882b = (PstnManager) this.app.getManager(142);
        this.f26866a = this.f26882b.m7425a(this.app.getCurrentAccountUin());
        return true;
    }

    @Override
    public void doOnResume() {
        super.doOnResume();
        try {
            e();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void b() {
        ThreadManager.a(this.f26873a, 8, null, false);
    }

    @Override
    public void onResume() {
        super.onResume();
        b();
    }

    private void a(Intent intent) {
        PhoneContact mo4535b;
        if (intent == null) {
            finish();
            return;
        }
        this.f26889d = intent.getStringExtra("uin");
        this.f26891e = intent.getStringExtra("troop_uin");
        this.e = intent.getIntExtra("uintype", 0);
        if (this.e == 8) {
            this.e = intent.getIntExtra(AppConstants.Key.l, 0);
        }
        this.f26893f = intent.getStringExtra(AppConstants.Key.h);
        this.g = intent.getIntExtra(AppConstants.Key.i, 0);
        this.h = intent.getIntExtra(AppConstants.Key.l, 0);
        this.f26895g = intent.getStringExtra(AppConstants.Key.k);
        this.f26896h = intent.getStringExtra(AppConstants.Key.d);
        if (this.g == 2) {
            ReportController.b(this.app, "dc01331", "", "", "0X8004E95", "0X8004E95", 0, 0, "", "", "", "");
        }
        if (VideoUtils.a(this.e, this.g)) {
            this.rightViewImg.setVisibility(0);
        } else {
            this.rightViewImg.setVisibility(8);
        }
        this.f26876a = intent.getByteArrayExtra("sig");
        this.f26897i = intent.getStringExtra("entrance");
        this.f26875a = intent.getBooleanExtra(AppConstants.Key.ev, false);
        this.f = this.e;
        if (this.f == 0 && !a(this.f26889d)) {
            this.f = 1003;
        }
        this.i = intent.getIntExtra(AppConstants.Key.el, -1);
        if (this.i == -1) {
            PhoneContactManager phoneContactManager = (PhoneContactManager) this.app.getManager(10);
            switch (this.e) {
                case 1006:
                    mo4535b = phoneContactManager.c(this.f26889d);
                    break;
                case AppConstants.VALUE.w:
                    mo4535b = phoneContactManager.mo4535b(this.f26889d);
                    break;
                default:
                    mo4535b = phoneContactManager.mo4524a(this.f26889d);
                    break;
            }
            if (mo4535b != null) {
                this.i = mo4535b.contactID;
            }
        }
    }

    private void c() {
        int a2;
        ArrayList arrayList;
        ArrayList arrayList2;
        this.f26852a = (LinearLayout) LayoutInflater.from(this).inflate(R.layout.f57467name_res_0x7f030462, (ViewGroup) null);
        this.f26851a = (ImageView) this.f26852a.findViewById(R.id.f47988head);
        this.f26886c = (TextView) this.f26852a.findViewById(R.id.f47709name_res_0x7f090279);
        this.f26888d = (TextView) this.f26852a.findViewById(R.id.f52598name_res_0x7f091592);
        this.f26878b = (ImageView) this.f26852a.findViewById(R.id.f52599name_res_0x7f091593);
        this.f26890e = (TextView) this.f26852a.findViewById(R.id.f52600name_res_0x7f091594);
        this.f26884c = (LinearLayout) this.f26852a.findViewById(R.id.f52601name_res_0x7f091595);
        this.f26892f = (TextView) this.f26852a.findViewById(R.id.f52602name_res_0x7f091596);
        this.f26894g = (TextView) this.f26852a.findViewById(R.id.f52603name_res_0x7f091597);
        this.f26853a = (RelativeLayout) this.f26852a.findViewById(R.id.f52611name_res_0x7f09159f);
        this.f26880b = (RelativeLayout) this.f26852a.findViewById(R.id.f52596name_res_0x7f091590);
        this.f26885c = (RelativeLayout) this.f26852a.findViewById(R.id.f52605name_res_0x7f091599);
        this.f26850a = (Button) findViewById(R.id.f52593name_res_0x7f09158d);
        this.f26850a.setOnClickListener(this);
        this.f26887d = (RelativeLayout) this.f26852a.findViewById(R.id.f52614name_res_0x7f0915a2);
        this.f26881b = (TextView) this.f26852a.findViewById(R.id.f52607name_res_0x7f09159b);
        this.f26849a = this.f26852a.findViewById(R.id.f52610name_res_0x7f09159e);
        int color = getResources().getColor(R.color.f39292name_res_0x7f0b037b);
        this.f26849a.setBackgroundColor(color);
        View findViewById = this.f26852a.findViewById(R.id.f52604name_res_0x7f091598);
        findViewById.setBackgroundColor(color);
        this.f26886c.setText(this.f26893f);
        TextView textView = (TextView) this.f26852a.findViewById(R.id.f48282name_res_0x7f0904b6);
        ImageView imageView = (ImageView) this.f26852a.findViewById(R.id.f49956name_res_0x7f090b40);
        switch (this.e) {
            case 25:
                PhoneContactManager phoneContactManager = (PhoneContactManager) this.app.getManager(10);
                PhoneContact c2 = (phoneContactManager == null || this.f26896h == null) ? phoneContactManager != null ? phoneContactManager.c(this.f26896h) : null : phoneContactManager.c(this.f26896h);
                if (QLog.isColorLevel()) {
                    QLog.d(f26848c, 2, "getFaceBitmap contact = " + c2);
                }
                if (c2 != null) {
                    FaceDrawable b2 = FaceDrawable.b(this.app, this.f26896h, (byte) 3);
                    this.f26886c.setText(c2.name);
                    if (b2 != null) {
                        this.f26851a.setImageDrawable(b2);
                        break;
                    }
                } else {
                    Bitmap a3 = this.app.a(16, this.f26889d, (byte) 3, true, 16);
                    QCallCardInfo a4 = ((QCallCardManager) this.app.getManager(139)).a(this.f26889d);
                    if (a4 != null && a4.nickname != null) {
                        this.f26886c.setText(a4.nickname);
                    }
                    if (a3 != null) {
                        this.f26851a.setImageBitmap(a3);
                        break;
                    }
                }
                break;
            case 26:
                this.l = null;
                PhoneContact m7420a = OpenSDKUtils.m7420a(this.app, this.f26889d);
                if (m7420a != null) {
                    this.l = m7420a.uin;
                }
                if (this.l == null) {
                    imageView.setVisibility(8);
                    this.f26851a.setImageResource(R.drawable.f42862name_res_0x7f0206fd);
                    textView.setVisibility(0);
                    textView.setText(ContactUtils.d(this.f26893f));
                } else {
                    imageView.setVisibility(0);
                    this.f26851a.setImageDrawable(OpenSDKUtils.m7419a(this.app, this.f26889d));
                }
                findViewById(R.id.f52592name_res_0x7f09158c).setVisibility(8);
                this.f26850a.setVisibility(0);
                findViewById.setVisibility(8);
                this.f26885c.setVisibility(8);
                break;
            case 1001:
            case 1010:
                this.f26851a.setImageDrawable(FaceDrawable.a((AppInterface) this.app, 200, this.f26889d, true));
                break;
            case 2016:
            case AppConstants.VALUE.w:
                this.f26851a.setImageResource(R.drawable.f42862name_res_0x7f0206fd);
                textView.setVisibility(0);
                textView.setText(ContactUtils.d(this.f26893f));
                imageView.setVisibility(8);
                this.f26890e.setText(R.string.f65257name_res_0x7f0a1acd);
                findViewById.setVisibility(8);
                this.f26885c.setVisibility(8);
                findViewById(R.id.f52592name_res_0x7f09158c).setVisibility(8);
                break;
            case 3000:
                if (this.f26867a == null || this.f26867a.m7423a() != 1) {
                    this.f26851a.setImageDrawable(FaceDrawable.a(this.app, 101, this.f26889d));
                    DiscussionManager discussionManager = (DiscussionManager) this.app.getManager(52);
                    a2 = discussionManager != null ? discussionManager.a(this.f26889d) : 0;
                } else {
                    Drawable a5 = FaceDrawable.a(1001, 3);
                    this.f26851a.setImageDrawable(FaceDrawable.a(this.app, 1001, this.f26889d, 1, a5, a5));
                    this.f26886c.setText(ContactUtils.e(this.app, this.f26889d));
                    a2 = ContactUtils.a(this.app, this.f26889d);
                }
                if (a2 > 0) {
                    this.f26888d.setText(UnifiedTraceRouter.e + a2 + UnifiedTraceRouter.f);
                }
                if (this.f26885c != null && findViewById != null) {
                    this.f26885c.setVisibility(8);
                    findViewById.setVisibility(8);
                }
                if (this.f26875a) {
                    imageView.setVisibility(8);
                    findViewById(R.id.f52592name_res_0x7f09158c).setVisibility(8);
                    this.f26850a.setVisibility(0);
                    break;
                } else {
                    imageView.setVisibility(0);
                    findViewById(R.id.f52592name_res_0x7f09158c).setVisibility(0);
                    this.f26850a.setVisibility(8);
                    break;
                }
            default:
                this.f26851a.setImageDrawable(FaceDrawable.a(this.app, 1, this.f26889d));
                break;
        }
        TextView textView2 = (TextView) this.f26852a.findViewById(R.id.f52613name_res_0x7f0915a1);
        textView2.setContentDescription(getString(R.string.f65558name_res_0x7f0a1bfa));
        textView2.setOnClickListener(this);
        d();
        if (this.g == 2 || this.g == 3 || this.e == 25) {
            this.f26890e.setContentDescription(getString(R.string.f59991name_res_0x7f0a0633));
            this.f26890e.setOnClickListener(this);
        }
        a(true);
        this.f26885c.setOnClickListener(this);
        this.f26880b.setOnClickListener(this);
        this.f26890e.setOnClickListener(this);
        this.f26890e.setOnTouchListener(new tbw(this));
        if (this.i != -1) {
            List a6 = this.app.getEntityManagerFactory().createEntityManager().a(PhoneContact.class, false, "contactID = " + this.i, null, null, null, null, null);
            ReportController.b(this.app, "dc01331", "", "", "0X8005AF4", "0X8005AF4", 0, 0, "", "", "", "");
            arrayList = a6;
        } else {
            arrayList = null;
        }
        if (this.e == 26) {
            ArrayList arrayList3 = new ArrayList();
            PhoneContact phoneContact = new PhoneContact();
            phoneContact.mobileNo = this.f26889d;
            phoneContact.type = 0;
            phoneContact.label = MainFragment.f10200g;
            arrayList3.add(phoneContact);
            arrayList2 = arrayList3;
        } else {
            arrayList2 = arrayList;
        }
        if (arrayList2 != null && arrayList2.size() > 0) {
            this.f26852a.findViewById(R.id.f52608name_res_0x7f09159c).setVisibility(0);
            NoScrollListView noScrollListView = (NoScrollListView) this.f26852a.findViewById(R.id.f52609name_res_0x7f09159d);
            noScrollListView.setVisibility(0);
            PhoneNumberAdapter phoneNumberAdapter = new PhoneNumberAdapter(this, arrayList2);
            phoneNumberAdapter.a(this.f26860a);
            noScrollListView.setAdapter((ListAdapter) phoneNumberAdapter);
            noScrollListView.setOnItemClickListener(new tbx(this));
        }
    }

    public void a(Context context, String str) {
        ActionSheet a2 = ActionSheet.a(context);
        if (this.f26860a != null) {
            if (NetworkUtil.e(context) && !TextUtils.isEmpty(this.f26860a.g)) {
                a2.a(this.f26860a.f, URLDrawable.getDrawable(this.f26860a.g, 0, 0, (Drawable) null, (Drawable) null, false), 0);
            } else {
                a2.c(this.f26860a.f);
            }
            this.f26877a[0] = 1;
            this.f26877a[1] = 2;
            this.f26877a[2] = 3;
            ReportController.b(this.app, "dc01331", "", "", "0X8005AF7", "0X8005AF7", 0, 0, "", "", "", "");
        } else {
            this.f26877a[0] = 2;
            this.f26877a[1] = 3;
        }
        this.f26855a = new PstnSessionInfo();
        this.f26855a = PstnUtils.a(this.app, this.f26855a, this.e == 56938 ? str : this.f26889d, this.e);
        this.f26855a.f925b = str;
        this.f26855a.d = this.f26893f;
        boolean z = (this.f26855a.f925b == null || this.f26855a.f926c == null || this.f26882b.m7423a() != 1) ? false : true;
        this.j = 0;
        if (z && this.f26866a != null) {
            if (this.f26866a.pstn_c2c_call_time > 0) {
                this.j = 1;
            } else if (this.f26882b.b() == 1 && this.f26866a.pstn_c2c_try_status == 0) {
                this.j = 2;
            } else {
                this.j = 5;
            }
        }
        if (this.e == 26) {
            OpenSDKUtils.a(this.app, context, str, this.j, this.f26855a, 2);
            return;
        }
        if (z) {
            a2.m10333a(R.string.f66306name_res_0x7f0a1ee6);
            if (this.j == 1) {
                a2.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.j == 2) {
                a2.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 {
                a2.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 {
            a2.c(R.string.f66167name_res_0x7f0a1e5b);
        }
        a2.d(R.string.f63203cancel);
        a2.a(new tby(this));
        a2.a(new tbz(this, context, str, a2));
        a2.show();
        ReportController.b(this.app, "dc01331", "", "", "0X8005AF6", "0X8005AF6", 0, 0, "", "", "", "");
    }

    public void a(boolean z) {
        String b2;
        int a2 = VipFunCallManager.a((AppRuntime) this.app, this.f26889d, 6, true, (String) null);
        if (a2 == 0) {
            b2 = getResources().getString(R.string.f65044name_res_0x7f0a19f8);
        } else {
            b2 = VipFunCallManager.b(this.app, a2, -1, "name");
        }
        if (TextUtils.isEmpty(b2)) {
            b2 = getResources().getString(R.string.f65044name_res_0x7f0a19f8);
        }
        this.f26881b.setText(b2);
    }

    public void d() {
        if (this.e == 3000) {
            this.f26878b.setVisibility(8);
            this.f26890e.setVisibility(8);
            return;
        }
        this.f26884c.setVisibility(8);
        FriendsManager friendsManager = (FriendsManager) this.app.getManager(50);
        if (QLog.isColorLevel()) {
            QLog.d(f26848c, 2, "updateOnlineStatus mFriendUin : " + this.f26889d + " , uinType = " + this.e);
        }
        this.f26859a = friendsManager.m4355c(this.f26889d);
        if (this.f26859a != null) {
            if (this.f26859a.iTermType == 68104 || this.f26859a.iTermType == 65805) {
                this.f26878b.setVisibility(8);
                this.f26890e.setVisibility(8);
                return;
            }
            if (QLog.isColorLevel()) {
                QLog.d(f26848c, 2, "friend.getNetWorkType():" + this.f26859a.getNetWorkType() + ", friend.detalStatusFlag:" + ((int) this.f26859a.detalStatusFlag) + ", friend.iTermType:" + this.f26859a.iTermType);
            }
            int a2 = ContactUtils.a((int) this.f26859a.detalStatusFlag, this.f26859a.iTermType);
            if (this.g == 2 || this.g == 3 || this.e == 25) {
                this.f26878b.setVisibility(0);
                this.f26878b.setBackgroundResource(R.drawable.f44189name_res_0x7f020c2d);
                this.f26890e.setText(R.string.f59991name_res_0x7f0a0633);
                this.f26890e.setContentDescription(getString(R.string.f59991name_res_0x7f0a0633));
            } else if (a2 != 0) {
                if (this.f26859a.getNetWorkType() == 2 || this.f26859a.getNetWorkType() == 3 || this.f26859a.getNetWorkType() == 4 || this.f26859a.getNetWorkType() == 1 || this.f26859a.netTypeIconId == 7 || this.f26859a.netTypeIconId == 8) {
                    if (this.f26859a.getNetWorkType() == 2) {
                        this.f26878b.setVisibility(8);
                        this.f26890e.setText(R.string.f65560name_res_0x7f0a1bfc);
                        this.f26890e.setContentDescription(getString(R.string.f65560name_res_0x7f0a1bfc));
                        return;
                    } else if (this.f26859a.getNetWorkType() == 3) {
                        this.f26878b.setVisibility(8);
                        this.f26890e.setText(R.string.f65561name_res_0x7f0a1bfd);
                        this.f26890e.setContentDescription(getString(R.string.f65561name_res_0x7f0a1bfd));
                        return;
                    } else if (this.f26859a.getNetWorkType() == 4) {
                        this.f26878b.setVisibility(8);
                        this.f26890e.setText(R.string.f65562name_res_0x7f0a1bfe);
                        this.f26890e.setContentDescription(getString(R.string.f65562name_res_0x7f0a1bfe));
                        return;
                    } else if (this.f26859a.netTypeIconId == 7) {
                        this.f26878b.setVisibility(8);
                        this.f26890e.setText(getString(R.string.f65564name_res_0x7f0a1c00));
                        this.f26890e.setContentDescription(getString(R.string.f65564name_res_0x7f0a1c00));
                        return;
                    } else if (this.f26859a.netTypeIconId == 8) {
                        this.f26878b.setVisibility(8);
                        this.f26890e.setText(getString(R.string.f65565name_res_0x7f0a1c01));
                        this.f26890e.setContentDescription(getString(R.string.f65565name_res_0x7f0a1c01));
                        return;
                    } else if (this.f26859a.netTypeIconId == 9) {
                        this.f26878b.setVisibility(8);
                        this.f26890e.setText(getString(R.string.f65566name_res_0x7f0a1c02));
                        this.f26890e.setContentDescription(getString(R.string.f65566name_res_0x7f0a1c02));
                        return;
                    } else {
                        this.f26878b.setVisibility(0);
                        this.f26878b.setBackgroundResource(R.drawable.f44177name_res_0x7f020c21);
                        this.f26890e.setText(R.string.f65563name_res_0x7f0a1bff);
                        this.f26890e.setContentDescription(getString(R.string.f65563name_res_0x7f0a1bff));
                        return;
                    }
                }
                this.f26878b.setVisibility(8);
            }
        } else if (this.e == 25 || this.e == 26) {
            this.f26878b.setVisibility(0);
            this.f26878b.setBackgroundResource(R.drawable.f44189name_res_0x7f020c2d);
            this.f26890e.setText(R.string.f59991name_res_0x7f0a0633);
            this.f26890e.setContentDescription(getString(R.string.f59991name_res_0x7f0a0633));
        }
    }

    private void e() {
        String string;
        if (this.e == 3000) {
            this.f26884c.setVisibility(0);
            this.f26878b.setVisibility(8);
            this.f26890e.setVisibility(8);
            QCallRecent m7456a = this.f26869a.m7456a(this.f26889d, this.e);
            if (!TextUtils.isEmpty(m7456a.pstnInfo)) {
                PhoneContactManager phoneContactManager = (PhoneContactManager) this.app.getManager(10);
                ArrayList m775a = PstnUtils.m775a(m7456a.pstnInfo);
                if (m775a != null) {
                    StringBuilder sb = new StringBuilder();
                    for (int i = 0; i < m775a.size(); i++) {
                        PhoneContact mo4535b = phoneContactManager.mo4535b(((AVPhoneUserInfo) m775a.get(i)).telInfo.mobile);
                        if (mo4535b != null) {
                            sb.append(mo4535b.name).append("、");
                        } else if (!TextUtils.isEmpty(((AVPhoneUserInfo) m775a.get(i)).telInfo.mobile)) {
                            if (((AVPhoneUserInfo) m775a.get(i)).telInfo.nationState == 0) {
                                sb.append(((AVPhoneUserInfo) m775a.get(i)).telInfo.mobile).append("、");
                            } else {
                                sb.append(((AVPhoneUserInfo) m775a.get(i)).telInfo.nation).append(((AVPhoneUserInfo) m775a.get(i)).telInfo.mobile).append("、");
                            }
                        }
                        if (i > 2) {
                            break;
                        }
                    }
                    if (sb.length() > 0) {
                        sb.deleteCharAt(sb.length() - 1);
                        if (m775a.size() > 1) {
                            string = getString(R.string.f60011name_res_0x7f0a0647, new Object[]{"" + m775a.size()});
                        } else {
                            string = getString(R.string.f60012name_res_0x7f0a0648);
                        }
                        int dimensionPixelSize = getResources().getDisplayMetrics().widthPixels - getResources().getDimensionPixelSize(R.dimen.f40411name_res_0x7f0c03e5);
                        Paint paint = new Paint(1);
                        paint.setColor(-1);
                        paint.setTextSize(getResources().getDimensionPixelSize(R.dimen.f40409name_res_0x7f0c03e3));
                        float measureText = paint.measureText(string);
                        this.f26894g.setLayoutParams(new LinearLayout.LayoutParams(((int) measureText) + 1, -2));
                        this.f26894g.setText(string);
                        int i2 = dimensionPixelSize - (((int) measureText) + 1);
                        float measureText2 = paint.measureText(sb.toString());
                        if (i2 > measureText2) {
                            this.f26892f.setLayoutParams(new LinearLayout.LayoutParams((int) measureText2, -2));
                        } else {
                            this.f26892f.setLayoutParams(new LinearLayout.LayoutParams(i2, -2));
                        }
                        this.f26892f.setText(sb.toString());
                        return;
                    }
                    return;
                }
                return;
            }
            return;
        }
        this.f26884c.setVisibility(8);
    }

    public void b(boolean z) {
        if (this.f26853a != null && this.f26887d != null) {
            if (z) {
                this.f26887d.setVisibility(0);
                this.f26853a.setVisibility(8);
                return;
            }
            this.f26887d.setVisibility(8);
            this.f26853a.setVisibility(0);
        }
    }

    private void f() {
        if (this.g == 2 || this.g == 3 || this.e == 25 || this.e == 26) {
            this.f26879b = (LinearLayout) LayoutInflater.from(this).inflate(R.layout.f57466name_res_0x7f030461, (ViewGroup) null);
            this.f26879b.setContentDescription(getString(R.string.f59993name_res_0x7f0a0635));
            this.f26879b.setOnClickListener(this);
        }
        Button button = (Button) findViewById(R.id.f52590name_res_0x7f09158a);
        button.setOnClickListener(this);
        Button button2 = (Button) findViewById(R.id.f52589name_res_0x7f091589);
        button2.setOnClickListener(this);
        Button button3 = (Button) findViewById(R.id.f52588name_res_0x7f091588);
        button3.setOnClickListener(this);
        button.setText(R.string.f63608name_res_0x7f0a1457);
        if (this.e == 3000) {
            button.setContentDescription("发消息");
            button3.setText(R.string.f64746name_res_0x7f0a18c9);
            button3.setContentDescription("QQ电话");
            button2.setVisibility(8);
        } else if (this.e == 1008) {
            button2.setVisibility(8);
            button.setVisibility(8);
            button3.setText("QQ电话");
            button3.setContentDescription(getString(R.string.f65572name_res_0x7f0a1c08));
            this.f26885c.setVisibility(8);
        } else if (this.g == 2 || this.g == 3 || this.e == 25) {
            button2.setVisibility(8);
            button.setVisibility(8);
            button3.setText(R.string.f64745name_res_0x7f0a18c8);
            button3.setContentDescription(getString(R.string.f65572name_res_0x7f0a1c08));
        } else {
            button2.setVisibility(8);
            button.setContentDescription("发消息");
            button3.setText(R.string.f64745name_res_0x7f0a18c8);
            button3.setContentDescription("QQ电话");
        }
        if (this.e != 0) {
            button3.setVisibility(8);
            button2.setVisibility(8);
        }
    }

    private void g() {
        this.f26872a = (XListView) findViewById(R.id.f52591name_res_0x7f09158b);
        this.f26872a.a((View) this.f26852a);
        if (this.g == 2 || this.g == 3 || this.e == 25 || this.e == 26) {
            this.f26872a.b((View) this.f26879b);
        }
        this.f26874a = new tca(this);
        this.f26872a.setAdapter((ListAdapter) this.f26874a);
    }

    public void h() {
        if (this.e == 3000) {
            ReportController.b(this.app, "dc01331", "", "", f26847b, f26847b, 0, 0, "", "", "", "");
            ReportController.b(this.app, "dc01331", "", "", "0X8004F91", "0X8004F91", 0, 0, "", "", "", "");
            ChatActivityUtils.a(this.app, (Context) this, this.e, this.f26898j, true, true, (ChatActivityUtils.StartVideoListener) null, (Map) null);
        } else if (this.g == 2 || this.g == 3 || this.e == 25) {
            HashMap hashMap = new HashMap();
            hashMap.put("dstClient", "Lightalk");
            hashMap.put("bindType", String.valueOf(this.g));
            hashMap.put("bindId", this.f26895g);
            hashMap.put("extraType", String.valueOf(this.h));
            if (this.f26876a != null) {
                String a2 = HexUtil.a(this.f26876a);
                if (QLog.isColorLevel()) {
                    QLog.d(f26848c, 2, "mLightalksig = " + this.f26876a);
                    QLog.d(f26848c, 2, "sig = " + a2);
                }
                hashMap.put("sig", a2);
            }
            if (QLog.isColorLevel()) {
                QLog.d(f26848c, 2, "mBindId = " + this.f26895g + ", mBindType = " + this.g + ", mExtraType = " + this.h + ", mUinType = " + this.e + ", mPhoneNumber = " + this.f26896h);
            }
            ReportController.b(this.app, "dc01331", "", "", "0X8004E96", "0X8004E96", 0, 0, "", "", "", "");
            ChatActivityUtils.a(this.app, (Context) this, this.e, this.f26898j, this.f26893f, this.f26896h, true, this.f26891e, true, true, (ChatActivityUtils.StartVideoListener) null, VideoConstants.f770aZ, (Map) hashMap);
        } else {
            ReportController.b(this.app, "dc01331", "", this.f26889d, "Two_video_call", "Tvc_msg_info_launch", 0, 0, "", "", "", "");
            ReportController.b(this.app, "dc01331", "", "", "0X8004F8A", "0X8004F8A", 0, 0, "", "", "", "");
            if (this.e != 1008) {
                if (this.e == 1024) {
                    CrmUtils.a(this.app, this, this.f26893f, this.f26898j, VideoClientReportConstants.as);
                } else {
                    ChatActivityUtils.a(this.app, this, this.e, this.f26898j, this.f26893f, this.k, true, this.f26891e, true, true, null, VideoConstants.f770aZ);
                }
            }
        }
    }

    @Override
    public void onClick(View view) {
        int i;
        int i2;
        boolean z;
        boolean z2;
        boolean z3;
        this.f26898j = null;
        this.k = null;
        if (this.e == 1006) {
            this.k = this.f26889d;
        } else {
            this.f26898j = this.f26889d;
        }
        switch (view.getId()) {
            case R.id.f47677ivTitleBtnLeft:
                finish();
                return;
            case R.id.f48300ivTitleBtnRightImage:
                ReportController.b(this.app, "dc01331", "", "", "0X8004E6D", "0X8004E6D", 0, 0, "", "", "", "");
                ActionSheet actionSheet = (ActionSheet) ActionSheetHelper.a(this, (View) null);
                boolean z4 = false;
                boolean z5 = false;
                boolean b2 = this.f26865a.b();
                if (this.e == 26) {
                    PhoneNumberInfo m7264a = PhoneNumberUtil.m7264a(this.f26889d);
                    z4 = this.f26862a.a(m7264a.f91157a + "-" + m7264a.f91159c);
                    i2 = this.e;
                    z = false;
                    z2 = false;
                } else {
                    if (this.e == 0 && !((FriendsManager) this.app.getManager(50)).m4354b(this.f26889d)) {
                        i2 = 1003;
                    } else {
                        i2 = this.e;
                    }
                    boolean z6 = i2 == 0 && ((FriendsManager) this.app.getManager(50)).m4354b(this.f26889d);
                    try {
                        Long.parseLong(this.f26889d);
                    } catch (Exception e) {
                        z5 = true;
                    }
                    if (!b2) {
                        z4 = true;
                        boolean z7 = z5;
                        z = z6;
                        z2 = z7;
                    } else if (z6) {
                        FriendsManager friendsManager = (FriendsManager) this.app.getManager(50);
                        if (friendsManager == null || TextUtils.isEmpty(this.f26889d)) {
                            z3 = false;
                        } else {
                            z3 = friendsManager.e(this.f26889d);
                        }
                        z4 = z3;
                        boolean z8 = z6;
                        z2 = z5;
                        z = z8;
                    } else if (z5) {
                        z4 = this.f26862a.a(UinUtils.a(this.f26889d));
                        boolean z9 = z5;
                        z = z6;
                        z2 = z9;
                    } else {
                        ShieldMsgManger shieldMsgManger = (ShieldMsgManger) this.app.getManager(15);
                        if (shieldMsgManger == null || TextUtils.isEmpty(this.f26889d)) {
                            boolean z10 = z5;
                            z = z6;
                            z2 = z10;
                        } else {
                            z4 = shieldMsgManger.m6927a(this.f26889d);
                            boolean z11 = z5;
                            z = z6;
                            z2 = z11;
                        }
                    }
                }
                actionSheet.c(z4 ? R.string.f64430name_res_0x7f0a178d : R.string.f64428name_res_0x7f0a178b);
                actionSheet.c(R.string.f64301name_res_0x7f0a170c);
                actionSheet.d(R.string.f63203cancel);
                actionSheet.a(new tbg(this));
                if (QLog.isColorLevel()) {
                    QLog.d(f26848c, 2, "isFriend:" + z + " isQCallUin:" + z2 + " isSwitch:" + b2 + " isSield:" + z4 + " mFriendUin:" + this.f26889d);
                }
                actionSheet.a(new tbh(this, z4, z, b2, i2, actionSheet));
                actionSheet.show();
                return;
            case R.id.f52588name_res_0x7f091588:
                if (this.e == 3000) {
                    if (this.f26882b.m7423a() == 1) {
                        VideoActionSheet a2 = VideoActionSheet.a((Context) this);
                        a2.a(R.string.f66306name_res_0x7f0a1ee6);
                        a2.c(R.string.f63760name_res_0x7f0a14ef);
                        if (this.f26866a.pstn_multi_call_time > 0) {
                            this.j = 3;
                            a2.a(getResources().getString(R.string.f66304name_res_0x7f0a1ee4), getResources().getDrawable(R.drawable.f42961name_res_0x7f020760), 0);
                            ReportController.b(this.app, "dc01331", "", "", "0X80063FE", "0X80063FE", 1, 0, "", "", "", "");
                        } else if (this.f26882b.c() == 1 && this.f26866a.pstn_multi_try_status == 0) {
                            this.j = 4;
                            a2.a(getResources().getString(R.string.f66304name_res_0x7f0a1ee4), getResources().getDrawable(R.drawable.f42960name_res_0x7f02075f), 0);
                            ReportController.b(this.app, "dc01331", "", "", "0X80063FE", "0X80063FE", 3, 0, "", "", "", "");
                        } else {
                            this.j = 5;
                            a2.a(getResources().getString(R.string.f66304name_res_0x7f0a1ee4), getResources().getDrawable(R.drawable.f42959name_res_0x7f02075e), 0);
                            ReportController.b(this.app, "dc01331", "", "", "0X80063FE", "0X80063FE", 2, 0, "", "", "", "");
                        }
                        a2.d(R.string.f63203cancel);
                        a2.a(new tbl(this));
                        a2.a(new tbm(this, a2));
                        a2.show();
                        return;
                    }
                    h();
                    return;
                }
                this.f26855a = new PstnSessionInfo();
                this.f26855a = PstnUtils.a(this.app, this.f26855a, this.f26889d, this.e);
                boolean z12 = (this.f26855a.f925b == null || this.f26855a.f926c == null || this.f26882b.m7423a() != 1) ? false : true;
                this.j = 0;
                if (z12) {
                    if (this.f26866a.pstn_c2c_call_time > 0) {
                        this.j = 1;
                    } else if (this.f26882b.b() == 1 && this.f26866a.pstn_c2c_try_status == 0) {
                        this.j = 2;
                    } else {
                        this.j = 5;
                    }
                }
                if (z12) {
                    this.f26855a.d = this.f26893f;
                    VideoActionSheet a3 = VideoActionSheet.a((Context) this);
                    a3.a(R.string.f66306name_res_0x7f0a1ee6);
                    a3.c(R.string.f63760name_res_0x7f0a14ef);
                    if (this.f26866a.pstn_c2c_call_time > 0) {
                        this.j = 1;
                        a3.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.f26882b.b() == 1 && this.f26866a.pstn_c2c_try_status == 0) {
                        this.j = 2;
                        a3.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.j = 5;
                        a3.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, "", "", "", "");
                    }
                    a3.d(R.string.f63203cancel);
                    a3.a(new tbn(this));
                    a3.a(new tbo(this, a3));
                    a3.show();
                    return;
                }
                h();
                return;
            case R.id.f52589name_res_0x7f091589:
                ReportController.b(this.app, "dc01331", "", this.f26889d, "Two_call", VideoClientReportConstants.G, 0, 0, "15", a(this.e), "", "");
                ReportController.b(this.app, "dc01331", "", "", "0X8004F8B", "0X8004F8B", 0, 0, "", "", "", "");
                if (this.e == 1024) {
                    if (CrmUtils.b(this.app, this.f26898j, this.e)) {
                        CrmUtils.a(this.app, this, this.f26893f, this.f26898j, VideoClientReportConstants.as);
                        ReportController.b(this.app, "dc01331", "", "", "0X80049D6", "0X80049D6", 0, 0, "", "", "", "");
                        return;
                    }
                    QQToast.a(view.getContext(), (int) R.string.f59872name_res_0x7f0a05bc, 1).b(view.getContext().getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                    if (QLog.isColorLevel()) {
                        QLog.d(f26848c, 2, "Don't support ivr");
                        return;
                    }
                    return;
                }
                ChatActivityUtils.a(this.app, this, this.e, this.f26898j, this.f26893f, this.k, false, this.f26891e, true, true, null, VideoConstants.f770aZ);
                return;
            case R.id.f52590name_res_0x7f09158a:
                if (this.e == 3000) {
                    ReportController.b(this.app, "dc01331", "", "", f26846a, f26846a, 0, 0, "", "", "", "");
                    ReportController.b(this.app, "dc01331", "", "", "0X8004F90", "0X8004F90", 0, 0, "", "", "", "");
                } else {
                    ReportController.b(this.app, "dc01331", "", "", "0X8004F89", "0X8004F89", 0, 0, "", "", "", "");
                }
                Intent a4 = AIOUtils.a(new Intent(this, SplashActivity.class), (int[]) null);
                a4.putExtra("uin", this.f26889d);
                a4.putExtra("uintype", this.e);
                a4.putExtra(AppConstants.Key.h, this.f26893f);
                a4.putExtra("entrance", 0);
                startActivity(a4);
                return;
            case R.id.f52593name_res_0x7f09158d:
                if (this.e == 26) {
                    this.f26855a = new PstnSessionInfo();
                    this.f26855a = PstnUtils.a(this.app, this.f26855a, this.f26889d, this.e);
                    boolean z13 = (this.f26855a.f925b == null || this.f26855a.f926c == null || this.f26882b.m7423a() != 1) ? false : true;
                    this.j = 0;
                    if (z13) {
                        if (this.f26866a.pstn_c2c_call_time > 0) {
                            this.j = 1;
                        } else if (this.f26882b.b() == 1 && this.f26866a.pstn_c2c_try_status == 0) {
                            this.j = 2;
                        } else {
                            this.j = 5;
                        }
                    }
                    OpenSDKUtils.a(this.app, this, this.f26889d, this.j, this.f26855a, 2);
                    return;
                }
                List m777a = PstnUtils.m777a(this.app, this.f26898j, 3000);
                ArrayList arrayList = new ArrayList();
                if (m777a != null) {
                    int i3 = 0;
                    while (true) {
                        int i4 = i3;
                        if (i4 < m777a.size()) {
                            arrayList.add(((AVPhoneUserInfo) m777a.get(i4)).telInfo.mobile);
                            i3 = i4 + 1;
                        }
                    }
                }
                ChatActivityUtils.a(this.app, (Context) this, this.e, this.f26898j, true, true, true, (ChatActivityUtils.StartVideoListener) null, arrayList, 1, 2);
                ReportController.b(this.app, "dc01331", "", "", "0X8006407", "0X8006407", 1, 0, "", "", "", "");
                return;
            case R.id.f52594name_res_0x7f09158e:
                if (QLog.isColorLevel()) {
                    QLog.d(f26848c, 2, "qq_call_lightalk_download onclick");
                }
                Intent intent = new Intent(this, QQBrowserActivity.class);
                intent.putExtra("url", "http://laidian.qq.com");
                ReportController.b(this.app, "dc01331", "", "", "0X8004E97", "0X8004E97", 0, 0, "", "", "", "");
                startActivity(intent);
                return;
            case R.id.f52596name_res_0x7f091590:
            case R.id.f52600name_res_0x7f091594:
                switch (this.e) {
                    case 2016:
                    case AppConstants.VALUE.w:
                        return;
                    case 3000:
                        if (!this.f26875a) {
                            ReportController.b(this.app, "dc01331", "", "", "0X8004F92", "0X8004F92", 0, 0, "", "", "", "");
                            a();
                            return;
                        }
                        return;
                    default:
                        i();
                        ReportController.b(this.app, "dc01331", "", "", "0X8004F8C", "0X8004F8C", 0, 0, "", "", "", "");
                        return;
                }
            case R.id.f52605name_res_0x7f091599:
                int e2 = ((SVIPHandler) this.app.getBusinessHandler(13)).e();
                if (e2 == 2) {
                    i = 0;
                } else {
                    i = e2 == 3 ? 2 : e2;
                }
                Intent intent2 = new Intent(this, QQBrowserActivity.class);
                intent2.putExtra(VasWebviewConstants.INDIVIDUATION_URL_SOURCE_TYPE, VasWebviewConstants.REPORT_FROM_CALLDETAIL);
                VasWebviewUtil.openQQBrowserWithoutAD(this, IndividuationUrlHelper.a(this, "call", "mvip.gongneng.anroid.individuation.web"), 524288L, intent2, true, -1);
                ReportController.b(this.app, "dc01331", "", "", "0X8004A1F", "0X8004A1F", 0, 0, "" + i, "", "", "");
                return;
            case R.id.f52613name_res_0x7f0915a1:
                ReportController.b(this.app, "dc01331", "", this.f26889d, "Two_call", "Tc_msg_dinfo", 0, 0, "", "", "", "");
                if (this.e == 3000) {
                    ReportController.b(this.app, "dc01331", "", "", "0X8004F93", "0X8004F93", 0, 0, "", "", "", "");
                } else {
                    ReportController.b(this.app, "dc01331", "", "", "0X8004F8D", "0X8004F8D", 0, 0, "", "", "", "");
                }
                if (this.g == 2 || this.g == 3 || this.e == 25) {
                    this.f26869a.m7465b(this.f26889d, 8);
                } else {
                    this.f26869a.m7465b(this.f26889d, this.e);
                }
                b(true);
                this.f26874a.f77760a.clear();
                this.f26874a.notifyDataSetChanged();
                return;
            default:
                return;
        }
    }

    private String a(int i) {
        switch (i) {
            case 0:
                return "0";
            case 2:
                return "2";
            case 1004:
                return "1";
            case 1006:
                return "3";
            default:
                return ThemeUtil.DIY_THEME_ID;
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        if (this.app != null) {
            this.app.removeObserver(this.f26870a);
        }
        ChatActivityUtils.a();
        if (this.f26874a != null) {
            this.f26874a.f77760a = null;
            this.f26874a = null;
        }
        if (this.f26869a != null) {
            this.f26869a.deleteObserver(this);
        }
        ThreadManager.a(this.f26873a);
        this.f26873a = null;
        removeObserver(this.f26858a);
        removeObserver(this.f26856a);
        removeObserver(this.f26863a);
        removeObserver(this.f26868a);
    }

    @Override
    public void update(Observable observable, Object obj) {
        boolean z = false;
        if (this.f26874a != null && observable != null && (observable instanceof QCallFacade) && obj != null && (obj instanceof List)) {
            List list = (List) obj;
            if (list.isEmpty() || !(list.get(0) instanceof QCallRecord)) {
                return;
            }
            int i = 0;
            while (true) {
                if (i >= list.size()) {
                    break;
                } else if (list.get(i) instanceof QCallRecord) {
                    QCallRecord qCallRecord = (QCallRecord) list.get(i);
                    if (TextUtils.isEmpty(qCallRecord.friendUin) || !qCallRecord.friendUin.equals(this.f26889d) || qCallRecord.uinType != this.e) {
                        i++;
                    } else {
                        z = true;
                        break;
                    }
                } else {
                    return;
                }
            }
        }
    }

    @Override
    public void doOnActivityResult(int i, int i2, Intent intent) {
        super.doOnActivityResult(i, i2, intent);
        if (i2 == -1) {
            switch (i) {
                case 110:
                    if (intent != null) {
                        String stringExtra = intent.getStringExtra("roomId");
                        if (!TextUtils.isEmpty(stringExtra)) {
                            ChatActivityUtils.a(this.app, (Context) this, 3000, stringExtra, true, true, true, (ChatActivityUtils.StartVideoListener) null, (ArrayList) intent.getStringArrayListExtra("qqPhoneUserList"), 1, 2);
                            ReportController.b(this.app, "dc01331", "", "", "0X8006407", "0X8006407", 1, 0, "", "", "", "");
                            return;
                        }
                        return;
                    }
                    return;
                case 2000:
                    boolean z = false;
                    if (intent != null && intent.getExtras() != null) {
                        z = intent.getExtras().getBoolean(AppConstants.Key.co);
                    }
                    if (z) {
                        finish();
                        return;
                    }
                    return;
                default:
                    return;
            }
        }
    }

    public boolean a(String str) {
        return ((FriendsManager) this.app.getManager(50)).m4354b(str);
    }

    private void i() {
        if (this.f == 1024) {
            Intent intent = new Intent(this, EqqAccountDetailActivity.class);
            intent.putExtra("uin", this.f26889d);
            intent.putExtra("uintype", 1024);
            startActivityForResult(intent, 2000);
        } else if (this.f == 1008) {
            Intent intent2 = new Intent(this, AccountDetailActivity.class);
            intent2.putExtra("uin", this.f26889d);
            intent2.putExtra("uintype", 1008);
            intent2.putExtra("source", 113);
            startActivityForResult(intent2, 2000);
        } else {
            ProfileActivity.AllInOne allInOne = new ProfileActivity.AllInOne(this.f26889d, 46);
            allInOne.f10517a = 19;
            allInOne.f10533h = ContactUtils.m9104a(this.app, this.f26889d);
            switch (this.f) {
                case 0:
                    allInOne.f10517a = 1;
                    break;
                case 1:
                    allInOne.f10517a = 20;
                    break;
                case 25:
                    j();
                    return;
                case 26:
                    if (!TextUtils.isEmpty(this.l)) {
                        if (this.l.equals("0")) {
                            allInOne.f10517a = 34;
                            break;
                        } else {
                            allInOne.f10517a = 1;
                            allInOne.f10519a = this.l;
                            allInOne.f10533h = ContactUtils.m9104a(this.app, this.l);
                            break;
                        }
                    } else {
                        return;
                    }
                case 1000:
                    allInOne.f10517a = 22;
                    allInOne.f10529d = this.f26891e;
                    break;
                case 1001:
                    allInOne.f10517a = 42;
                    break;
                case 1003:
                    allInOne.f10517a = 70;
                    break;
                case 1004:
                    allInOne.f10517a = 47;
                    allInOne.f10530e = this.f26891e;
                    break;
                case 1005:
                    allInOne.f10517a = 2;
                    break;
                case 1006:
                case 4000:
                    allInOne.f10517a = 34;
                    break;
                case 1009:
                    allInOne.f10517a = 57;
                    break;
                case 1010:
                    allInOne.f10517a = 76;
                    break;
                case 1020:
                    allInOne.f10517a = 58;
                    break;
                case 1022:
                    allInOne.f10517a = 27;
                    break;
                case 1023:
                    allInOne.f10517a = 74;
                    break;
            }
            if (this.f == 1001 || this.f == 1010) {
                if (this.f == 1001) {
                    allInOne.g = 12;
                } else if (this.f == 1010) {
                    allInOne.g = 13;
                }
            } else if (this.f == 1006) {
                ProfileActivity.AllInOne allInOne2 = new ProfileActivity.AllInOne(this.f26889d, 34);
                allInOne2.g = 65;
                allInOne2.f10533h = this.f26893f;
                ProfileActivity.c(getActivity(), allInOne2);
            } else {
                ProfileActivity.b(this, allInOne);
            }
        }
    }

    private void j() {
        ProfileActivity.AllInOne allInOne = new ProfileActivity.AllInOne(this.f26889d, 80);
        QCallCardInfo a2 = ((QCallCardManager) this.app.getManager(139)).a(this.f26889d);
        PhoneContactManager phoneContactManager = (PhoneContactManager) this.app.getManager(10);
        PhoneContact c2 = (phoneContactManager == null || this.f26896h == null) ? null : phoneContactManager.c(this.f26896h);
        if (a2 != null) {
            allInOne.f10533h = a2.nickname;
            allInOne.f85249a = (byte) a2.gender;
            if (QLog.isColorLevel()) {
                QLog.i("startQCallProfileCardActivity ", 2, "QCallCardInfo.uin = " + a2.uin + "QCallCardInfo.nickname = " + a2.nickname + "mPhoneNumber = " + this.f26896h + "mFriendUin = " + this.f26889d);
            }
        }
        if (c2 != null) {
            allInOne.f10533h = c2.name;
        }
        if ((c2 != null || a2 != null) && this.f26896h != null) {
            allInOne.f10517a = 80;
            ProfileActivity.CardContactInfo cardContactInfo = new ProfileActivity.CardContactInfo(MainFragment.f10200g, this.f26896h, "");
            if (allInOne.f10520a == null) {
                allInOne.f10520a = new ArrayList();
                allInOne.f10520a.add(cardContactInfo);
            }
            ProfileActivity.b(this.app.getApplication().getApplicationContext(), allInOne);
            if (this.e == 25) {
                ReportController.b(null, "dc01331", "", "", "0X8006251", "0X8006251", 0, 0, "", "", "", "");
            } else if (this.e == 24 || this.g == 2 || this.g == 3) {
                ReportController.b(null, "dc01331", "", "", "0X8006250", "0X8006250", 0, 0, "", "", "", "");
            }
        }
    }

    public void a() {
        Intent intent = new Intent(this, DiscussionInfoCardActivity.class);
        intent.putExtra("uin", this.f26889d);
        intent.putExtra(AppConstants.Key.h, this.f26893f);
        intent.putExtra("uintype", this.f);
        startActivityForResult(intent, 2000);
    }

    public void m7450a(String str) {
        DiscussionManager discussionManager;
        DiscussionInfo m4254a;
        int a2;
        String str2;
        if (!isFinishing() && (discussionManager = (DiscussionManager) this.app.getManager(52)) != null && (m4254a = discussionManager.m4254a(str)) != null && m4254a.discussionName != null) {
            if (this.f26867a == null || this.f26867a.m7423a() != 1) {
                this.f26893f = m4254a.discussionName;
                this.f26851a.setImageDrawable(FaceDrawable.a(this.app, 101, str));
                a2 = discussionManager.a(str);
            } else {
                this.f26893f = ContactUtils.e(this.app, str);
                int a3 = ContactUtils.a(this.app, str);
                Drawable a4 = FaceDrawable.a(1001, 3);
                FaceDrawable a5 = FaceDrawable.a(this.app, 1001, this.f26889d, 1, a4, (Drawable) null);
                if (a5 == null) {
                    a5 = FaceDrawable.a(this.app, 101, this.f26889d, 1, a4, a4);
                }
                this.f26851a.setImageDrawable(a5);
                a2 = a3;
            }
            this.f26886c.setText(this.f26893f);
            if (a2 <= 0) {
                str2 = "";
            } else {
                str2 = UnifiedTraceRouter.e + a2 + UnifiedTraceRouter.f;
            }
            this.f26888d.setText(str2);
        }
    }
}