ReferenceMessage.smali

.class public Lio/rong/message/ReferenceMessage;
.super Lio/rong/message/MediaMessageContent;
.source "ReferenceMessage.java"


# annotations
.annotation runtime Lio/rong/imlib/MessageTag;
    flag = 0x3
    messageHandler = Lio/rong/message/ReferenceMessageHandler;
    value = "RC:ReferenceMsg"
.end annotation


# static fields
.field public static final CREATOR:Landroid/os/Parcelable$Creator;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/os/Parcelable$Creator<",
            "Lio/rong/message/ReferenceMessage;",
            ">;"
        }
    .end annotation
.end field

.field private static final TAG:Ljava/lang/String; = "ReferenceMessage"


# instance fields
.field private content:Ljava/lang/String;

.field private extra:Ljava/lang/String;

.field private objName:Ljava/lang/String;

.field private referMsg:Lio/rong/imlib/model/MessageContent;

.field private referMsgUserId:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    .line 1
    new-instance v0, Lio/rong/message/ReferenceMessage$1;

    invoke-direct {v0}, Lio/rong/message/ReferenceMessage$1;-><init>()V

    sput-object v0, Lio/rong/message/ReferenceMessage;->CREATOR:Landroid/os/Parcelable$Creator;

    return-void
.end method

.method private constructor <init>()V
    .registers 1

    .line 1
    invoke-direct {p0}, Lio/rong/message/MediaMessageContent;-><init>()V

    return-void
.end method

.method public constructor <init>(Landroid/os/Parcel;)V
    .registers 3

    .line 46
    invoke-direct {p0}, Lio/rong/message/MediaMessageContent;-><init>()V

    .line 47
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lio/rong/message/ReferenceMessage;->setUserId(Ljava/lang/String;)V

    .line 48
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lio/rong/message/ReferenceMessage;->setEditSendText(Ljava/lang/String;)V

    .line 49
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lio/rong/message/ReferenceMessage;->setObjName(Ljava/lang/String;)V

    .line 50
    const-class v0, Lio/rong/imlib/model/MessageContent;

    invoke-static {p1, v0}, Lio/rong/common/ParcelUtils;->readFromParcel(Landroid/os/Parcel;Ljava/lang/Class;)Landroid/os/Parcelable;

    move-result-object v0

    check-cast v0, Lio/rong/imlib/model/MessageContent;

    invoke-virtual {p0, v0}, Lio/rong/message/ReferenceMessage;->setContent(Lio/rong/imlib/model/MessageContent;)V

    .line 51
    invoke-virtual {p1}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lio/rong/message/ReferenceMessage;->setExtra(Ljava/lang/String;)V

    .line 52
    const-class v0, Lio/rong/imlib/model/UserInfo;

    invoke-static {p1, v0}, Lio/rong/common/ParcelUtils;->readFromParcel(Landroid/os/Parcel;Ljava/lang/Class;)Landroid/os/Parcelable;

    move-result-object v0

    check-cast v0, Lio/rong/imlib/model/UserInfo;

    invoke-virtual {p0, v0}, Lio/rong/imlib/model/MessageContent;->setUserInfo(Lio/rong/imlib/model/UserInfo;)V

    .line 53
    const-class v0, Lio/rong/imlib/model/MentionedInfo;

    invoke-static {p1, v0}, Lio/rong/common/ParcelUtils;->readFromParcel(Landroid/os/Parcel;Ljava/lang/Class;)Landroid/os/Parcelable;

    move-result-object p1

    check-cast p1, Lio/rong/imlib/model/MentionedInfo;

    invoke-virtual {p0, p1}, Lio/rong/imlib/model/MessageContent;->setMentionedInfo(Lio/rong/imlib/model/MentionedInfo;)V

    return-void
.end method

