CSChangeModeResponseMessage.smali

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


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

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


# instance fields
.field private code:I

.field private errMsg:Ljava/lang/String;

.field private evaluation:Ljava/lang/String;

.field private status:I


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

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

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

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

    return-void
.end method

.method public 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 19
    invoke-direct {p0}, Lio/rong/imlib/model/MessageContent;-><init>()V

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

    move-result-object v0

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

    move-result v0

    iput v0, p0, Lio/rong/message/CSChangeModeResponseMessage;->code:I

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

    move-result-object v0

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

    move-result v0

    iput v0, p0, Lio/rong/message/CSChangeModeResponseMessage;->status:I

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

    move-result-object v0

    iput-object v0, p0, Lio/rong/message/CSChangeModeResponseMessage;->errMsg:Ljava/lang/String;

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

    move-result-object p1

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

    return-void
.end method

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

    const-string v0, "data"

    const-string v1, "satisfaction"

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

    .line 3
    :try_start_7
    new-instance v2, Ljava/lang/String;

    const-string v3, "UTF-8"

    invoke-direct {v2, p1, v3}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
    :try_end_e
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_7 .. :try_end_e} :catch_f

    goto :goto_18

    :catch_f
    move-exception p1

    const-string v2, "CSChangeModeResponseMessage"

    const-string v3, "UnsupportedEncodingException "

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

    const/4 v2, 0x0

    .line 5
    :goto_18
    :try_start_18
    new-instance p1, Lorg/json/JSONObject;

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

    const-string v2, "code"

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

    move-result v2

    iput v2, p0, Lio/rong/message/CSChangeModeResponseMessage;->code:I

    const-string v2, "msg"

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

    move-result-object v2

    iput-object v2, p0, Lio/rong/message/CSChangeModeResponseMessage;->errMsg:Ljava/lang/String;

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

    move-result v2

    if-eqz v2, :cond_66

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

    move-result-object p1

    const-string v0, "status"

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

    move-result v0

    iput v0, p0, Lio/rong/message/CSChangeModeResponseMessage;->status:I

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

    move-result v0

    if-eqz v0, :cond_66

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

    move-result-object p1

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

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

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

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

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

    const-string p1, "evaluation"

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

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

    move-result-object p1

    iput-object p1, p0, Lio/rong/message/CSChangeModeResponseMessage;->evaluation:Ljava/lang/String;
    :try_end_61
    .catch Lorg/json/JSONException; {:try_start_18 .. :try_end_61} :catch_62

    goto :goto_66

    :catch_62
    move-exception p1

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

    :cond_66
    :goto_66
    return-void
.end method

.method public static obtain()Lio/rong/message/CSChangeModeResponseMessage;
    .registers 1

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

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

    return-object v0
.end method


# virtual methods
.method public describeContents()I
    .registers 2

    const/4 v0, 0x0

    return v0
.end method

.method public encode()[B
    .registers 2

    const/4 v0, 0x0

    return-object v0
.end method

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

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

    return-object v0
.end method

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

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

    return-object v0
.end method

.method public getResult()I
    .registers 2

    .line 1
    iget v0, p0, Lio/rong/message/CSChangeModeResponseMessage;->code:I

    return v0
.end method

.method public getStatus()I
    .registers 2

    .line 1
    iget v0, p0, Lio/rong/message/CSChangeModeResponseMessage;->status:I

    return v0
.end method

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

    .line 1
    iget p2, p0, Lio/rong/message/CSChangeModeResponseMessage;->code: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

    .line 2
    iget p2, p0, Lio/rong/message/CSChangeModeResponseMessage;->status: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

    .line 3
    iget-object p2, p0, Lio/rong/message/CSChangeModeResponseMessage;->errMsg:Ljava/lang/String;

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

    .line 4
    iget-object p2, p0, Lio/rong/message/CSChangeModeResponseMessage;->evaluation:Ljava/lang/String;

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

    return-void
.end method