ChatRoomKVNotiMessage.smali
.class public Lio/rong/message/ChatRoomKVNotiMessage;
.super Lio/rong/imlib/model/MessageContent;
.source "ChatRoomKVNotiMessage.java"
# annotations
.annotation runtime Lio/rong/imlib/MessageTag;
flag = 0x0
value = "RC:chrmKVNotiMsg"
.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/ChatRoomKVNotiMessage;",
">;"
}
.end annotation
.end field
.field private static final TAG:Ljava/lang/String; = "ChatRoomKVNotiMessage"
.field public static final TYPE_DELETE_KEY:I = 0x2
.field public static final TYPE_SET_KEY:I = 0x1
# instance fields
.field private extra:Ljava/lang/String;
.field private key:Ljava/lang/String;
.field private type:I
.field private value:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.registers 1
.line 1
new-instance v0, Lio/rong/message/ChatRoomKVNotiMessage$1;
invoke-direct {v0}, Lio/rong/message/ChatRoomKVNotiMessage$1;-><init>()V
sput-object v0, Lio/rong/message/ChatRoomKVNotiMessage;->CREATOR:Landroid/os/Parcelable$Creator;
return-void
.end method
.method private constructor <init>()V
.registers 1
.line 15
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 1
invoke-direct {p0}, Lio/rong/imlib/model/MessageContent;-><init>()V
.line 2
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/ChatRoomKVNotiMessage;->key:Ljava/lang/String;
.line 3
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/ChatRoomKVNotiMessage;->value:Ljava/lang/String;
.line 4
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/ChatRoomKVNotiMessage;->extra:Ljava/lang/String;
.line 5
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, Lio/rong/message/ChatRoomKVNotiMessage;->type:I
return-void
.end method
.method public constructor <init>([B)V
.registers 5
const-string v0, "ChatRoomKVNotiMessage"
.line 6
invoke-direct {p0}, Lio/rong/imlib/model/MessageContent;-><init>()V
.line 7
:try_start_5
new-instance v1, Ljava/lang/String;
const-string v2, "UTF-8"
invoke-direct {v1, p1, v2}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
:try_end_c
.catch Ljava/io/UnsupportedEncodingException; {:try_start_5 .. :try_end_c} :catch_d
goto :goto_14
:catch_d
move-exception p1
const-string v1, "UnsupportedEncodingException"
.line 8
invoke-static {v0, v1, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
const/4 v1, 0x0
.line 9
:goto_14
:try_start_14
new-instance p1, Lorg/json/JSONObject;
invoke-direct {p1, v1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
const-string v1, "key"
.line 10
invoke-virtual {p1, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, v1}, Lio/rong/message/ChatRoomKVNotiMessage;->setKey(Ljava/lang/String;)V
const-string v1, "value"
.line 11
invoke-virtual {p1, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, v1}, Lio/rong/message/ChatRoomKVNotiMessage;->setValue(Ljava/lang/String;)V
const-string v1, "extra"
.line 12
invoke-virtual {p1, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, v1}, Lio/rong/message/ChatRoomKVNotiMessage;->setExtra(Ljava/lang/String;)V
const-string v1, "type"
.line 13
invoke-virtual {p1, v1}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I
move-result p1
invoke-virtual {p0, p1}, Lio/rong/message/ChatRoomKVNotiMessage;->setType(I)V
:try_end_3d
.catch Lorg/json/JSONException; {:try_start_14 .. :try_end_3d} :catch_3e
goto :goto_57
:catch_3e
move-exception p1
.line 14
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "JSONException "
invoke-virtual {v1, v2}, 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 {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-static {v0, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
:goto_57
return-void
.end method
.method public static getTAG()Ljava/lang/String;
.registers 1
const-string v0, "ChatRoomKVNotiMessage"
return-object v0
.end method
.method public static obtain(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)Lio/rong/message/ChatRoomKVNotiMessage;
.registers 5
.line 1
new-instance v0, Lio/rong/message/ChatRoomKVNotiMessage;
invoke-direct {v0}, Lio/rong/message/ChatRoomKVNotiMessage;-><init>()V
.line 2
iput-object p0, v0, Lio/rong/message/ChatRoomKVNotiMessage;->key:Ljava/lang/String;
.line 3
iput-object p1, v0, Lio/rong/message/ChatRoomKVNotiMessage;->value:Ljava/lang/String;
.line 4
iput-object p3, v0, Lio/rong/message/ChatRoomKVNotiMessage;->extra:Ljava/lang/String;
.line 5
iput p2, v0, Lio/rong/message/ChatRoomKVNotiMessage;->type:I
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 6
const-string v0, "ChatRoomKVNotiMessage"
.line 1
new-instance v1, Lorg/json/JSONObject;
invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V
:try_start_7
const-string v2, "key"
.line 2
iget-object v3, p0, Lio/rong/message/ChatRoomKVNotiMessage;->key:Ljava/lang/String;
invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
const-string v2, "value"
.line 3
iget-object v3, p0, Lio/rong/message/ChatRoomKVNotiMessage;->value:Ljava/lang/String;
invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
const-string v2, "extra"
.line 4
iget-object v3, p0, Lio/rong/message/ChatRoomKVNotiMessage;->extra:Ljava/lang/String;
invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
const-string v2, "type"
.line 5
iget v3, p0, Lio/rong/message/ChatRoomKVNotiMessage;->type:I
invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
:try_end_23
.catch Lorg/json/JSONException; {:try_start_7 .. :try_end_23} :catch_24
goto :goto_3d
:catch_24
move-exception v2
.line 6
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "JSONException "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Lorg/json/JSONException;->getMessage()Ljava/lang/String;
move-result-object v2
invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v0, v2}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 7
:goto_3d
:try_start_3d
invoke-virtual {v1}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
move-result-object v1
const-string v2, "UTF-8"
invoke-virtual {v1, v2}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B
move-result-object v0
:try_end_47
.catch Ljava/io/UnsupportedEncodingException; {:try_start_3d .. :try_end_47} :catch_48
return-object v0
:catch_48
move-exception v1
const-string v2, "UnsupportedEncodingException"
.line 8
invoke-static {v0, v2, v1}, 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 getExtra()Ljava/lang/String;
.registers 2
.line 1
iget-object v0, p0, Lio/rong/message/ChatRoomKVNotiMessage;->extra:Ljava/lang/String;
return-object v0
.end method
.method public getKey()Ljava/lang/String;
.registers 2
.line 1
iget-object v0, p0, Lio/rong/message/ChatRoomKVNotiMessage;->key:Ljava/lang/String;
return-object v0
.end method
.method public getType()I
.registers 2
.line 1
iget v0, p0, Lio/rong/message/ChatRoomKVNotiMessage;->type:I
return v0
.end method
.method public getValue()Ljava/lang/String;
.registers 2
.line 1
iget-object v0, p0, Lio/rong/message/ChatRoomKVNotiMessage;->value:Ljava/lang/String;
return-object v0
.end method
.method public setExtra(Ljava/lang/String;)V
.registers 2
.line 1
iput-object p1, p0, Lio/rong/message/ChatRoomKVNotiMessage;->extra:Ljava/lang/String;
return-void
.end method
.method public setKey(Ljava/lang/String;)V
.registers 2
.line 1
iput-object p1, p0, Lio/rong/message/ChatRoomKVNotiMessage;->key:Ljava/lang/String;
return-void
.end method
.method public setType(I)V
.registers 2
.line 1
iput p1, p0, Lio/rong/message/ChatRoomKVNotiMessage;->type:I
return-void
.end method
.method public setValue(Ljava/lang/String;)V
.registers 2
.line 1
iput-object p1, p0, Lio/rong/message/ChatRoomKVNotiMessage;->value:Ljava/lang/String;
return-void
.end method
.method public writeToParcel(Landroid/os/Parcel;I)V
.registers 3
.line 1
iget-object p2, p0, Lio/rong/message/ChatRoomKVNotiMessage;->key: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, Lio/rong/message/ChatRoomKVNotiMessage;->value: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, Lio/rong/message/ChatRoomKVNotiMessage;->extra:Ljava/lang/String;
invoke-static {p1, p2}, Lio/rong/common/ParcelUtils;->writeToParcel(Landroid/os/Parcel;Ljava/lang/String;)V
.line 4
iget p2, p0, Lio/rong/message/ChatRoomKVNotiMessage;->type: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