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

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


package com.tencent.biz.pubaccount.util;

import android.text.TextUtils;
import com.tencent.mobileqq.data.MessageForStructing;
import com.tencent.mobileqq.data.MessageRecord;
import com.tencent.mobileqq.statistics.ReportController;
import com.tencent.mobileqq.structmsg.AbsStructMsg;
import com.tencent.mobileqq.structmsg.AbsStructMsgElement;
import com.tencent.mobileqq.structmsg.StructMsgForGeneralShare;
import com.tencent.mobileqq.structmsg.view.StructMsgItemLayout5;
import com.tencent.mobileqq.structmsg.view.StructMsgItemTitle;
import com.tencent.mobileqq.structmsg.view.StructMsgItemVideo;
import com.tencent.qphone.base.util.QLog;
import java.util.Iterator;
public class PAVideoStructMsgUtil {
    public static final int f82785a = 15;
    public static final String f5149a = "PAVideoStructMsgUtil";
    public static final String f82786b = "https://webcard.mp.qq.com/webCard/index?_wv=16777217&_bid=2321&puin=";

    public static String a(String str) {
        return f82786b + str;
    }

    public static void a(StructMsgForGeneralShare structMsgForGeneralShare) {
        if (structMsgForGeneralShare != null) {
            Iterator it = structMsgForGeneralShare.iterator();
            while (it.hasNext()) {
                AbsStructMsgElement absStructMsgElement = (AbsStructMsgElement) it.next();
                if (absStructMsgElement instanceof StructMsgItemLayout5) {
                    Iterator it2 = ((StructMsgItemLayout5) absStructMsgElement).f92934a.iterator();
                    while (it2.hasNext()) {
                        AbsStructMsgElement absStructMsgElement2 = (AbsStructMsgElement) it2.next();
                        if (absStructMsgElement2 instanceof StructMsgItemVideo) {
                            StructMsgItemVideo structMsgItemVideo = (StructMsgItemVideo) absStructMsgElement2;
                            if (structMsgItemVideo.a()) {
                                structMsgItemVideo.dN = null;
                                structMsgItemVideo.u = null;
                                structMsgItemVideo.i = 0;
                                if (QLog.isColorLevel()) {
                                    QLog.d(f5149a, 2, "simplifyForForward: summary = null");
                                }
                                ReportController.b(null, "dc01332", "Pb_account_lifeservice", "", "0X800682F", "0X800682F", 0, 0, structMsgItemVideo.dL, "" + structMsgItemVideo.aS, "" + structMsgItemVideo.f29458a.msgId, "");
                            }
                        } else if (absStructMsgElement2 instanceof StructMsgItemTitle) {
                            StructMsgItemTitle structMsgItemTitle = (StructMsgItemTitle) absStructMsgElement2;
                            String b2 = structMsgItemTitle.b();
                            int length = b2.length();
                            if (QLog.isColorLevel()) {
                                QLog.d(f5149a, 2, "simplifyForForward: title = " + structMsgItemTitle.b() + ", length=" + length);
                            }
                            if (length > 15) {
                                structMsgItemTitle.a(b2.substring(0, 15) + vfr.f78684a);
                                if (QLog.isColorLevel()) {
                                    QLog.d(f5149a, 2, "simplifyForForward: after reduce title length, title = " + structMsgItemTitle.b());
                                }
                            }
                        }
                    }
                }
            }
            if (!TextUtils.isEmpty(structMsgForGeneralShare.mMsgBrief) && structMsgForGeneralShare.mMsgBrief.length() > 15) {
                structMsgForGeneralShare.mMsgBrief = structMsgForGeneralShare.mMsgBrief.substring(0, 15) + vfr.f78684a;
            }
        }
    }

    public static boolean a(MessageRecord messageRecord) {
        if (!(messageRecord instanceof MessageForStructing)) {
            return false;
        }
        MessageForStructing messageForStructing = (MessageForStructing) messageRecord;
        messageForStructing.parse();
        return a(messageForStructing.structingMsg);
    }

    public static boolean a(AbsStructMsg absStructMsg) {
        boolean z = false;
        if (absStructMsg == null || !(absStructMsg instanceof StructMsgForGeneralShare)) {
            return false;
        }
        Iterator it = ((StructMsgForGeneralShare) absStructMsg).iterator();
        while (true) {
            boolean z2 = z;
            if (!it.hasNext()) {
                return z2;
            }
            AbsStructMsgElement absStructMsgElement = (AbsStructMsgElement) it.next();
            if (absStructMsgElement instanceof StructMsgItemLayout5) {
                Iterator it2 = ((StructMsgItemLayout5) absStructMsgElement).f92934a.iterator();
                while (true) {
                    if (it2.hasNext()) {
                        AbsStructMsgElement absStructMsgElement2 = (AbsStructMsgElement) it2.next();
                        if (absStructMsgElement2 instanceof StructMsgItemVideo) {
                            if (((StructMsgItemVideo) absStructMsgElement2).a()) {
                                z2 = true;
                            }
                        }
                    }
                }
            }
            z = z2;
        }
    }

    public static boolean a(int i) {
        return i >= 1 && i <= 100;
    }
}