SyncReadStatusMessage.smali
.class public Lio/rong/message/SyncReadStatusMessage;
.super Lio/rong/imlib/model/MessageContent;
.source "SyncReadStatusMessage.java"
# annotations
.annotation runtime Lio/rong/imlib/MessageTag;
flag = 0x0
value = "RC:SRSMsg"
.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/SyncReadStatusMessage;",
">;"
}
.end annotation
.end field
.field private static final TAG:Ljava/lang/String; = "SyncReadStatusMessage"
# instance fields
.field private lastMessageSendTime:J
# direct methods
.method static constructor <clinit>()V
.registers 1
.line 1
new-instance v0, Lio/rong/message/SyncReadStatusMessage$1;
invoke-direct {v0}, Lio/rong/message/SyncReadStatusMessage$1;-><init>()V
sput-object v0, Lio/rong/message/SyncReadStatusMessage;->CREATOR:Landroid/os/Parcelable$Creator;
return-void
.end method
.method public constructor <init>(J)V
.registers 3
.line 1
invoke-direct {p0}, Lio/rong/imlib/model/MessageContent;-><init>()V
.line 2
iput-wide p1, p0, Lio/rong/message/SyncReadStatusMessage;->lastMessageSendTime:J
return-void
.end method
.method public constructor <init>(Landroid/os/Parcel;)V
.registers 4
.line 3
invoke-direct {p0}, Lio/rong/imlib/model/MessageContent;-><init>()V
.line 4
invoke-static {p1}, Lio/rong/common/ParcelUtils;->readLongFromParcel(Landroid/os/Parcel;)Ljava/lang/Long;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
move-result-wide v0
iput-wide v0, p0, Lio/rong/message/SyncReadStatusMessage;->lastMessageSendTime:J
return-void
.end method
.method public constructor <init>([B)V
.registers 6
const-string v0, "lastMessageSendTime"
const-string v1, "SyncReadStatusMessage"
.line 5
invoke-direct {p0}, Lio/rong/imlib/model/MessageContent;-><init>()V
.line 6
: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 7
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 8
:goto_18
:try_start_18
new-instance p1, Lorg/json/JSONObject;
invoke-direct {p1, v2}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
.line 9
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_32
.line 10
invoke-virtual {p1, v0}, Lorg/json/JSONObject;->getLong(Ljava/lang/String;)J
move-result-wide v2
iput-wide v2, p0, Lio/rong/message/SyncReadStatusMessage;->lastMessageSendTime:J
:try_end_29
.catch Lorg/json/JSONException; {:try_start_18 .. :try_end_29} :catch_2a
goto :goto_32
:catch_2a
move-exception p1
.line 11
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
:cond_32
:goto_32
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, "SyncReadStatusMessage"
.line 1
new-instance v1, Lorg/json/JSONObject;
invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V
:try_start_7
const-string v2, "lastMessageSendTime"
.line 2
iget-wide v3, p0, Lio/rong/message/SyncReadStatusMessage;->lastMessageSendTime:J
invoke-virtual {v1, v2, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
:try_end_e
.catch Lorg/json/JSONException; {:try_start_7 .. :try_end_e} :catch_f
goto :goto_28
:catch_f
move-exception v2
.line 3
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 4
:goto_28
:try_start_28
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_32
.catch Ljava/io/UnsupportedEncodingException; {:try_start_28 .. :try_end_32} :catch_33
return-object v0
:catch_33
move-exception v1
const-string v2, "UnsupportedEncodingException "
.line 5
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 getLastMessageSendTime()J
.registers 3
.line 1
iget-wide v0, p0, Lio/rong/message/SyncReadStatusMessage;->lastMessageSendTime:J
return-wide v0
.end method
.method public writeToParcel(Landroid/os/Parcel;I)V
.registers 5
.line 1
iget-wide v0, p0, Lio/rong/message/SyncReadStatusMessage;->lastMessageSendTime:J
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
return-void
.end method