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

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


package com.tencent.mobileqq.activity.aio;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.preference.PreferenceManager;
import android.support.v4.app.FragmentActivity;
import android.text.TextUtils;
import android.util.Pair;
import com.dataline.activities.LiteActivity;
import com.tencent.av.VideoConstants;
import com.tencent.av.app.PstnSessionInfo;
import com.tencent.av.camera.QavCameraUsage;
import com.tencent.av.utils.PstnUtils;
import com.tencent.av.utils.VideoActionSheet;
import com.tencent.biz.PoiMapActivity;
import com.tencent.biz.anonymous.AnonymousChatHelper;
import com.tencent.biz.pubaccount.PublicAccountBrowser;
import com.tencent.biz.pubaccount.subscript.SubscriptRecommendController;
import com.tencent.common.app.AppInterface;
import com.tencent.common.app.BaseApplicationImpl;
import com.tencent.device.devicemgr.SmartDeviceProxyMgr;
import com.tencent.device.utils.SmartDeviceReport;
import com.tencent.image.URLDrawable;
import com.tencent.mobileqq.activity.BaseChatPie;
import com.tencent.mobileqq.activity.ChatActivity;
import com.tencent.mobileqq.activity.ChatActivityConstants;
import com.tencent.mobileqq.activity.ChatActivityUtils;
import com.tencent.mobileqq.activity.PayBridgeActivity;
import com.tencent.mobileqq.activity.QQBrowserActivity;
import com.tencent.mobileqq.activity.SplashActivity;
import com.tencent.mobileqq.activity.aio.panel.AIOPanelUtiles;
import com.tencent.mobileqq.activity.aio.rebuild.FriendChatPie;
import com.tencent.mobileqq.activity.photo.AlbumListActivity;
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.qwallet.PasswdRedBagManager;
import com.tencent.mobileqq.activity.qwallet.SendHbActivity;
import com.tencent.mobileqq.activity.qwallet.report.VACDReportUtil;
import com.tencent.mobileqq.activity.shortvideo.SendVideoActivity;
import com.tencent.mobileqq.app.AppConstants;
import com.tencent.mobileqq.app.BaseActivity;
import com.tencent.mobileqq.app.DeviceProfileManager;
import com.tencent.mobileqq.app.DiscussionManager;
import com.tencent.mobileqq.app.FlashPicHelper;
import com.tencent.mobileqq.app.HotChatManager;
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.app.ThreadManager;
import com.tencent.mobileqq.app.TroopHandler;
import com.tencent.mobileqq.app.TroopManager;
import com.tencent.mobileqq.app.TroopObserver;
import com.tencent.mobileqq.cloudfile.CloudFileConstants;
import com.tencent.mobileqq.cloudfile.CloudFileDirBrowserActivity;
import com.tencent.mobileqq.cloudfile.CloudFileManager;
import com.tencent.mobileqq.data.TroopInfo;
import com.tencent.mobileqq.filemanager.activity.FMActivity;
import com.tencent.mobileqq.filemanager.activity.FMLocalFileActivity;
import com.tencent.mobileqq.filemanager.data.FMConstants;
import com.tencent.mobileqq.filemanager.data.FileInfo;
import com.tencent.mobileqq.jsp.DocxApiPlugin;
import com.tencent.mobileqq.jumplightalk.AIOJumpLightalkConfig;
import com.tencent.mobileqq.model.PhoneContactManager;
import com.tencent.mobileqq.pic.PresendPicMgrService;
import com.tencent.mobileqq.qcall.PstnCardInfo;
import com.tencent.mobileqq.qcall.PstnManager;
import com.tencent.mobileqq.sensewhere.SenseWhereManager;
import com.tencent.mobileqq.service.report.ReportConstants;
import com.tencent.mobileqq.statistics.ReportController;
import com.tencent.mobileqq.statistics.ReportUtils;
import com.tencent.mobileqq.teamwork.TeamWorkListActivity;
import com.tencent.mobileqq.util.HbThemeConfigManager;
import com.tencent.mobileqq.util.Utils;
import com.tencent.mobileqq.utils.AlbumConstants;
import com.tencent.mobileqq.utils.AlbumUtil;
import com.tencent.mobileqq.utils.AudioHelper;
import com.tencent.mobileqq.utils.Base64Util;
import com.tencent.mobileqq.utils.DialogUtil;
import com.tencent.mobileqq.utils.ImageUtil;
import com.tencent.mobileqq.utils.JumpAction;
import com.tencent.mobileqq.utils.LogTag;
import com.tencent.mobileqq.utils.NetworkUtil;
import com.tencent.mobileqq.webview.swift.component.SwiftBrowserUIStyleHandler;
import com.tencent.mobileqq.widget.QQToast;
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.BinderWarpper;
import com.tencent.widget.ActionSheet;
import cooperation.peak.PeakConstants;
import cooperation.peak.PeakUtils;
import cooperation.qqfav.QfavHelper;
import cooperation.qqfav.QfavReport;
import cooperation.qwallet.plugin.QWalletHelper;
import cooperation.smartdevice.SmartDeviceConst;
import java.io.File;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
public class PlusPanelUtils {
    public static final int f85621a = 1;
    private static TroopObserver f12440a = null;
    public static String f12441a = null;
    public static final int f85622b = 2;
    public static String f12442b = null;
    public static final int f85623c = 3;
    public static final int d = 4;
    public static final int e = 5;
    public static final int f = 5;
    public static final int g = 0;
    public static final int h = 1;
    public static final int i = 2;
    public static final int j = 0;
    public static final int k = 3;
    static int l;
    public static int m;
    public static int n;
    public long f12443a;
    private Dialog f12444a;

