CollectExchangeMessage.smali

.class public Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;
.super Lio/rong/imlib/model/MessageContent;
.source "CollectExchangeMessage.java"


# annotations
.annotation runtime Lio/rong/imlib/MessageTag;
    flag = 0x3
    value = "cu:collectExchange"
.end annotation


# static fields
.field public static final CREATOR:Landroid/os/Parcelable$Creator;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/os/Parcelable$Creator<",
            "Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;",
            ">;"
        }
    .end annotation
.end field


# instance fields
.field private operation:I

.field private receiveUserId:Ljava/lang/Long;

.field private scrapId:Ljava/lang/String;

.field private sendUserId:Ljava/lang/Long;

.field private uuid:Ljava/lang/String;


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

    .line 1
    new-instance v0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage$1;

    invoke-direct {v0}, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage$1;-><init>()V

    sput-object v0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->CREATOR:Landroid/os/Parcelable$Creator;

    return-void
.end method

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

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

    return-void
.end method

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

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

    .line 9
    invoke-static {p1}, Lio/rong/common/ParcelUtils;->readFromParcel(Landroid/os/Parcel;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->uuid:Ljava/lang/String;

    .line 10
    invoke-static {p1}, Lio/rong/common/ParcelUtils;->readFromParcel(Landroid/os/Parcel;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->scrapId:Ljava/lang/String;

    .line 11
    invoke-static {p1}, Lio/rong/common/ParcelUtils;->readLongFromParcel(Landroid/os/Parcel;)Ljava/lang/Long;

    move-result-object v0

    iput-object v0, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->receiveUserId:Ljava/lang/Long;

    .line 12
    invoke-static {p1}, Lio/rong/common/ParcelUtils;->readLongFromParcel(Landroid/os/Parcel;)Ljava/lang/Long;

    move-result-object v0

    iput-object v0, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->sendUserId:Ljava/lang/Long;

    .line 13
    invoke-static {p1}, Lio/rong/common/ParcelUtils;->readIntFromParcel(Landroid/os/Parcel;)Ljava/lang/Integer;

    move-result-object p1

    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result p1

    iput p1, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->operation:I

    return-void
.end method

.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Long;I)V
    .registers 6

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

    .line 3
    iput-object p1, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->uuid:Ljava/lang/String;

    .line 4
    iput-object p2, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->scrapId:Ljava/lang/String;

    .line 5
    iput-object p3, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->receiveUserId:Ljava/lang/Long;

    .line 6
    iput-object p4, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->sendUserId:Ljava/lang/Long;

    .line 7
    iput p5, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->operation:I

    return-void
.end method

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

    const-string v0, "operation"

    const-string v1, "sendUserId"

    const-string v2, "receiveUserId"

    const-string v3, "scrapId"

    const-string v4, "uuid"

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

    .line 15
    :try_start_d
    new-instance v5, Ljava/lang/String;

    const-string v6, "UTF-8"

    invoke-direct {v5, p1, v6}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
    :try_end_14
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_d .. :try_end_14} :catch_15

    goto :goto_1a

    :catch_15
    move-exception p1

    .line 16
    invoke-virtual {p1}, Ljava/io/UnsupportedEncodingException;->printStackTrace()V

    const/4 v5, 0x0

    .line 17
    :goto_1a
    :try_start_1a
    new-instance p1, Lorg/json/JSONObject;

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

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

    move-result v5

    if-eqz v5, :cond_2b

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

    move-result-object v4

    iput-object v4, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->uuid:Ljava/lang/String;

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

    move-result v4

    if-eqz v4, :cond_37

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

    move-result-object v3

    iput-object v3, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->scrapId:Ljava/lang/String;

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

    move-result v3

    if-eqz v3, :cond_47

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

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    iput-object v2, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->receiveUserId:Ljava/lang/Long;

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

    move-result v2

    if-eqz v2, :cond_57

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

    move-result-wide v1

    invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    iput-object v1, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->sendUserId:Ljava/lang/Long;

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

    move-result v1

    if-eqz v1, :cond_68

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

    move-result p1

    iput p1, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->operation:I
    :try_end_63
    .catch Lorg/json/JSONException; {:try_start_1a .. :try_end_63} :catch_64

    goto :goto_68

    :catch_64
    move-exception p1

    .line 28
    invoke-virtual {p1}, Lorg/json/JSONException;->printStackTrace()V

    :cond_68
    :goto_68
    return-void
.end method


# virtual methods
.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

    :try_start_5
    const-string v1, "uuid"

    .line 2
    iget-object v2, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->uuid:Ljava/lang/String;

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

    const-string v1, "scrapId"

    .line 3
    iget-object v2, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->scrapId:Ljava/lang/String;

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

    const-string v1, "receiveUserId"

    .line 4
    iget-object v2, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->receiveUserId:Ljava/lang/Long;

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

    const-string v1, "sendUserId"

    .line 5
    iget-object v2, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->sendUserId:Ljava/lang/Long;

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

    const-string v1, "operation"

    .line 6
    iget v2, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->operation:I

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
    :try_end_28
    .catch Lorg/json/JSONException; {:try_start_5 .. :try_end_28} :catch_29

    goto :goto_2d

    :catch_29
    move-exception v1

    .line 7
    invoke-virtual {v1}, Lorg/json/JSONException;->printStackTrace()V

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

    move-result-object v0

    const-string v1, "UTF-8"

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

    move-result-object v0
    :try_end_37
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_2d .. :try_end_37} :catch_38

    return-object v0

    :catch_38
    move-exception v0

    .line 9
    invoke-virtual {v0}, Ljava/io/UnsupportedEncodingException;->printStackTrace()V

    const/4 v0, 0x0

    return-object v0
.end method

.method public getOperation()I
    .registers 2

    .line 1
    iget v0, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->operation:I

    return v0
.end method

.method public getReceiveUserId()Ljava/lang/Long;
    .registers 2

    .line 1
    iget-object v0, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->receiveUserId:Ljava/lang/Long;

    return-object v0
.end method

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

    .line 1
    iget-object v0, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->scrapId:Ljava/lang/String;

    return-object v0
.end method

.method public getSendUserId()Ljava/lang/Long;
    .registers 2

    .line 1
    iget-object v0, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->sendUserId:Ljava/lang/Long;

    return-object v0
.end method

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

    .line 1
    iget-object v0, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->uuid:Ljava/lang/String;

    return-object v0
.end method

.method public setOperation(I)V
    .registers 2

    .line 1
    iput p1, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->operation:I

    return-void
.end method

.method public setReceiveUserId(Ljava/lang/Long;)V
    .registers 2

    .line 1
    iput-object p1, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->receiveUserId:Ljava/lang/Long;

    return-void
.end method

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

    .line 1
    iput-object p1, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->scrapId:Ljava/lang/String;

    return-void
.end method

.method public setSendUserId(Ljava/lang/Long;)V
    .registers 2

    .line 1
    iput-object p1, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->sendUserId:Ljava/lang/Long;

    return-void
.end method

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

    .line 1
    iput-object p1, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->uuid:Ljava/lang/String;

    return-void
.end method

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

    .line 1
    iget-object p2, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->uuid:Ljava/lang/String;

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

    .line 2
    iget-object p2, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->scrapId:Ljava/lang/String;

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

    .line 3
    iget-object p2, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->receiveUserId:Ljava/lang/Long;

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

    .line 4
    iget-object p2, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->sendUserId:Ljava/lang/Long;

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

    .line 5
    iget p2, p0, Lcom/sandboxol/imchat/message/entity/CollectExchangeMessage;->operation:I

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p2

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

    return-void
.end method