a.smali
.class public final Lpg/a;
.super Lkc/a;
.source "BizChatArrivedProcessor.kt"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkc/a<",
"Lcom/shopee/foody/driver/im/business/network/model/proto/BizChatRecvData;",
">;"
}
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000N\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0008\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0002\u0008\u0004\n\u0002\u0010\u000e\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0012\n\u0000\u0018\u00002\u0008\u0012\u0004\u0012\u00020\u00020\u0001BA\u0012:\u0008\u0002\u0010\u0003\u001a4\u0012\u0013\u0012\u00110\u0005\u00a2\u0006\u000c\u0008\u0006\u0012\u0008\u0008\u0007\u0012\u0004\u0008\u0008(\u0008\u0012\u0013\u0012\u00110\t\u00a2\u0006\u000c\u0008\u0006\u0012\u0008\u0008\u0007\u0012\u0004\u0008\u0008(\n\u0012\u0004\u0012\u00020\u000b\u0018\u00010\u0004\u00a2\u0006\u0002\u0010\u000cJ\u0019\u0010\u0011\u001a\u00020\t2\u0006\u0010\u0012\u001a\u00020\tH\u0082@\u00f8\u0001\u0000\u00a2\u0006\u0002\u0010\u0013J\u0010\u0010\u0014\u001a\u00020\u00152\u0006\u0010\n\u001a\u00020\tH\u0002J\u0008\u0010\u0016\u001a\u00020\u0005H\u0016J\u0008\u0010\u0017\u001a\u00020\u0005H\u0016J\u001a\u0010\u0018\u001a\u00020\u000b2\u0006\u0010\u0019\u001a\u00020\u001a2\u0008\u0010\u001b\u001a\u0004\u0018\u00010\u0002H\u0016J\u001e\u0010\u001c\u001a\u000e\u0012\u0004\u0012\u00020\u001a\u0012\u0004\u0012\u00020\u00020\u001d2\u0008\u0010\u001b\u001a\u0004\u0018\u00010\u001eH\u0016RC\u0010\u0003\u001a4\u0012\u0013\u0012\u00110\u0005\u00a2\u0006\u000c\u0008\u0006\u0012\u0008\u0008\u0007\u0012\u0004\u0008\u0008(\u0008\u0012\u0013\u0012\u00110\t\u00a2\u0006\u000c\u0008\u0006\u0012\u0008\u0008\u0007\u0012\u0004\u0008\u0008(\n\u0012\u0004\u0012\u00020\u000b\u0018\u00010\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\r\u0010\u000eR\u000e\u0010\u000f\u001a\u00020\u0010X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\u0008\u0019\u00a8\u0006\u001f"
}
d2 = {
"Lcom/shopee/foody/driver/im/business/network/model/processor/BizChatArrivedProcessor;",
"Lcom/shopee/app/network/processors/extended/ExtendedItemProcessor;",
"Lcom/shopee/foody/driver/im/business/network/model/proto/BizChatRecvData;",
"callback",
"Lkotlin/Function2;",
"",
"Lkotlin/ParameterName;",
"name",
"cmd",
"Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;",
"chatMsg",
"",
"(Lkotlin/jvm/functions/Function2;)V",
"getCallback",
"()Lkotlin/jvm/functions/Function2;",
"mutex",
"Lkotlinx/coroutines/sync/Mutex;",
"fetchAndSaveToDb",
"receivedChatMsg",
"(Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
"filerNewArrivedMsg",
"Lkotlinx/coroutines/Job;",
"getCommand",
"getServiceId",
"onProcess",
"requestId",
"",
"data",
"parse",
"Landroid/util/Pair;",
"",
"driver_indonesiaRelease"
}
k = 0x1
mv = {
0x1,
0x1,
0x10
}
.end annotation
# instance fields
.field public final a:Lkotlinx/coroutines/sync/Mutex;
.field public final b:Lkotlin/jvm/functions/Function2;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkotlin/jvm/functions/Function2<",
"Ljava/lang/Integer;",
"Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;",
"Lkotlin/Unit;",
">;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>()V
.registers 3
const/4 v0, 0x0
const/4 v1, 0x1
invoke-direct {p0, v0, v1, v0}, Lpg/a;-><init>(Lkotlin/jvm/functions/Function2;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
return-void
.end method
.method public constructor <init>(Lkotlin/jvm/functions/Function2;)V
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/jvm/functions/Function2<",
"-",
"Ljava/lang/Integer;",
"-",
"Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;",
"Lkotlin/Unit;",
">;)V"
}
.end annotation
invoke-direct {p0}, Lkc/a;-><init>()V
iput-object p1, p0, Lpg/a;->b:Lkotlin/jvm/functions/Function2;
const/4 p1, 0x0
const/4 v0, 0x1
const/4 v1, 0x0
invoke-static {p1, v0, v1}, Lkotlinx/coroutines/sync/MutexKt;->Mutex$default(ZILjava/lang/Object;)Lkotlinx/coroutines/sync/Mutex;
move-result-object p1
iput-object p1, p0, Lpg/a;->a:Lkotlinx/coroutines/sync/Mutex;
return-void
.end method
.method public synthetic constructor <init>(Lkotlin/jvm/functions/Function2;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
.registers 4
and-int/lit8 p2, p2, 0x1
if-eqz p2, :cond_5
const/4 p1, 0x0
:cond_5
invoke-direct {p0, p1}, Lpg/a;-><init>(Lkotlin/jvm/functions/Function2;)V
return-void
.end method
.method public static final synthetic a(Lpg/a;)Lkotlinx/coroutines/sync/Mutex;
.registers 1
iget-object p0, p0, Lpg/a;->a:Lkotlinx/coroutines/sync/Mutex;
return-object p0
.end method
# virtual methods
.method public a()I
.registers 2
sget-object v0, Lcom/shopee/protocol/action/CommandExt;->CMD_BIZ_CHAT_RECV:Lcom/shopee/protocol/action/CommandExt;
invoke-virtual {v0}, Lcom/shopee/protocol/action/CommandExt;->getValue()I
move-result v0
return v0
.end method
.method public a([B)Landroid/util/Pair;
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"([B)",
"Landroid/util/Pair<",
"Ljava/lang/String;",
"Lcom/shopee/foody/driver/im/business/network/model/proto/BizChatRecvData;",
">;"
}
.end annotation
sget-object v0, Lfc/d;->f:Lfc/d;
invoke-virtual {v0}, Lfc/d;->a()Lcom/squareup/wire/Wire;
move-result-object v0
const/4 v1, 0x0
if-eqz p1, :cond_b
array-length v2, p1
goto :goto_c
:cond_b
const/4 v2, 0x0
:goto_c
const-class v3, Lcom/shopee/foody/driver/im/business/network/model/proto/BizChatRecvData;
invoke-virtual {v0, p1, v1, v2, v3}, Lcom/squareup/wire/Wire;->parseFrom([BIILjava/lang/Class;)Lcom/squareup/wire/Message;
move-result-object p1
check-cast p1, Lcom/shopee/foody/driver/im/business/network/model/proto/BizChatRecvData;
if-eqz p1, :cond_2e
iget-object v0, p1, Lcom/shopee/foody/driver/im/business/network/model/proto/BizChatRecvData;->chat_msg:Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;
if-eqz v0, :cond_2e
sget-object v1, Llg/c;->a:Llg/c;
iget-object v2, v0, Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;->msgid:Ljava/lang/Long;
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v2
const-string v3, "ChatArrivedProcessor(), new msg arrived."
invoke-virtual {v1, v3, v2}, Llg/c;->b(Ljava/lang/String;Ljava/lang/String;)V
invoke-virtual {p0, v0}, Lpg/a;->a(Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;)Lkotlinx/coroutines/Job;
:cond_2e
new-instance v0, Landroid/util/Pair;
const-string v1, ""
invoke-direct {v0, v1, p1}, Landroid/util/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
return-object v0
.end method
.method public final synthetic a(Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
.registers 14
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;",
"Lkotlin/coroutines/Continuation<",
"-",
"Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;",
">;)",
"Ljava/lang/Object;"
}
.end annotation
instance-of v0, p2, Lpg/a$a;
if-eqz v0, :cond_13
move-object v0, p2
check-cast v0, Lpg/a$a;
iget v1, v0, Lpg/a$a;->b:I
const/high16 v2, -0x80000000
and-int v3, v1, v2
if-eqz v3, :cond_13
sub-int/2addr v1, v2
iput v1, v0, Lpg/a$a;->b:I
goto :goto_18
:cond_13
new-instance v0, Lpg/a$a;
invoke-direct {v0, p0, p2}, Lpg/a$a;-><init>(Lpg/a;Lkotlin/coroutines/Continuation;)V
:goto_18
iget-object p2, v0, Lpg/a$a;->a:Ljava/lang/Object;
invoke-static {}, Lkotlin/coroutines/intrinsics/IntrinsicsKt__IntrinsicsKt;->getCOROUTINE_SUSPENDED()Ljava/lang/Object;
move-result-object v1
iget v2, v0, Lpg/a$a;->b:I
const/4 v3, 0x3
const/4 v4, 0x2
const/4 v5, 0x1
if-eqz v2, :cond_80
if-eq v2, v5, :cond_69
if-eq v2, v4, :cond_4c
if-ne v2, v3, :cond_44
iget-object p1, v0, Lpg/a$a;->h:Ljava/lang/Object;
check-cast p1, Lcom/shopee/foody/driver/im/business/network/model/proto/action/ResponseChatMsg;
iget-object p1, v0, Lpg/a$a;->g:Ljava/lang/Object;
check-cast p1, Lng/b;
iget-object p1, v0, Lpg/a$a;->f:Ljava/lang/Object;
check-cast p1, Lkotlin/jvm/internal/Ref$ObjectRef;
iget-object v1, v0, Lpg/a$a;->e:Ljava/lang/Object;
check-cast v1, Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;
iget-object v0, v0, Lpg/a$a;->d:Ljava/lang/Object;
check-cast v0, Lpg/a;
invoke-static {p2}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
goto/16 :goto_13e
:cond_44
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "call to \'resume\' before \'invoke\' with coroutine"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
:cond_4c
iget-object p1, v0, Lpg/a$a;->h:Ljava/lang/Object;
check-cast p1, Lcom/shopee/foody/driver/im/business/network/model/proto/action/ResponseChatMsg;
iget-object v2, v0, Lpg/a$a;->g:Ljava/lang/Object;
check-cast v2, Lng/b;
iget-object v4, v0, Lpg/a$a;->f:Ljava/lang/Object;
check-cast v4, Lkotlin/jvm/internal/Ref$ObjectRef;
iget-object v5, v0, Lpg/a$a;->e:Ljava/lang/Object;
check-cast v5, Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;
iget-object v6, v0, Lpg/a$a;->d:Ljava/lang/Object;
check-cast v6, Lpg/a;
invoke-static {p2}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
move-object v10, v5
move-object v5, v2
move-object v2, v4
move-object v4, v10
goto/16 :goto_e5
:cond_69
iget-object p1, v0, Lpg/a$a;->g:Ljava/lang/Object;
check-cast p1, Lng/b;
iget-object v2, v0, Lpg/a$a;->f:Ljava/lang/Object;
check-cast v2, Lkotlin/jvm/internal/Ref$ObjectRef;
iget-object v5, v0, Lpg/a$a;->e:Ljava/lang/Object;
check-cast v5, Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;
iget-object v6, v0, Lpg/a$a;->d:Ljava/lang/Object;
check-cast v6, Lpg/a;
invoke-static {p2}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
move-object v10, v5
move-object v5, p1
move-object p1, v10
goto :goto_bd
:cond_80
invoke-static {p2}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V
sget-object p2, Llg/c;->a:Llg/c;
iget-object v2, p1, Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;->msgid:Ljava/lang/Long;
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
move-result-wide v6
invoke-static {v6, v7}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v2
const-string v6, "ChatArrivedProcessor(), new msg no content, fetch it"
invoke-virtual {p2, v6, v2}, Llg/c;->b(Ljava/lang/String;Ljava/lang/String;)V
new-instance v2, Lkotlin/jvm/internal/Ref$ObjectRef;
invoke-direct {v2}, Lkotlin/jvm/internal/Ref$ObjectRef;-><init>()V
iput-object p1, v2, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object;
new-instance p2, Lng/b;
iget-object v6, p1, Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;->msgid:Ljava/lang/Long;
invoke-static {v6}, Lkotlin/collections/CollectionsKt__CollectionsJVMKt;->listOf(Ljava/lang/Object;)Ljava/util/List;
move-result-object v6
invoke-direct {p2, v6}, Lng/b;-><init>(Ljava/util/List;)V
sget-object v6, Llg/b;->d:Llg/b;
iput-object p0, v0, Lpg/a$a;->d:Ljava/lang/Object;
iput-object p1, v0, Lpg/a$a;->e:Ljava/lang/Object;
iput-object v2, v0, Lpg/a$a;->f:Ljava/lang/Object;
iput-object p2, v0, Lpg/a$a;->g:Ljava/lang/Object;
iput v5, v0, Lpg/a$a;->b:I
invoke-virtual {v6, p2, v0}, Llg/b;->a(Lng/b;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object v5
if-ne v5, v1, :cond_b9
return-object v1
:cond_b9
move-object v6, p0
move-object v10, v5
move-object v5, p2
move-object p2, v10
:goto_bd
check-cast p2, Lcom/shopee/foody/driver/im/business/network/model/proto/action/ResponseChatMsg;
if-eqz p2, :cond_144
sget-object v7, Llg/b;->d:Llg/b;
iget-object v8, p1, Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;->msgid:Ljava/lang/Long;
const-string v9, "receivedChatMsg.msgid"
invoke-static {v8, v9}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v8}, Ljava/lang/Long;->longValue()J
move-result-wide v8
iput-object v6, v0, Lpg/a$a;->d:Ljava/lang/Object;
iput-object p1, v0, Lpg/a$a;->e:Ljava/lang/Object;
iput-object v2, v0, Lpg/a$a;->f:Ljava/lang/Object;
iput-object v5, v0, Lpg/a$a;->g:Ljava/lang/Object;
iput-object p2, v0, Lpg/a$a;->h:Ljava/lang/Object;
iput v4, v0, Lpg/a$a;->b:I
invoke-virtual {v7, v8, v9, v0}, Llg/b;->c(JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object v4
if-ne v4, v1, :cond_e1
return-object v1
:cond_e1
move-object v10, v4
move-object v4, p1
move-object p1, p2
move-object p2, v10
:goto_e5
check-cast p2, Ljava/lang/Boolean;
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z
move-result p2
if-nez p2, :cond_143
iget-object p2, p1, Lcom/shopee/foody/driver/im/business/network/model/proto/action/ResponseChatMsg;->msg:Ljava/util/List;
if-eqz p2, :cond_107
invoke-interface {p2}, Ljava/util/List;->size()I
move-result p2
if-lez p2, :cond_107
iget-object p2, p1, Lcom/shopee/foody/driver/im/business/network/model/proto/action/ResponseChatMsg;->msg:Ljava/util/List;
const/4 v7, 0x0
invoke-interface {p2, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object p2
const-string v7, "responseChatMsg.msg[0]"
invoke-static {p2, v7}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
check-cast p2, Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;
iput-object p2, v2, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object;
:cond_107
sget-object p2, Llg/c;->a:Llg/c;
iget-object v7, v2, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object;
check-cast v7, Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;
invoke-virtual {v7}, Lcom/squareup/wire/Message;->toString()Ljava/lang/String;
move-result-object v7
const-string v8, "fetchResult.toString()"
invoke-static {v7, v8}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string v8, "ChatArrivedProcessor(), fetch msg success. save to db"
invoke-virtual {p2, v8, v7}, Llg/c;->b(Ljava/lang/String;Ljava/lang/String;)V
sget-object p2, Llg/b;->d:Llg/b;
iget-object v7, v2, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object;
check-cast v7, Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;
invoke-static {v7}, Lke/c;->a(Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;)Lpe/a;
move-result-object v7
const-string v8, "DataMapper.map(fetchResult)"
invoke-static {v7, v8}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
iput-object v6, v0, Lpg/a$a;->d:Ljava/lang/Object;
iput-object v4, v0, Lpg/a$a;->e:Ljava/lang/Object;
iput-object v2, v0, Lpg/a$a;->f:Ljava/lang/Object;
iput-object v5, v0, Lpg/a$a;->g:Ljava/lang/Object;
iput-object p1, v0, Lpg/a$a;->h:Ljava/lang/Object;
iput v3, v0, Lpg/a$a;->b:I
invoke-virtual {p2, v7, v0}, Llg/b;->a(Lpe/a;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
move-result-object p1
if-ne p1, v1, :cond_13d
return-object v1
:cond_13d
move-object p1, v2
:goto_13e
iget-object p1, p1, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object;
check-cast p1, Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;
return-object p1
:cond_143
move-object p1, v4
:cond_144
return-object p1
.end method
.method public final a(Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;)Lkotlinx/coroutines/Job;
.registers 4
new-instance v0, Lpg/a$b;
const/4 v1, 0x0
invoke-direct {v0, p0, p1, v1}, Lpg/a$b;-><init>(Lpg/a;Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;Lkotlin/coroutines/Continuation;)V
invoke-static {v0}, Lhe/b;->b(Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/Job;
move-result-object p1
return-object p1
.end method
.method public a(Ljava/lang/String;Lcom/shopee/foody/driver/im/business/network/model/proto/BizChatRecvData;)V
.registers 3
return-void
.end method
.method public bridge synthetic a(Ljava/lang/String;Lcom/squareup/wire/Message;)V
.registers 3
check-cast p2, Lcom/shopee/foody/driver/im/business/network/model/proto/BizChatRecvData;
invoke-virtual {p0, p1, p2}, Lpg/a;->a(Ljava/lang/String;Lcom/shopee/foody/driver/im/business/network/model/proto/BizChatRecvData;)V
return-void
.end method
.method public b()I
.registers 2
sget-object v0, Lcom/shopee/protocol/action/ServerID;->CORE_SERVER_EXT:Lcom/shopee/protocol/action/ServerID;
invoke-virtual {v0}, Lcom/shopee/protocol/action/ServerID;->getValue()I
move-result v0
return v0
.end method
.method public final c()Lkotlin/jvm/functions/Function2;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lkotlin/jvm/functions/Function2<",
"Ljava/lang/Integer;",
"Lcom/shopee/foody/driver/im/business/network/model/proto/ChatMsg;",
"Lkotlin/Unit;",
">;"
}
.end annotation
iget-object v0, p0, Lpg/a;->b:Lkotlin/jvm/functions/Function2;
return-object v0
.end method