    public static void a(QQAppInterface qQAppInterface, Context context, SessionInfo sessionInfo, boolean z, String str, BaseChatPie baseChatPie) {
        int i2;
        int i3;
        int i4;
        int i5;
        AIOJumpLightalkConfig a2;
        int i6;
        if (!VideoActionSheet.a()) {
            VideoActionSheet a3 = VideoActionSheet.a(context);
            int[] iArr = new int[5];
            if ((sessionInfo.f85624a == 1025 || sessionInfo.f85624a == 0 || sessionInfo.f85624a == 1000 || sessionInfo.f85624a == 1004) && ((QidianManager) qQAppInterface.getManager(164)).m10183c(sessionInfo.f12447a)) {
                iArr[0] = 5;
                a3.c(R.string.f58415name_res_0x7f0a0009);
                i2 = 1;
            } else {
                i2 = 0;
            }
            iArr[i2] = 1;
            a3.c(R.string.f63760name_res_0x7f0a14ef);
            int i7 = i2 + 1;
            PstnManager pstnManager = (PstnManager) qQAppInterface.getManager(142);
            PstnCardInfo m7425a = pstnManager.m7425a(qQAppInterface.getCurrentAccountUin());
            PstnSessionInfo a4 = PstnUtils.a(qQAppInterface, new PstnSessionInfo(), sessionInfo.f12447a, sessionInfo.f85624a);
            if (a4.f925b != null && a4.f926c != null) {
                a4.d = sessionInfo.f12450d;
                if (m7425a != null && pstnManager.m7423a() == 1 && pstnManager.m7426a().f26806c == 1) {
                    a3.a(R.string.f66306name_res_0x7f0a1ee6);
                    if (m7425a.pstn_c2c_call_time > 0) {
                        a3.a(qQAppInterface.getApplication().getBaseContext().getResources().getString(R.string.f66304name_res_0x7f0a1ee4), qQAppInterface.getApplication().getBaseContext().getResources().getDrawable(R.drawable.f42961name_res_0x7f020760), 0);
                        ReportController.b(qQAppInterface, "dc01331", "", "", "0X80063FD", "0X80063FD", 1, 0, "", "", "", "");
                        i6 = 1;
                    } else if (pstnManager.b() == 1 && m7425a.pstn_c2c_try_status == 0) {
                        a3.a(qQAppInterface.getApplication().getBaseContext().getResources().getString(R.string.f66304name_res_0x7f0a1ee4), qQAppInterface.getApplication().getBaseContext().getResources().getDrawable(R.drawable.f42960name_res_0x7f02075f), 0);
                        ReportController.b(qQAppInterface, "dc01331", "", "", "0X80063FD", "0X80063FD", 3, 0, "", "", "", "");
                        i6 = 2;
                    } else {
                        a3.a(qQAppInterface.getApplication().getBaseContext().getResources().getString(R.string.f66304name_res_0x7f0a1ee4), qQAppInterface.getApplication().getBaseContext().getResources().getDrawable(R.drawable.f42959name_res_0x7f02075e), 0);
                        ReportController.b(qQAppInterface, "dc01331", "", "", "0X80063FD", "0X80063FD", 2, 0, "", "", "", "");
                        i6 = 5;
                    }
                    iArr[i7] = 4;
                    i3 = i6;
                    i4 = i7 + 1;
                    iArr[i4] = 2;
                    a3.c(R.string.f63758name_res_0x7f0a14ed);
                    i5 = i4 + 1;
                    if ((baseChatPie instanceof FriendChatPie) && (a2 = ((FriendChatPie) baseChatPie).a()) != null) {
                        if (!NetworkUtil.e(context) && !TextUtils.isEmpty(a2.g)) {
                            a3.a(a2.f, URLDrawable.getDrawable(a2.g, 0, 0, (Drawable) null, (Drawable) null, false), 0);
                        } else {
                            a3.c(a2.f);
                        }
                        iArr[i5] = 3;
                        ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005B01", "0X8005B01", 0, 0, "", "", "", "");
                    }
                    a3.d(R.string.f63203cancel);
                    a3.a(new mbj(qQAppInterface, iArr));
                    a3.a(new mbm(a3, iArr, i3, qQAppInterface, context, a4, sessionInfo, baseChatPie, str));
                    a3.show();
                    ReportController.b(qQAppInterface, "dc01331", "", "", "0X8004D68", "0X8004D68", 0, 0, "", "", "", "");
                }
            }
            i3 = 0;
            i4 = i7;
            iArr[i4] = 2;
            a3.c(R.string.f63758name_res_0x7f0a14ed);
            i5 = i4 + 1;
            if (baseChatPie instanceof FriendChatPie) {
                if (!NetworkUtil.e(context)) {
                }
                a3.c(a2.f);
                iArr[i5] = 3;
                ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005B01", "0X8005B01", 0, 0, "", "", "", "");
            }
            a3.d(R.string.f63203cancel);
            a3.a(new mbj(qQAppInterface, iArr));
            a3.a(new mbm(a3, iArr, i3, qQAppInterface, context, a4, sessionInfo, baseChatPie, str));
            a3.show();
            ReportController.b(qQAppInterface, "dc01331", "", "", "0X8004D68", "0X8004D68", 0, 0, "", "", "", "");
        }
    }

    public static ActionSheet a(QQAppInterface qQAppInterface, Activity activity, int i2, String str, boolean z, boolean z2, Handler.Callback callback, int i3) {
        ActionSheet a2 = ActionSheet.a(activity);
        int i4 = 0;
        if (i3 == 0) {
            a2.c(R.string.f61284name_res_0x7f0a0b41);
        } else if (i3 == 1) {
            a2.c(R.string.f63760name_res_0x7f0a14ef);
            PstnManager pstnManager = (PstnManager) qQAppInterface.getManager(142);
            PstnCardInfo m7425a = pstnManager.m7425a(qQAppInterface.getCurrentAccountUin());
            if (m7425a != null && pstnManager.m7423a() == 1 && pstnManager.m7426a().f26809f == 1) {
                a2.m10333a(R.string.f66306name_res_0x7f0a1ee6);
                if (m7425a.pstn_multi_call_time > 0) {
                    a2.a(qQAppInterface.getApplication().getBaseContext().getResources().getString(R.string.f66304name_res_0x7f0a1ee4), qQAppInterface.getApplication().getBaseContext().getResources().getDrawable(R.drawable.f42961name_res_0x7f020760), 0);
                    ReportController.b(qQAppInterface, "dc01331", "", "", "0X80063FE", "0X80063FE", 1, 0, "", "", "", "");
                    i4 = 3;
                } else if (pstnManager.c() == 1 && m7425a.pstn_multi_try_status == 0) {
                    a2.a(qQAppInterface.getApplication().getBaseContext().getResources().getString(R.string.f66304name_res_0x7f0a1ee4), qQAppInterface.getApplication().getBaseContext().getResources().getDrawable(R.drawable.f42960name_res_0x7f02075f), 0);
                    ReportController.b(qQAppInterface, "dc01331", "", "", "0X80063FE", "0X80063FE", 3, 0, "", "", "", "");
                    i4 = 4;
                } else {
                    a2.a(qQAppInterface.getApplication().getBaseContext().getResources().getString(R.string.f66304name_res_0x7f0a1ee4), qQAppInterface.getApplication().getBaseContext().getResources().getDrawable(R.drawable.f42959name_res_0x7f02075e), 0);
                    ReportController.b(qQAppInterface, "dc01331", "", "", "0X80063FE", "0X80063FE", 2, 0, "", "", "", "");
                    i4 = 5;
                }
            }
        }
        a2.d(R.string.f63203cancel);
        a2.a(new mbn(qQAppInterface));
        a2.a(new mbo(a2, qQAppInterface, activity, i2, str, i3, i4));
        a2.show();
        ReportController.b(qQAppInterface, "dc01331", "", "", "0X8004D6C", "0X8004D6C", 0, 0, "", "", "", "");
        return a2;
    }

