RecallCommandMessage.smali
.class public Lio/rong/message/RecallCommandMessage;
.super Lio/rong/imlib/model/MessageContent;
.source "RecallCommandMessage.java"
# annotations
.annotation runtime Lio/rong/imlib/MessageTag;
flag = 0x0
value = "RC:RcCmd"
.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/RecallCommandMessage;",
">;"
}
.end annotation
.end field
.field private static final TAG:Ljava/lang/String; = "RecallCommandMessage"
# instance fields
.field private conversationType:I
.field private extra:Ljava/lang/String;
.field private isAdmin:Z
.field private isDelete:Z
.field private messageUId:Ljava/lang/String;
.field private sentTime:J
.field private targetId:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.registers 1
.line 1
new-instance v0, Lio/rong/message/RecallCommandMessage$1;
invoke-direct {v0}, Lio/rong/message/RecallCommandMessage$1;-><init>()V
sput-object v0, Lio/rong/message/RecallCommandMessage;->CREATOR:Landroid/os/Parcelable$Creator;
return-void
.end method
.method public constructor <init>(Landroid/os/Parcel;)V
.registers 5
.line 20
invoke-direct {p0}, Lio/rong/imlib/model/MessageContent;-><init>()V
.line 21
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 22
invoke-static {p1}, Lio/rong/common/ParcelUtils;->readFromParcel(Landroid/os/Parcel;)Ljava/lang/String;
move-result-object v0
invoke-virtual {p0, v0}, Lio/rong/message/RecallCommandMessage;->setMessageUId(Ljava/lang/String;)V
.line 23
invoke-static {p1}, Lio/rong/common/ParcelUtils;->readFromParcel(Landroid/os/Parcel;)Ljava/lang/String;
move-result-object v0
invoke-virtual {p0, v0}, Lio/rong/message/RecallCommandMessage;->setExtra(Ljava/lang/String;)V
.line 24
invoke-static {p1}, Lio/rong/common/ParcelUtils;->readFromParcel(Landroid/os/Parcel;)Ljava/lang/String;
move-result-object v0
invoke-virtual {p0, v0}, Lio/rong/message/RecallCommandMessage;->setTargetId(Ljava/lang/String;)V
.line 25
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
invoke-virtual {p0, v0}, Lio/rong/message/RecallCommandMessage;->setConversationType(I)V
.line 26
invoke-static {p1}, Lio/rong/common/ParcelUtils;->readLongFromParcel(Landroid/os/Parcel;)Ljava/lang/Long;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
move-result-wide v0
invoke-virtual {p0, v0, v1}, Lio/rong/message/RecallCommandMessage;->setSentTime(J)V
.line 27
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
const/4 v1, 0x0
const/4 v2, 0x1
if-ne v0, v2, :cond_47
const/4 v0, 0x1
goto :goto_48
:cond_47
const/4 v0, 0x0
:goto_48
invoke-virtual {p0, v0}, Lio/rong/message/RecallCommandMessage;->setAdmin(Z)V
.line 28
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
if-ne p1, v2, :cond_56
const/4 v1, 0x1
:cond_56
invoke-virtual {p0, v1}, Lio/rong/message/RecallCommandMessage;->setDelete(Z)V
return-void
.end method
.method public constructor <init>(Ljava/lang/String;)V
.registers 2
.line 1
invoke-direct {p0}, Lio/rong/imlib/model/MessageContent;-><init>()V
.line 2
invoke-virtual {p0, p1}, Lio/rong/message/RecallCommandMessage;->setMessageUId(Ljava/lang/String;)V
return-void
.end method
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;)V
.registers 3
.line 3
invoke-direct {p0}, Lio/rong/imlib/model/MessageContent;-><init>()V
.line 4
invoke-virtual {p0, p1}, Lio/rong/message/RecallCommandMessage;->setMessageUId(Ljava/lang/String;)V
.line 5
invoke-virtual {p0, p2}, Lio/rong/message/RecallCommandMessage;->setExtra(Ljava/lang/String;)V
return-void
.end method
.method public constructor <init>([B)V
.registers 6
const-string v0, "user"
const-string v1, "RecallCommandMessage"
.line 6
invoke-direct {p0}, Lio/rong/imlib/model/MessageContent;-><init>()V
.line 7
: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
.line 8
invoke-virtual {p1}, Ljava/io/UnsupportedEncodingException;->getMessage()Ljava/lang/String;
move-result-object p1
invoke-static {v1, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
const/4 v2, 0x0
.line 9
:goto_18
:try_start_18
new-instance p1, Lorg/json/JSONObject;
invoke-direct {p1, v2}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
.line 10
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_2e
.line 11
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object v0
invoke-virtual {p0, v0}, Lio/rong/imlib/model/MessageContent;->parseJsonToUserInfo(Lorg/json/JSONObject;)Lio/rong/imlib/model/UserInfo;
move-result-object v0
invoke-virtual {p0, v0}, Lio/rong/imlib/model/MessageContent;->setUserInfo(Lio/rong/imlib/model/UserInfo;)V
:cond_2e
const-string v0, "messageUId"
.line 12
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
invoke-virtual {p0, v0}, Lio/rong/message/RecallCommandMessage;->setMessageUId(Ljava/lang/String;)V
const-string v0, "extra"
.line 13
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
invoke-virtual {p0, v0}, Lio/rong/message/RecallCommandMessage;->setExtra(Ljava/lang/String;)V
const-string v0, "targetId"
.line 14
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
invoke-virtual {p0, v0}, Lio/rong/message/RecallCommandMessage;->setTargetId(Ljava/lang/String;)V
const-string v0, "conversationType"
.line 15
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I
move-result v0
invoke-virtual {p0, v0}, Lio/rong/message/RecallCommandMessage;->setConversationType(I)V
const-string v0, "sentTime"
.line 16
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optLong(Ljava/lang/String;)J
move-result-wide v2
invoke-virtual {p0, v2, v3}, Lio/rong/message/RecallCommandMessage;->setSentTime(J)V
const-string v0, "isAdmin"
.line 17
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;)Z
move-result v0
invoke-virtual {p0, v0}, Lio/rong/message/RecallCommandMessage;->setAdmin(Z)V
const-string v0, "isDelete"
.line 18
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;)Z
move-result p1
invoke-virtual {p0, p1}, Lio/rong/message/RecallCommandMessage;->setDelete(Z)V
:try_end_6d
.catch Lorg/json/JSONException; {:try_start_18 .. :try_end_6d} :catch_6e
goto :goto_76
:catch_6e
move-exception p1
.line 19
invoke-virtual {p1}, Lorg/json/JSONException;->getMessage()Ljava/lang/String;
move-result-object p1
invoke-static {v1, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
:goto_76
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 6
const-string v0, "RecallCommandMessage"
.line 1
new-instance v1, Lorg/json/JSONObject;
invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V
.line 2
:try_start_7
invoke-virtual {p0}, Lio/rong/imlib/model/MessageContent;->getJSONUserInfo()Lorg/json/JSONObject;
move-result-object v2
if-eqz v2, :cond_16
const-string v2, "user"
.line 3
invoke-virtual {p0}, Lio/rong/imlib/model/MessageContent;->getJSONUserInfo()Lorg/json/JSONObject;
move-result-object v3
invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->putOpt(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 4
:cond_16
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->getMessageUId()Ljava/lang/String;
move-result-object v2
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
if-nez v2, :cond_29
const-string v2, "messageUId"
.line 5
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->getMessageUId()Ljava/lang/String;
move-result-object v3
invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 6
:cond_29
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->getExtra()Ljava/lang/String;
move-result-object v2
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
if-nez v2, :cond_3c
const-string v2, "extra"
.line 7
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->getExtra()Ljava/lang/String;
move-result-object v3
invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 8
:cond_3c
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->getTargetId()Ljava/lang/String;
move-result-object v2
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
if-nez v2, :cond_4f
const-string v2, "targetId"
.line 9
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->getTargetId()Ljava/lang/String;
move-result-object v3
invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
:cond_4f
const-string v2, "isAdmin"
.line 10
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->isAdmin()Z
move-result v3
invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;
const-string v2, "isDelete"
.line 11
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->isDelete()Z
move-result v3
invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject;
const-string v2, "conversationType"
.line 12
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->getConversationType()I
move-result v3
invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
const-string v2, "sentTime"
.line 13
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->getSentTime()J
move-result-wide v3
invoke-virtual {v1, v2, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
:try_end_73
.catch Lorg/json/JSONException; {:try_start_7 .. :try_end_73} :catch_74
goto :goto_7c
:catch_74
move-exception v2
.line 14
invoke-virtual {v2}, Lorg/json/JSONException;->getMessage()Ljava/lang/String;
move-result-object v2
invoke-static {v0, v2}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 15
:goto_7c
:try_start_7c
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_86
.catch Ljava/io/UnsupportedEncodingException; {:try_start_7c .. :try_end_86} :catch_87
return-object v0
:catch_87
move-exception v1
const-string v2, "UnsupportedEncodingException "
.line 16
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 getConversationType()I
.registers 2
.line 1
iget v0, p0, Lio/rong/message/RecallCommandMessage;->conversationType:I
return v0
.end method
.method public getExtra()Ljava/lang/String;
.registers 2
.line 1
iget-object v0, p0, Lio/rong/message/RecallCommandMessage;->extra:Ljava/lang/String;
return-object v0
.end method
.method public getMessageUId()Ljava/lang/String;
.registers 2
.line 1
iget-object v0, p0, Lio/rong/message/RecallCommandMessage;->messageUId:Ljava/lang/String;
return-object v0
.end method
.method public getSentTime()J
.registers 3
.line 1
iget-wide v0, p0, Lio/rong/message/RecallCommandMessage;->sentTime:J
return-wide v0
.end method
.method public getTargetId()Ljava/lang/String;
.registers 2
.line 1
iget-object v0, p0, Lio/rong/message/RecallCommandMessage;->targetId:Ljava/lang/String;
return-object v0
.end method
.method public isAdmin()Z
.registers 2
.line 1
iget-boolean v0, p0, Lio/rong/message/RecallCommandMessage;->isAdmin:Z
return v0
.end method
.method public isDelete()Z
.registers 2
.line 1
iget-boolean v0, p0, Lio/rong/message/RecallCommandMessage;->isDelete:Z
return v0
.end method
.method public setAdmin(Z)V
.registers 2
.line 1
iput-boolean p1, p0, Lio/rong/message/RecallCommandMessage;->isAdmin:Z
return-void
.end method
.method public setConversationType(I)V
.registers 2
.line 1
iput p1, p0, Lio/rong/message/RecallCommandMessage;->conversationType:I
return-void
.end method
.method public setDelete(Z)V
.registers 2
.line 1
iput-boolean p1, p0, Lio/rong/message/RecallCommandMessage;->isDelete:Z
return-void
.end method
.method public setExtra(Ljava/lang/String;)V
.registers 2
.line 1
iput-object p1, p0, Lio/rong/message/RecallCommandMessage;->extra:Ljava/lang/String;
return-void
.end method
.method public setMessageUId(Ljava/lang/String;)V
.registers 2
.line 1
iput-object p1, p0, Lio/rong/message/RecallCommandMessage;->messageUId:Ljava/lang/String;
return-void
.end method
.method public setSentTime(J)V
.registers 3
.line 1
iput-wide p1, p0, Lio/rong/message/RecallCommandMessage;->sentTime:J
return-void
.end method
.method public setTargetId(Ljava/lang/String;)V
.registers 2
.line 1
iput-object p1, p0, Lio/rong/message/RecallCommandMessage;->targetId:Ljava/lang/String;
return-void
.end method
.method public writeToParcel(Landroid/os/Parcel;I)V
.registers 5
.line 1
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 2
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->getMessageUId()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/RecallCommandMessage;->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 4
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->getTargetId()Ljava/lang/String;
move-result-object p2
invoke-static {p1, p2}, Lio/rong/common/ParcelUtils;->writeToParcel(Landroid/os/Parcel;Ljava/lang/String;)V
.line 5
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->getConversationType()I
move-result p2
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 6
invoke-virtual {p0}, Lio/rong/message/RecallCommandMessage;->getSentTime()J
move-result-wide v0
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p2
invoke-static {p1, p2}, Lio/rong/common/ParcelUtils;->writeToParcel(Landroid/os/Parcel;Ljava/lang/Long;)V
.line 7
iget-boolean p2, p0, Lio/rong/message/RecallCommandMessage;->isAdmin:Z
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 8
iget-boolean p2, p0, Lio/rong/message/RecallCommandMessage;->isDelete:Z
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