.method private constructor <init>(Ljava/lang/String;Lio/rong/imlib/model/MessageContent;)V
    .registers 6

    .line 2
    invoke-direct {p0}, Lio/rong/message/MediaMessageContent;-><init>()V

    .line 3
    iput-object p1, p0, Lio/rong/message/ReferenceMessage;->referMsgUserId:Ljava/lang/String;

    .line 4
    iput-object p2, p0, Lio/rong/message/ReferenceMessage;->referMsg:Lio/rong/imlib/model/MessageContent;

    const-string p1, "ReferenceMessage"

    if-nez p2, :cond_11

    const-string p2, "MessageContent is null"

    .line 5
    invoke-static {p1, p2}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I

    return-void

    :cond_11
    const/4 v0, 0x0

    .line 6
    :try_start_12
    invoke-virtual {p2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object p2

    const-class v1, Lio/rong/imlib/MessageTag;

    invoke-virtual {p2, v1}, Ljava/lang/Class;->getAnnotation(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;

    move-result-object p2

    check-cast p2, Lio/rong/imlib/MessageTag;
    :try_end_1e
    .catch Ljava/lang/Throwable; {:try_start_12 .. :try_end_1e} :catch_1f

    goto :goto_39

    :catch_1f
    move-exception p2

    .line 7
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "throwable:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/Throwable;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-static {p1, p2}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I

    move-object p2, v0

    :goto_39
    if-nez p2, :cond_41

    const-string p2, "MessageTag is null"

    .line 8
    invoke-static {p1, p2}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I

    return-void

    :cond_41
    const/4 p1, 0x5

    .line 9
    new-array p1, p1, [Ljava/lang/String;

    const/4 v0, 0x0

    const-string v1, "RC:TxtMsg"

    aput-object v1, p1, v0

    const/4 v0, 0x1

    const-string v1, "RC:ImgMsg"

    aput-object v1, p1, v0

    const/4 v0, 0x2

    const-string v1, "RC:FileMsg"

    aput-object v1, p1, v0

    const/4 v0, 0x3

    const-string v1, "RC:ImgTextMsg"

    aput-object v1, p1, v0

    const/4 v0, 0x4

    const-string v1, "RC:ReferenceMsg"

    aput-object v1, p1, v0

    .line 10
    invoke-static {p1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;

    move-result-object p1

    invoke-interface {p2}, Lio/rong/imlib/MessageTag;->value()Ljava/lang/String;

    move-result-object v0

    invoke-interface {p1, v0}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_72

    .line 11
    invoke-interface {p2}, Lio/rong/imlib/MessageTag;->value()Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lio/rong/message/ReferenceMessage;->objName:Ljava/lang/String;

    return-void

    .line 12
    :cond_72
    new-instance p1, Ljava/lang/RuntimeException;

    const-string p2, "\u5f15\u7528\u6d88\u606f\u4e0d\u652f\u6301\u6b64\u6d88\u606f\u7c7b\u578b"

    invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public constructor <init>([B)V
    .registers 14

    const-string v0, "mentionedInfo"

    const-string v1, "user"

    const-string v2, "extra"

    const-string v3, "referMsg"

    const-string v4, "objName"

    const-string v5, "content"

    const-string v6, "referMsgUserId"

    const-string v7, "UTF-8"

    const-string v8, "ReferenceMessage"

    .line 13
    invoke-direct {p0}, Lio/rong/message/MediaMessageContent;-><init>()V

    .line 14
    :try_start_15
    new-instance v9, Ljava/lang/String;

    invoke-direct {v9, p1, v7}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
    :try_end_1a
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_15 .. :try_end_1a} :catch_1b

    goto :goto_22

    :catch_1b
    move-exception p1

    const-string v9, "UnsupportedEncodingException"

    .line 15
    invoke-static {v8, v9, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    const/4 v9, 0x0

    :goto_22
    if-nez v9, :cond_2a

    const-string p1, "jsonStr is null"

    .line 16
    invoke-static {v8, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I

    return-void

    .line 17
    :cond_2a
    :try_start_2a
    new-instance p1, Lorg/json/JSONObject;

    invoke-direct {p1, v9}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 18
    invoke-virtual {p1, v6}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v9

    if-eqz v9, :cond_3c

    .line 19
    invoke-virtual {p1, v6}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {p0, v6}, Lio/rong/message/ReferenceMessage;->setUserId(Ljava/lang/String;)V

    .line 20
    :cond_3c
    invoke-virtual {p1, v5}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_49

    .line 21
    invoke-virtual {p1, v5}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {p0, v5}, Lio/rong/message/ReferenceMessage;->setEditSendText(Ljava/lang/String;)V

    .line 22
    :cond_49
    invoke-virtual {p1, v4}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_56

    .line 23
    invoke-virtual {p1, v4}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {p0, v4}, Lio/rong/message/ReferenceMessage;->setObjName(Ljava/lang/String;)V

    .line 24
    :cond_56
    invoke-virtual {p1, v3}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_ed

    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getObjName()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    if-nez v4, :cond_ed

    .line 25
    invoke-virtual {p1, v3}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lorg/json/JSONObject;

    .line 26
    invoke-virtual {v3}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3, v7}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v3

    .line 27
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getObjName()Ljava/lang/String;

    move-result-object v4

    const/4 v5, -0x1

    invoke-virtual {v4}, Ljava/lang/String;->hashCode()I

    move-result v6

    const/4 v7, 0x4

    const/4 v9, 0x3

    const/4 v10, 0x2

    const/4 v11, 0x1

    sparse-switch v6, :sswitch_data_13e

    goto :goto_b6

    :sswitch_85
    const-string v6, "RC:TxtMsg"

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_b6

    const/4 v5, 0x0

    goto :goto_b6

    :sswitch_8f
    const-string v6, "RC:ImgMsg"

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_b6

    const/4 v5, 0x1

    goto :goto_b6

    :sswitch_99
    const-string v6, "RC:ReferenceMsg"

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_b6

    const/4 v5, 0x4

    goto :goto_b6

    :sswitch_a3
    const-string v6, "RC:ImgTextMsg"

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_b6

    const/4 v5, 0x3

    goto :goto_b6

    :sswitch_ad
    const-string v6, "RC:FileMsg"

    invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_b6

    const/4 v5, 0x2

    :cond_b6
    :goto_b6
    if-eqz v5, :cond_e5

    if-eq v5, v11, :cond_dc

    if-eq v5, v10, :cond_d3

    if-eq v5, v9, :cond_ca

    if-eq v5, v7, :cond_c1

    goto :goto_ed

    .line 28
    :cond_c1
    new-instance v4, Lio/rong/message/ReferenceMessage;

    invoke-direct {v4, v3}, Lio/rong/message/ReferenceMessage;-><init>([B)V

    .line 29
    invoke-virtual {p0, v4}, Lio/rong/message/ReferenceMessage;->setContent(Lio/rong/imlib/model/MessageContent;)V

    goto :goto_ed

    .line 30
    :cond_ca
    new-instance v4, Lio/rong/message/RichContentMessage;

    invoke-direct {v4, v3}, Lio/rong/message/RichContentMessage;-><init>([B)V

    .line 31
    invoke-virtual {p0, v4}, Lio/rong/message/ReferenceMessage;->setContent(Lio/rong/imlib/model/MessageContent;)V

    goto :goto_ed

    .line 32
    :cond_d3
    new-instance v4, Lio/rong/message/FileMessage;

    invoke-direct {v4, v3}, Lio/rong/message/FileMessage;-><init>([B)V

    .line 33
    invoke-virtual {p0, v4}, Lio/rong/message/ReferenceMessage;->setContent(Lio/rong/imlib/model/MessageContent;)V

    goto :goto_ed

    .line 34
    :cond_dc
    new-instance v4, Lio/rong/message/ImageMessage;

    invoke-direct {v4, v3}, Lio/rong/message/ImageMessage;-><init>([B)V

    .line 35
    invoke-virtual {p0, v4}, Lio/rong/message/ReferenceMessage;->setContent(Lio/rong/imlib/model/MessageContent;)V

    goto :goto_ed

    .line 36
    :cond_e5
    new-instance v4, Lio/rong/message/TextMessage;

    invoke-direct {v4, v3}, Lio/rong/message/TextMessage;-><init>([B)V

    .line 37
    invoke-virtual {p0, v4}, Lio/rong/message/ReferenceMessage;->setContent(Lio/rong/imlib/model/MessageContent;)V

    .line 38
    :cond_ed
    :goto_ed
    invoke-virtual {p1, v2}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_fa

    .line 39
    invoke-virtual {p1, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0, v2}, Lio/rong/message/ReferenceMessage;->setExtra(Ljava/lang/String;)V

    .line 40
    :cond_fa
    invoke-virtual {p1, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_10b

    .line 41
    invoke-virtual {p1, v1}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v1

    invoke-virtual {p0, v1}, Lio/rong/imlib/model/MessageContent;->parseJsonToUserInfo(Lorg/json/JSONObject;)Lio/rong/imlib/model/UserInfo;

    move-result-object v1

    invoke-virtual {p0, v1}, Lio/rong/imlib/model/MessageContent;->setUserInfo(Lio/rong/imlib/model/UserInfo;)V

    .line 42
    :cond_10b
    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_13d

    .line 43
    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object p1

    invoke-virtual {p0, p1}, Lio/rong/imlib/model/MessageContent;->parseJsonToMentionInfo(Lorg/json/JSONObject;)Lio/rong/imlib/model/MentionedInfo;

    move-result-object p1

    invoke-virtual {p0, p1}, Lio/rong/imlib/model/MessageContent;->setMentionedInfo(Lio/rong/imlib/model/MentionedInfo;)V
    :try_end_11c
    .catch Lorg/json/JSONException; {:try_start_2a .. :try_end_11c} :catch_124
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_2a .. :try_end_11c} :catch_11d

    goto :goto_13d

    :catch_11d
    move-exception p1

    const-string v0, "ReferenceMessage UnsupportedEncodingException"

    .line 44
    invoke-static {v8, v0, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_13d

    :catch_124
    move-exception p1

    .line 45
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "JSONException "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Lorg/json/JSONException;->getMessage()Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {v8, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I

    :cond_13d
    :goto_13d
    return-void

    :sswitch_data_13e
    .sparse-switch
        -0x394a7c04 -> :sswitch_ad
        -0x3655b926 -> :sswitch_a3
        -0x2525bd01 -> :sswitch_99
        0x2cc58247 -> :sswitch_8f
        0x402bbc7a -> :sswitch_85
    .end sparse-switch
.end method

.method public static obtainMessage(Ljava/lang/String;Lio/rong/imlib/model/MessageContent;)Lio/rong/message/ReferenceMessage;
    .registers 3

    if-eqz p0, :cond_b

    if-nez p1, :cond_5

    goto :goto_b

    .line 1
    :cond_5
    new-instance v0, Lio/rong/message/ReferenceMessage;

    invoke-direct {v0, p0, p1}, Lio/rong/message/ReferenceMessage;-><init>(Ljava/lang/String;Lio/rong/imlib/model/MessageContent;)V

    return-object v0

    :cond_b
    :goto_b
    const/4 p0, 0x0

    return-object p0
.end method


# virtual methods
.method public buildSendText(Ljava/lang/String;)Lio/rong/message/ReferenceMessage;
    .registers 2

    .line 1
    iput-object p1, p0, Lio/rong/message/ReferenceMessage;->content:Ljava/lang/String;

    return-object p0
.end method

.method public describeContents()I
    .registers 2

    const/4 v0, 0x0

    return v0
.end method

.method public encode()[B
    .registers 6

    const-string v0, "UTF-8"

    const-string v1, "ReferenceMessage"

    .line 1
    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2}, Lorg/json/JSONObject;-><init>()V

    .line 2
    :try_start_9
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getUserId()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_1c

    const-string v3, "referMsgUserId"

    .line 3
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getUserId()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 4
    :cond_1c
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getEditSendText()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_2f

    const-string v3, "content"

    .line 5
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getEditSendText()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 6
    :cond_2f
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getObjName()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_42

    const-string v3, "objName"

    .line 7
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getObjName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 8
    :cond_42
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getReferenceContent()Lio/rong/imlib/model/MessageContent;

    move-result-object v3

    if-eqz v3, :cond_5f

    .line 9
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getReferenceContent()Lio/rong/imlib/model/MessageContent;

    move-result-object v3

    invoke-virtual {v3}, Lio/rong/imlib/model/MessageContent;->encode()[B

    move-result-object v3

    .line 10
    new-instance v4, Ljava/lang/String;

    invoke-direct {v4, v3, v0}, Ljava/lang/String;-><init>([BLjava/lang/String;)V

    .line 11
    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3, v4}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string v4, "referMsg"

    .line 12
    invoke-virtual {v2, v4, v3}, Lorg/json/JSONObject;->putOpt(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 13
    :cond_5f
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getExtra()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_72

    const-string v3, "extra"

    .line 14
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getExtra()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 15
    :cond_72
    invoke-virtual {p0}, Lio/rong/imlib/model/MessageContent;->getJSONUserInfo()Lorg/json/JSONObject;

    move-result-object v3

    if-eqz v3, :cond_81

    const-string v3, "user"

    .line 16
    invoke-virtual {p0}, Lio/rong/imlib/model/MessageContent;->getJSONUserInfo()Lorg/json/JSONObject;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Lorg/json/JSONObject;->putOpt(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 17
    :cond_81
    invoke-virtual {p0}, Lio/rong/imlib/model/MessageContent;->getJsonMentionInfo()Lorg/json/JSONObject;

    move-result-object v3

    if-eqz v3, :cond_9e

    const-string v3, "mentionedInfo"

    .line 18
    invoke-virtual {p0}, Lio/rong/imlib/model/MessageContent;->getJsonMentionInfo()Lorg/json/JSONObject;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Lorg/json/JSONObject;->putOpt(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_90
    .catch Lorg/json/JSONException; {:try_start_9 .. :try_end_90} :catch_98
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_9 .. :try_end_90} :catch_91

    goto :goto_9e

    :catch_91
    move-exception v3

    const-string v4, "encode UnsupportedEncodingException"

    .line 19
    invoke-static {v1, v4, v3}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_9e

    :catch_98
    move-exception v3

    const-string v4, "encode JSONException"

    .line 20
    invoke-static {v1, v4, v3}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 21
    :cond_9e
    :goto_9e
    :try_start_9e
    invoke-virtual {v2}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v0
    :try_end_a6
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_9e .. :try_end_a6} :catch_a7

    return-object v0

    :catch_a7
    move-exception v0

    const-string v2, "encode jsonObject UnsupportedEncodingException"

    .line 22
    invoke-static {v1, v2, v0}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    const/4 v0, 0x0

    return-object v0
.end method

.method public getEditSendText()Ljava/lang/String;
    .registers 2

    .line 1
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->content:Ljava/lang/String;

    return-object v0
.end method

.method public getExtra()Ljava/lang/String;
    .registers 2

    .line 1
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->extra:Ljava/lang/String;

    return-object v0
.end method

.method public getLocalPath()Landroid/net/Uri;
    .registers 3

    .line 1
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->objName:Ljava/lang/String;

    const-string v1, "RC:FileMsg"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_13

    .line 2
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->referMsg:Lio/rong/imlib/model/MessageContent;

    check-cast v0, Lio/rong/message/FileMessage;

    invoke-virtual {v0}, Lio/rong/message/MediaMessageContent;->getLocalPath()Landroid/net/Uri;

    move-result-object v0

    return-object v0

    :cond_13
    const/4 v0, 0x0

    return-object v0
.end method

.method public getMediaUrl()Landroid/net/Uri;
    .registers 3

    .line 1
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->objName:Ljava/lang/String;

    const-string v1, "RC:FileMsg"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_13

    .line 2
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->referMsg:Lio/rong/imlib/model/MessageContent;

    check-cast v0, Lio/rong/message/FileMessage;

    invoke-virtual {v0}, Lio/rong/message/MediaMessageContent;->getMediaUrl()Landroid/net/Uri;

    move-result-object v0

    return-object v0

    :cond_13
    const/4 v0, 0x0

    return-object v0
.end method

.method public getName()Ljava/lang/String;
    .registers 3

    .line 1
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->objName:Ljava/lang/String;

    const-string v1, "RC:FileMsg"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_13

    .line 2
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->referMsg:Lio/rong/imlib/model/MessageContent;

    check-cast v0, Lio/rong/message/FileMessage;

    invoke-virtual {v0}, Lio/rong/message/MediaMessageContent;->getName()Ljava/lang/String;

    move-result-object v0

    return-object v0

    :cond_13
    const/4 v0, 0x0

    return-object v0
.end method

.method getObjName()Ljava/lang/String;
    .registers 2

    .line 1
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->objName:Ljava/lang/String;

    return-object v0
.end method

.method public getReferenceContent()Lio/rong/imlib/model/MessageContent;
    .registers 2

    .line 1
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->referMsg:Lio/rong/imlib/model/MessageContent;

    return-object v0
.end method

.method public getSearchableWord()Ljava/util/List;
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .line 1
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 2
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getEditSendText()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    return-object v0
.end method

.method public getUserId()Ljava/lang/String;
    .registers 2

    .line 1
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->referMsgUserId:Ljava/lang/String;

    return-object v0
.end method

.method public setContent(Lio/rong/imlib/model/MessageContent;)V
    .registers 2

    .line 1
    iput-object p1, p0, Lio/rong/message/ReferenceMessage;->referMsg:Lio/rong/imlib/model/MessageContent;

    return-void
.end method

.method public setEditSendText(Ljava/lang/String;)V
    .registers 2

    .line 1
    iput-object p1, p0, Lio/rong/message/ReferenceMessage;->content:Ljava/lang/String;

    return-void
.end method

.method public setExtra(Ljava/lang/String;)V
    .registers 2

    .line 1
    iput-object p1, p0, Lio/rong/message/ReferenceMessage;->extra:Ljava/lang/String;

    return-void
.end method

.method public setLocalPath(Landroid/net/Uri;)V
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->objName:Ljava/lang/String;

    const-string v1, "RC:FileMsg"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_11

    .line 2
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->referMsg:Lio/rong/imlib/model/MessageContent;

    check-cast v0, Lio/rong/message/FileMessage;

    invoke-virtual {v0, p1}, Lio/rong/message/MediaMessageContent;->setLocalPath(Landroid/net/Uri;)V

    :cond_11
    return-void
.end method

.method public setMediaUrl(Landroid/net/Uri;)V
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->objName:Ljava/lang/String;

    const-string v1, "RC:FileMsg"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_11

    .line 2
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->referMsg:Lio/rong/imlib/model/MessageContent;

    check-cast v0, Lio/rong/message/FileMessage;

    invoke-virtual {v0, p1}, Lio/rong/message/MediaMessageContent;->setMediaUrl(Landroid/net/Uri;)V

    :cond_11
    return-void
.end method

.method public setName(Ljava/lang/String;)V
    .registers 4

    .line 1
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->objName:Ljava/lang/String;

    const-string v1, "RC:FileMsg"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_11

    .line 2
    iget-object v0, p0, Lio/rong/message/ReferenceMessage;->referMsg:Lio/rong/imlib/model/MessageContent;

    check-cast v0, Lio/rong/message/FileMessage;

    invoke-virtual {v0, p1}, Lio/rong/message/MediaMessageContent;->setName(Ljava/lang/String;)V

    :cond_11
    return-void
.end method

.method setObjName(Ljava/lang/String;)V
    .registers 2

    .line 1
    iput-object p1, p0, Lio/rong/message/ReferenceMessage;->objName:Ljava/lang/String;

    return-void
.end method

.method public setUserId(Ljava/lang/String;)V
    .registers 2

    .line 1
    iput-object p1, p0, Lio/rong/message/ReferenceMessage;->referMsgUserId:Ljava/lang/String;

    return-void
.end method

.method public writeToParcel(Landroid/os/Parcel;I)V
    .registers 3

    .line 1
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getUserId()Ljava/lang/String;

    move-result-object p2

    invoke-static {p1, p2}, Lio/rong/common/ParcelUtils;->writeToParcel(Landroid/os/Parcel;Ljava/lang/String;)V

    .line 2
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getEditSendText()Ljava/lang/String;

    move-result-object p2

    invoke-static {p1, p2}, Lio/rong/common/ParcelUtils;->writeToParcel(Landroid/os/Parcel;Ljava/lang/String;)V

    .line 3
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getObjName()Ljava/lang/String;

    move-result-object p2

    invoke-static {p1, p2}, Lio/rong/common/ParcelUtils;->writeToParcel(Landroid/os/Parcel;Ljava/lang/String;)V

    .line 4
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getReferenceContent()Lio/rong/imlib/model/MessageContent;

    move-result-object p2

    invoke-static {p1, p2}, Lio/rong/common/ParcelUtils;->writeToParcel(Landroid/os/Parcel;Landroid/os/Parcelable;)V

    .line 5
    invoke-virtual {p0}, Lio/rong/message/ReferenceMessage;->getExtra()Ljava/lang/String;

    move-result-object p2

    invoke-static {p1, p2}, Lio/rong/common/ParcelUtils;->writeToParcel(Landroid/os/Parcel;Ljava/lang/String;)V

    .line 6
    invoke-virtual {p0}, Lio/rong/imlib/model/MessageContent;->getUserInfo()Lio/rong/imlib/model/UserInfo;

    move-result-object p2

    invoke-static {p1, p2}, Lio/rong/common/ParcelUtils;->writeToParcel(Landroid/os/Parcel;Landroid/os/Parcelable;)V

    .line 7
    invoke-virtual {p0}, Lio/rong/imlib/model/MessageContent;->getMentionedInfo()Lio/rong/imlib/model/MentionedInfo;

    move-result-object p2

    invoke-static {p1, p2}, Lio/rong/common/ParcelUtils;->writeToParcel(Landroid/os/Parcel;Landroid/os/Parcelable;)V

    return-void
.end method