    public static void a(QQAppInterface qQAppInterface, Context context, SessionInfo sessionInfo, boolean z, String str, Map map) {
        String str2;
        String str3;
        if (z) {
            str2 = "0X80049C5";
        } else {
            str2 = "0X80049C7";
        }
        switch (sessionInfo.f85624a) {
            case 0:
                str3 = "0";
                break;
            case 1000:
                str3 = "2";
                break;
            case 1001:
                str3 = "4";
                break;
            case 1004:
                str3 = "1";
                break;
            case 1006:
                str3 = "3";
                break;
            case 1010:
                str3 = "7";
                break;
            case 1024:
                str3 = "6";
                break;
            default:
                str3 = "0";
                break;
        }
        ReportController.b(qQAppInterface, "dc01331", "", "", str2, str2, 0, 0, str3, "", "", "");
        b(qQAppInterface, context, sessionInfo, z, str, map);
    }

    public static void b(QQAppInterface qQAppInterface, Context context, SessionInfo sessionInfo, boolean z, String str, Map map) {
        String str2;
        String mo4537b;
        PhoneContactManager phoneContactManager = (PhoneContactManager) qQAppInterface.getManager(10);
        if (sessionInfo.f85624a == 1006) {
            str2 = phoneContactManager.mo4526a(sessionInfo.f12447a);
            mo4537b = sessionInfo.f12447a;
        } else {
            str2 = sessionInfo.f12447a;
            mo4537b = phoneContactManager.mo4537b(str2);
        }
        if (str == null) {
            ChatActivityUtils.a(qQAppInterface, context, sessionInfo.f85624a, str2, sessionInfo.f12450d, mo4537b, z, sessionInfo.f12448b, true, true, (ChatActivityUtils.StartVideoListener) null, VideoConstants.f770aZ, map);
        } else {
            ChatActivityUtils.a(qQAppInterface, context, sessionInfo.f85624a, str2, sessionInfo.f12450d, mo4537b, z, sessionInfo.f12448b, true, true, (ChatActivityUtils.StartVideoListener) null, str, map);
        }
    }

    public static String a() {
        return a(AppConstants.bN);
    }

    public static String a(String str) {
        Calendar calendar = Calendar.getInstance();
        StringBuilder sb = new StringBuilder(str);
        sb.append("IMG");
        sb.append(calendar.get(1));
        int i2 = calendar.get(2) + 1;
        sb.append(i2 < 10 ? "0" + i2 : Integer.valueOf(i2));
        int i3 = calendar.get(5);
        sb.append(i3 < 10 ? "0" + i3 : Integer.valueOf(i3));
        int i4 = calendar.get(11);
        sb.append(i4 < 10 ? "0" + i4 : Integer.valueOf(i4));
        int i5 = calendar.get(12);
        sb.append(i5 < 10 ? "0" + i5 : Integer.valueOf(i5));
        int i6 = calendar.get(13);
        sb.append(i6 < 10 ? "0" + i6 : Integer.valueOf(i6));
        if (!new File(sb.toString() + ".jpg").exists()) {
            return sb.toString() + ".jpg";
        }
        StringBuilder sb2 = new StringBuilder(sb);
        int length = sb.length();
        for (int i7 = 1; i7 < Integer.MAX_VALUE; i7++) {
            sb2.append('(');
            sb2.append(i7);
            sb2.append(')');
            sb2.append(".jpg");
            if (!new File(sb2.toString()).exists()) {
                break;
            }
            sb2.delete(length, sb2.length());
        }
        return sb2.toString();
    }

    public static void m3098a(String str) {
        File file = new File(str);
        if (!file.exists()) {
            file.mkdirs();
        }
        if (!new File(str + ".nomedia").exists()) {
            ThreadManager.a(new mbp(str), 5, null, false);
        }
    }

    public static void a(AppInterface appInterface, Activity activity, int i2, SessionInfo sessionInfo) {
        if (!QavCameraUsage.b(BaseApplicationImpl.getContext())) {
            if (!Utils.m9070b()) {
                QQToast.a(activity, activity.getResources().getString(R.string.f64207name_res_0x7f0a16ae), 0).m9833a();
                return;
            }
            long currentTimeMillis = System.currentTimeMillis() - System.currentTimeMillis();
            String a2 = a(AppConstants.bN);
            File file = new File(AppConstants.bN);
            if (!file.exists()) {
                file.mkdirs();
            }
            Uri fromFile = Uri.fromFile(new File(a2));
            PreferenceManager.getDefaultSharedPreferences(activity).edit().putString(AppConstants.Preferences.aU, a2).commit();
            Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
            intent.putExtra("output", fromFile);
            intent.putExtra("android.intent.extra.quickCapture", true);
            if (QLog.isColorLevel()) {
                QLog.i("Q.camera.enterCamera", 2, "[enterCamera] + ENTER sysCamera takeTime: " + currentTimeMillis);
            }
            intent.setFlags(536870912);
            intent.putExtra("android.intent.extra.videoQuality", 100);
            try {
                activity.startActivityForResult(intent, i2);
            } catch (Exception e2) {
                e2.printStackTrace();
                QQToast.a(activity, (int) R.string.f64211name_res_0x7f0a16b2, 0).m9833a();
            }
        }
    }

    public static void a(QQAppInterface qQAppInterface, Context context, Uri uri, SessionInfo sessionInfo) {
        new mbq(sessionInfo, qQAppInterface, context, ImageUtil.c(context, uri)).execute(new Void[0]);
    }

    public static void a(BaseActivity baseActivity, SessionInfo sessionInfo, QQAppInterface qQAppInterface, Intent intent) {
        a(baseActivity.app, baseActivity, sessionInfo, (ArrayList) null, (Intent) null);
    }

