DestructionCmdMessage.smali

.class public Lio/rong/message/DestructionCmdMessage;
.super Lio/rong/imlib/model/MessageContent;
.source "DestructionCmdMessage.java"


# annotations
.annotation runtime Lio/rong/imlib/MessageTag;
    flag = 0x0
    value = "RC:BurnNoticeMsg"
.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/DestructionCmdMessage;",
            ">;"
        }
    .end annotation
.end field

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


# instance fields
.field private burnMessageUIds:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field


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

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

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

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

    return-void
.end method

.method public constructor <init>()V
    .registers 2

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

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

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

    iput-object v0, p0, Lio/rong/message/DestructionCmdMessage;->burnMessageUIds:Ljava/util/List;

    return-void
.end method

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

    .line 4
    invoke-direct {p0}, Lio/rong/imlib/model/MessageContent;-><init>()V

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

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

    iput-object v0, p0, Lio/rong/message/DestructionCmdMessage;->burnMessageUIds:Ljava/util/List;

    .line 6
    const-class v0, Lio/rong/message/DestructionCmdMessage;

    invoke-virtual {v0}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;

    move-result-object v0

    invoke-virtual {p1, v0}, Landroid/os/Parcel;->readArrayList(Ljava/lang/ClassLoader;)Ljava/util/ArrayList;

    move-result-object p1

    iput-object p1, p0, Lio/rong/message/DestructionCmdMessage;->burnMessageUIds:Ljava/util/List;

    return-void
.end method

.method synthetic constructor <init>(Landroid/os/Parcel;Lio/rong/message/DestructionCmdMessage$1;)V
    .registers 3

    .line 1
    invoke-direct {p0, p1}, Lio/rong/message/DestructionCmdMessage;-><init>(Landroid/os/Parcel;)V

    return-void
.end method

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

    const-string v0, "DestructionCmdMessage"

    .line 7
    invoke-direct {p0}, Lio/rong/imlib/model/MessageContent;-><init>()V

    .line 8
    new-instance v1, Ljava/util/ArrayList;

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

    iput-object v1, p0, Lio/rong/message/DestructionCmdMessage;->burnMessageUIds:Ljava/util/List;

    .line 9
    :try_start_c
    new-instance v1, Ljava/lang/String;

    const-string v2, "UTF-8"

    invoke-direct {v1, p1, v2}, Ljava/lang/String;-><init>([BLjava/lang/String;)V

    .line 10
    new-instance p1, Lorg/json/JSONObject;

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

    const-string v1, "burnMessageUIds"

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

    move-result-object p1

    const/4 v1, 0x0

    .line 12
    :goto_1f
    invoke-virtual {p1}, Lorg/json/JSONArray;->length()I

    move-result v2

    if-ge v1, v2, :cond_3e

    .line 13
    iget-object v2, p0, Lio/rong/message/DestructionCmdMessage;->burnMessageUIds:Ljava/util/List;

    invoke-virtual {p1, v1}, Lorg/json/JSONArray;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_2e
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_c .. :try_end_2e} :catch_38
    .catch Lorg/json/JSONException; {:try_start_c .. :try_end_2e} :catch_31

    add-int/lit8 v1, v1, 0x1

    goto :goto_1f

    :catch_31
    move-exception p1

    .line 14
    sget-object v1, Lio/rong/message/DestructionCmdMessage;->TAG:Ljava/lang/String;

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

    goto :goto_3e

    :catch_38
    move-exception p1

    .line 15
    sget-object v1, Lio/rong/message/DestructionCmdMessage;->TAG:Ljava/lang/String;

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

    :cond_3e
    :goto_3e
    return-void
.end method


# virtual methods
.method public addBurnMessageUId(Ljava/lang/String;)V
    .registers 3

    .line 1
    iget-object v0, p0, Lio/rong/message/DestructionCmdMessage;->burnMessageUIds:Ljava/util/List;

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

    return-void
.end method

.method public describeContents()I
    .registers 2

    const/4 v0, 0x0

    return v0
.end method

.method public encode()[B
    .registers 4

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

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

    .line 2
    new-instance v1, Lorg/json/JSONArray;

    iget-object v2, p0, Lio/rong/message/DestructionCmdMessage;->burnMessageUIds:Ljava/util/List;

    invoke-direct {v1, v2}, Lorg/json/JSONArray;-><init>(Ljava/util/Collection;)V

    :try_start_c
    const-string v2, "burnMessageUIds"

    .line 3
    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_11
    .catch Lorg/json/JSONException; {:try_start_c .. :try_end_11} :catch_1a

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

    move-result-object v0

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

    move-result-object v0

    return-object v0

    :catch_1a
    const/4 v0, 0x0

    return-object v0
.end method

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

    .line 1
    iget-object v0, p0, Lio/rong/message/DestructionCmdMessage;->burnMessageUIds:Ljava/util/List;

    return-object v0
.end method

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

    if-nez p1, :cond_3

    return-void

    .line 1
    :cond_3
    iput-object p1, p0, Lio/rong/message/DestructionCmdMessage;->burnMessageUIds:Ljava/util/List;

    return-void
.end method

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

    .line 1
    iget-object p2, p0, Lio/rong/message/DestructionCmdMessage;->burnMessageUIds:Ljava/util/List;

    invoke-virtual {p1, p2}, Landroid/os/Parcel;->writeList(Ljava/util/List;)V

    return-void
.end method