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

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


package com.tencent.mobileqq.activity;

import NS_MOBILE_FEEDS.e_attribute;
import SecurityAccountServer.RespondQueryQQBindingStat;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.SystemClock;
import android.preference.PreferenceManager;
import android.support.v4.app.FragmentActivity;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.style.URLSpan;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.sixgod.pluginsdk.common.Constants;
import com.tencent.av.VideoClientReportConstants;
import com.tencent.av.VideoConstants;
import com.tencent.av.VideoController;
import com.tencent.av.app.PstnSessionInfo;
import com.tencent.av.config.ConfigSystemImpl;
import com.tencent.av.core.VcSystemInfo;
import com.tencent.av.gaudio.AVNotifyCenter;
import com.tencent.av.gaudio.AVPhoneUserInfo;
import com.tencent.av.guild.GuildMultiActivity;
import com.tencent.av.random.ui.RandomDoubleActivity;
import com.tencent.av.random.ui.RandomMultiActivity;
import com.tencent.av.ui.AVActivity;
import com.tencent.av.ui.AVLoadingDialogActivity;
import com.tencent.av.ui.CallbackWaitingActivityExt;
import com.tencent.av.ui.VideoInviteFull;
import com.tencent.av.ui.VideoInviteLock;
import com.tencent.av.utils.DataReport;
import com.tencent.av.utils.GVideoUpdateUtil;
import com.tencent.av.utils.ImageResUtil;
import com.tencent.av.utils.InviteBaseData;
import com.tencent.av.utils.PopupDialog;
import com.tencent.av.utils.PstnUtils;
import com.tencent.av.utils.TroopMemberUtil;
import com.tencent.av.utils.UITools;
import com.tencent.av.utils.VideoMsgTools;
import com.tencent.av.utils.download.BaseDownloadAsyncTask;
import com.tencent.av.utils.download.DownloadParams;
import com.tencent.biz.anonymous.AnonymousChatHelper;
import com.tencent.biz.common.offline.HtmlOffline;
import com.tencent.biz.eqq.CrmUtils;
import com.tencent.biz.game.LauchGameAppListHelper;
import com.tencent.biz.pubaccount.PublicAccountBrowser;
import com.tencent.common.app.AppInterface;
import com.tencent.common.app.BaseApplicationImpl;
import com.tencent.mobileqq.activity.aio.AIOUtils;
import com.tencent.mobileqq.activity.aio.ChatItemBuilder;
import com.tencent.mobileqq.activity.aio.MediaPlayerManager;
import com.tencent.mobileqq.activity.aio.PlusPanelUtils;
import com.tencent.mobileqq.activity.aio.SessionInfo;
import com.tencent.mobileqq.activity.aio.item.ReplyTextItemBuilder;
import com.tencent.mobileqq.activity.aio.rebuild.StrangerChatPie;
import com.tencent.mobileqq.activity.contact.addcontact.AddContactsActivity;
import com.tencent.mobileqq.activity.photo.PhotoPreviewActivity;
import com.tencent.mobileqq.activity.photo.PhotoUtils;
import com.tencent.mobileqq.activity.photo.SendPhotoActivity;
import com.tencent.mobileqq.activity.photopreview.PhotoPreviewConstant;
import com.tencent.mobileqq.activity.selectmember.PhoneContactSelectActivity;
import com.tencent.mobileqq.app.AppConstants;
import com.tencent.mobileqq.app.BaseActivity;
import com.tencent.mobileqq.app.DiscussionHandler;
import com.tencent.mobileqq.app.DiscussionManager;
import com.tencent.mobileqq.app.FriendListHandler;
import com.tencent.mobileqq.app.FriendsManager;
import com.tencent.mobileqq.app.HotChatManager;
import com.tencent.mobileqq.app.LBSHandler;
import com.tencent.mobileqq.app.PhoneContactManagerImp;
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.app.TroopManager;
import com.tencent.mobileqq.app.automator.StepFactory;
import com.tencent.mobileqq.app.message.MsgProxyUtils;
import com.tencent.mobileqq.app.proxy.RecentUserProxy;
import com.tencent.mobileqq.camera.utils.CameraUtils;
import com.tencent.mobileqq.data.ChatMessage;
import com.tencent.mobileqq.data.DiscussionInfo;
import com.tencent.mobileqq.data.DiscussionMemberInfo;
import com.tencent.mobileqq.data.Friends;
import com.tencent.mobileqq.data.MessageForLongMsg;
import com.tencent.mobileqq.data.MessageForMixedMsg;
import com.tencent.mobileqq.data.MessageForReplyText;
import com.tencent.mobileqq.data.MessageForText;
import com.tencent.mobileqq.data.MessageRecord;
import com.tencent.mobileqq.data.PhoneContact;
import com.tencent.mobileqq.data.RecentUser;
import com.tencent.mobileqq.data.RecommendCommonMessage;
import com.tencent.mobileqq.data.TroopInfo;
import com.tencent.mobileqq.data.TroopMemberInfo;
import com.tencent.mobileqq.magicface.magicfaceaction.ActionGlobalData;
import com.tencent.mobileqq.managers.ShieldMsgManger;
import com.tencent.mobileqq.model.PhoneContactManager;
import com.tencent.mobileqq.phone.PhoneNumberUtil;
import com.tencent.mobileqq.qcall.LightalkShieldHandler;
import com.tencent.mobileqq.qcall.LightalkShieldManager;
import com.tencent.mobileqq.qcall.LightalkSwitchHanlder;
import com.tencent.mobileqq.qcall.LightalkSwitchManager;
import com.tencent.mobileqq.qcall.PstnCardInfo;
import com.tencent.mobileqq.qcall.PstnManager;
import com.tencent.mobileqq.qcall.QCallFacade;
import com.tencent.mobileqq.qcall.UinUtils;
import com.tencent.mobileqq.service.friendlist.FriendListContants;
import com.tencent.mobileqq.service.message.MessageUtils;
import com.tencent.mobileqq.service.troop.TroopConstants;
import com.tencent.mobileqq.shortvideo.ShortVideoConstants;
import com.tencent.mobileqq.statistics.ReportController;
import com.tencent.mobileqq.statistics.StatisticCollector;
import com.tencent.mobileqq.structmsg.AbsShareMsg;
import com.tencent.mobileqq.structmsg.AbsStructMsgItem;
import com.tencent.mobileqq.structmsg.StructMsgElementFactory;
import com.tencent.mobileqq.structmsg.StructMsgForGeneralShare;
import com.tencent.mobileqq.text.QQText;
import com.tencent.mobileqq.theme.ThemeUtil;
import com.tencent.mobileqq.troop.utils.HttpWebCgiAsyncTask;
import com.tencent.mobileqq.troop.utils.TroopBarUtils;
import com.tencent.mobileqq.troop.utils.TroopBusinessUtil;
import com.tencent.mobileqq.utils.AlbumConstants;
import com.tencent.mobileqq.utils.AppShareIDUtil;
import com.tencent.mobileqq.utils.AudioHelper;
import com.tencent.mobileqq.utils.Base64Util;
import com.tencent.mobileqq.utils.ContactUtils;
import com.tencent.mobileqq.utils.DialogUtil;
import com.tencent.mobileqq.utils.FileUtils;
import com.tencent.mobileqq.utils.HexUtil;
import com.tencent.mobileqq.utils.ImageUtil;
import com.tencent.mobileqq.utils.JumpAction;
import com.tencent.mobileqq.utils.NetworkUtil;
import com.tencent.mobileqq.utils.QAVHrMeeting;
import com.tencent.mobileqq.utils.QQCustomDialog;
import com.tencent.mobileqq.utils.QQUtils;
import com.tencent.mobileqq.utils.TimeFormatterUtils;
import com.tencent.mobileqq.widget.IndexView;
import com.tencent.mobileqq.widget.QQProgressDialog;
import com.tencent.mobileqq.widget.QQToast;
import com.tencent.mobileqq.widget.QQToastNotifier;
import com.tencent.mobileqq.widget.StatableSpanTextView;
import com.tencent.qidian.QidianManager;
import com.tencent.qphone.base.util.BaseApplication;
import com.tencent.qphone.base.util.QLog;
import com.tencent.tim.R;
import com.tencent.util.IOUtils;
import cooperation.peak.PeakConstants;
import cooperation.qzone.QZoneHelper;
import java.io.File;
import java.security.MessageDigest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import mqq.app.AppRuntime;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class ChatActivityUtils {
    public static final long f84954a = 55901189;
    private static AddFriendSpan f8600a = null;
    static QQCustomDialog f8601a = null;
    private static QQProgressDialog f8602a = null;
    public static QQToastNotifier f8603a = null;
    public static final String f8604a = "ChatActivityUtils";
    private static ConcurrentHashMap f8605a = null;
    private static final char[] f8606a = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
    public static final long f84955b = 2274034950L;
    public static final String f8607b = "MultiAVType";
    public static final long f84956c = 2223703302L;
    public static final String f8608c = "isVideo";
    public static final long d = 274201605;
    public static final String f8609d = "forceShowInviteBox";
    public static final long e = 440495416;
    public static final String f8610e = "enableInvite";
    public static final String f = "uin";
    public static final String g = "relationType";
    public static final String h = "uinType";
    public static final String i = "disableInvite";
    public static final String j = "MeetingStasks";
    public static final String k = "MeetingConfID";
    public static final String l = "ConfAppID";
    public static final String m = "sendToVideo";
    public static final String n = "http://m.qzone.com";
    public static final String o = "http://mobile.qzone.qq.com";

    public interface OnDownloadAsyncTaskListener {
        void a(int i, int i2);
    }

    public interface StartVideoListener {
        void a();

        void b();

        void c();
    }

    public static final String a(Activity activity) {
        return activity.getClass().getName() + "_" + activity.hashCode();
    }

    public static void a(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo, int i2, Intent intent, int i3, boolean z) {
        Uri uri = null;
        String str = null;
        if (i2 == 1) {
            String string = PreferenceManager.getDefaultSharedPreferences(activity).getString(AppConstants.Preferences.aU, "");
            if (!string.equalsIgnoreCase("")) {
                if (i3 == 1) {
                    BaseApplication.getContext().getSharedPreferences(PeakConstants.cl, Build.VERSION.SDK_INT > 10 ? 4 : 0).edit().putString(PeakConstants.cp, string).commit();
                }
                uri = Uri.fromFile(new File(string));
            }
            PreferenceManager.getDefaultSharedPreferences(activity).edit().remove(AppConstants.Preferences.aU).commit();
            if (uri != null) {
                String c2 = ImageUtil.c(activity, uri);
                if (c2 != null) {
                    ImageUtil.m9202a((Context) activity, c2);
                    if (!FileUtils.e(c2)) {
                        QQToast.a(activity, activity.getString(R.string.f64076name_res_0x7f0a162b), 0).b(activity.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                        return;
                    } else if (!new File(c2).exists()) {
                        QQToast.a(activity, activity.getString(R.string.f64077name_res_0x7f0a162c), 0).b(activity.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                        return;
                    } else {
                        str = c2;
                    }
                } else {
                    QQToast.a(activity, activity.getString(R.string.f64077name_res_0x7f0a162c), 0).b(activity.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                    return;
                }
            } else {
                return;
            }
        }
        Intent intent2 = new Intent();
        if (qQAppInterface != null) {
            String account = qQAppInterface.getAccount();
            Friends m4355c = ((FriendsManager) qQAppInterface.getManager(50)).m4355c(account);
            intent2.putExtra(PeakConstants.aN, account);
            if (m4355c != null) {
                intent2.putExtra(PeakConstants.aO, m4355c.name);
            }
        }
        intent2.putExtra("uin", sessionInfo.f12447a);
        intent2.putExtra("uintype", sessionInfo.f85624a);
        intent2.putExtra("troop_uin", sessionInfo.f12448b);
        intent2.putExtra(AppConstants.Key.h, sessionInfo.f12450d);
        intent2.putExtra("entrance", sessionInfo.f85626c);
        intent2.putExtra("is_anonymous", AnonymousChatHelper.a().m897a(sessionInfo.f12447a));
        boolean z2 = false;
        int i4 = -1;
        if (intent != null) {
            int intExtra = intent.getIntExtra(CameraUtils.Constant.d, 1);
            int intExtra2 = intent.getIntExtra(CameraUtils.Constant.e, 0);
            int intExtra3 = intent.getIntExtra(CameraUtils.Constant.f, -1);
            int intExtra4 = intent.getIntExtra(CameraUtils.Constant.g, -1);
            intent2.putExtra(CameraUtils.Constant.d, intExtra);
            intent2.putExtra(CameraUtils.Constant.e, intExtra2);
            intent2.putExtra(CameraUtils.Constant.f, intExtra3);
            intent2.putExtra(CameraUtils.Constant.g, intExtra4);
            if (intExtra == 103) {
                z2 = true;
                i4 = 100012;
            }
        }
        if (!SplashActivity.class.isInstance(activity) && !ChatActivity.class.isInstance(activity)) {
            intent2.putExtras(activity.getIntent());
        } else {
            if (activity instanceof SplashActivity) {
                intent2.putExtra("PhotoConst.INIT_ACTIVITY_CLASS_NAME", SplashActivity.class.getName());
                intent2 = AIOUtils.a(intent2, (int[]) null);
            } else if (activity instanceof ChatActivity) {
                intent2.putExtra("PhotoConst.INIT_ACTIVITY_CLASS_NAME", ChatActivity.class.getName());
            }
            intent2.putExtra("PhotoConst.INIT_ACTIVITY_PACKAGE_NAME", "com.tencent.tim");
            if (sessionInfo.f85624a == 9501) {
                if (activity instanceof SplashActivity) {
                    intent2.putExtra(PeakConstants.f69373M, SplashActivity.class.getName());
                    intent2 = AIOUtils.a(intent2, (int[]) null);
                } else {
                    intent2.putExtra(PeakConstants.f69373M, ChatActivity.class.getName());
                }
                intent2.putExtra(AlbumConstants.i, 82);
                intent2.putExtra(PeakConstants.f69374N, "com.tencent.tim");
                intent2.putExtra(PeakConstants.aF, false);
            } else {
                intent2.putExtra(PeakConstants.f69373M, SendPhotoActivity.class.getName());
                intent2.putExtra(PeakConstants.f69374N, "com.tencent.tim");
                intent2.putExtra(PeakConstants.aF, true);
            }
        }
        if (i3 != -1) {
            if (i3 == 8) {
                if (qQAppInterface != null) {
                    PlusPanelUtils.a(intent2, sessionInfo, qQAppInterface);
                }
                intent2.putExtra(PhotoPreviewConstant.f14784l, true);
                intent2.putExtra("FROM_WHERE", PhotoPreviewActivity.d);
                intent2.putExtra("PhotoConst.SEND_BUSINESS_TYPE", 1037);
            } else if (i3 == 1) {
                if (qQAppInterface != null) {
                    PlusPanelUtils.a(intent2, sessionInfo, qQAppInterface);
                }
                intent2.putExtra("FROM_WHERE", PhotoPreviewActivity.f86365c);
                intent2.putExtra("PhotoConst.SEND_BUSINESS_TYPE", 1008);
            }
        }
        if (intent != null) {
            boolean booleanExtra = intent.getBooleanExtra("PhotoConst.IS_SINGLE_MODE", false);
            int intExtra5 = intent.getIntExtra("PhotoConst.SEND_BUSINESS_TYPE", -1);
            intent2.putExtra("PhotoConst.IS_SINGLE_MODE", booleanExtra);
            if (intExtra5 == 1039) {
                intent2.putExtra("PhotoConst.SEND_BUSINESS_TYPE", 1039);
            }
            if (intExtra5 == 1040) {
                intent2.putExtra("PhotoConst.SEND_BUSINESS_TYPE", 1040);
            }
            PhotoUtils.a(intent, intent2);
        }
        ArrayList<String> arrayList = new ArrayList<>();
        arrayList.add(str);
        intent2.putStringArrayListExtra("PhotoConst.PHOTO_PATHS", arrayList);
        intent2.putExtra(PeakConstants.f69410ax, true);
        intent2.putExtra(PeakConstants.aM, z);
        intent2.setClass(activity, PhotoPreviewActivity.class);
        intent2.addFlags(603979776);
        if (z2) {
            activity.startActivityForResult(intent2, i4);
        } else {
            activity.startActivity(intent2);
        }
    }

    public static void a(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo, int i2, Intent intent, int i3) {
        a(qQAppInterface, activity, sessionInfo, i2, intent, i3, true);
    }

    public static void a(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo) {
        LauchGameAppListHelper.a(qQAppInterface, activity, sessionInfo);
    }

    public static void b(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo) {
        Intent intent;
        if (sessionInfo.f85624a == 0) {
            intent = new Intent(activity, ChatHistoryForC2C.class);
        } else {
            intent = new Intent(activity, ChatHistory.class);
        }
        intent.addFlags(536870912);
        intent.putExtra("uin", sessionInfo.f12447a);
        intent.putExtra("uintype", sessionInfo.f85624a);
        intent.putExtra("FriendNick", sessionInfo.f12450d);
        activity.startActivityForResult(intent, 0);
    }

    public static boolean a(TroopMemberInfo troopMemberInfo) {
        return (troopMemberInfo.alias != null && troopMemberInfo.alias.length() > 0) || !(troopMemberInfo.memberuin == null || troopMemberInfo.memberuin.trim().length() <= 0 || troopMemberInfo.memberuin.trim().equalsIgnoreCase(String.valueOf(0)));
    }

    public static boolean m2392a(String str) {
        return (str == null || str.trim().length() <= 0 || str.trim().equals(String.valueOf(0))) ? false : true;
    }

    public static boolean m2391a(QQAppInterface qQAppInterface, String str) {
        return ((FriendsManager) qQAppInterface.getManager(50)).m4354b(str);
    }

    public static boolean a(QQAppInterface qQAppInterface, Context context, int i2, String str, String str2, String str3, boolean z, String str4, boolean z2, boolean z3, StartVideoListener startVideoListener, String str5) {
        return a(qQAppInterface, context, i2, str, str2, str3, z, str4, z2, z3, startVideoListener, str5, (Map) null);
    }

    private static String a(byte[] bArr) {
        StringBuffer stringBuffer = new StringBuffer();
        int i2 = 0;
        while (true) {
            int i3 = i2;
            if (i3 < 16) {
                int i4 = bArr[i3];
                if (i4 < 0) {
                    i4 += 256;
                }
                stringBuffer.append(f8606a[i4 >>> 4]);
                stringBuffer.append(f8606a[i4 % 16]);
                i2 = i3 + 1;
            } else {
                return stringBuffer.toString();
            }
        }
    }

    public static String a(String str, int i2) {
        MessageDigest messageDigest = MessageDigest.getInstance("MD5");
        return i2 == 16 ? a(messageDigest.digest(str.getBytes("utf-8"))).substring(8, 24) : a(messageDigest.digest(str.getBytes("utf-8")));
    }

    static String a(QQAppInterface qQAppInterface, String str) {
        try {
            String[] split = str.replace(IndexView.f95330c, "").split(",");
            byte[] bArr = new byte[split.length];
            for (int i2 = 0; i2 < split.length; i2++) {
                bArr[i2] = Byte.parseByte(split[i2].trim());
            }
            byte[] a2 = a(bArr, a(qQAppInterface.getCurrentAccountUin() + "MasPlay", 32).getBytes("UTF-8"));
            if (a2 != null) {
                return new String(a2, "UTF-8").replace(IndexView.f35472a, "");
            }
            return null;
        } catch (Exception e2) {
            return null;
        }
    }

    public static String m2387a(String str, String str2) {
        try {
            String[] split = str2.replace(IndexView.f95330c, "").split(",");
            byte[] bArr = new byte[split.length];
            for (int i2 = 0; i2 < split.length; i2++) {
                bArr[i2] = Byte.parseByte(split[i2].trim());
            }
            byte[] a2 = a(bArr, a(str + "MasPlay", 32).getBytes("UTF-8"));
            if (a2 != null) {
                return new String(a2, "UTF-8").replace(IndexView.f35472a, "");
            }
            return null;
        } catch (Exception e2) {
            return null;
        }
    }

    public static String a(String str, byte[] bArr) {
        try {
            byte[] a2 = a(bArr, a(str + "MasPlay", 32).getBytes("UTF-8"));
            if (a2 != null) {
                return new String(a2, "UTF-8").replace(IndexView.f35472a, "");
            }
            return null;
        } catch (Exception e2) {
            return null;
        }
    }

    public static byte[] a(byte[] bArr, byte[] bArr2) {
        try {
            byte[] bArr3 = new byte[16];
            for (int i2 = 0; i2 < 16; i2++) {
                bArr3[i2] = bArr2[i2];
            }
            SecretKeySpec secretKeySpec = new SecretKeySpec(bArr3, "AES");
            Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding");
            cipher.init(2, secretKeySpec);
            return cipher.doFinal(bArr);
        } catch (Exception e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public static String b(String str, String str2) {
        try {
            int length = str2.length();
            if (length < 16) {
                int i2 = 16 - length;
                for (int i3 = 0; i3 < i2; i3++) {
                    str2 = str2 + IndexView.f35472a;
                }
            } else if (length > 16) {
                return null;
            }
            byte[] bytes = a(str + "MasPlay", 32).getBytes("UTF-8");
            byte[] bArr = new byte[16];
            for (int i4 = 0; i4 < 16; i4++) {
                bArr[i4] = bytes[i4];
            }
            SecretKeySpec secretKeySpec = new SecretKeySpec(bArr, "AES");
            Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding");
            cipher.init(1, secretKeySpec);
            byte[] doFinal = cipher.doFinal(str2.getBytes("utf-8"));
            StringBuffer stringBuffer = new StringBuffer();
            if (doFinal.length > 0) {
                stringBuffer.append((int) doFinal[0]);
                for (int i5 = 1; i5 < doFinal.length; i5++) {
                    stringBuffer.append(",");
                    stringBuffer.append((int) doFinal[i5]);
                }
            }
            return stringBuffer.toString();
        } catch (Exception e2) {
            return null;
        }
    }

    public static String a(String str) {
        if (str == null || "".equals(str) || str.length() == 0) {
            return null;
        }
        try {
            return new String(Base64Util.decode(str, 0));
        } catch (Exception e2) {
            return null;
        }
    }

    public static boolean a(QQAppInterface qQAppInterface, Context context, PstnSessionInfo pstnSessionInfo, int i2) {
        return a(qQAppInterface, context, pstnSessionInfo, i2, (StartVideoListener) null, true);
    }

    public static boolean a(QQAppInterface qQAppInterface, Context context, PstnSessionInfo pstnSessionInfo, int i2, StartVideoListener startVideoListener, boolean z) {
        boolean z2;
        boolean z3;
        if (QLog.isColorLevel()) {
            QLog.d(f8604a, 2, new StringBuilder().append("startPstnC2CCall|pstnSession=").append(pstnSessionInfo).toString() == null ? AppConstants.dF : pstnSessionInfo.toString() + ", from=" + i2);
        }
        if (!NetworkUtil.h(context)) {
            QQToast.a(context, 0, (int) R.string.f63380name_res_0x7f0a1373, 0).m9833a();
            return false;
        }
        if (qQAppInterface.m4707d()) {
            boolean z4 = true;
            if (qQAppInterface.m4621a().m405a().f81238b != -1) {
                String str = qQAppInterface.m4621a().m405a().f924a;
                if (TextUtils.isEmpty(pstnSessionInfo.f924a) || TextUtils.isEmpty(str) || !str.equals(pstnSessionInfo.f924a)) {
                    z3 = true;
                } else {
                    z3 = false;
                }
                if (z3) {
                    String str2 = (String) PhoneNumberUtil.m7266a(pstnSessionInfo.f925b).get(1);
                    String str3 = (String) PhoneNumberUtil.m7266a(qQAppInterface.m4621a().m405a().f925b).get(1);
                    if (!TextUtils.isEmpty(str2) && !TextUtils.isEmpty(str3) && str2.equals(str3)) {
                        z4 = false;
                    }
                }
                z4 = z3;
            }
            if (z4) {
                QQToast.a(context, (int) R.string.f59806name_res_0x7f0a057a, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                return false;
            }
        }
        if (!TextUtils.isEmpty(pstnSessionInfo.f926c) && !TextUtils.isEmpty(pstnSessionInfo.f925b) && (pstnSessionInfo.f926c.equals(pstnSessionInfo.f925b) || pstnSessionInfo.f926c.contains(pstnSessionInfo.f925b))) {
            QQToast.a(context, (int) R.string.f60198name_res_0x7f0a0702, 0).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
            return false;
        }
        String b2 = PstnUtils.b(qQAppInterface, 1);
        String c2 = PstnUtils.c(qQAppInterface, 1);
        String d2 = PstnUtils.d(qQAppInterface, 1);
        if (PstnUtils.m778a(qQAppInterface, 1)) {
            if (PstnUtils.m780b(qQAppInterface, 1) && z) {
                DialogUtil.a(context, 230, "时长不足", PstnUtils.a(qQAppInterface, 1), "购买时长", "继续拨打", new jll(qQAppInterface, context, pstnSessionInfo, i2, startVideoListener), new jlw(qQAppInterface, context, startVideoListener)).show();
                return false;
            }
            if (context instanceof BaseActivity) {
                if (!PstnUtils.a(qQAppInterface, (BaseActivity) context, 2002, (i2 == 4 || i2 == 5) ? false : true)) {
                    Intent intent = new Intent(context, CallbackWaitingActivityExt.class);
                    if (i2 == 7) {
                        intent.addFlags(e_attribute._IsFrdCommentFamousFeed);
                    }
                    intent.putExtra(PstnUtils.f3020a, pstnSessionInfo);
                    context.startActivity(intent);
                }
            } else if (!PstnUtils.a(qQAppInterface, context)) {
                Intent intent2 = new Intent(context, CallbackWaitingActivityExt.class);
                if (i2 == 7) {
                    intent2.addFlags(e_attribute._IsFrdCommentFamousFeed);
                }
                intent2.putExtra(PstnUtils.f3020a, pstnSessionInfo);
                context.startActivity(intent2);
            }
            if (startVideoListener != null) {
                startVideoListener.c();
            }
            return true;
        }
        if (i2 == 3 || i2 == 5) {
            if (pstnSessionInfo.f81237a != 0 || ((PhoneContactManager) qQAppInterface.getManager(10)).mo4524a(pstnSessionInfo.f924a) == null) {
                z2 = false;
            } else {
                z2 = true;
            }
            if (z2) {
                DialogUtil.a(context, b2, c2, d2, (DialogInterface.OnClickListener) new jmh(qQAppInterface, context, i2), context.getString(R.string.f60176name_res_0x7f0a06ec), (DialogInterface.OnClickListener) new jmv(qQAppInterface, context, pstnSessionInfo, i2)).show();
            } else {
                DialogUtil.a(context, 230, b2, c2, context.getString(R.string.f59618name_res_0x7f0a04be), d2, new jnf(qQAppInterface, context, i2), new jng(qQAppInterface, i2)).show();
            }
        } else {
            PstnUtils.a(qQAppInterface, context, 1, 8);
        }
        return false;
    }

    public static boolean a(QQAppInterface qQAppInterface, Context context, int i2, String str, String str2, String str3, boolean z, String str4, boolean z2, boolean z3, StartVideoListener startVideoListener, Map map, int i3, boolean z4) {
        if (!NetworkUtil.h(context)) {
            QQToast.a(context, 0, (int) R.string.f63380name_res_0x7f0a1373, 0).m9833a();
            return false;
        }
        PhoneContactManager phoneContactManager = (PhoneContactManager) qQAppInterface.getManager(10);
        RespondQueryQQBindingStat mo4523a = phoneContactManager.mo4523a();
        if (mo4523a != null) {
            String str5 = mo4523a.mobileNo;
            String str6 = mo4523a.nationCode + mo4523a.mobileNo;
            if ((!TextUtils.isEmpty(str5) && str5.equals(str3)) || (!TextUtils.isEmpty(str6) && str6.equals(str3))) {
                QQToast.a(context, (int) R.string.f60198name_res_0x7f0a0702, 0).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                return false;
            }
        }
        PstnManager pstnManager = (PstnManager) qQAppInterface.getManager(142);
        PstnCardInfo m7425a = pstnManager.m7425a(qQAppInterface.getCurrentAccountUin());
        boolean z5 = m7425a != null && m7425a.pstn_c2c_call_time > 0;
        if (z4 && i2 == 0 && !pstnManager.m7429a() && PstnUtils.m778a(qQAppInterface, 1) && a(qQAppInterface, i2, str) && z5) {
            String string = qQAppInterface.getApplication().getResources().getString(R.string.f66359name_res_0x7f0a1f1b);
            String string2 = qQAppInterface.getApplication().getResources().getString(R.string.f66360name_res_0x7f0a1f1c);
            String m7428a = pstnManager.m7428a(PstnManager.v);
            String m7428a2 = pstnManager.m7428a(PstnManager.w);
            DialogUtil.a(context, 230, "确认呼叫方式", TextUtils.isEmpty(m7428a) ? string : m7428a, TextUtils.isEmpty(m7428a2) ? string2 : m7428a2, "取消", "呼叫", (DialogInterface.OnClickListener) null, (DialogInterface.OnClickListener) new jnh(pstnManager, qQAppInterface, context, i2, str, str2, str3, z, str4, z2, z3, startVideoListener, map, i3), (DialogInterface.OnClickListener) new jni(startVideoListener, qQAppInterface)).show();
            return false;
        } else if (i2 == 3 || i2 == 4 || i2 == 1006 || i2 == 56938 || i2 == 5 || (i2 == 0 && a(qQAppInterface, i2, str))) {
            PstnSessionInfo pstnSessionInfo = new PstnSessionInfo();
            pstnSessionInfo.f81237a = i2;
            if (i2 == 5) {
                pstnSessionInfo.f924a = str.substring("pstn".length());
                pstnSessionInfo.f81237a = AppConstants.VALUE.w;
            } else {
                pstnSessionInfo.f924a = str;
            }
            if (TextUtils.isEmpty(str3)) {
                PhoneContact mo4524a = phoneContactManager.mo4524a(str);
                if (mo4524a != null) {
                    pstnSessionInfo.f925b = mo4524a.unifiedCode;
                }
            } else {
                pstnSessionInfo.f925b = str3;
            }
            pstnSessionInfo.d = str2;
            if (mo4523a != null) {
                pstnSessionInfo.f926c = mo4523a.nationCode + mo4523a.mobileNo;
            }
            return a(qQAppInterface, context, pstnSessionInfo, i3, startVideoListener, true);
        } else if (i2 == 0) {
            return a(qQAppInterface, context, i2, str, str2, str3, z, str4, z2, z3, startVideoListener, VideoConstants.f770aZ, map);
        } else {
            if (QLog.isColorLevel()) {
                QLog.i(f8604a, 2, "startC2CCall| type is wrong.");
            }
            return false;
        }
    }

    public static boolean a(QQAppInterface qQAppInterface, int i2, String str) {
        if (i2 != 0) {
            return false;
        }
        return ((PhoneContactManager) qQAppInterface.getManager(10)).mo4524a(str) != null;
    }

    public static boolean a(QQAppInterface qQAppInterface, Context context, int i2, String str, boolean z, boolean z2, boolean z3, StartVideoListener startVideoListener, ArrayList arrayList, int i3, int i4) {
        return b(qQAppInterface, context, i2, str, z, z2, z3, startVideoListener, arrayList, i3, i4, true, true);
    }

    public static boolean b(QQAppInterface qQAppInterface, Context context, int i2, String str, boolean z, boolean z2, boolean z3, StartVideoListener startVideoListener, ArrayList arrayList, int i3, int i4, boolean z4, boolean z5) {
        int i5;
        if (!NetworkUtil.h(context)) {
            QQToast.a(context, 0, (int) R.string.f63380name_res_0x7f0a1373, 0).m9833a();
            return false;
        }
        String b2 = PstnUtils.b(qQAppInterface, 2);
        String c2 = PstnUtils.c(qQAppInterface, 2);
        String d2 = PstnUtils.d(qQAppInterface, 2);
        PstnManager pstnManager = (PstnManager) qQAppInterface.getManager(142);
        HashMap hashMap = new HashMap();
        hashMap.put("PstnLevel", "LEVEL2");
        hashMap.put("PLACE", "CALL_CREATE");
        long j2 = 0;
        try {
            j2 = Long.valueOf(str).longValue();
        } catch (NumberFormatException e2) {
            if (QLog.isColorLevel()) {
                QLog.d(f8604a, 2, "NumberFormatException uin = " + str);
            }
        }
        if (qQAppInterface.m4621a().m412a().containsKey(Long.valueOf(j2))) {
            qQAppInterface.m4621a().m412a().remove(Long.valueOf(j2));
            hashMap.put("CREATE_PLACE", (String) qQAppInterface.m4621a().m412a().get(Long.valueOf(j2)));
        }
        if (pstnManager.m7423a() == 0 || i3 == 0) {
            hashMap.put("ipPstnEnterType", String.valueOf(0));
            return a(qQAppInterface, context, i2, str, z, z2, startVideoListener, hashMap);
        }
        if (i3 == 1) {
            hashMap.put("ipPstnEnterType", String.valueOf(i3));
            ArrayList arrayList2 = new ArrayList();
            ArrayList arrayList3 = new ArrayList();
            if (arrayList != null) {
                arrayList2.addAll(arrayList);
            }
            if (PstnUtils.m778a(qQAppInterface, 2)) {
                if (!PstnUtils.a(qQAppInterface, context)) {
                    ArrayList arrayList4 = new ArrayList();
                    boolean z6 = true;
                    if (i4 != 2) {
                        i5 = R.string.f66335name_res_0x7f0a1f03;
                    } else {
                        z6 = false;
                        i5 = R.string.f66336name_res_0x7f0a1f04;
                    }
                    if (!a(qQAppInterface, z6, i2, str, arrayList2, arrayList4, arrayList3)) {
                        if (arrayList2 != null && arrayList2.size() > 0) {
                            hashMap.put("PhoneNumberList", PstnUtils.b(arrayList2));
                        }
                        if (PstnUtils.m780b(qQAppInterface, 2) && z5) {
                            DialogUtil.a(context, 230, "时长不足", PstnUtils.a(qQAppInterface, 2), "购买时长", "继续拨打", new jnj(qQAppInterface, context, i2, str, z, z2, startVideoListener, hashMap), new jlm(qQAppInterface, context)).show();
                            return false;
                        }
                        a(qQAppInterface, context, i2, str, z, z2, startVideoListener, hashMap);
                    } else {
                        PhoneContactSelectActivity.a(context, i3, arrayList3, i5);
                        return true;
                    }
                }
            } else {
                if (i4 == 6 || i4 == 3) {
                    DialogUtil.a(context, 230, b2, c2, context.getString(R.string.f59618name_res_0x7f0a04be), d2, new jln(qQAppInterface, context, startVideoListener, i4), new jlo(qQAppInterface, i4)).show();
                } else {
                    PstnUtils.a(qQAppInterface, context, 2, 12);
                }
                return false;
            }
        } else if (PstnUtils.m778a(qQAppInterface, 2)) {
            PhoneContactManagerImp phoneContactManagerImp = (PhoneContactManagerImp) qQAppInterface.getManager(10);
            if (phoneContactManagerImp != null && phoneContactManagerImp.mo4545d() >= 6) {
                PstnCardInfo m7425a = pstnManager.m7425a(qQAppInterface.getCurrentAccountUin());
                boolean z7 = m7425a != null && m7425a.pstn_multi_call_time > 0;
                if (!qQAppInterface.m4621a().m422a(UITools.a(i2), Long.valueOf(str).longValue()) && pstnManager.e() == 1 && !pstnManager.m7430b() && ((a(qQAppInterface, i2, str, arrayList) || NetworkUtil.b(context) == 2) && z7 && 6 != i4 && z4)) {
                    String string = qQAppInterface.getApplication().getResources().getString(R.string.f66362name_res_0x7f0a1f1e);
                    String string2 = qQAppInterface.getApplication().getResources().getString(R.string.f66363name_res_0x7f0a1f1f);
                    String m7428a = pstnManager.m7428a(PstnManager.y);
                    String m7428a2 = pstnManager.m7428a(PstnManager.z);
                    DialogUtil.a(context, 230, "确认呼叫方式", TextUtils.isEmpty(m7428a) ? string : m7428a, TextUtils.isEmpty(m7428a2) ? string2 : m7428a2, "取消", "呼叫", (DialogInterface.OnClickListener) null, (DialogInterface.OnClickListener) new jlp(pstnManager, qQAppInterface, context, i2, str, z, z2, z3, startVideoListener, arrayList, i3, i4, z5), (DialogInterface.OnClickListener) new jlq(startVideoListener, qQAppInterface)).show();
                    return false;
                } else if (PstnUtils.m780b(qQAppInterface, 2) && z5) {
                    DialogUtil.a(context, 230, "时长不足", PstnUtils.a(qQAppInterface, 2), "购买时长", "继续拨打", new jlr(qQAppInterface, context, i2, str, z, z2, z3, startVideoListener, arrayList, i3, i4, z4), new jls(qQAppInterface, context)).show();
                    return false;
                } else {
                    if (i3 == 4) {
                        hashMap.put("ipPstnEnterType", String.valueOf(4));
                    } else {
                        hashMap.put("ipPstnEnterType", String.valueOf(2));
                    }
                    if (arrayList != null && arrayList.size() > 0) {
                        hashMap.put("PhoneNumberList", PstnUtils.b(arrayList));
                    }
                    a(qQAppInterface, context, i2, str, z, z2, startVideoListener, hashMap);
                }
            } else if (i3 == 3 && (arrayList == null || arrayList.size() == 0)) {
                hashMap.put("PstnLevel", "LEVEL2");
                hashMap.put("ipPstnEnterType", String.valueOf(0));
                a(qQAppInterface, context, i2, str, z, z2, startVideoListener, hashMap);
            } else {
                PstnUtils.a(qQAppInterface, context);
            }
        } else if (i4 == 3 || i4 == 6) {
            ArrayList m4256a = ((DiscussionManager) qQAppInterface.getManager(52)).m4256a(str);
            if (m4256a != null && m4256a.size() == 1 && ((DiscussionMemberInfo) m4256a.get(0)).memberUin.equals(qQAppInterface.getCurrentAccountUin())) {
                DialogUtil.a(context, 230, b2, c2, context.getString(R.string.f59618name_res_0x7f0a04be), d2, new jlt(qQAppInterface, context, startVideoListener, i4), new jlu(qQAppInterface, i4)).show();
            } else if (arrayList != null && arrayList.size() > 0) {
                DialogUtil.a(context, b2, c2, d2, (DialogInterface.OnClickListener) new jlv(qQAppInterface, context, startVideoListener, i4), context.getString(R.string.f60177name_res_0x7f0a06ed), (DialogInterface.OnClickListener) new jlx(hashMap, qQAppInterface, context, i2, str, z, z2, startVideoListener, i4)).show();
            } else {
                hashMap.put("PstnLevel", "LEVEL2");
                hashMap.put("ipPstnEnterType", String.valueOf(0));
                a(qQAppInterface, context, i2, str, z, z2, startVideoListener, hashMap);
            }
        } else {
            DialogUtil.a(context, 230, b2, c2, context.getString(R.string.f59618name_res_0x7f0a04be), d2, new jly(qQAppInterface, context, startVideoListener), new jlz()).show();
        }
        return false;
    }

    private static boolean a(QQAppInterface qQAppInterface, boolean z, int i2, String str, ArrayList arrayList, ArrayList arrayList2, ArrayList arrayList3) {
        boolean z2;
        Iterator it;
        String str2;
        Iterator it2;
        String str3;
        Iterator it3;
        String str4;
        boolean z3;
        ArrayList m775a;
        boolean z4;
        boolean z5 = false;
        String str5 = "";
        if (i2 == 3000) {
            PhoneContactManager phoneContactManager = (PhoneContactManager) qQAppInterface.getManager(10);
            String currentAccountUin = qQAppInterface.getCurrentAccountUin();
            ArrayList m4256a = ((DiscussionManager) qQAppInterface.getManager(52)).m4256a(str);
            if (m4256a != null) {
                int size = m4256a.size();
                int i3 = 0;
                while (i3 < size) {
                    DiscussionMemberInfo discussionMemberInfo = (DiscussionMemberInfo) m4256a.get(i3);
                    if (discussionMemberInfo != null) {
                        if (currentAccountUin.equals(discussionMemberInfo.memberUin)) {
                            z4 = phoneContactManager.mo4523a() == null ? true : z5;
                        } else {
                            arrayList2.add(new InviteBaseData(discussionMemberInfo));
                            PhoneContact mo4524a = phoneContactManager.mo4524a(discussionMemberInfo.memberUin);
                            if (mo4524a != null) {
                                arrayList.add(mo4524a.unifiedCode);
                                arrayList3.add(mo4524a.mobileNo);
                            } else {
                                z5 = true;
                            }
                            z4 = z5;
                        }
                    } else {
                        z4 = true;
                    }
                    i3++;
                    z5 = z4;
                }
                z3 = z5;
            } else {
                z3 = true;
            }
            if (!z) {
                String a2 = PstnUtils.a(qQAppInterface, str, 3000);
                if (!TextUtils.isEmpty(a2) && (m775a = PstnUtils.m775a(a2)) != null) {
                    Iterator it4 = m775a.iterator();
                    String str6 = "";
                    while (it4.hasNext()) {
                        AVPhoneUserInfo aVPhoneUserInfo = (AVPhoneUserInfo) it4.next();
                        if (!a(phoneContactManager, aVPhoneUserInfo.telInfo.mobile, arrayList2)) {
                            arrayList2.add(new InviteBaseData(aVPhoneUserInfo, qQAppInterface));
                            arrayList.add(aVPhoneUserInfo.telInfo.mobile);
                            arrayList3.add(aVPhoneUserInfo.telInfo.mobile);
                        }
                        str6 = QLog.isDevelopLevel() ? str6 + String.format("\n\rAVPhoneUserInfo: %s", aVPhoneUserInfo) : str6;
                    }
                    str5 = str6;
                }
            }
            z2 = z3;
        } else {
            z2 = true;
        }
        if (QLog.isDevelopLevel()) {
            String str7 = str5 + String.format("\n\rphoneList[%s]", Integer.valueOf(arrayList.size()));
            while (true) {
                str2 = str7;
                if (!arrayList.iterator().hasNext()) {
                    break;
                }
                str7 = str2 + String.format("\n\rphone: %s", (String) it.next());
            }
            String str8 = str2 + String.format("\n\rselectedList[%s]", Integer.valueOf(arrayList3.size()));
            while (true) {
                str3 = str8;
                if (!arrayList3.iterator().hasNext()) {
                    break;
                }
                str8 = str3 + String.format("\n\rselected: %s", (String) it2.next());
            }
            String str9 = str3 + String.format("\n\rinviteList[%s]", Integer.valueOf(arrayList2.size()));
            while (true) {
                str4 = str9;
                if (!arrayList2.iterator().hasNext()) {
                    break;
                }
                str9 = str4 + String.format("\n\rinvite: %s", (InviteBaseData) it3.next());
            }
            QLog.d(f8604a, 4, String.format("checkDiscussMemberNoPhone, onlyMembers[%s], uinType[%s], uin[%s], hasNoPhone[%s], %s", Boolean.valueOf(z), Integer.valueOf(i2), str, Boolean.valueOf(z2), str4));
        }
        return z2;
    }

    private static boolean a(PhoneContactManager phoneContactManager, String str, List list) {
        if (list == null || TextUtils.isEmpty(str)) {
            return false;
        }
        PhoneContact mo4535b = phoneContactManager.mo4535b(str);
        if (mo4535b != null && !TextUtils.isEmpty(mo4535b.uin) && !mo4535b.uin.equals("0")) {
            Iterator it = list.iterator();
            while (it.hasNext()) {
                InviteBaseData inviteBaseData = (InviteBaseData) it.next();
                if (inviteBaseData.f2975a != null && inviteBaseData.f2975a.equals(mo4535b.uin)) {
                    return true;
                }
            }
        }
        return false;
    }

    private static boolean a(QQAppInterface qQAppInterface, int i2, String str, ArrayList arrayList) {
        ArrayList m4256a;
        PhoneContactManager phoneContactManager = (PhoneContactManager) qQAppInterface.getManager(10);
        if (i2 == 3000 && (m4256a = ((DiscussionManager) qQAppInterface.getManager(52)).m4256a(str)) != null) {
            int size = m4256a.size();
            for (int i3 = 0; i3 < size; i3++) {
                DiscussionMemberInfo discussionMemberInfo = (DiscussionMemberInfo) m4256a.get(i3);
                if (discussionMemberInfo != null && !qQAppInterface.getAccount().equals(discussionMemberInfo.memberUin) && phoneContactManager.mo4524a(discussionMemberInfo.memberUin) != null) {
                    return true;
                }
            }
        }
        return false;
    }

    public static boolean a(QQAppInterface qQAppInterface, Context context, int i2, String str, String str2, String str3, boolean z, String str4, boolean z2, boolean z3, StartVideoListener startVideoListener, String str5, Map map) {
        if (QLog.isColorLevel()) {
            QLog.d(f8604a, 2, "startVideo uinType: " + i2 + ", peerUin: " + str + ", name: " + str2 + ", phoneNum: " + str3 + ", onlyAudio: " + z + ", extraUin: " + str4 + ", checkShieldMsg: " + z2 + ", checkWifi: " + z3 + ", from: " + str5);
        }
        return b(qQAppInterface, context, i2, str, str2, str3, z, str4, z2, z3, startVideoListener, str5, map, true, true, false);
    }

    public static boolean b(QQAppInterface qQAppInterface, Context context, int i2, String str, String str2, String str3, boolean z, String str4, boolean z2, boolean z3, StartVideoListener startVideoListener, String str5, Map map, boolean z4, boolean z5, boolean z6) {
        String str6;
        String str7;
        long j2;
        String str8;
        String string;
        String str9;
        if (!qQAppInterface.m4707d()) {
            if (!VcSystemInfo.m381e()) {
                if (QLog.isColorLevel()) {
                    QLog.d(f8604a, 2, "startVideo device not support!");
                }
                QQToast.a(context, (int) R.string.f59691name_res_0x7f0a0507, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005756", "0X8005756", 0, 0, "", "", "", "");
                ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005758", "0X8005758", 0, 0, "", "", VcSystemInfo.d(), "");
                ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005759", "0X8005759", 0, 0, "", "", VcSystemInfo.m380e(), "");
                return true;
            }
            ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005757", "0X8005757", 0, 0, "", "", "", "");
            if (!VcSystemInfo.m382f()) {
                if (QLog.isColorLevel()) {
                    QLog.d(f8604a, 2, "startVideo earlyDown so not ready!");
                }
                QQToast.a(context, (int) R.string.f59700name_res_0x7f0a0510, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                ReportController.b(qQAppInterface, "dc01331", "", "", "0X800575A", "0X800575A", 0, 0, "", "", "", "");
                return true;
            }
            ReportController.b(qQAppInterface, "dc01331", "", "", "0X800575B", "0X800575B", 0, 0, "", "", "", "");
            if (!z && !VcSystemInfo.m379d()) {
                if (QLog.isColorLevel()) {
                    QLog.d(f8604a, 2, "startVideo sdk not support Video!");
                }
                QQToast.a(context, (int) R.string.f59692name_res_0x7f0a0508, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                ReportController.b(qQAppInterface, "dc01331", "", "", "0X800575C", "0X800575C", 0, 0, "", "", "", "");
                ReportController.b(qQAppInterface, "dc01331", "", "", "0X800575D", "0X800575D", 0, 0, "", "", VcSystemInfo.d(), "");
                ReportController.b(qQAppInterface, "dc01331", "", "", "0X800575E", "0X800575E", 0, 0, "", "", VcSystemInfo.m380e(), "");
                return true;
            }
            ReportController.b(qQAppInterface, "dc01331", "", "", "0X800575F", "0X800575F", 0, 0, "", "", "", "");
            if (qQAppInterface.m4621a().m421a()) {
                if (QLog.isColorLevel()) {
                    QLog.d(f8604a, 2, "startVideo phone is calling!");
                }
                PopupDialog.a(context, 230, context.getString(R.string.f59845name_res_0x7f0a05a1), context.getString(R.string.f59848name_res_0x7f0a05a4), (int) R.string.f63203cancel, (int) R.string.agw, (DialogInterface.OnClickListener) new jma(startVideoListener, z), (DialogInterface.OnClickListener) null);
                DataReport.a(z);
                if (i2 == 1024) {
                    ReportController.b(qQAppInterface, "dc01331", "", "", "0X80049DF", VideoClientReportConstants.ad, 0, 0, "", "", "", "");
                }
                return false;
            }
            if ((i2 == 1006 && !m2391a(qQAppInterface, str)) || i2 == 1024 || i2 == 1011) {
                new VcSystemInfo();
                VcSystemInfo.m372a();
                int f2 = VcSystemInfo.f();
                long c2 = VcSystemInfo.c();
                int i3 = Build.VERSION.SDK_INT;
                if (f2 < 3 || c2 / 1000 < 800 || i3 < 9) {
                    if (QLog.isColorLevel()) {
                        QLog.d(f8604a, 2, "startVideo old engine!");
                    }
                    String str10 = map != null ? (String) map.get(JumpAction.bO) : "";
                    if (i2 == 1011) {
                        PopupDialog.a(context, 230, context.getString(R.string.f59845name_res_0x7f0a05a1), context.getString(R.string.f60004name_res_0x7f0a0640), (int) R.string.f63203cancel, (int) R.string.f59858name_res_0x7f0a05ae, (DialogInterface.OnClickListener) new jmb(startVideoListener), (DialogInterface.OnClickListener) null);
                        if (str10.equals("randomc2c")) {
                            ReportController.b(qQAppInterface, "dc01331", "", "", "0X80053B1", "0X80053B1", 0, 0, "", "", "", "");
                        } else {
                            ReportController.b(qQAppInterface, "dc01331", "", "", "0X80053BD", "0X80053BD", 0, 0, "", "", "", "");
                        }
                        return false;
                    }
                    QQToast.a(context, (int) R.string.f59880name_res_0x7f0a05c4, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                    if (z) {
                        ReportController.b(null, "dc01331", "", "", "Two_call", VideoClientReportConstants.ab, 0, 0, "", "", "", "");
                        if (i2 == 1024) {
                            ReportController.b(qQAppInterface, "dc01331", "", "", "0X80049DF", VideoClientReportConstants.ab, 0, 0, "", "", "", "");
                        }
                    }
                    return true;
                }
            }
            if (z && !ConfigSystemImpl.m361a(context)) {
                if (QLog.isColorLevel()) {
                    QLog.d(f8604a, 2, "startVideo audio disabled!");
                }
                PopupDialog.a(context, 230, context.getString(R.string.f59845name_res_0x7f0a05a1), context.getString(R.string.f59849name_res_0x7f0a05a5), (int) R.string.f63203cancel, (int) R.string.f59858name_res_0x7f0a05ae, (DialogInterface.OnClickListener) new jmc(startVideoListener), (DialogInterface.OnClickListener) null);
                if (z) {
                    ReportController.b(null, "dc01331", "", "", "Two_call", VideoClientReportConstants.ac, 0, 0, "", "", "", "");
                    if (i2 == 1024) {
                        ReportController.b(qQAppInterface, "dc01331", "", "", "0X80049DF", VideoClientReportConstants.ac, 0, 0, "", "", "", "");
                    }
                }
                return false;
            }
            if (i2 == 1010) {
            }
            if (z2 && a(qQAppInterface, i2, str, str3) && i2 != 1024) {
                if (QLog.isColorLevel()) {
                    QLog.d(f8604a, 2, "startVideo check shiled msg!");
                }
                if (z) {
                    ReportController.b(null, "dc01331", "", "", "Two_call", VideoClientReportConstants.af, 0, 0, "", "", "", "");
                }
                QQCustomDialog a2 = PopupDialog.a(context, 230, context.getString(R.string.f59845name_res_0x7f0a05a1), context.getString(R.string.f59846name_res_0x7f0a05a2), (int) R.string.f59850name_res_0x7f0a05a6, (int) R.string.f59860name_res_0x7f0a05b0, (DialogInterface.OnClickListener) new jmd(qQAppInterface, i2, str, str3, z, context, str2, str4, startVideoListener, str5, map, z4, z5), (DialogInterface.OnClickListener) new jme(z, startVideoListener));
                if (a2 != null) {
                    a2.setOnCancelListener(new jmf(z, startVideoListener));
                }
                return false;
            } else if (!NetworkUtil.e(context)) {
                if (QLog.isColorLevel()) {
                    QLog.d(f8604a, 2, "startVideo network not support!");
                }
                QQToast.a(context, (int) R.string.f63198name_res_0x7f0a12bb, 0).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                if (z) {
                    ReportController.b(null, "dc01331", "", "", "Two_call", VideoClientReportConstants.ae, 0, 0, "1", "", "", "");
                    if (i2 == 1024) {
                        ReportController.b(qQAppInterface, "dc01331", "", "", "0X80049DF", VideoClientReportConstants.ae, 0, 0, "", "", "", "");
                    }
                }
                return true;
            } else {
                boolean i4 = NetworkUtil.i(context);
                if (i2 == 1024 && !i4 && NetworkUtil.a(context) == 2) {
                    ReportController.b(null, "dc01331", "", "", "Two_call", VideoClientReportConstants.ah, 0, 0, "1", "", "", "");
                    QQToast.a(context, (int) R.string.f59840name_res_0x7f0a059c, 0).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                    ReportController.b(null, "dc01331", "", "", "Two_call", VideoClientReportConstants.ai, 0, 0, "3", "", "", "");
                    return false;
                } else if (z3 && !i4 && !NetworkUtil.g(context)) {
                    if (QLog.isColorLevel()) {
                        QLog.d(f8604a, 2, "startVideo check wifi!");
                    }
                    String str11 = VideoController.d + qQAppInterface.getCurrentAccountUin();
                    if (map != null) {
                        String str12 = (String) map.get(JumpAction.bO);
                        if (str12 != null && (str12.equals("randomc2c") || str12.equals("randomgroup"))) {
                            str8 = VideoController.e + qQAppInterface.getCurrentAccountUin();
                        } else if ("guildgroup".equals(str12)) {
                            str8 = VideoController.f + qQAppInterface.getCurrentAccountUin();
                        }
                        if (VideoController.d(str8) <= 0) {
                            b(qQAppInterface, context, i2, str, str2, str3, z, str4, false, false, startVideoListener, str5, map, z4, z5, false);
                            return true;
                        }
                        int a3 = NetworkUtil.a(context);
                        if (a3 == 2) {
                            if (QLog.isColorLevel()) {
                                QLog.d(f8604a, 2, "startVideo is 2G!");
                            }
                            String string2 = context.getString(R.string.f59845name_res_0x7f0a05a1);
                            String string3 = context.getString(R.string.f59839name_res_0x7f0a059b);
                            if (z) {
                                ReportController.b(null, "dc01331", "", "", "Two_call", VideoClientReportConstants.ah, 0, 0, "1", "", "", "");
                                string = string3;
                                str9 = string2;
                            } else {
                                string = string3;
                                str9 = string2;
                            }
                        } else if (a3 != 3 && a3 != 4) {
                            string = null;
                            str9 = null;
                        } else {
                            if (QLog.isColorLevel()) {
                                QLog.d(f8604a, 2, "startVideo is 3G or 4G!");
                            }
                            String string4 = context.getString(R.string.f59845name_res_0x7f0a05a1);
                            if (z) {
                                String string5 = context.getString(R.string.f59842name_res_0x7f0a059e);
                                ReportController.b(null, "dc01331", "", "", "Two_call", VideoClientReportConstants.ah, 0, 0, "2", "", "", "");
                                string = string5;
                                str9 = string4;
                            } else {
                                string = context.getString(R.string.f59841name_res_0x7f0a059d);
                                str9 = string4;
                            }
                        }
                        if (TextUtils.isEmpty(str9) || TextUtils.isEmpty(string)) {
                            if (QLog.isColorLevel()) {
                                QLog.e(f8604a, 2, "startVideo title or content is empty");
                            }
                            return true;
                        }
                        QQCustomDialog a4 = PopupDialog.a(context, 230, str9, string, (int) R.string.f59850name_res_0x7f0a05a6, (int) R.string.f59855name_res_0x7f0a05ab, (DialogInterface.OnClickListener) new jmg(z, a3, qQAppInterface, context, i2, str, str2, str3, str4, startVideoListener, str5, map, z4, z5), (DialogInterface.OnClickListener) new jmi(z, a3, startVideoListener));
                        if (a4 != null) {
                            a4.setOnCancelListener(new jmj(z, a3, startVideoListener));
                        }
                        return false;
                    }
                    str8 = str11;
                    if (VideoController.d(str8) <= 0) {
                    }
                }
            }
        } else {
            int g2 = qQAppInterface.m4621a().g();
            int m427b = qQAppInterface.m4621a().m427b();
            int m437c = qQAppInterface.m4621a().m437c();
            if (map == null) {
                str6 = null;
                str7 = null;
                j2 = -1;
            } else {
                String str13 = (String) map.get(JumpAction.bO);
                if (str13 != null && (str13.equals("randomgroup") || str13.equals("randomc2c"))) {
                    str6 = (String) map.get("session_name");
                    str7 = str13;
                    j2 = -1;
                } else if ("guildgroup".equals(str13)) {
                    try {
                        str6 = null;
                        str7 = str13;
                        j2 = Long.parseLong((String) map.get(FriendListContants.S));
                    } catch (NumberFormatException e2) {
                        str6 = null;
                        str7 = str13;
                        j2 = -1;
                    }
                } else {
                    str6 = null;
                    str7 = str13;
                    j2 = -1;
                }
            }
            if ((m437c == 1 || m437c == 2) && m427b >= 1 && m427b <= 5) {
                if (QLog.isColorLevel()) {
                    QLog.d(f8604a, 2, "startVideo is in Double Random Call!");
                }
                if (str6 == null || !str7.equals("randomc2c") || !str6.equals(qQAppInterface.m4621a().m409a())) {
                    QQToast.a(context, (int) R.string.f59806name_res_0x7f0a057a, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                    a(qQAppInterface, map);
                    return true;
                }
            } else if (z5 && ((m437c == 3 || m437c == 4) && m427b >= 1 && m427b <= 5)) {
                if (QLog.isColorLevel()) {
                    QLog.d(f8604a, 2, "startVideo is Multi Random calling!");
                }
                if (!((!TextUtils.isEmpty(str6) && TextUtils.equals(str6, qQAppInterface.m4621a().m409a())) || ("guildgroup".equals(str7) && j2 > 0 && j2 == qQAppInterface.m4621a().m438c()))) {
                    PopupDialog.a(context, 230, (String) null, context.getString(R.string.f59801name_res_0x7f0a0575), (int) R.string.f59850name_res_0x7f0a05a6, (int) R.string.f59855name_res_0x7f0a05ab, (DialogInterface.OnClickListener) new jmk(qQAppInterface, context, i2, str, str2, str3, z, str4, z2, z3, startVideoListener, str5, map, z4), (DialogInterface.OnClickListener) new jml(startVideoListener));
                    a(qQAppInterface, map);
                    return false;
                }
            } else if (g2 == 1) {
                if (QLog.isColorLevel()) {
                    QLog.d(f8604a, 2, "startVideo is calling!");
                }
                if (z && ((str != null && str.equals(qQAppInterface.m4621a().m449f())) || ((str3 != null && str3.equals(qQAppInterface.m4621a().m449f())) || (i2 == 1006 && ((str != null && str.equals(qQAppInterface.m4621a().m451g())) || (str3 != null && str3.equals(qQAppInterface.m4621a().m451g()))))))) {
                    if (startVideoListener != null) {
                        startVideoListener.b();
                    }
                    if (qQAppInterface.m4621a().m436b(qQAppInterface.m4621a().m449f())) {
                        Intent intent = new Intent(context, AVActivity.class);
                        intent.addFlags(262144);
                        intent.addFlags(e_attribute._IsFrdCommentFamousFeed);
                        intent.putExtra(ShortVideoConstants.aL, 3);
                        intent.putExtra("GroupId", qQAppInterface.m4621a().m449f());
                        intent.putExtra("isDoubleVideoMeeting", true);
                        context.startActivity(intent);
                    } else {
                        a(qQAppInterface, context, i2, str, str2, str3, z, str4, str5, map, false);
                    }
                    if (startVideoListener != null) {
                        startVideoListener.c();
                    }
                } else {
                    QQToast.a(context, (int) R.string.f59806name_res_0x7f0a057a, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                    a(qQAppInterface, map);
                }
                return true;
            } else if (g2 == 2) {
                if (QLog.isColorLevel()) {
                    QLog.d(f8604a, 2, "startVideo is calling!");
                }
                if (!z && ((str != null && str.equals(qQAppInterface.m4621a().m449f())) || ((str3 != null && str3.equals(qQAppInterface.m4621a().m449f())) || (i2 == 1006 && ((str != null && str.equals(qQAppInterface.m4621a().m451g())) || (str3 != null && str3.equals(qQAppInterface.m4621a().m451g()))))))) {
                    if (startVideoListener != null) {
                        startVideoListener.b();
                    }
                    if (qQAppInterface.m4621a().m436b(qQAppInterface.m4621a().m449f())) {
                        Intent intent2 = new Intent(context, AVActivity.class);
                        intent2.addFlags(262144);
                        intent2.addFlags(e_attribute._IsFrdCommentFamousFeed);
                        intent2.putExtra(ShortVideoConstants.aL, 3);
                        intent2.putExtra("GroupId", qQAppInterface.m4621a().m449f());
                        intent2.putExtra("isDoubleVideoMeeting", true);
                        context.startActivity(intent2);
                    } else {
                        a(qQAppInterface, context, i2, str, str2, str3, z, str4, str5, map, false);
                    }
                    if (startVideoListener != null) {
                        startVideoListener.c();
                    }
                } else {
                    QQToast.a(context, (int) R.string.f59806name_res_0x7f0a057a, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                    a(qQAppInterface, map);
                }
                return true;
            } else if (z5 && (g2 == 3 || g2 == 4)) {
                if (qQAppInterface.m4621a().m428b() > 0) {
                    if (QLog.isColorLevel()) {
                        QLog.d(f8604a, 2, "startVideo is multi calling!");
                    }
                    PopupDialog.a(context, 230, (String) null, context.getString(R.string.f59801name_res_0x7f0a0575), (int) R.string.f59850name_res_0x7f0a05a6, (int) R.string.f59855name_res_0x7f0a05ab, (DialogInterface.OnClickListener) new jmm(i2, map, qQAppInterface, context, str, str2, str3, z, str4, z2, z3, startVideoListener, str5, z4), (DialogInterface.OnClickListener) new jmn(startVideoListener));
                    a(qQAppInterface, map);
                    return false;
                }
            } else if (qQAppInterface.m4621a().m405a().f81238b != -1) {
                QQToast.a(context, (int) R.string.f59806name_res_0x7f0a057a, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                a(qQAppInterface, map);
                return true;
            }
        }
        FriendsManager friendsManager = (FriendsManager) qQAppInterface.getManager(50);
        if (i2 == 0 && !friendsManager.m4354b(str)) {
            DialogUtil.a(context, 230, context.getString(R.string.f59845name_res_0x7f0a05a1), context.getString(z ? R.string.f59977name_res_0x7f0a0625 : R.string.f59976name_res_0x7f0a0624), (int) R.string.f63203cancel, (int) R.string.f59859name_res_0x7f0a05af, (DialogInterface.OnClickListener) new jmo(), (DialogInterface.OnClickListener) null).show();
            return false;
        }
        if (z4 && !z && i2 != 1 && i2 != 3000 && i2 != 9500 && !qQAppInterface.m4621a().m446d(str) && AVNotifyCenter.f(qQAppInterface.getCurrentAccountUin())) {
            if (AVNotifyCenter.e(qQAppInterface.getCurrentAccountUin())) {
                b(qQAppInterface, context, i2, str, str2, str3, z, str4, false, false, startVideoListener, str5, map, false, z5, false);
                ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005014", "0X8005014", 0, 0, "", "", "", "");
                return false;
            }
            ReportController.b(qQAppInterface, "dc01331", "", "", "0X800501B", "0X800501B", 0, 0, "", "", "", "");
        }
        ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005766", "0X8005766", 0, 0, "", "", "", "");
        if (startVideoListener != null) {
            startVideoListener.b();
        }
        a(qQAppInterface, context, i2, str, str2, str3, z, str4, str5, map, z6);
        if (startVideoListener != null) {
            startVideoListener.c();
        }
        return true;
    }

    public static void a() {
        if (f8601a != null && f8601a.isShowing()) {
            f8601a.dismiss();
        }
        f8601a = null;
    }

    public static String a(int i2) {
        switch (i2) {
            case 0:
                return "0";
            case 1000:
                return "2";
            case 1004:
                return "1";
            case 1006:
                return "3";
            default:
                return ThemeUtil.DIY_THEME_ID;
        }
    }

    public static void a(QQAppInterface qQAppInterface, Activity activity, int i2, String str, String str2, boolean z) {
        boolean z2;
        LightalkSwitchHanlder lightalkSwitchHanlder;
        long j2;
        if (NetworkUtil.e(BaseApplication.getContext())) {
            if (i2 == 0) {
                FriendListHandler friendListHandler = (FriendListHandler) qQAppInterface.getBusinessHandler(1);
                if (friendListHandler != null) {
                    try {
                        j2 = Long.parseLong(str);
                    } catch (Exception e2) {
                        j2 = 0;
                    }
                    if (j2 > 0) {
                        friendListHandler.a(j2, z ? false : true);
                    }
                }
            } else if (i2 == 25) {
                if (z) {
                    LightalkShieldHandler lightalkShieldHandler = (LightalkShieldHandler) qQAppInterface.getBusinessHandler(78);
                    if (lightalkShieldHandler != null) {
                        lightalkShieldHandler.b(10, UinUtils.a(str));
                    }
                    LightalkSwitchManager lightalkSwitchManager = (LightalkSwitchManager) qQAppInterface.getManager(85);
                    if (lightalkSwitchManager != null && !lightalkSwitchManager.b() && (lightalkSwitchHanlder = (LightalkSwitchHanlder) qQAppInterface.getBusinessHandler(52)) != null) {
                        lightalkSwitchHanlder.a((byte) 0);
                    }
                }
            } else {
                ShieldMsgManger shieldMsgManger = (ShieldMsgManger) qQAppInterface.getManager(15);
                if (shieldMsgManger != null) {
                    if (i2 == 1006 && str == null) {
                        try {
                            str = ContactUtils.f(qQAppInterface, str2);
                        } catch (NumberFormatException e3) {
                            if (QLog.isColorLevel()) {
                                QLog.e(f8604a, 2, "shieldMsg", e3);
                            }
                        }
                    }
                    long parseLong = Long.parseLong(str);
                    ArrayList arrayList = new ArrayList();
                    arrayList.add(Long.valueOf(parseLong));
                    if (z) {
                        shieldMsgManger.b(i2, arrayList);
                    } else {
                        shieldMsgManger.a(i2, arrayList);
                    }
                    z2 = true;
                    if (i2 == 1001) {
                        r1 = z2;
                    } else if (str != null && str.length() > 0) {
                        if (z) {
                            qQAppInterface.m4626a().b(str);
                        } else {
                            qQAppInterface.m4626a().m4443a(str);
                        }
                    }
                    if (activity == null && !activity.isFinishing()) {
                        if (r1) {
                            m2388a(activity);
                            return;
                        } else if (z) {
                            b(activity, (int) R.string.f64081name_res_0x7f0a1630, 2);
                            return;
                        } else {
                            b(activity, (int) R.string.f64080name_res_0x7f0a162f, 2);
                            return;
                        }
                    }
                }
                z2 = false;
                if (i2 == 1001) {
                }
                if (activity == null) {
                }
            }
        } else if (activity != null && !activity.isFinishing()) {
            b(activity, (int) R.string.f63198name_res_0x7f0a12bb, 2);
        }
    }

    public static void a(Activity activity, boolean z, boolean z2) {
        b();
        if (!z) {
            if (z2) {
                b(activity, (int) R.string.f64081name_res_0x7f0a1630, 2);
            } else {
                b(activity, (int) R.string.f64080name_res_0x7f0a162f, 2);
            }
        }
    }

    public static boolean a(QQAppInterface qQAppInterface, int i2, String str, String str2) {
        Friends m4355c;
        boolean z = true;
        boolean z2 = false;
        if (QLog.isColorLevel()) {
            QLog.d(f8604a, 2, "isMsgShielded() ==== uinType = " + i2);
        }
        ShieldMsgManger shieldMsgManger = (ShieldMsgManger) qQAppInterface.getManager(15);
        if (i2 == 0) {
            z2 = ((FriendsManager) qQAppInterface.getManager(50)).e(str);
        } else if (i2 == 1001) {
            FriendsManager friendsManager = (FriendsManager) qQAppInterface.getManager(50);
            boolean m6927a = shieldMsgManger != null ? shieldMsgManger.m6927a(str) : false;
            if (m6927a || (m4355c = friendsManager.m4355c(str)) == null || m4355c.groupid != -1002) {
                z = m6927a;
            }
            z2 = z;
        } else if (i2 != 1011) {
            if (i2 == 25) {
                z2 = ((LightalkShieldManager) qQAppInterface.getManager(138)).a(UinUtils.a(str));
            } else if (shieldMsgManger != null) {
                if (i2 == 1006 && str == null) {
                    str = ContactUtils.f(qQAppInterface, str2);
                }
                if (!TextUtils.isEmpty(str)) {
                    z2 = shieldMsgManger.m6927a(str);
                }
            }
        }
        if (QLog.isColorLevel()) {
            QLog.d(f8604a, 2, "isMsgShielded() ==== isMsgShield = " + z2);
        }
        return z2;
    }

    public static byte[] m2393a(String str) {
        if (str == null || str.equals("")) {
            return null;
        }
        String upperCase = str.toUpperCase();
        int length = upperCase.length() / 2;
        char[] charArray = upperCase.toCharArray();
        byte[] bArr = new byte[length];
        for (int i2 = 0; i2 < length; i2++) {
            int i3 = i2 * 2;
            bArr[i2] = (byte) (a(charArray[i3 + 1]) | (a(charArray[i3]) << 4));
        }
        return bArr;
    }

    private static byte a(char c2) {
        return (byte) "0123456789ABCDEF".indexOf(c2);
    }

    private static void a(QQAppInterface qQAppInterface, Context context, int i2, String str, String str2, String str3, boolean z, String str4, String str5, Map map, boolean z2) {
        boolean z3;
        RespondQueryQQBindingStat mo4523a;
        String str6;
        String str7;
        String str8;
        String str9;
        String str10;
        boolean z4;
        byte[] a2;
        int i3;
        int i4;
        int i5;
        PstnManager pstnManager;
        PstnCardInfo m7425a;
        Friends m4355c;
        Intent intent;
        String str11;
        Intent intent2;
        if (i2 == 1011) {
            if (!ImageResUtil.a(ImageResUtil.f81821a)) {
                ImageResUtil.a(qQAppInterface);
            }
            if (map != null) {
                String str12 = (String) map.get(JumpAction.bO);
                if (str12 != null && (str12.equals("randomc2c") || str12.equals("randomgroup"))) {
                    String str13 = (String) map.get(JumpAction.bD);
                    String str14 = (String) map.get(PhotoPreviewConstant.f14773a);
                    String str15 = (String) map.get("version");
                    String str16 = (String) map.get("session_type");
                    String str17 = (String) map.get("session_name");
                    String str18 = (String) map.get("is_mask");
                    String str19 = (String) map.get("online_num");
                    String str20 = (String) map.get("channel_id");
                    String str21 = (String) map.get("peer_gender");
                    if (str12.equals("randomc2c")) {
                        intent2 = new Intent(context, RandomDoubleActivity.class);
                    } else {
                        intent2 = new Intent(context, RandomMultiActivity.class);
                    }
                    intent2.putExtra(JumpAction.bD, str13);
                    intent2.putExtra(PhotoPreviewConstant.f14773a, str14);
                    intent2.putExtra("version", str15);
                    intent2.putExtra("session_type", str16);
                    intent2.putExtra("session_name", str17);
                    intent2.putExtra("is_mask", str18);
                    intent2.putExtra("online_num", str19);
                    intent2.putExtra("channel_id", str20);
                    intent2.putExtra("peer_gender", str21);
                    context.startActivity(intent2);
                    return;
                } else if ("guildgroup".equals(str12)) {
                    String str22 = (String) map.get("version");
                    Intent intent3 = new Intent(context, GuildMultiActivity.class);
                    intent3.putExtra(JumpAction.bD, (String) map.get(JumpAction.bD));
                    intent3.putExtra(PhotoPreviewConstant.f14773a, (String) map.get(PhotoPreviewConstant.f14773a));
                    intent3.putExtra("version", str22);
                    intent3.putExtra(FriendListContants.S, (String) map.get(FriendListContants.S));
                    intent3.putExtra("room_title", (String) map.get("room_title"));
                    intent3.putExtra("role", (String) map.get("role"));
                    intent3.putExtra("business_type", (String) map.get("business_type"));
                    intent3.putExtra("is_quit", (String) map.get("is_quit"));
                    int i6 = 0;
                    try {
                        i6 = Integer.parseInt(str22);
                    } catch (NumberFormatException e2) {
                    }
                    if (i6 > 1) {
                        intent3.putExtra("open_game", (String) map.get("open_game"));
                        intent3.putExtra("appID", (String) map.get("appID"));
                        intent3.putExtra("flag", (String) map.get("flag"));
                        intent3.putExtra(Constants.KEY_PKG_NAME, (String) map.get(Constants.KEY_PKG_NAME));
                        intent3.putExtra("paramsStr", (String) map.get("paramsStr"));
                        intent3.putExtra("url", (String) map.get("url"));
                        intent3.putExtra("web_id", (String) map.get("web_id"));
                        intent3.putExtra("op_id", (String) map.get("op_id"));
                        intent3.putExtra("image_url", (String) map.get("image_url"));
                        intent3.putExtra("title", (String) map.get("title"));
                        intent3.putExtra("desc", (String) map.get("desc"));
                        intent3.putExtra("share_url", (String) map.get("share_url"));
                    }
                    context.startActivity(intent3);
                    return;
                } else if (map != null && (str11 = (String) map.get("encodeuin")) != null && !TextUtils.isEmpty(str11) && (str = a(qQAppInterface, str11)) == null) {
                    if (QLog.isColorLevel()) {
                        QLog.e(f8604a, 2, "enterVideo Chat AnyOne decode peeruin Err!");
                        return;
                    }
                    return;
                }
            }
        }
        if (QLog.isColorLevel()) {
            QLog.d(f8604a, 2, "enterVideo uinType: " + i2 + ", peerUin: " + str + ", name: " + str2 + ", phoneNum: " + str3 + ", onlyAudio: " + z + ", extraUin: " + str4 + ", from: " + str5);
        }
        if (qQAppInterface.m4707d() && qQAppInterface.m4621a().h() != 1 && qQAppInterface.m4621a().h() != 3000 && qQAppInterface.m4621a().m450f() && qQAppInterface.m4621a().m448e() && qQAppInterface.m4621a().h() != 1011 && qQAppInterface.m4621a().h() != 21) {
            if (QQUtils.a(context)) {
                intent = new Intent(context, VideoInviteLock.class);
            } else {
                intent = new Intent(context, VideoInviteFull.class);
            }
            intent.addFlags(e_attribute._IsFrdCommentFamousFeed);
            intent.putExtra("uinType", i2);
            intent.putExtra("peerUin", str);
            intent.putExtra("extraUin", str4);
            intent.putExtra("isAudioMode", z);
            context.startActivity(intent);
            return;
        }
        try {
            MediaPlayerManager a3 = MediaPlayerManager.a(qQAppInterface);
            if (a3 != null) {
                a3.m3086a(true);
            }
        } catch (Exception e3) {
            e3.printStackTrace();
        }
        if (i2 == 0 && (m4355c = ((FriendsManager) qQAppInterface.getManager(50)).m4355c(str)) != null) {
            if (QLog.isColorLevel()) {
                QLog.d(f8604a, 2, "enterVideo terminal: " + ContactUtils.b(m4355c) + ", abilityBits: " + m4355c.abilityBits + ", _eSupportVoice: 1");
            }
            if (m4355c.getNetWorkType() != 2) {
                z3 = true;
                if (i2 != 1006 || i2 == 24 || i2 == 25) {
                    if (!TextUtils.isEmpty(str) && TextUtils.isEmpty(str3)) {
                        if (QLog.isColorLevel()) {
                            QLog.e(f8604a, 2, "enterVideo uinType: " + i2 + ", peerUin: " + str + ", name: " + str2 + ", phoneNum: " + str3 + ", onlyAudio: " + z + ", extraUin: " + str4);
                            return;
                        }
                        return;
                    }
                    mo4523a = ((PhoneContactManager) qQAppInterface.getManager(10)).mo4523a();
                    if (mo4523a != null) {
                        str6 = null;
                        str7 = null;
                    } else {
                        str7 = mo4523a.nationCode;
                        str6 = mo4523a.mobileNo;
                    }
                    if (!TextUtils.isEmpty(str)) {
                        str = str3;
                    } else if (TextUtils.isEmpty(str3)) {
                        str3 = str;
                    }
                    if ((i2 != 24 || i2 == 25) && (mo4523a == null || mo4523a.nationCode.equals("") || mo4523a.mobileNo.equals(""))) {
                        QQToast.a(context, (int) R.string.f60132name_res_0x7f0a06c0, 0).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                    } else {
                        str8 = str6;
                        str9 = str7;
                    }
                } else {
                    if (TextUtils.isEmpty(str3)) {
                        PhoneContact mo4524a = ((PhoneContactManager) qQAppInterface.getManager(10)).mo4524a(str);
                        if (mo4524a != null) {
                            str3 = mo4524a.mobileNo;
                            str8 = null;
                            str9 = null;
                        } else if (QLog.isColorLevel()) {
                            QLog.w(f8604a, 2, "enterVideo cannot get phone number");
                        }
                    }
                    str8 = null;
                    str9 = null;
                }
                if (i2 == 1000) {
                    TroopManager troopManager = (TroopManager) qQAppInterface.getManager(51);
                    String m4859b = troopManager != null ? troopManager.m4859b(str4) : str4;
                    if (m4859b == null) {
                        if (QLog.isColorLevel()) {
                            QLog.e(f8604a, 2, "enterVideo can't find troop info!");
                            return;
                        }
                        return;
                    }
                    str10 = m4859b;
                } else {
                    str10 = str4;
                }
                byte[] bArr = null;
                if (i2 != 1011) {
                    z4 = false;
                    a2 = VideoMsgTools.a(qQAppInterface, i2, str);
                } else {
                    if (map != null) {
                        try {
                            String str23 = (String) map.get("sig");
                            if (QLog.isColorLevel()) {
                                QLog.e(f8604a, 2, "sig string=" + str23);
                            }
                            String[] split = str23.replace(IndexView.f95330c, "").split(",");
                            bArr = new byte[split.length];
                            for (int i7 = 0; i7 < split.length; i7++) {
                                bArr[i7] = Byte.parseByte(split[i7].trim());
                            }
                            try {
                                String str24 = new String(m2393a(str2), "UTF-8");
                                try {
                                    if (QLog.isColorLevel()) {
                                        QLog.e(f8604a, 2, "UTF-8 == " + str24);
                                    }
                                    str2 = str24;
                                } catch (Exception e4) {
                                    str2 = str24;
                                }
                            } catch (Exception e5) {
                            }
                        } catch (Exception e6) {
                            if (QLog.isColorLevel()) {
                                QLog.e(f8604a, 2, "Parse Sig String Exception");
                                return;
                            }
                            return;
                        }
                    }
                    z4 = true;
                    a2 = bArr;
                }
                int m4614a = (int) qQAppInterface.m4614a();
                boolean m2391a = m2391a(qQAppInterface, str);
                Friends m4355c2 = ((FriendsManager) qQAppInterface.getManager(50)).m4355c(str);
                if (m4355c2 == null) {
                    i3 = -1;
                } else {
                    i3 = ContactUtils.a(m4355c2, qQAppInterface);
                }
                Intent intent4 = new Intent(context, AVActivity.class);
                intent4.addFlags(262144);
                intent4.addFlags(e_attribute._IsFrdCommentFamousFeed);
                intent4.putExtra("uinType", i2);
                intent4.putExtra("uin", str);
                intent4.putExtra("name", str2);
                intent4.putExtra("selfNation", str9);
                intent4.putExtra("selfMobile", str8);
                intent4.putExtra("toMobile", str3);
                intent4.putExtra(ActionGlobalData.g, false);
                intent4.putExtra("isAudioMode", z);
                intent4.putExtra("istatus", m4614a);
                intent4.putExtra("extraUin", str10);
                intent4.putExtra("extraCode", str4);
                intent4.putExtra("isPeerNetworkWell", z3);
                intent4.putExtra("isFriend", m2391a);
                intent4.putExtra("senderStartTime", SystemClock.elapsedRealtime());
                intent4.putExtra("isSender", true);
                intent4.putExtra("colorRingId", 0);
                intent4.putExtra("vipType", 0);
                intent4.putExtra(ShortVideoConstants.aL, z ? 1 : 2);
                if (map != null) {
                    String str25 = (String) map.get("dstClient");
                    String str26 = (String) map.get("bindId");
                    String str27 = (String) map.get("bindType");
                    String str28 = (String) map.get("extraType");
                    if (str25 != null) {
                        intent4.putExtra("dstClient", str25);
                        intent4.putExtra("bindId", str26);
                        intent4.putExtra("bindType", Integer.valueOf(str27).intValue());
                        intent4.putExtra("extraType", Integer.valueOf(str28).intValue());
                        String str29 = (String) map.get("sig");
                        if (QLog.isColorLevel()) {
                            QLog.e(f8604a, 2, "sig string=" + str29);
                        }
                        if (str29 != null) {
                            try {
                                a2 = HexUtil.m9188a(str29);
                                HexUtil.a(f8604a, a2);
                            } catch (Exception e7) {
                                if (QLog.isColorLevel()) {
                                    QLog.e(f8604a, 2, "Parse Sig String Exception");
                                    return;
                                }
                                return;
                            }
                        }
                    }
                }
                intent4.putExtra("sig", a2);
                if (i2 == 1011 && map != null) {
                    intent4.putExtra("headUrl", ((String) map.get("headUrl")) + ((String) map.get("sex")) + ".jpg");
                }
                if (qQAppInterface.m4621a().m446d(str)) {
                    if (qQAppInterface.m4621a().b(str) == 1) {
                        intent4.putExtra("isAudioMode", true);
                    } else {
                        intent4.putExtra("isAudioMode", false);
                    }
                    intent4.putExtra("startfromVideoEntry", !z);
                    intent4.putExtra(ShortVideoConstants.aL, qQAppInterface.m4621a().b(str));
                }
                intent4.putExtra("from", str5);
                intent4.putExtra("friendTerminal", i3);
                intent4.putExtra("isOtherTerminalOnChating", qQAppInterface.m4621a().m446d(str));
                intent4.putExtra("otherTerminalChatingRoomId", qQAppInterface.m4621a().m403a(str));
                intent4.putExtra("triggerBeauty", z2);
                PstnSessionInfo a4 = PstnUtils.a(qQAppInterface, new PstnSessionInfo(), str, i2);
                if (a4.f925b == null || a4.f926c == null || (m7425a = (pstnManager = (PstnManager) qQAppInterface.getManager(142)).m7425a(qQAppInterface.getCurrentAccountUin())) == null || pstnManager.m7423a() != 1 || pstnManager.m7426a().f26808e != 1) {
                    i4 = 5;
                    i5 = 0;
                } else {
                    i5 = 1;
                    if (m7425a != null && m7425a.pstn_c2c_call_time > 0) {
                        i4 = 1;
                    } else if (pstnManager.b() == 1 && m7425a.pstn_c2c_try_status == 0) {
                        i4 = 2;
                    } else {
                        i4 = 5;
                    }
                }
                intent4.putExtra("graySwitch", i5);
                intent4.putExtra("ltC2CMembership", i4);
                if (map != null && map.containsKey("c2b_logo_url")) {
                    intent4.putExtra("c2b_logo_url", (String) map.get("c2b_logo_url"));
                }
                if (map != null && map.containsKey("c2b_session_id")) {
                    intent4.putExtra("c2b_session_id", (String) map.get("c2b_session_id"));
                }
                if (map != null && map.containsKey("c2b_app_id")) {
                    intent4.putExtra("c2b_app_id", (String) map.get("c2b_app_id"));
                }
                if (map != null && map.containsKey("c2b_user_info")) {
                    intent4.putExtra("c2b_user_info", (String) map.get("c2b_user_info"));
                }
                if (map != null && map.containsKey("c2b_call_direct_artificial")) {
                    intent4.putExtra("c2b_call_direct_artificial", (String) map.get("c2b_call_direct_artificial"));
                }
                String className = intent4.getComponent().getClassName();
                String name = context.getClass().getName();
                if (className.equals("com.tencent.av.ui.AVActivity") && (name.equals("com.tencent.mobileqq.qcall.QCallDetailActivity") || name.equals("com.tencent.mobileqq.activity.selectmember.SelectMemberActivity") || name.equals("com.tencent.mobileqq.activity.SplashActivity") || name.equals("com.tencent.av.ui.CallActivity") || i2 == 9500)) {
                    Intent intent5 = new Intent(context, AVLoadingDialogActivity.class);
                    intent5.putExtra(AVLoadingDialogActivity.f2168b, intent4);
                    intent5.addFlags(e_attribute._IsFrdCommentFamousFeed);
                    context.startActivity(intent5);
                } else {
                    context.startActivity(intent4);
                }
                if (z2 && (context instanceof Activity)) {
                    ((Activity) context).overridePendingTransition(R.anim.f37630name_res_0x7f040064, R.anim.f37631name_res_0x7f040065);
                }
                if (qQAppInterface.m4707d() && !z4 && i2 != 9500 && (context instanceof Activity)) {
                    ((Activity) context).overridePendingTransition(R.anim.f37638name_res_0x7f04006c, 0);
                    return;
                }
                return;
            }
        }
        z3 = false;
        if (i2 != 1006) {
        }
        if (!TextUtils.isEmpty(str)) {
        }
        mo4523a = ((PhoneContactManager) qQAppInterface.getManager(10)).mo4523a();
        if (mo4523a != null) {
        }
        if (!TextUtils.isEmpty(str)) {
        }
        if (i2 != 24) {
        }
        QQToast.a(context, (int) R.string.f60132name_res_0x7f0a06c0, 0).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
    }

    public static boolean a(QQAppInterface qQAppInterface, Context context, int i2, String str, boolean z, boolean z2, StartVideoListener startVideoListener, Map map) {
        return a(qQAppInterface, context, i2, str, z, z2, startVideoListener, a(map));
    }

    public static void b(QQAppInterface qQAppInterface, Context context, int i2, String str, Bundle bundle) {
        int i3;
        boolean z;
        long[] jArr;
        AVNotifyCenter.VideoRoomInfo a2;
        int i4;
        if (QLog.isColorLevel()) {
            QLog.w(f8604a, 1, "createOrEnterGroupAudio, uinType[" + i2 + "], uin[" + str + StepFactory.f18879b);
            AudioHelper.a(f8604a, bundle);
        }
        if (bundle == null) {
            bundle = new Bundle();
        }
        if (str != null) {
            Intent intent = new Intent();
            intent.addFlags(262144);
            intent.addFlags(e_attribute._IsFrdCommentFamousFeed);
            intent.addFlags(67108864);
            long parseLong = Long.parseLong(str);
            int a3 = UITools.a(i2);
            int i5 = a3 == 2 ? 1 : bundle.getInt(f8607b, 0);
            String string = bundle.getString("jump_from");
            intent.putExtras(bundle);
            if ((VideoConstants.f807bi.equals(string) || VideoConstants.f808bj.equals(string)) && i2 == 1) {
                i3 = 1;
            } else if (qQAppInterface.m4621a().a(a3, parseLong) > 0) {
                if (i5 != qQAppInterface.m4621a().b(parseLong) && i2 == 1) {
                    AVNotifyCenter.VideoRoomInfo a4 = qQAppInterface.m4621a().a(parseLong, i5);
                    if (a4 != null && a4.f81346b == i5 && a4.f81345a > 0) {
                        i4 = 1;
                    } else {
                        i4 = 0;
                    }
                    i3 = i4;
                } else {
                    i3 = qQAppInterface.m4621a().m422a(a3, parseLong) ? 2 : 1;
                }
            } else {
                i3 = 0;
                if (i5 == 2 && (a2 = qQAppInterface.m4621a().a(parseLong, 2)) != null && a2.f81345a > 0) {
                    i3 = 1;
                }
            }
            if (i2 == 3000) {
                ArrayList m4256a = ((DiscussionManager) qQAppInterface.getManager(52)).m4256a(str);
                if (m4256a == null) {
                    jArr = null;
                } else {
                    int size = m4256a.size();
                    long[] jArr2 = new long[size];
                    for (int i6 = 0; i6 < size; i6++) {
                        DiscussionMemberInfo discussionMemberInfo = (DiscussionMemberInfo) m4256a.get(i6);
                        if (discussionMemberInfo != null) {
                            jArr2[i6] = Long.valueOf(discussionMemberInfo.memberUin).longValue();
                        }
                    }
                    jArr = jArr2;
                }
                intent.putExtra("DiscussUinList", jArr);
            } else if (i2 == 1) {
                TroopManager troopManager = (TroopManager) qQAppInterface.getManager(51);
                if (troopManager == null || troopManager.m4837a(str) != null) {
                    z = true;
                } else {
                    z = false;
                }
                intent.putExtra(JumpAction.dh, z);
            }
            intent.putExtra(ShortVideoConstants.aL, 3);
            intent.putExtra("uin", str);
            intent.putExtra("uinType", i2);
            intent.putExtra("Type", i3);
            intent.putExtra("GroupId", str);
            intent.putExtra(f8607b, i5);
            int i7 = bundle.getInt(j, -1);
            if (i7 > 0) {
                qQAppInterface.m4621a().c(i7);
            }
            if (i5 != 2) {
                intent.setClass(context, AVActivity.class);
            }
            if (QLog.isColorLevel()) {
                QLog.d(f8604a, 2, "createOrEnterGroupAudio, uin=" + str + ",uinType=" + i2 + ",Type=" + i3 + ",GroupId=" + str + ",MultiAVType=" + i5);
            }
            if (bundle.containsKey("ipPstnEnterType") && bundle.getInt("ipPstnEnterType") == 1 && qQAppInterface.m4707d()) {
                QQToast.a(context, (int) R.string.f59806name_res_0x7f0a057a, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                return;
            }
            a(qQAppInterface, intent);
            GVideoUpdateUtil.a(context, str, i5, new jmp(i3, i2, qQAppInterface, (QCallFacade) qQAppInterface.getManager(37), parseLong, intent, parseLong, AppConstants.Key.dZ + qQAppInterface.getCurrentAccountUin()));
        }
    }

    public static void a(QQAppInterface qQAppInterface, Intent intent) {
        int i2 = 5;
        int i3 = 1;
        PstnManager pstnManager = (PstnManager) qQAppInterface.getManager(142);
        PstnCardInfo m7425a = pstnManager.m7425a(qQAppInterface.getCurrentAccountUin());
        if (m7425a == null || pstnManager.m7423a() != 1) {
            i3 = 0;
        } else if (m7425a.pstn_multi_call_time > 0) {
            i2 = 3;
        } else if (pstnManager.c() == 1 && m7425a.pstn_multi_try_status == 0) {
            i2 = 4;
        }
        intent.putExtra("graySwitch", i3);
        intent.putExtra("ltMultiMembership", i2);
        intent.putExtra("multiPstnAutoTranTime", pstnManager.m7426a().f26810g);
        intent.putExtra("multiPstnMissDelayTime", pstnManager.m7426a().h);
        intent.putExtra("multiPstnMissShowTime", pstnManager.m7426a().i);
    }

    public static Toast a(Context context, String str) {
        Toast toast = new Toast(context);
        View inflate = LayoutInflater.from(context).inflate(R.layout.f56409name_res_0x7f030040, (ViewGroup) null);
        toast.setView(inflate);
        toast.setGravity(55, 0, context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
        toast.setDuration(1);
        ((TextView) inflate.findViewById(R.id.f48001name_res_0x7f09039d)).setText(str);
        inflate.setOnClickListener(new jmt(toast));
        return toast;
    }

    public static View a(Context context, String str, View.OnClickListener onClickListener, View.OnClickListener onClickListener2) {
        if (context == null) {
            return null;
        }
        View inflate = LayoutInflater.from(context).inflate(R.layout.f56506name_res_0x7f0300a1, (ViewGroup) null);
        View findViewById = inflate.findViewById(R.id.f48518name_res_0x7f0905a2);
        TextView textView = (TextView) inflate.findViewById(R.id.f48517name_res_0x7f0905a1);
        ImageView imageView = (ImageView) inflate.findViewById(R.id.f48519name_res_0x7f0905a3);
        if (str != null) {
            textView.setText(str);
        }
        imageView.setOnClickListener(onClickListener2);
        findViewById.setOnClickListener(onClickListener);
        return inflate;
    }

    public static String a(Context context) {
        String string = context.getString(R.string.f63580name_res_0x7f0a143b);
        switch (context.getSharedPreferences(ChatTextSizeSettingActivity.f8986a, 0).getInt(ChatTextSizeSettingActivity.f8987b, 0)) {
            case 1:
                return context.getString(R.string.f63581name_res_0x7f0a143c);
            case 2:
                return context.getString(R.string.f63582name_res_0x7f0a143d);
            case 3:
                return context.getString(R.string.f63583name_res_0x7f0a143e);
            default:
                return string;
        }
    }

    public static void a(Intent intent, SessionInfo sessionInfo) {
        if (intent != null && sessionInfo != null) {
            intent.putExtra("uin", sessionInfo.f12447a);
            intent.putExtra("uintype", sessionInfo.f85624a);
            intent.putExtra("troop_uin", sessionInfo.f12448b);
            intent.putExtra(AppConstants.Key.d, sessionInfo.e);
            intent.putExtra(AppConstants.Key.h, sessionInfo.f12450d);
        }
    }

    public static void a(Activity activity, QQAppInterface qQAppInterface, String str, long j2, int i2) {
        a(activity, qQAppInterface, str, j2, i2, (Bundle) null);
    }

    public static void a(Context context, QQAppInterface qQAppInterface, String str, long j2, int i2, Bundle bundle) {
        if (str != null) {
            if (QLog.isColorLevel()) {
                QLog.d(f8604a, 2, "appShareOnClick action:" + str + ",appShareId:" + j2 + "mixType:" + i2);
            }
            String trim = str.trim();
            if (f84954a == j2) {
                QZoneHelper.UserInfo a2 = QZoneHelper.UserInfo.a();
                a2.f70173a = qQAppInterface.getCurrentAccountUin();
                a2.f98380b = qQAppInterface.getCurrentNickname();
                QZoneHelper.a((Activity) context, a2, trim, "mqqChat", -1);
            } else {
                if (trim.startsWith(n) || trim.startsWith(o)) {
                }
                Intent intent = new Intent(context, QQBrowserDelegationActivity.class);
                String m905a = HtmlOffline.m905a(trim, "from=androidqq");
                intent.putExtra("injectrecommend", false);
                intent.putExtra("url", m905a.trim());
                intent.putExtra("isAppShare", true);
                intent.putExtra(AppConstants.Key.aT, j2);
                String str2 = m905a.toString();
                if (str2.startsWith(PublicAccountBrowser.w)) {
                    intent.putExtra("url", str2);
                    intent.setClass(context, PublicAccountBrowser.class);
                    if (bundle != null) {
                        intent.putExtras(bundle);
                    }
                }
                context.startActivity(intent);
            }
            StatisticCollector.a((Context) BaseApplication.getContext()).a(qQAppInterface, "sha_click", 1, "", "", String.valueOf(AppShareIDUtil.b(j2)));
        }
    }

    public static String b(int i2) {
        int i3 = 999;
        switch (i2) {
            case 0:
                i3 = 0;
                break;
            case 1:
                i3 = 3;
                break;
            case 1000:
            case 1001:
            case 1003:
            case 1004:
            case 1005:
            case 1009:
            case 1020:
            case 1023:
            case 1024:
            case 1025:
                i3 = 1;
                break;
            case 1008:
                i3 = 4;
                break;
            case 3000:
                i3 = 2;
                break;
        }
        return String.valueOf(i3);
    }

    public static void a(Activity activity, SessionInfo sessionInfo, String str, boolean z) {
        int i2 = 3008;
        int i3 = 0;
        switch (sessionInfo.f85624a) {
            case 1000:
                i2 = 3004;
                i3 = 2;
                break;
            case 1001:
                i3 = 2;
                i2 = 3007;
                break;
            case 1004:
                i2 = 3005;
                i3 = 2;
                break;
            case 1005:
            case 1023:
                break;
            case 1006:
                i2 = 3006;
                break;
            case 1009:
                i2 = 3013;
                break;
            case 1010:
                i2 = 3019;
                break;
            default:
                i2 = 3999;
                break;
        }
        if (i2 == 3007 && ((activity instanceof SplashActivity) || (activity instanceof ChatActivity))) {
            FragmentActivity fragmentActivity = (FragmentActivity) activity;
            if (!LBSHandler.a(fragmentActivity.getChatFragment().m2397a(), sessionInfo.f12447a)) {
                fragmentActivity.getChatFragment().m2396a().c(fragmentActivity.getString(R.string.f65934name_res_0x7f0a1d72));
                return;
            }
        } else if (i2 == 3019 && ((activity instanceof SplashActivity) || (activity instanceof ChatActivity))) {
            FragmentActivity fragmentActivity2 = (FragmentActivity) activity;
        }
        if (sessionInfo.f85624a == 1006) {
            if (sessionInfo.f12447a != null && sessionInfo.f12447a.length() > 0) {
                activity.startActivity(AddFriendLogicActivity.a(activity, 2, sessionInfo.f12447a, sessionInfo.f12448b, i2, i3, sessionInfo.f12450d, null, null, str, null));
            }
        } else if (z) {
            activity.startActivity(AddFriendLogicActivity.a(activity, 1, sessionInfo.f12447a, null, i2, i3, sessionInfo.f12450d, null, AddContactsActivity.class.getName(), str, null));
        } else {
            activity.startActivityForResult(AddFriendLogicActivity.a(activity, 1, sessionInfo.f12447a, sessionInfo.f12448b, i2, i3, sessionInfo.f12450d, null, null, str, null), 11);
        }
    }

    public static boolean m2390a(int i2) {
        return i2 == 1001 || i2 == 1005 || i2 == 1009 || i2 == 1006 || i2 == 1000 || i2 == 1004 || i2 == 1022 || i2 == 1023 || i2 == 1020 || i2 == 1025 || i2 == 1010;
    }

    public static boolean a(QQAppInterface qQAppInterface, SessionInfo sessionInfo) {
        if (1024 == sessionInfo.f85624a && CrmUtils.m952a(qQAppInterface, sessionInfo.f12447a)) {
            return false;
        }
        return sessionInfo.f85624a == 0 && !((FriendsManager) qQAppInterface.getManager(50)).m4354b(sessionInfo.f12447a);
    }

    public static boolean b(QQAppInterface qQAppInterface, SessionInfo sessionInfo) {
        int i2 = sessionInfo.f85624a;
        return i2 == 0 || i2 == 1000 || i2 == 1004 || i2 == 3000 || i2 == 1006 || i2 == 1010 || i2 == 1001 || i2 == 1025;
    }

    public static boolean a(Context context, String str, int i2) {
        String string = PreferenceManager.getDefaultSharedPreferences(context).getString(AppConstants.Preferences.dG, "");
        if (TextUtils.isEmpty(string)) {
            return true;
        }
        if (QLog.isDevelopLevel()) {
            QLog.d(f8604a, 4, "single friend list: " + string);
        }
        try {
            JSONArray jSONArray = new JSONArray(string);
            JSONArray jSONArray2 = new JSONArray();
            for (int i3 = 0; i3 < jSONArray.length(); i3++) {
                JSONObject jSONObject = jSONArray.getJSONObject(i3);
                if (jSONObject.has("type") && jSONObject.has("uin")) {
                    int i4 = jSONObject.getInt("type");
                    String string2 = jSONObject.getString("uin");
                    if (i4 != i2 || !string2.equals(MsgProxyUtils.m5008a(str))) {
                        jSONArray2.put(jSONObject);
                    }
                }
            }
            SharedPreferences.Editor edit = PreferenceManager.getDefaultSharedPreferences(context).edit();
            edit.putString(AppConstants.Preferences.dG, jSONArray2.toString());
            return edit.commit();
        } catch (JSONException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public static void a(Context context, int i2, int i3) {
        QQToast.a(context, i2, i3).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
    }

    public static void b(Context context, int i2, int i3) {
        new QQToastNotifier(context).a(i2, context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height), 0, i3);
    }

    public static void a(Context context, int i2) {
        if (f8603a == null) {
            f8603a = new QQToastNotifier(context);
        }
        f8603a.a(i2, context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height), 0, 0);
    }

    public static void m2388a(Activity activity) {
        if (activity != null && !activity.isFinishing()) {
            try {
                if (f8602a == null) {
                    f8602a = new QQProgressDialog(activity, activity.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                    f8602a.b(R.string.f64042name_res_0x7f0a1609);
                }
                f8602a.show();
                if (f8602a != null && !f8602a.isShowing()) {
                    f8602a = null;
                }
            } catch (Exception e2) {
                if (f8602a != null && !f8602a.isShowing()) {
                    f8602a = null;
                }
            } catch (Throwable th) {
                if (f8602a != null && !f8602a.isShowing()) {
                    f8602a = null;
                }
                throw th;
            }
        }
    }

    public static void b() {
        if (f8602a != null && f8602a.isShowing()) {
            try {
                f8602a.cancel();
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
        f8602a = null;
    }

    public static MessageRecord a(List list, SessionInfo sessionInfo, QQAppInterface qQAppInterface) {
        MessageRecord messageRecord;
        if (!m2390a(sessionInfo.f85624a) || list == null || list.isEmpty()) {
            return null;
        }
        if (sessionInfo.f85624a == 1006) {
            messageRecord = (MessageRecord) list.get(0);
        } else {
            int size = list.size() - 1;
            while (true) {
                if (size < 0) {
                    messageRecord = null;
                    break;
                }
                messageRecord = (MessageRecord) list.get(size);
                if (!messageRecord.isSend() && !MsgProxyUtils.g(messageRecord.msgtype)) {
                    break;
                }
                size--;
            }
            if (messageRecord == null) {
                return null;
            }
        }
        return a(messageRecord, qQAppInterface);
    }

    private static MessageRecord a(MessageRecord messageRecord, QQAppInterface qQAppInterface) {
        int i2 = messageRecord.msgtype;
        if (i2 == -1003 || i2 == -1031 || i2 == -1032 || i2 == -3001) {
            return null;
        }
        if (((FriendsManager) qQAppInterface.getManager(50)).m4354b(messageRecord.frienduin)) {
            return null;
        }
        return messageRecord;
    }

    public static MessageRecord b(List list, SessionInfo sessionInfo, QQAppInterface qQAppInterface) {
        MessageRecord messageRecord;
        if (!m2390a(sessionInfo.f85624a) || list == null || list.isEmpty()) {
            return null;
        }
        if (sessionInfo.f85624a == 1006) {
            messageRecord = (MessageRecord) list.get(0);
        } else {
            int size = list.size() - 1;
            while (true) {
                if (size < 0) {
                    messageRecord = null;
                    break;
                }
                messageRecord = (MessageRecord) list.get(size);
                if (!MsgProxyUtils.g(messageRecord.msgtype)) {
                    break;
                }
                size--;
            }
            if (messageRecord == null) {
                return null;
            }
        }
        return a(messageRecord, qQAppInterface);
    }

    public static String a(Context context, QQAppInterface qQAppInterface, String str) {
        String format;
        try {
            TroopInfo m4837a = ((TroopManager) qQAppInterface.getManager(51)).m4837a(str);
            if (m4837a == null) {
                format = context.getString(R.string.f64791name_res_0x7f0a18f6);
            } else if (TextUtils.isEmpty(m4837a.troopname)) {
                format = context.getString(R.string.f64791name_res_0x7f0a18f6);
            } else {
                format = String.format(context.getString(R.string.f64792name_res_0x7f0a18f7), m4837a.troopname);
            }
            return format;
        } catch (Exception e2) {
            e2.printStackTrace();
            return context.getString(R.string.f64791name_res_0x7f0a18f6);
        }
    }

    public static String a(QQAppInterface qQAppInterface, Context context, String str) {
        QidianManager qidianManager = (QidianManager) qQAppInterface.getManager(164);
        if (!qidianManager.b(str, false)) {
            return null;
        }
        return qidianManager.a(context, str);
    }

    public static String a(Context context, MessageRecord messageRecord, QQAppInterface qQAppInterface) {
        String str;
        String format;
        if (messageRecord == null) {
            return null;
        }
        switch (messageRecord.istroop) {
            case 1000:
                try {
                    TroopManager troopManager = (TroopManager) qQAppInterface.getManager(51);
                    TroopInfo m4837a = troopManager.m4837a(troopManager.m4873c(messageRecord.senderuin));
                    if (m4837a == null) {
                        format = context.getString(R.string.f64791name_res_0x7f0a18f6);
                    } else if (TextUtils.isEmpty(m4837a.troopname)) {
                        format = context.getString(R.string.f64791name_res_0x7f0a18f6);
                    } else {
                        format = String.format(context.getString(R.string.f64792name_res_0x7f0a18f7), m4837a.troopname);
                    }
                    return format;
                } catch (Exception e2) {
                    e2.printStackTrace();
                    String string = context.getString(R.string.f64791name_res_0x7f0a18f6);
                    if (QLog.isColorLevel()) {
                        QLog.d(f8604a, 2, "UIN_TYPE_OPEN_TROOP_MEMBER_STRANGER or UIN_TYPE_GROUP_MEMBER_STRANGER error");
                        return string;
                    }
                    return string;
                }
            case 1001:
                return context.getString(R.string.f64795name_res_0x7f0a18fa);
            case 1002:
            case 1003:
            case 1007:
            case 1008:
            case 1011:
            case 1012:
            case 1013:
            case 1014:
            case 1015:
            case 1016:
            case 1017:
            case 1018:
            case 1019:
            case 1021:
            default:
                return null;
            case 1004:
                return context.getString(R.string.f64794name_res_0x7f0a18f9);
            case 1005:
                return context.getString(R.string.f64799name_res_0x7f0a18fe);
            case 1006:
                return context.getString(R.string.f64797name_res_0x7f0a18fc);
            case 1009:
                return context.getString(R.string.f64798name_res_0x7f0a18fd);
            case 1010:
                return context.getString(R.string.f64796name_res_0x7f0a18fb);
            case 1020:
                AppRuntime m1871a = BaseApplicationImpl.f6970a.m1871a();
                if (m1871a == null || !(m1871a instanceof QQAppInterface)) {
                    return null;
                }
                QQAppInterface qQAppInterface2 = (QQAppInterface) BaseApplicationImpl.a().m1871a();
                if (qQAppInterface == null || TextUtils.isEmpty(((HotChatManager) qQAppInterface.getManager(59)).m4387a(messageRecord.senderuin))) {
                    str = null;
                } else {
                    str = context.getString(R.string.f64793name_res_0x7f0a18f8);
                }
                return str;
            case 1022:
                return context.getString(R.string.f64801name_res_0x7f0a1900);
            case 1023:
                return context.getString(R.string.f64802name_res_0x7f0a1901);
        }
    }

    public static CharSequence a(QQAppInterface qQAppInterface, Context context, SessionInfo sessionInfo, MessageRecord messageRecord) {
        if (messageRecord == null) {
            return null;
        }
        String str = messageRecord.senderuin;
        String str2 = messageRecord.frienduin;
        int i2 = messageRecord.istroop;
        if (!messageRecord.isSend() && !MessageUtils.m7812a(messageRecord.msgtype)) {
            if (1000 == i2) {
                String format = String.format(context.getString(R.string.f64779name_res_0x7f0a18ea), sessionInfo.f12450d, ContactUtils.m(qQAppInterface, str));
                a(sessionInfo, messageRecord);
                return format;
            } else if (1020 == i2) {
                return null;
            } else {
                if (1004 == i2) {
                    String format2 = String.format(context.getString(R.string.f64781name_res_0x7f0a18ec), sessionInfo.f12450d, ContactUtils.b(qQAppInterface, str, 3000));
                    a(sessionInfo, messageRecord);
                    return format2;
                } else if (1001 == i2) {
                    return String.format(context.getString(R.string.f64782name_res_0x7f0a18ed), sessionInfo.f12450d);
                } else {
                    if (1006 == i2) {
                        return String.format(context.getString(R.string.f64783name_res_0x7f0a18ee), sessionInfo.f12450d);
                    }
                    if (1009 == i2) {
                        return String.format(context.getString(R.string.f64785name_res_0x7f0a18f0), sessionInfo.f12450d);
                    }
                    if (1005 == i2) {
                        return String.format(context.getString(R.string.f64786name_res_0x7f0a18f1), sessionInfo.f12450d);
                    }
                    if (1022 == i2) {
                        return String.format(context.getString(R.string.f64788name_res_0x7f0a18f3), sessionInfo.f12450d);
                    }
                    if (1023 != i2) {
                        return null;
                    }
                    return String.format(context.getString(R.string.f64789name_res_0x7f0a18f4), sessionInfo.f12450d);
                }
            }
        } else if (1006 != i2) {
            return null;
        } else {
            String format3 = String.format(context.getString(R.string.f64784name_res_0x7f0a18ef), sessionInfo.f12450d);
            String string = context.getString(R.string.f64790name_res_0x7f0a18f5);
            if (f8600a == null) {
                f8600a = new AddFriendSpan(string, context.getResources().getColor(R.color.f38550name_res_0x7f0b0095));
            }
            int lastIndexOf = format3.lastIndexOf(string);
            SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(format3);
            spannableStringBuilder.setSpan(f8600a, lastIndexOf, string.length() + lastIndexOf, 33);
            return spannableStringBuilder;
        }
    }

    private static void a(SessionInfo sessionInfo, MessageRecord messageRecord) {
        if (sessionInfo != null && messageRecord != null && sessionInfo.f85624a != messageRecord.istroop) {
            sessionInfo.f85624a = messageRecord.istroop;
            sessionInfo.f12448b = messageRecord.senderuin;
        }
    }

    public static void c() {
        if (f8605a != null) {
            f8605a.clear();
        } else {
            f8605a = new ConcurrentHashMap();
        }
    }

    public static Integer a(String str, String str2) {
        if (TextUtils.isEmpty(str) || f8605a == null) {
            return null;
        }
        return (Integer) f8605a.get(str + str2);
    }

    public static void a(QQAppInterface qQAppInterface, String str, Integer num) {
        boolean z;
        TroopInfo m4837a;
        if (!TextUtils.isEmpty(str) && qQAppInterface != null && !TextUtils.isEmpty(qQAppInterface.getCurrentAccountUin())) {
            if (QLog.isColorLevel()) {
                QLog.d("ChatActivityUtils.troop.notification_center.show_red_dot", 2, "setTroopTipStatus, troopUin:" + str + ",status:" + num);
            }
            if (num.intValue() == -1 || num.intValue() == 0) {
                if (f8605a == null) {
                    f8605a = new ConcurrentHashMap();
                }
                f8605a.put(str + qQAppInterface.getCurrentAccountUin(), num);
                if (num.intValue() == -1) {
                    TroopManager troopManager = (TroopManager) qQAppInterface.getManager(51);
                    if (troopManager != null && (m4837a = troopManager.m4837a(str)) != null) {
                        String currentAccountUin = qQAppInterface.getCurrentAccountUin();
                        if (!TextUtils.isEmpty(currentAccountUin) && !TextUtils.isEmpty(m4837a.Administrator)) {
                            z = currentAccountUin.equals(m4837a.Administrator) || m4837a.Administrator.contains(currentAccountUin);
                            ReportController.b(qQAppInterface, "dc01332", "Grp_set", "", "AIOchat", "Exp_dataEntry_new", 0, 0, str, !z ? "0" : "1", "", "");
                        }
                    }
                    z = false;
                    ReportController.b(qQAppInterface, "dc01332", "Grp_set", "", "AIOchat", "Exp_dataEntry_new", 0, 0, str, !z ? "0" : "1", "", "");
                }
            }
        }
    }

    public class AddFriendSpan extends URLSpan {
        int f84957a;

        public AddFriendSpan(String str, int i) {
            super(str);
            this.f84957a = -16776961;
            this.f84957a = i;
        }

        @Override
        public void onClick(View view) {
            Context context = view.getContext();
            if ((context instanceof SplashActivity) || (context instanceof ChatActivity)) {
                FragmentActivity fragmentActivity = (FragmentActivity) context;
                if (fragmentActivity.getChatFragment().m2396a() instanceof StrangerChatPie) {
                    ((StrangerChatPie) fragmentActivity.getChatFragment().m2396a()).aC();
                }
            }
        }

        @Override
        public void updateDrawState(TextPaint textPaint) {
            textPaint.setColor(this.f84957a);
        }
    }

    public static void a(QQAppInterface qQAppInterface, View view, FragmentActivity fragmentActivity) {
        ChatMessage m3035a;
        String sb;
        TroopBusinessUtil.TroopBusinessMessage a2;
        String str;
        String str2;
        MessageForLongMsg messageForLongMsg;
        if (QLog.isColorLevel()) {
            QLog.d(ChatItemBuilder.f85581a, 2, "bubble onDoubleClick().");
        }
        if (fragmentActivity != null && fragmentActivity.getCurrentFocus() != null) {
            ((InputMethodManager) fragmentActivity.getSystemService("input_method")).hideSoftInputFromWindow(fragmentActivity.getCurrentFocus().getWindowToken(), 0);
        } else if (QLog.isColorLevel()) {
            QLog.d(ChatItemBuilder.f85581a, 2, "chatActivity current focus is null");
        }
        Context context = view.getContext();
        if (context != null && (m3035a = AIOUtils.m3035a(view)) != null) {
            if (m3035a instanceof MessageForLongMsg) {
                sb = ((RecommendCommonMessage) m3035a).translationInfo.showTranslation ? ((QQText) messageForLongMsg.sb).f30395l + "\n[译文]\n" + ((RecommendCommonMessage) m3035a).translationInfo.translation : ((MessageForLongMsg) m3035a).f88923msg;
            } else if (m3035a instanceof MessageForText) {
                MessageForText messageForText = (MessageForText) m3035a;
                if (!(messageForText.sb instanceof QQText)) {
                    str = null;
                } else {
                    str = ((QQText) messageForText.sb).f30395l;
                }
                if (((RecommendCommonMessage) m3035a).translationInfo.showTranslation) {
                    str = ((QQText) messageForText.sb).f30395l + "\n[译文]\n" + ((RecommendCommonMessage) m3035a).translationInfo.translation;
                }
                if (m3035a.msgtype == -2008) {
                    if (m3035a.isSend()) {
                        str = context.getString(R.string.f65019name_res_0x7f0a19df);
                    } else {
                        str = context.getString(R.string.f65018name_res_0x7f0a19de);
                    }
                }
                sb = str;
            } else if ((m3035a instanceof MessageForReplyText) || (m3035a instanceof MessageForLongMsg)) {
                MessageForReplyText.SourceMsgInfo sourceMsgInfo = null;
                if (m3035a instanceof MessageForReplyText) {
                    sourceMsgInfo = ((MessageForReplyText) m3035a).mSourceMsgInfo;
                } else if (m3035a instanceof MessageForLongMsg) {
                    sourceMsgInfo = ((MessageForLongMsg) m3035a).mSourceMsgInfo;
                }
                StringBuilder sb2 = new StringBuilder();
                if (sourceMsgInfo != null) {
                    String charSequence = TimeFormatterUtils.a(context, 3, sourceMsgInfo.mSourceMsgTime * 1000).toString();
                    String str3 = "";
                    if (!TextUtils.isEmpty(sourceMsgInfo.mAnonymousNickName)) {
                        str3 = sourceMsgInfo.mAnonymousNickName;
                    } else if (sourceMsgInfo.mSourceMsgSenderUin == 50000000) {
                        MessageRecord a3 = ReplyTextItemBuilder.a(qQAppInterface, m3035a.frienduin, m3035a.istroop, sourceMsgInfo.mSourceMsgSeq);
                        if (a3 != null && (a2 = TroopBusinessUtil.a(a3)) != null) {
                            sourceMsgInfo.mAnonymousNickName = a2.f32515c;
                        }
                    } else {
                        str3 = ContactUtils.e(qQAppInterface, m3035a.frienduin, sourceMsgInfo.mSourceMsgSenderUin + "");
                    }
                    sb2.append("“").append(charSequence).append(TroopBarUtils.y).append(str3).append(IOUtils.LINE_SEPARATOR_WINDOWS);
                    if (sourceMsgInfo.mSourceSummaryFlag == 1) {
                        sb2.append(sourceMsgInfo.mSourceMsgText).append(IOUtils.LINE_SEPARATOR_WINDOWS);
                    } else if (sourceMsgInfo.mSourceSummaryFlag == 0) {
                        List m5051a = qQAppInterface.m4635a().m5051a(m3035a.frienduin, 1, sourceMsgInfo.mSourceMsgSeq, 0L);
                        MessageRecord messageRecord = (m5051a == null || m5051a.size() <= 0) ? null : (MessageRecord) m5051a.get(0);
                        if (messageRecord != null) {
                            sb2.append(messageRecord.f88923msg).append(IOUtils.LINE_SEPARATOR_WINDOWS);
                        }
                    }
                    MessageForReplyText.reportReplyMsg(null, "replyMsg_bubble", "doubleClk", m3035a.frienduin, m3035a);
                }
                sb2.append(m3035a.getSummaryMsg());
                sb = sb2.toString();
            } else if (!(m3035a instanceof MessageForMixedMsg)) {
                sb = null;
            } else {
                sb = ((MessageForMixedMsg) m3035a).f88923msg;
            }
            if (sb == null) {
                if (QLog.isColorLevel()) {
                    QLog.d(ChatItemBuilder.f85581a, 2, "bubble onDoubleClick() CharSequence null.");
                    return;
                }
                return;
            }
            Intent intent = new Intent(context, TextPreviewActivity.class);
            intent.putExtra("peeruin", m3035a.frienduin);
            intent.putExtra("uin_type", m3035a.istroop);
            intent.putExtra("content", sb);
            intent.putExtra("uniseq", m3035a.uniseq);
            intent.putExtra(TextPreviewActivity.f, m3035a.vipBubbleID);
            intent.putExtra("senderuin", m3035a.senderuin);
            if (m3035a.isSend()) {
                str2 = m3035a.selfuin;
            } else if (m3035a.istroop == 1000 || m3035a.istroop == 1020 || m3035a.istroop == 1004) {
                str2 = m3035a.frienduin;
            } else {
                str2 = m3035a.senderuin;
            }
            intent.putExtra(TextPreviewActivity.k, str2);
            context.startActivity(intent);
            ((Activity) context).overridePendingTransition(R.anim.f37554name_res_0x7f040018, 0);
            ReportController.b(qQAppInterface, "dc01331", "", "", "long_msg", "long_msg_double", 0, 0, "", "", "", "");
        }
    }

    public static void m2389a(Context context) {
        SpannableString spannableString = new SpannableString(context.getString(R.string.f63484name_res_0x7f0a13db));
        spannableString.setSpan(new StatableSpanTextView.StatableForegroundColorSpan(context.getResources().getColor(R.color.f38552name_res_0x7f0b0097), context.getResources().getColor(R.color.f38553name_res_0x7f0b0098)), spannableString.length() - 7, spannableString.length() - 1, 33);
        DialogUtil.a(context, context.getString(R.string.f63483name_res_0x7f0a13da), spannableString, 0, (int) R.string.f63666name_res_0x7f0a1491, (DialogInterface.OnClickListener) null, (DialogInterface.OnClickListener) null, new jmu(context)).show();
    }

    public static void b(Context context) {
        DialogUtil.a(context, 230, context.getString(R.string.f63485name_res_0x7f0a13dc), context.getString(R.string.f63486name_res_0x7f0a13dd), new jmw(), (DialogInterface.OnClickListener) null).show();
    }

    public static byte[] a(JSONObject jSONObject) {
        if (jSONObject == null) {
            return null;
        }
        if (QLog.isDevelopLevel()) {
            QLog.d(f8604a, 4, jSONObject.toString() + "");
        }
        try {
            String string = jSONObject.has("url") ? jSONObject.getString("url") : null;
            String string2 = jSONObject.has("picture") ? jSONObject.getString("picture") : null;
            String string3 = jSONObject.has("title") ? jSONObject.getString("title") : null;
            String string4 = jSONObject.has("summary") ? jSONObject.getString("summary") : null;
            String string5 = jSONObject.has("brief") ? jSONObject.getString("brief") : null;
            int i2 = jSONObject.has("layout") ? jSONObject.getInt("layout") : 2;
            String string6 = jSONObject.has("source") ? jSONObject.getString("source") : null;
            if (i2 == 6) {
                String string7 = jSONObject.has("price") ? jSONObject.getString("price") : null;
                String string8 = jSONObject.has(JumpAction.cn) ? jSONObject.getString(JumpAction.cn) : null;
                String string9 = jSONObject.has("icon") ? jSONObject.getString("icon") : null;
                String string10 = jSONObject.has(JumpAction.cq) ? jSONObject.getString(JumpAction.cq) : null;
                String string11 = jSONObject.has("action") ? jSONObject.getString("action") : null;
                String string12 = jSONObject.has("a_actionData") ? jSONObject.getString("a_actionData") : null;
                String string13 = jSONObject.has("i_actionData") ? jSONObject.getString("i_actionData") : null;
                String string14 = jSONObject.has("appid") ? jSONObject.getString("appid") : "";
                AbsShareMsg a2 = new AbsShareMsg.Builder(StructMsgForGeneralShare.class).c(41).a(string5).a(7).b(!TextUtils.isEmpty(string14) ? Long.parseLong(string14) : -1L).a(string11, string, null, null, null).a(string6, string9).b(string10, null, null, string12, string13).d(string).a();
                AbsStructMsgItem a3 = StructMsgElementFactory.a(i2);
                a3.a(string2, string3, string4, string7, string8, 0);
                a2.addItem(a3);
                return a2.getBytes();
            }
            String string15 = jSONObject.getString("puin");
            AbsShareMsg a4 = new AbsShareMsg.Builder(StructMsgForGeneralShare.class).c(1).a(string5).e(string).a(string6, null).b("plugin", null, null, AppConstants.VALUE.f17435a + string15, AppConstants.VALUE.f17436b + string15).a();
            AbsStructMsgItem a5 = StructMsgElementFactory.a(2);
            a5.a(string2, string3, string4);
            a4.addItem(a5);
            return a4.getBytes();
        } catch (JSONException e2) {
            if (QLog.isDevelopLevel()) {
                QLog.e(f8604a, 4, "createSecondHandProductInfoStructMsg---JSONException");
            }
            return null;
        }
    }

    public static boolean a(String str, String str2, String str3) {
        BaseApplication context;
        SharedPreferences sharedPreferences;
        if (str == null || str2 == null || str3 == null || (context = BaseApplication.getContext()) == null || (sharedPreferences = context.getSharedPreferences(AppConstants.Key.eb, 0)) == null) {
            return false;
        }
        StringBuilder sb = new StringBuilder();
        sb.append(str).append(str2).append(str3);
        if (sharedPreferences.contains(sb.toString())) {
            return false;
        }
        SharedPreferences.Editor edit = sharedPreferences.edit();
        edit.putInt(sb.toString(), 0);
        edit.commit();
        return true;
    }

    public static void a(SessionInfo sessionInfo, Intent intent) {
        if (sessionInfo != null && intent != null) {
            intent.putExtra("uin", sessionInfo.f12447a);
            intent.putExtra("uintype", sessionInfo.f85624a);
            intent.putExtra(AppConstants.Key.h, sessionInfo.f12450d);
            intent.putExtra("troop_uin", sessionInfo.f12448b);
            intent.putExtra(AppConstants.Key.d, sessionInfo.e);
        }
    }

    public static void b(QQAppInterface qQAppInterface, Context context, int i2, int i3) {
        long m428b = qQAppInterface.m4621a().m428b();
        int a2 = qQAppInterface.m4621a().a();
        int b2 = qQAppInterface.m4621a().b(m428b);
        if (i2 == 1 || a2 == 1) {
            if (b2 == 2 && i3 != 2) {
                context.sendBroadcast(new Intent(VideoConstants.f810bl));
            } else if (b2 != 2 && i3 == 2) {
                context.sendBroadcast(new Intent(VideoConstants.f811bm));
            }
        }
    }

    private static void a(QQAppInterface qQAppInterface, Map map) {
    }

    public static boolean a(QQAppInterface qQAppInterface, Context context, int i2, String str, boolean z, boolean z2, StartVideoListener startVideoListener, Bundle bundle) {
        QLog.w(f8604a, 1, "startGroupAudioEx, uinType[" + i2 + "], uin[" + str + "], checkWifi[" + z + "], checkMutex[" + z2 + "], StartVideoListener[" + (startVideoListener != null) + "], extroBundle[" + (bundle != null) + StepFactory.f18879b);
        AudioHelper.a("ChatActivityUtils.startGroupAudioEx", bundle, true);
        if (!a(qQAppInterface, context, startVideoListener, i2, str)) {
            return true;
        }
        long longValue = Long.valueOf(str).longValue();
        int a2 = UITools.a(i2);
        Bundle bundle2 = bundle == null ? new Bundle() : bundle;
        int i3 = bundle2.getInt(f8607b, 0);
        boolean z3 = bundle2.getBoolean(f8608c, false);
        if (a2 == 2) {
            i3 = 1;
        }
        if (a2 == 1) {
            qQAppInterface.m4621a().a(z3);
        }
        if (a(qQAppInterface, context, a2, i2, longValue, i3)) {
            return true;
        }
        if (!qQAppInterface.m4621a().m423a(a2, longValue, i3) && (!a(qQAppInterface, context, startVideoListener, new jmx(qQAppInterface, context, i2, str, z2, startVideoListener, bundle2), z, z3) || a(qQAppInterface, context, startVideoListener, new jmy(qQAppInterface, context, i2, str, z, startVideoListener, bundle2), z2, str, a2, longValue, i3))) {
            return true;
        }
        ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005776", "0X8005776", 0, 0, "", "", "", "");
        if (startVideoListener != null) {
            startVideoListener.b();
        }
        c(qQAppInterface, context, i2, str, bundle2);
        if (startVideoListener != null) {
            startVideoListener.c();
        }
        qQAppInterface.m4621a().m418a(longValue, i3);
        return true;
    }

    static boolean a(QQAppInterface qQAppInterface, Context context, StartVideoListener startVideoListener, int i2, String str) {
        if ((context instanceof Activity) && ((Activity) context).isFinishing()) {
            QLog.d(f8604a, 1, "startGroupAudio, Activity isDestroyed!");
            return false;
        } else if (!NetworkUtil.e(BaseApplication.getContext())) {
            QLog.d(f8604a, 1, "startGroupAudio, 当前网络不可用");
            QQToast.a(context, (int) R.string.f63256name_res_0x7f0a12f7, 0).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
            ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005767", "0X8005767", 0, 0, "", "", "", "");
            return false;
        } else {
            ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005768", "0X8005768", 0, 0, "", "", "", "");
            if (!VcSystemInfo.m381e()) {
                QQToast.a(context, (int) R.string.f59824name_res_0x7f0a058c, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005769", "0X8005769", 0, 0, "", "", "", "");
                ReportController.b(qQAppInterface, "dc01331", "", "", "0X800576B", "0X800576B", 0, 0, "", "", VcSystemInfo.d(), "");
                ReportController.b(qQAppInterface, "dc01331", "", "", "0X800576C", "0X800576C", 0, 0, "", "", VcSystemInfo.m380e(), "");
                return false;
            }
            ReportController.b(qQAppInterface, "dc01331", "", "", "0X800576A", "0X800576A", 0, 0, "", "", "", "");
            if (!VcSystemInfo.m382f()) {
                QLog.d(f8604a, 1, "startGroupAudio, earlyDown so not ready!");
                QQToast.a(context, (int) R.string.f59700name_res_0x7f0a0510, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                ReportController.b(qQAppInterface, "dc01331", "", "", "0X800576D", "0X800576D", 0, 0, "", "", "", "");
                return false;
            }
            ReportController.b(qQAppInterface, "dc01331", "", "", "0X800576E", "0X800576E", 0, 0, "", "", "", "");
            if (qQAppInterface.m4621a().m421a() && !qQAppInterface.m4707d()) {
                QLog.d(f8604a, 1, "startGroupAudio, 有系统电话");
                String string = context.getString(R.string.f59848name_res_0x7f0a05a4);
                DialogUtil.a(context instanceof Activity ? context : BaseActivity.sTopActivity, 230, context.getString(R.string.f59845name_res_0x7f0a05a1), string, (int) R.string.f63203cancel, (int) R.string.agw, (DialogInterface.OnClickListener) new jmz(startVideoListener), (DialogInterface.OnClickListener) null).show();
                DataReport.a();
                return false;
            }
            if (!VcSystemInfo.h()) {
                QLog.d(f8604a, 1, "startGroupAudio, old engine");
                if (i2 == 1011) {
                    DialogUtil.a(context, 230, context.getString(R.string.f59845name_res_0x7f0a05a1), context.getString(R.string.f60004name_res_0x7f0a0640), (int) R.string.f63203cancel, (int) R.string.f59858name_res_0x7f0a05ae, (DialogInterface.OnClickListener) new jna(startVideoListener), (DialogInterface.OnClickListener) null).show();
                    ReportController.b(qQAppInterface, "CliOper", "", "", "0X80053BD", "0X80053BD", 0, 0, "", "", "", "");
                    return false;
                }
            }
            if (!DiscussionInfo.isValidDisUin(str) && i2 == 3000) {
                QLog.d(f8604a, 1, "startGroupAudio, invalid discussId: " + str);
                return false;
            }
            return true;
        }
    }

    static boolean a(QQAppInterface qQAppInterface, Context context, int i2, int i3, long j2, int i4) {
        if (qQAppInterface.m4621a().m422a(i2, j2) && i2 == 1 && qQAppInterface.m4621a().m452g() && i3 == 1) {
            if (QLog.isColorLevel()) {
                QLog.d(f8604a, 2, "check mutex of qq call and group call!");
            }
            int b2 = qQAppInterface.m4621a().b(qQAppInterface.m4621a().m428b());
            if (b2 != i4) {
                if (b2 == 10 && i4 == 2) {
                    if (qQAppInterface.m4621a().m434b()) {
                        QQToast.a(context, (int) R.string.f59805name_res_0x7f0a0579, 0).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                        return true;
                    }
                    QQToast.a(context, (int) R.string.f59802name_res_0x7f0a0576, 0).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                    return true;
                } else if (b2 == 2 && i4 == 10) {
                    if (qQAppInterface.m4621a().m434b()) {
                        QQToast.a(context, (int) R.string.f59804name_res_0x7f0a0578, 0).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                        return true;
                    }
                    QQToast.a(context, (int) R.string.f59803name_res_0x7f0a0577, 0).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                    return true;
                }
            }
            if (i4 == 2) {
                context.sendBroadcast(new Intent(VideoConstants.f811bm));
            } else {
                context.sendBroadcast(new Intent(VideoConstants.f810bl));
            }
        }
        return false;
    }

    static boolean a(QQAppInterface qQAppInterface, Context context, StartVideoListener startVideoListener, DialogInterface.OnClickListener onClickListener, boolean z, boolean z2) {
        String str;
        String str2 = null;
        if (z && !NetworkUtil.i(BaseApplication.getContext()) && !NetworkUtil.g(BaseApplication.getContext()) && VideoController.d(VideoController.d + qQAppInterface.getCurrentAccountUin()) <= 0) {
            if (NetworkUtil.c(BaseApplication.getContext())) {
                str = context.getString(R.string.f59845name_res_0x7f0a05a1);
                str2 = context.getString(R.string.f59839name_res_0x7f0a059b);
            } else {
                str = null;
            }
            if (NetworkUtil.d(BaseApplication.getContext())) {
                str = context.getString(R.string.f59845name_res_0x7f0a05a1);
                if (z2) {
                    str2 = context.getString(R.string.f59841name_res_0x7f0a059d);
                } else {
                    str2 = context.getString(R.string.f59842name_res_0x7f0a059e);
                }
            }
            if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
                if (QLog.isColorLevel()) {
                    QLog.e(f8604a, 2, "startGAudio title or content is empty");
                }
                return false;
            }
            return false;
        }
        return true;
    }

    static boolean a(QQAppInterface qQAppInterface, Context context, StartVideoListener startVideoListener, DialogInterface.OnClickListener onClickListener, boolean z, String str, int i2, long j2, int i3) {
        if (z && qQAppInterface.m4707d()) {
            int m427b = qQAppInterface.m4621a().m427b();
            int m437c = qQAppInterface.m4621a().m437c();
            int g2 = qQAppInterface.m4621a().g();
            if (((m437c == 1 || m437c == 2) && m427b >= 1 && m427b <= 5) || g2 == 1 || g2 == 2) {
                QQToast.a(context, (int) R.string.f59806name_res_0x7f0a057a, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                QAVHrMeeting.a(qQAppInterface, Long.valueOf(str).longValue(), (DiscussionInfo) null);
                return true;
            } else if (((m437c == 3 || m437c == 4) && m427b >= 1 && m427b <= 5) || g2 == 3 || g2 == 4) {
                long m428b = qQAppInterface.m4621a().m428b();
                if (m428b == j2 && i2 != 1 && i2 != 2) {
                    if (QLog.isColorLevel()) {
                        QLog.e(f8604a, 2, "startGroupAudio-->chatUin==discussid???Why");
                    }
                    return true;
                }
                long m428b2 = qQAppInterface.m4621a().m428b();
                if (m428b2 > 0) {
                    QLog.w(f8604a, 1, "checkMutex, chatingRelationId[" + m428b2 + "], chatUin[" + m428b + "], discussId[" + j2 + StepFactory.f18879b);
                    if (m428b != j2 || (i2 != 2 && i2 != 1)) {
                        String string = context.getString(R.string.f59801name_res_0x7f0a0575);
                        int a2 = TroopMemberUtil.a((AppInterface) qQAppInterface, qQAppInterface.getCurrentAccountUin(), str + "");
                        PopupDialog.a(context, 230, (String) null, string, (int) R.string.f59850name_res_0x7f0a05a6, (int) R.string.f59855name_res_0x7f0a05ab, (DialogInterface.OnClickListener) new jnb(qQAppInterface, context, i2, i3, onClickListener, str, a2), (DialogInterface.OnClickListener) new jnc(startVideoListener, str, a2, qQAppInterface));
                        ReportController.b(null, "dc01332", ReportController.v, "", "video_jump", "exp_jump", 0, 0, str + "", a2 + "", "", "");
                        return true;
                    }
                }
            } else if (qQAppInterface.m4621a().m405a().f81238b != -1) {
                QQToast.a(context, (int) R.string.f59806name_res_0x7f0a057a, 1).b(context.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height));
                QAVHrMeeting.a(qQAppInterface, Long.valueOf(str).longValue(), (DiscussionInfo) null);
                return true;
            }
        }
        return false;
    }

    private static void c(QQAppInterface qQAppInterface, Context context, int i2, String str, Bundle bundle) {
        boolean z;
        DiscussionInfo m4254a;
        if (i2 == 3000 && (m4254a = ((DiscussionManager) qQAppInterface.getManager(52)).m4254a(str)) != null) {
            if (m4254a.isPSTNConf()) {
                AudioHelper.a("发起音视频_获取会议id");
                ConfIdownloadTask.a(f8604a, m4254a.uin, new jnd(bundle, qQAppInterface, context, i2, str));
                z = true;
            } else if (m4254a.isDiscussHrMeeting() && (bundle == null || !bundle.containsKey(j))) {
                AudioHelper.a("发起音视频_获取hr信息");
                QAVHrMeeting.a(qQAppInterface, str, qQAppInterface.getCurrentAccountUin(), new jne(bundle, qQAppInterface, context, i2, str));
                z = true;
            }
            if (z) {
                b(qQAppInterface, context, i2, str, bundle);
                return;
            }
            return;
        }
        z = false;
        if (z) {
        }
    }

    public class ConfIdownloadTask extends BaseDownloadAsyncTask {
        static final String f84958a = "http://pubacc.mobile.qq.com/mqqweb-rtx2qq/mqqweb/get_confid_by_discid?discid=";
        OnDownloadAsyncTaskListener f8611a;
        String f84959b;
        final String f84960c;

        public static void a(String str, String str2, OnDownloadAsyncTaskListener onDownloadAsyncTaskListener) {
            QLog.w(str, 1, "getConfId, uin[" + str2 + StepFactory.f18879b);
            ConfIdownloadTask confIdownloadTask = new ConfIdownloadTask(str, onDownloadAsyncTaskListener);
            ArrayList arrayList = new ArrayList();
            DownloadParams downloadParams = new DownloadParams();
            downloadParams.f3135a = f84958a + str2;
            downloadParams.k = 1000;
            downloadParams.l = 1000;
            downloadParams.j = 0;
            arrayList.add(downloadParams);
            confIdownloadTask.execute(new ArrayList[]{arrayList});
        }

        ConfIdownloadTask(String str, OnDownloadAsyncTaskListener onDownloadAsyncTaskListener) {
            this.f84960c = str;
            this.f8611a = onDownloadAsyncTaskListener;
        }

        @Override
        public void a(DownloadParams downloadParams) {
            String str;
            String str2;
            int i;
            int i2;
            int i3;
            String str3;
            int i4;
            JSONObject jSONObject;
            int i5 = 0;
            int i6 = -100;
            if (downloadParams.f3133a.f3139a) {
                try {
                    str = new String(downloadParams.f3133a.f3140a, "UTF-8");
                } catch (Exception e) {
                    if (QLog.isColorLevel()) {
                        QLog.i(this.f84960c, 2, "getConfId.Complete :" + e.toString());
                    }
                    str = null;
                    i6 = -1;
                }
                if (str != null) {
                    try {
                        JSONObject jSONObject2 = new JSONObject(str);
                        int i7 = jSONObject2.getInt(HttpWebCgiAsyncTask.f94008b);
                        if (QLog.isColorLevel()) {
                            QLog.d(this.f84960c, 2, "getConfId.Complete : retcode = " + i7);
                        }
                        if (i7 == 0 && (jSONObject = jSONObject2.getJSONObject("result")) != null) {
                            str2 = jSONObject.getString("result_code");
                            try {
                                if (str2.equals("0")) {
                                    String string = jSONObject.getString("confidshort");
                                    String string2 = jSONObject.getString("pstnappid");
                                    if (!TextUtils.isEmpty(string) && string.compareToIgnoreCase(AppConstants.dF) != 0) {
                                        i = Integer.valueOf(string).intValue();
                                        try {
                                            i4 = Integer.valueOf(string2).intValue();
                                        } catch (JSONException e2) {
                                            i6 = -3;
                                            if (QLog.isColorLevel()) {
                                                QLog.i(this.f84960c, 2, "getConfId.Complete : errorCode = " + str2 + ",ret = -3");
                                            }
                                            String str4 = str;
                                            i2 = i;
                                            i3 = 0;
                                            str3 = str4;
                                            QLog.w(this.f84960c, 1, "getConfId.Complete, ret[" + i6 + "], appId[" + i3 + "], confid[" + i2 + "], content[" + str3 + StepFactory.f18879b);
                                            if (this.f8611a != null) {
                                            }
                                        } catch (Exception e3) {
                                            i6 = -4;
                                            if (QLog.isColorLevel()) {
                                                QLog.i(this.f84960c, 2, "getConfId.Complete : errorCode = " + str2 + ",ret = -4");
                                            }
                                            String str5 = str;
                                            i2 = i;
                                            i3 = 0;
                                            str3 = str5;
                                            QLog.w(this.f84960c, 1, "getConfId.Complete, ret[" + i6 + "], appId[" + i3 + "], confid[" + i2 + "], content[" + str3 + StepFactory.f18879b);
                                            if (this.f8611a != null) {
                                            }
                                        }
                                    } else {
                                        i = 0;
                                        i5 = -2;
                                        i4 = 0;
                                    }
                                    String str6 = str;
                                    i2 = i;
                                    i3 = i4;
                                    i6 = i5;
                                    str3 = str6;
                                }
                            } catch (JSONException e4) {
                                i = 0;
                            } catch (Exception e5) {
                                i = 0;
                            }
                        }
                        i = 0;
                        i5 = i7;
                        i4 = 0;
                        String str62 = str;
                        i2 = i;
                        i3 = i4;
                        i6 = i5;
                        str3 = str62;
                    } catch (JSONException e6) {
                        str2 = null;
                        i = 0;
                    } catch (Exception e7) {
                        str2 = null;
                        i = 0;
                    }
                } else {
                    i3 = 0;
                    String str7 = str;
                    i2 = 0;
                    str3 = str7;
                }
            } else {
                i3 = 0;
                i2 = 0;
                str3 = null;
            }
            QLog.w(this.f84960c, 1, "getConfId.Complete, ret[" + i6 + "], appId[" + i3 + "], confid[" + i2 + "], content[" + str3 + StepFactory.f18879b);
            if (this.f8611a != null) {
                this.f8611a.a(i3, i2);
                this.f8611a = null;
            }
        }
    }

    static Bundle a(Map map) {
        String str;
        Map.Entry entry;
        Object value;
        Bundle bundle = new Bundle();
        if (map != null) {
            if (map.containsKey("actid")) {
                bundle.putString("actId", (String) map.get("actid"));
            }
            if (map.containsKey("mp_ext_params")) {
                bundle.putString("mp_ext_params", (String) map.get("mp_ext_params"));
            }
            String str2 = (String) map.get(f8607b);
            if (str2 != null) {
                bundle.putInt(f8607b, Integer.valueOf(str2).intValue());
            }
            bundle.putBoolean(f8608c, TextUtils.equals((String) map.get(f8608c), "true"));
            bundle.putString("jump_from", (String) map.get("jump_from"));
            String str3 = (String) map.get("Fromwhere");
            if (!TextUtils.isEmpty(str3)) {
                bundle.putString("Fromwhere", str3);
            }
            bundle.putBoolean("isAVMeeting", TextUtils.equals((String) map.get("isAVMeeting"), "true"));
            bundle.putBoolean("isAVGroupMeeting", TextUtils.equals((String) map.get("isAVGroupMeeting"), "true"));
            if (map.containsKey(l)) {
                bundle.putInt(l, Integer.valueOf((String) map.get(l)).intValue());
            }
            if (map.containsKey(k)) {
                bundle.putInt(k, Integer.valueOf((String) map.get(k)).intValue());
            }
            String str4 = (String) map.get("PhoneNumberList");
            if (str4 != null) {
                bundle.putStringArrayList("phoneNumbers", PstnUtils.c(str4));
            }
            String str5 = (String) map.get("PstnLevel");
            if (str5 != null) {
                bundle.putString("PstnLevel", str5);
            }
            String str6 = (String) map.get("PLACE");
            if (str6 != null) {
                bundle.putString("PLACE", str6);
            }
            String str7 = (String) map.get("CREATE_PLACE");
            if (str7 != null) {
                bundle.putString("CREATE_PLACE", str7);
            }
            String str8 = (String) map.get("ipPstnEnterType");
            if (!TextUtils.isEmpty(str8)) {
                bundle.putInt("ipPstnEnterType", Integer.parseInt(str8));
            }
            bundle.putString(TroopConstants.bM, (String) map.get(TroopConstants.bM));
        }
        String str9 = "";
        if (map != null) {
            Iterator it = map.entrySet().iterator();
            while (true) {
                str = str9;
                if (!it.hasNext()) {
                    break;
                }
                str9 = str + "  [" + ((String) entry.getKey()) + "]=[" + ((Map.Entry) it.next()).getValue() + "], [" + value.getClass().getName() + "]\n";
            }
        } else {
            str = AppConstants.dF;
        }
        QLog.w(f8604a, 1, "strExtroInfo[extroInfo2Bundle]:\n" + str);
        AudioHelper.a("ChatActivityUtils_extroInfo2Bundle", bundle, true);
        return bundle;
    }

    static void a(QQAppInterface qQAppInterface, long j2) {
        if (QLog.isColorLevel()) {
            QLog.d(f8604a, 2, "ChatActivityUtils.ACTION_CALLING_DIALOG");
        }
        if (qQAppInterface != null) {
            QLog.d(f8604a, 1, "HR_meeting Finish quit DiscussionId = " + j2);
            ((DiscussionHandler) qQAppInterface.getBusinessHandler(6)).d(j2);
            ((DiscussionManager) qQAppInterface.getManager(52)).c(String.valueOf(j2));
            RecentUserProxy m5113a = qQAppInterface.m4638a().m5113a();
            RecentUser b2 = m5113a.b(String.valueOf(j2), 3000);
            if (b2 != null) {
                m5113a.b(b2);
            }
            ((DiscussionHandler) qQAppInterface.getBusinessHandler(6)).d();
        }
    }
}