    public static boolean a(SessionInfo sessionInfo, boolean z) {
        boolean z2 = true;
        boolean m4234a = DeviceProfileManager.m4227a().m4234a(DeviceProfileManager.AccountDpcManager.DpcAccountNames.picpresend_whitelist.name());
        SharedPreferences sharedPreferences = BaseApplication.getContext().getSharedPreferences(PeakConstants.cl, Build.VERSION.SDK_INT > 10 ? 4 : 0);
        boolean z3 = sharedPreferences.getBoolean(PeakConstants.co, false);
        if (z3) {
            if (System.currentTimeMillis() - sharedPreferences.getLong(PeakConstants.cn, 0L) > 86400000) {
                if (QLog.isColorLevel()) {
                    QLog.d("PEAK", 2, "isPresendAllowed,PicPresend off more than 24h ,enable PicPresend!");
                }
                sharedPreferences.edit().putBoolean(PeakConstants.co, false).commit();
                z3 = false;
            }
        }
        if (DeviceProfileManager.m4227a().m4234a(DeviceProfileManager.AccountDpcManager.DpcAccountNames.picpredownload_whitelist.name())) {
            if (QLog.isColorLevel()) {
                QLog.d("PEAK", 2, "isPresendAllowed ,is VIP User");
            }
            z3 = false;
        }
        if (sessionInfo.f85624a == 1001 && !z) {
            if (QLog.isColorLevel()) {
                QLog.d("PEAK", 2, "isPresendAllowed,old lbs protocol ,disable PicPresend!");
            }
            z3 = true;
        }
        if (sessionInfo.f85624a == 9500 || sessionInfo.f85624a == 9501) {
            if (QLog.isColorLevel()) {
                QLog.d("PEAK", 2, "curType is smart device ,disable PicPresend!");
            }
            z3 = true;
        }
        String a2 = DeviceProfileManager.m4227a().a(DeviceProfileManager.DpcNames.pic_presend.name(), DeviceProfileManager.k);
        if (!z3 && a2 != null && a2.length() > 0) {
            String[] split = a2.split("\\|");
            if (split.length >= 4) {
                boolean equals = split[0].equals("1");
                boolean equals2 = split[1].equals("1");
                boolean equals3 = split[2].equals("1");
                boolean equals4 = split[3].equals("1");
                int a3 = NetworkUtil.a((Context) BaseApplicationImpl.getContext());
                switch (a3) {
                    case 1:
                        if (!equals) {
                            z3 = true;
                            break;
                        } else {
                            z3 = false;
                            break;
                        }
                    case 2:
                        if (!equals2) {
                            z3 = true;
                            break;
                        } else {
                            z3 = false;
                            break;
                        }
                    case 3:
                        if (!equals3) {
                            z3 = true;
                            break;
                        } else {
                            z3 = false;
                            break;
                        }
                    case 4:
                        if (!equals4) {
                            z3 = true;
                            break;
                        } else {
                            z3 = false;
                            break;
                        }
                }
                if (QLog.isColorLevel()) {
                    QLog.d("PEAK", 2, "isPresendAllowed netType = " + a3 + ",enablePreCompress_WIFI:" + equals + ", enablePreCompress_2G = " + equals2 + ", enablePreCompress_3G = " + equals3 + ", enablePreCompress_4G = " + equals4 + ", presendOFF  = " + z3);
                }
            }
        }
        if (m4234a || z3) {
            z2 = false;
        }
        if (QLog.isColorLevel()) {
            QLog.d("PEAK", 2, "isPresendAllowed, isInDPCPicPresendWhiteList :" + m4234a + ", presendOFF = " + z3 + ", result  = " + z2);
        }
        return z2;
    }

    public static void a(Intent intent, SessionInfo sessionInfo, QQAppInterface qQAppInterface) {
        if (a(sessionInfo, qQAppInterface.m4696b(sessionInfo.f12447a))) {
            if (QLog.isColorLevel()) {
                QLog.d("PEAK", 2, "prepareForPicPresend add binder!");
            }
            intent.putExtra(PeakConstants.cf, new BinderWarpper(new PresendPicMgrService(sessionInfo.f85624a, sessionInfo.f12447a, sessionInfo.f12448b, qQAppInterface.getAccount()).asBinder()));
        }
    }

    public static int a(SessionInfo sessionInfo) {
        int i2 = AlbumUtil.a(sessionInfo.f85624a) ? 0 : 1;
        if (AnonymousChatHelper.a().m897a(sessionInfo.f12447a)) {
            return 1;
        }
        return i2;
    }

    public static void a(AppInterface appInterface, Activity activity, SessionInfo sessionInfo, ArrayList arrayList, Intent intent) {
        Intent intent2;
        boolean z;
        int i2;
        Intent intent3 = new Intent(activity, AlbumListActivity.class);
        intent3.putExtra(PhotoPreviewActivity.e, FlashPicHelper.a(sessionInfo.f85624a, sessionInfo.f12448b));
        intent3.putExtra("PhotoConst.SEND_BUSINESS_TYPE", 1007);
        if (!SplashActivity.class.isInstance(activity) && !ChatActivity.class.isInstance(activity) && !LiteActivity.class.isInstance(activity)) {
            intent3.putExtras(activity.getIntent());
            intent2 = intent3;
        } else {
            if (activity instanceof SplashActivity) {
                intent3.putExtra("PhotoConst.INIT_ACTIVITY_CLASS_NAME", SplashActivity.class.getName());
                intent3 = AIOUtils.a(intent3, (int[]) null);
            } else if (activity instanceof LiteActivity) {
                intent3.putExtra("PhotoConst.INIT_ACTIVITY_CLASS_NAME", LiteActivity.class.getName());
            } else {
                intent3.putExtra("PhotoConst.INIT_ACTIVITY_CLASS_NAME", ChatActivity.class.getName());
            }
            intent3.putExtra("PhotoConst.INIT_ACTIVITY_PACKAGE_NAME", "com.tencent.tim");
            intent3.putExtra(ChatActivityConstants.Q, ChatActivityUtils.a(activity));
            if (sessionInfo.f85624a == 9501) {
                if (activity instanceof SplashActivity) {
                    intent3.putExtra(PeakConstants.f69373M, SplashActivity.class.getName());
                    intent2 = AIOUtils.a(intent3, (int[]) null);
                } else {
                    intent3.putExtra(PeakConstants.f69373M, ChatActivity.class.getName());
                    intent2 = intent3;
                }
                intent2.putExtra(AlbumConstants.i, 80);
                intent2.putExtra(PeakConstants.f69374N, "com.tencent.tim");
                intent2.putExtra(PeakConstants.aF, true);
                intent2.putExtra(PeakConstants.bQ, false);
                SmartDeviceProxyMgr smartDeviceProxyMgr = (SmartDeviceProxyMgr) appInterface.getBusinessHandler(51);
                if (smartDeviceProxyMgr != null && smartDeviceProxyMgr.m1972a()) {
                    long j2 = 0;
                    try {
                        j2 = Long.parseLong(sessionInfo.f12447a);
                    } catch (Exception e2) {
                        e2.printStackTrace();
                    }
                    if (smartDeviceProxyMgr.m1975a(j2, 1)) {
                        intent2.putExtra(PeakConstants.aG, true);
                    }
                }
            } else {
                intent3.putExtra(PeakConstants.f69373M, SendPhotoActivity.class.getName());
                intent3.putExtra(PeakConstants.f69374N, "com.tencent.tim");
                intent3.putExtra(PeakConstants.aF, true);
                intent2 = intent3;
            }
            intent2.putExtra(PeakConstants.f69375O, SendVideoActivity.class.getName());
            intent2.putExtra(PeakConstants.f69376P, "com.tencent.tim");
        }
        if (QLog.isColorLevel()) {
            QLog.d("PEAK", 2, "enterAlbum() INIT_ACTIVITY_CLASS_NAME=" + intent2.getStringExtra("PhotoConst.INIT_ACTIVITY_CLASS_NAME"));
        }
        intent2.putExtra(PeakConstants.f69410ax, true);
        int i3 = 20;
        boolean z2 = false;
        if (intent == null) {
            z = false;
            i2 = -1;
        } else {
            int intExtra = intent.getIntExtra(PeakConstants.bc, -1);
            intent2.putExtra(PeakConstants.aQ, intent.getIntExtra(PeakConstants.aQ, 0));
            i3 = intent.getIntExtra("PhotoConst.MAXUM_SELECTED_NUM", 20);
            z2 = intent.getBooleanExtra(PeakConstants.f69366F, false);
            boolean booleanExtra = intent.getBooleanExtra(PeakConstants.cC, false);
            int intExtra2 = intent.getIntExtra("PhotoConst.SEND_BUSINESS_TYPE", -1);
            if (intExtra2 == 1039) {
                intent2.putExtra("PhotoConst.SEND_BUSINESS_TYPE", 1039);
            }
            if (intExtra2 == 1040) {
                intent2.putExtra("PhotoConst.SEND_BUSINESS_TYPE", 1040);
            }
            intent2.putExtra(PeakConstants.bb, intent.getBooleanExtra(PeakConstants.bb, false));
            PhotoUtils.a(intent, intent2);
            z = booleanExtra;
            i2 = intExtra;
        }
        if (QLog.isColorLevel()) {
            QLog.d("PlusPanelUtils", 2, "enterAlbum  maxNum = " + i3);
        }
        if (sessionInfo.f85624a == 9501) {
            intent2.putExtra(SmartDeviceConst.ae, true);
        }
        intent2.putExtra(PeakConstants.f69366F, z2);
        intent2.putExtra(PeakConstants.cC, z);
        intent2.putExtra("PhotoConst.MAXUM_SELECTED_NUM", i3);
        intent2.putExtra(ChatActivityConstants.L, "sessionInfo.enterAlbum");
        intent2.putExtra(PeakConstants.aH, true);
        intent2.putExtra(PeakConstants.aT, true);
        intent2.putExtra(PeakConstants.aR, AlbumUtil.a((Context) activity));
        intent2.putExtra(PeakConstants.aS, AlbumUtil.b((Context) activity));
        intent2.putExtra(PeakConstants.aX, true);
        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(PeakConstants.bB, false);
        if (((activity instanceof SplashActivity) || (activity instanceof ChatActivity)) && ((FragmentActivity) activity).getChatFragment() != null) {
            intent2.putExtra("isBack2Root", ((FragmentActivity) activity).getChatFragment().m2396a().f8494j);
        }
        intent2.putExtra("is_anonymous", AnonymousChatHelper.a().m897a(sessionInfo.f12447a));
        intent2.putExtra(PeakConstants.f69365E, a(sessionInfo));
        intent2.getExtras().remove(AppConstants.Key.G);
        if (arrayList != null && !arrayList.isEmpty()) {
            intent2.putExtra("PhotoConst.PHOTO_PATHS", arrayList);
        }
        if (i2 == -1) {
            activity.startActivity(intent2);
        } else {
            activity.startActivityForResult(intent2, i2);
        }
        if (QLog.isColorLevel()) {
            QLog.d("PEAK", 2, "enterPhotoPicker");
        }
        AlbumUtil.a(activity, false, true);
        if (PeakUtils.f69429a != null) {
            PeakUtils.f69429a.hit();
        }
    }

    public static void a(QQAppInterface qQAppInterface, Activity activity) {
        try {
            ((FragmentActivity) activity).getChatFragment().m2396a().au();
            activity.startActivityForResult(new Intent(activity, PoiMapActivity.class).putExtra("uin", qQAppInterface.getAccount()).putExtra(PoiMapActivity.g, true), 18);
        } catch (Exception e2) {
            e2.printStackTrace();
        }
        ((SenseWhereManager) qQAppInterface.getManager(125)).e();
    }

    public static void a(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo, int i2) {
        SmartDeviceProxyMgr smartDeviceProxyMgr = (SmartDeviceProxyMgr) qQAppInterface.getBusinessHandler(51);
        if (smartDeviceProxyMgr != null && smartDeviceProxyMgr.m1972a()) {
            long j2 = 0;
            try {
                j2 = Long.parseLong(sessionInfo.f12447a);
            } catch (Exception e2) {
                e2.printStackTrace();
            }
            int a2 = smartDeviceProxyMgr.a(j2);
            Intent intent = new Intent(activity, FMActivity.class);
            intent.putExtra("category", 6);
            intent.putExtra(FMConstants.f23334L, true);
            intent.putExtra(FMConstants.f23336N, sessionInfo.f12447a);
            intent.putExtra("peerType", sessionInfo.f85624a);
            intent.putExtra(FMConstants.f23419bL, 5);
            intent.putExtra(FMConstants.f23469cG, a2);
            intent.putExtra(FMConstants.f23470cH, i2);
            activity.startActivityForResult(intent, 5);
            activity.overridePendingTransition(R.anim.f37549name_res_0x7f040013, R.anim.f37551name_res_0x7f040015);
        }
    }

    public static void m3097a(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo) {
        if (sessionInfo.f85624a != 0 && sessionInfo.f85624a != 1 && sessionInfo.f85624a != 3000 && sessionInfo.f85624a != 1004 && sessionInfo.f85624a != 1000 && sessionInfo.f85624a != 1006) {
            c(qQAppInterface, activity, sessionInfo);
            return;
        }
        g(qQAppInterface, activity, sessionInfo);
        ReportUtils.a(qQAppInterface, ReportConstants.n, ReportConstants.H, "File", "0X800878B");
    }

    public static void b(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo) {
        Intent intent = new Intent(activity, TeamWorkListActivity.class);
        intent.putExtra("from_aio", true);
        intent.addFlags(536870912);
        intent.putExtra("peerType", sessionInfo.f85624a);
        intent.putExtra(FMConstants.f23336N, sessionInfo.f12447a);
        intent.putExtra(CloudFileConstants.f20800f, 2);
        if (sessionInfo.f85624a == 1000) {
            intent.putExtra(FMConstants.f23337O, sessionInfo.f12448b);
        } else if (sessionInfo.f85624a == 1006) {
            intent.putExtra(FMConstants.f23337O, sessionInfo.e);
        } else {
            intent.putExtra(FMConstants.f23337O, sessionInfo.f12449c);
        }
        activity.overridePendingTransition(R.anim.f37549name_res_0x7f040013, R.anim.f37551name_res_0x7f040015);
        activity.startActivityForResult(intent, 5);
        ReportUtils.a(qQAppInterface, ReportConstants.n, ReportConstants.H, ReportConstants.L, "0x8007D02");
    }

    private static void g(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo) {
        Intent intent = new Intent(activity, CloudFileDirBrowserActivity.class);
        FileInfo fileInfo = new FileInfo();
        fileInfo.b(((CloudFileManager) qQAppInterface.getManager(QQAppInterface.ca)).m5604a());
        fileInfo.d(activity.getString(R.string.f66791name_res_0x7f0a20cb));
        intent.putExtra(CloudFileConstants.f20795a, fileInfo);
        intent.putExtra(CloudFileConstants.f20797c, true);
        intent.putExtra(CloudFileConstants.f20800f, 2);
        intent.putExtra(CloudFileConstants.f20801g, 2);
        intent.putExtra(CloudFileConstants.f20802h, 4);
        intent.putExtra(FMConstants.f23346X, sessionInfo);
        intent.putExtra("peerType", sessionInfo.f85624a);
        intent.putExtra(FMConstants.f23336N, sessionInfo.f12447a);
        if (sessionInfo.f85624a == 1000) {
            intent.putExtra(FMConstants.f23337O, sessionInfo.f12448b);
        } else if (sessionInfo.f85624a == 1006) {
            intent.putExtra(FMConstants.f23337O, sessionInfo.e);
        } else {
            intent.putExtra(FMConstants.f23337O, sessionInfo.f12449c);
        }
        activity.overridePendingTransition(R.anim.f37549name_res_0x7f040013, R.anim.f37551name_res_0x7f040015);
        activity.startActivityForResult(intent, 5);
    }

    public static void c(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo) {
        Intent intent = new Intent(activity, FMActivity.class);
        SmartDeviceProxyMgr smartDeviceProxyMgr = (SmartDeviceProxyMgr) qQAppInterface.getBusinessHandler(51);
        long j2 = 0;
        try {
            j2 = Long.parseLong(sessionInfo.f12447a);
        } catch (Exception e2) {
            e2.printStackTrace();
        }
        if (sessionInfo.f85624a == 9501 && smartDeviceProxyMgr != null && smartDeviceProxyMgr.m1972a()) {
            intent.putExtra("category", 6);
            intent.putExtra(FMConstants.f23334L, true);
            intent.putExtra(FMConstants.f23336N, sessionInfo.f12447a);
            intent.putExtra("peerType", sessionInfo.f85624a);
            intent.putExtra(FMConstants.f23419bL, 5);
            intent.putExtra(FMConstants.f23469cG, smartDeviceProxyMgr.a(j2));
            if (smartDeviceProxyMgr.m1975a(j2, 1)) {
                intent.putExtra(FMConstants.f23324B, 52428800L);
            }
        } else {
            intent.putExtra("from_aio", true);
            intent.addFlags(536870912);
            intent.putExtra(FMConstants.f23334L, true);
            intent.putExtra("peerType", sessionInfo.f85624a);
            intent.putExtra(FMConstants.f23336N, sessionInfo.f12447a);
            if (sessionInfo.f85624a == 1000) {
                intent.putExtra(FMConstants.f23337O, sessionInfo.f12448b);
            } else if (sessionInfo.f85624a == 1006) {
                intent.putExtra(FMConstants.f23337O, sessionInfo.e);
            } else {
                intent.putExtra(FMConstants.f23337O, sessionInfo.f12449c);
            }
            intent.putExtra(FMConstants.f23419bL, 1);
            intent.putExtra(FMConstants.f23529x, true);
        }
        activity.startActivityForResult(intent, 5);
        activity.overridePendingTransition(R.anim.f37549name_res_0x7f040013, R.anim.f37551name_res_0x7f040015);
    }

    public static Intent a(QQAppInterface qQAppInterface, Activity activity, int i2) {
        Intent intent = new Intent(activity, FMActivity.class);
        intent.putExtra("from_aio", true);
        intent.addFlags(536870912);
        intent.putExtra(FMConstants.f23334L, true);
        intent.putExtra(FMConstants.f23419bL, 1);
        intent.putExtra(FMConstants.f23530y, true);
        intent.putExtra(FMConstants.f23419bL, 2);
        intent.putExtra(FMConstants.f23332J, true);
        intent.putExtra(CloudFileConstants.f20800f, 2);
        intent.putExtra(CloudFileConstants.f20801g, 2);
        intent.putExtra(CloudFileConstants.f20802h, i2);
        intent.putExtra(FMConstants.f23333K, true);
        return intent;
    }

    public static void d(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo) {
        ReportController.b(qQAppInterface, "dc01331", "", "", "Grp", "Up_sent_files\t", 0, 0, "", sessionInfo.f12447a, "", "");
        Intent intent = new Intent(activity, FMActivity.class);
        intent.putExtra("from_aio", true);
        intent.addFlags(536870912);
        intent.putExtra(FMConstants.f23334L, true);
        intent.putExtra("peerType", sessionInfo.f85624a);
        intent.putExtra(FMConstants.f23336N, sessionInfo.f12447a);
        intent.putExtra(FMConstants.f23419bL, 5);
        intent.putExtra(FMConstants.f23432bY, true);
        activity.startActivityForResult(intent, 5);
        activity.overridePendingTransition(R.anim.f37549name_res_0x7f040013, R.anim.f37551name_res_0x7f040015);
    }

    public static void a(Context context, SessionInfo sessionInfo) {
        Intent intent = new Intent(context, PublicAccountBrowser.class);
        intent.putExtra("url", ChatActivityConstants.I);
        intent.putExtra("uin", sessionInfo.f12447a);
        intent.putExtra("uin_type", sessionInfo.f85624a);
        intent.putExtra("uin_name", sessionInfo.f12450d);
        context.startActivity(intent);
    }

    public static void a(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo, String str) {
        ReportController.b(qQAppInterface, "dc01331", "", sessionInfo.f12447a, "Music_gene", "Music_gene_AIO", 0, 0, String.valueOf(a(sessionInfo.f85624a)), "", "", "");
        Intent intent = new Intent(activity, QQBrowserActivity.class);
        if (TextUtils.isEmpty(str)) {
            intent.putExtra("url", "http://y.qq.com/m/qzonemusic/mqzsearch.html?touin=" + sessionInfo.f12447a + "&uintype=" + sessionInfo.f85624a + "&_wv=1&entry=aio&_bid=203");
            if (QLog.isColorLevel()) {
                QLog.d("PlusPanelUtils", 2, "enterQQMusic url is null");
            }
        } else {
            intent.putExtra("url", str.replace("$FriendUin$", sessionInfo.f12447a).replace("$CurType$", String.valueOf(sessionInfo.f85624a)));
            if (QLog.isColorLevel()) {
                QLog.d("PlusPanelUtils", 2, "enterQQMusic url is get from file");
            }
        }
        intent.putExtra(SwiftBrowserUIStyleHandler.f95085c, true);
        intent.putExtra(SwiftBrowserUIStyleHandler.d, true);
        intent.putExtra(QQBrowserActivity.K, true);
        activity.startActivity(intent);
        activity.overridePendingTransition(R.anim.f37549name_res_0x7f040013, R.anim.f37551name_res_0x7f040015);
    }

    public static void e(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo) {
        Intent intent = new Intent();
        intent.putExtra(xvz.Z, true);
        intent.putExtra(xvz.aa, sessionInfo);
        QfavHelper.a(activity, qQAppInterface.getAccount(), intent, -1, false);
        QfavReport.b(qQAppInterface, 3, sessionInfo.f85624a);
    }

    public static void f(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo) {
        Intent intent = new Intent(activity, FMLocalFileActivity.class);
        intent.putExtra("category", 15);
        intent.putExtra("busiType", 5);
        intent.putExtra(FMConstants.f23334L, true);
        intent.putExtra("peerType", sessionInfo.f85624a);
        intent.putExtra(FMConstants.f23336N, sessionInfo.f12447a);
        intent.putExtra(FMConstants.f23347Y, false);
        intent.putExtra(FMConstants.f23348Z, false);
        intent.putExtra(FMConstants.f23379aa, false);
        intent.putExtra(FMConstants.f23380ab, false);
        intent.putExtra(FMConstants.f23386ah, false);
        intent.putExtra(FMConstants.f23323A, 5);
        intent.putExtra(AlbumConstants.i, 84);
        intent.putExtra(FMConstants.f23385ag, new String[]{"doc", DocxApiPlugin.f90020b, "txt", "pdf", "ppt", "pptx", "xls", "xlsx", "bmp", "jpg", "gif", "png"});
        activity.overridePendingTransition(R.anim.f37549name_res_0x7f040013, R.anim.f37551name_res_0x7f040015);
        activity.startActivityForResult(intent, 84);
        AlbumUtil.a(activity, false, true);
    }

    private static int a(int i2) {
        switch (i2) {
            case 0:
            default:
                return 0;
            case 1:
                return 1;
            case 3000:
                return 2;
        }
    }

    public static void a(QQAppInterface qQAppInterface, Context context, BaseActivity baseActivity, SessionInfo sessionInfo, int i2) {
        QLog.i("Q.aio.xxx", 2, "[enterCamera] + Enter");
        if (AudioHelper.b(0)) {
            DialogUtil.a(context, 230, context.getString(R.string.f63485name_res_0x7f0a13dc), context.getString(R.string.f63486name_res_0x7f0a13dd), new mbr(), (DialogInterface.OnClickListener) null).show();
        } else if (AudioHelper.m9094a(0)) {
            DialogUtil.a(context, 230, context.getString(R.string.f63485name_res_0x7f0a13dc), context.getString(R.string.f63487name_res_0x7f0a13de), new mbs(), (DialogInterface.OnClickListener) null).show();
        } else {
            qQAppInterface.getTransFileController().c();
            a(qQAppInterface, baseActivity, 1, sessionInfo);
            baseActivity.setCanLock(false);
            if (sessionInfo.f85624a == 9501) {
                SmartDeviceReport.a(qQAppInterface, Long.parseLong(sessionInfo.f12447a), SmartDeviceReport.ActionName.d, 2, 0, i2);
            }
        }
    }

    public static List a(QQAppInterface qQAppInterface) {
        long j2;
        long j3;
        HbThemeConfigManager a2 = HbThemeConfigManager.a();
        ArrayList arrayList = new ArrayList();
        if (a2.f33442a != null && a2.f33442a.size() > 0) {
            int i2 = 0;
            while (true) {
                int i3 = i2;
                if (i3 >= a2.f33442a.size()) {
                    break;
                }
                HbThemeConfigManager.HBThemeConfig hBThemeConfig = (HbThemeConfigManager.HBThemeConfig) a2.f33442a.get(i3);
                if (hBThemeConfig != null && hBThemeConfig.f94418a > 1 && hBThemeConfig.f33443a != null && hBThemeConfig.f33445b != null && hBThemeConfig.f33445b.length() > 0) {
                    long currentTimeMillis = System.currentTimeMillis();
                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                    try {
                        j2 = simpleDateFormat.parse(hBThemeConfig.e).getTime();
                    } catch (ParseException e2) {
                        e = e2;
                        j2 = 0;
                    }
                    try {
                        j3 = simpleDateFormat.parse(hBThemeConfig.f).getTime();
                    } catch (ParseException e3) {
                        e = e3;
                        e.printStackTrace();
                        j3 = 0;
                        if (currentTimeMillis >= j2) {
                            arrayList.add(hBThemeConfig);
                        }
                        i2 = i3 + 1;
                    }
                    if (currentTimeMillis >= j2 && currentTimeMillis <= j3) {
                        arrayList.add(hBThemeConfig);
                    }
                }
                i2 = i3 + 1;
            }
        }
        return arrayList;
    }

    public static List a(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo) {
        return a(qQAppInterface);
    }

    public void b(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo, int i2) {
        List a2 = a(qQAppInterface, activity, sessionInfo);
        if (a2 != null && a2.size() > 0) {
            a(qQAppInterface, activity, sessionInfo, a2);
        } else {
            a(qQAppInterface, activity, sessionInfo, (HbThemeConfigManager.HBThemeConfig) null, i2);
        }
    }

    public static void a(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo, HbThemeConfigManager.HBThemeConfig hBThemeConfig, int i2) {
        int i3;
        String str;
        int i4;
        int i5;
        HotChatManager hotChatManager;
        String m3576a;
        PasswdRedBagManager passwdRedBagManager = (PasswdRedBagManager) qQAppInterface.getManager(124);
        int i6 = 0;
        if (sessionInfo.f85624a == 0) {
            i3 = 1;
            str = "";
            i4 = 0;
            i5 = 1;
        } else if (sessionInfo.f85624a == 3000) {
            i3 = 2;
            i5 = 1;
            i4 = ((DiscussionManager) qQAppInterface.getManager(52)).a(sessionInfo.f12447a);
            str = "";
        } else if (sessionInfo.f85624a == 1) {
            TroopInfo m4837a = ((TroopManager) qQAppInterface.getManager(51)).m4837a(sessionInfo.f12447a);
            if (m4837a != null) {
                int i7 = m4837a.wMemberNum;
                if (QLog.isColorLevel()) {
                    QLog.d("PlusPanelUtils", 2, "群uin:" + sessionInfo.f12447a + " 群成员个数:" + i7);
                }
                i6 = i7;
            }
            if (QWalletHelper.m10813a(sessionInfo.f12447a)) {
                try {
                    long parseLong = Long.parseLong(sessionInfo.f12447a);
                    TroopHandler troopHandler = (TroopHandler) qQAppInterface.getBusinessHandler(20);
                    if (f12440a == null) {
                        f12440a = new mbt(sessionInfo);
                    }
                    qQAppInterface.addObserver(f12440a);
                    troopHandler.a(parseLong, 32, 0);
                } catch (NumberFormatException e2) {
                    if (QLog.isColorLevel()) {
                        QLog.d("angelzhuang", 2, "群uin:" + sessionInfo.f12447a + " 解析失败");
                    }
                }
            }
            i3 = 3;
            str = "";
            i4 = i6;
            i5 = 1;
        } else if (sessionInfo.f85624a == 1000) {
            i3 = 4;
            str = sessionInfo.f12448b;
            i4 = 0;
            i5 = 1;
        } else if (sessionInfo.f85624a == 1004) {
            i3 = 5;
            str = sessionInfo.f12448b;
            i4 = 0;
            i5 = 1;
        } else if (sessionInfo.f85624a != 1001) {
            i3 = 0;
            str = "";
            i4 = 0;
            i5 = 1;
        } else {
            byte[] j2 = qQAppInterface.m4654a().j(sessionInfo.f12447a);
            if (j2 == null) {
                str = "";
                i3 = 7;
                i4 = 0;
                i5 = 5;
            } else {
                str = Base64Util.encodeToString(j2, 2);
                i3 = 7;
                i4 = 0;
                i5 = 5;
            }
        }
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("recv_uin", sessionInfo.f12447a);
            if (i4 > 0) {
                jSONObject.put("people_num", i4);
            }
            jSONObject.put("recv_type", i3);
            if (!TextUtils.isEmpty(str)) {
                jSONObject.put("session_token", str);
            }
            jSONObject.put("channel", i5);
            if (passwdRedBagManager != null && (m3576a = passwdRedBagManager.m3576a()) != null) {
                jSONObject.put("placeholder", m3576a);
            }
        } catch (JSONException e3) {
            e3.printStackTrace();
        }
        if (QLog.isColorLevel()) {
            QLog.d("PlusPanel", 2, "click HongBao:params=" + jSONObject.toString());
        }
        Intent intent = new Intent(BaseApplicationImpl.getContext(), SendHbActivity.class);
        intent.putExtra(SubscriptRecommendController.f5057b, 2);
        JSONObject jSONObject2 = new JSONObject();
        boolean z = false;
        if (hBThemeConfig != null) {
            z = true;
            try {
                jSONObject2.put("hb_theme_id", hBThemeConfig.f94418a);
                if (!TextUtils.isEmpty(hBThemeConfig.f33443a)) {
                    jSONObject2.put("hb_theme_name", hBThemeConfig.f33443a);
                }
                if (!TextUtils.isEmpty(hBThemeConfig.f94419b)) {
                    jSONObject2.put("hb_theme_img", hBThemeConfig.f94419b);
                }
                if (hBThemeConfig.f33445b != null && hBThemeConfig.f33445b.length() > 0) {
                    jSONObject2.put("hb_theme_money_array", hBThemeConfig.f33445b);
                }
                if (hBThemeConfig.f33444a != null && hBThemeConfig.f33444a.length() > 0) {
                    jSONObject2.put("hb_theme_wish_array", hBThemeConfig.f33444a);
                }
            } catch (JSONException e4) {
                e4.printStackTrace();
            }
        }
        intent.putExtra("theme", z);
        intent.putExtra("theme_config", jSONObject2.toString());
        intent.putExtra(JumpAction.bG, "appid#1344242394|bargainor_id#1000030201|channel#aio");
        intent.putExtra("extra_data", jSONObject.toString());
        intent.putExtra(PayBridgeActivity.f10378l, VACDReportUtil.a((String) null, "qqwallet", "makeHongbao", "click", "groupType=" + i3, 0, (String) null));
        activity.startActivity(intent);
        activity.overridePendingTransition(R.anim.f37549name_res_0x7f040013, R.anim.f37551name_res_0x7f040015);
        if (sessionInfo.f85624a == 1 && (hotChatManager = (HotChatManager) qQAppInterface.getManager(59)) != null && hotChatManager.m4388a(sessionInfo.f12447a)) {
            ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005B9C", "0X8005B9C", 0, 0, "", "", "", "");
        }
        if (sessionInfo.f85624a == 1001) {
            ReportController.b(qQAppInterface, "dc01331", "", "", "0X8005B9D", "0X8005B9D", 0, 0, "", "", "", "");
        }
        if (i2 == 0) {
            AIOPanelUtiles.a(qQAppInterface, "0X8005CAF", sessionInfo.f85624a);
        } else if (i2 == 1) {
            AIOPanelUtiles.a(qQAppInterface, "0X8005FC9", sessionInfo.f85624a);
        }
    }

    public void m3099a() {
        if (this.f12444a != null && this.f12444a.isShowing()) {
            try {
                this.f12444a.dismiss();
            } catch (Exception e2) {
            }
        }
    }

    public void a(QQAppInterface qQAppInterface, Activity activity, SessionInfo sessionInfo, List list) {
        if (QLog.isColorLevel()) {
            QLog.d(LogTag.g, 2, "showActionSheet");
        }
        m3099a();
        if (this.f12444a != null) {
            try {
                this.f12444a.show();
                return;
            } catch (Exception e2) {
                return;
            }
        }
        ArrayList arrayList = new ArrayList();
        ArrayList arrayList2 = new ArrayList();
        if (list != null && list.size() > 0) {
            for (int i2 = 0; i2 < list.size(); i2++) {
                HbThemeConfigManager.HBThemeConfig hBThemeConfig = (HbThemeConfigManager.HBThemeConfig) list.get(i2);
                if (!TextUtils.isEmpty(hBThemeConfig.f33443a)) {
                    arrayList.add(new Pair(Integer.valueOf(l + i2), hBThemeConfig.f33443a));
                    arrayList2.add(hBThemeConfig);
                }
            }
        }
        int size = arrayList2.size();
        if (size > 0) {
            m = size + l;
            n = m + 1;
            String string = activity.getResources().getString(R.string.f66100name_res_0x7f0a1e18);
            String string2 = activity.getResources().getString(R.string.f66101name_res_0x7f0a1e19);
            arrayList.add(new Pair(Integer.valueOf(m), string));
            arrayList.add(new Pair(Integer.valueOf(n), string2));
        }
        ActionSheet c2 = ActionSheet.c(activity);
        for (int i3 = 0; i3 < arrayList.size(); i3++) {
            if (n == ((Integer) ((Pair) arrayList.get(i3)).first).intValue()) {
                c2.d((CharSequence) ((Pair) arrayList.get(i3)).second);
            } else {
                c2.c((CharSequence) ((Pair) arrayList.get(i3)).second);
            }
        }
        c2.a(new mbk(this, arrayList, qQAppInterface, activity, sessionInfo, arrayList2, c2));
        c2.a(new mbl(this));
        c2.setCanceledOnTouchOutside(true);
        this.f12444a = c2;
        try {
            this.f12444a.show();
        } catch (Exception e3) {
        }
    }
}