CustomServiceManager.smali
.class public Lio/rong/imlib/cs/CustomServiceManager;
.super Ljava/lang/Object;
.source "CustomServiceManager.java"
# interfaces
.implements Lio/rong/imlib/ModuleManager$MessageRouter;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lio/rong/imlib/cs/CustomServiceManager$OnHumanEvaluateListener;,
Lio/rong/imlib/cs/CustomServiceManager$EvaluateType;,
Lio/rong/imlib/cs/CustomServiceManager$SingletonHolder;,
Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
}
.end annotation
# static fields
.field private static final TAG:Ljava/lang/String; = "CustomServiceManager"
.field private static sIns:Lio/rong/imlib/cs/CustomServiceManager;
# instance fields
.field private csMessages:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Ljava/lang/Class<",
"+",
"Lio/rong/imlib/model/MessageContent;",
">;>;"
}
.end annotation
.end field
.field private customServiceCache:Ljava/util/HashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/HashMap<",
"Ljava/lang/String;",
"Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;",
">;"
}
.end annotation
.end field
.field private failureStr:Ljava/lang/String;
.field private libStub:Lio/rong/imlib/IHandler;
.field private mInitialized:Z
.field private mainHandler:Landroid/os/Handler;
.field private onHumanEvaluateListener:Lio/rong/imlib/cs/CustomServiceManager$OnHumanEvaluateListener;
.field private onReceiveMessageListener:Lio/rong/imlib/RongIMClient$OnReceiveMessageListener;
.field private quitStr:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.registers 0
return-void
.end method
.method private constructor <init>()V
.registers 3
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const-string v0, ""
.line 3
iput-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->failureStr:Ljava/lang/String;
.line 4
iput-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->quitStr:Ljava/lang/String;
.line 5
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
.line 6
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
.line 7
new-instance v0, Landroid/os/Handler;
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
move-result-object v1
invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V
iput-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
const/4 v0, 0x0
.line 8
iput-boolean v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->mInitialized:Z
return-void
.end method
.method synthetic constructor <init>(Lio/rong/imlib/cs/CustomServiceManager$1;)V
.registers 2
.line 1
invoke-direct {p0}, Lio/rong/imlib/cs/CustomServiceManager;-><init>()V
return-void
.end method
.method static synthetic access$000(Lio/rong/imlib/cs/CustomServiceManager;)Ljava/lang/String;
.registers 1
.line 1
iget-object p0, p0, Lio/rong/imlib/cs/CustomServiceManager;->failureStr:Ljava/lang/String;
return-object p0
.end method
.method static synthetic access$100(Lio/rong/imlib/cs/CustomServiceManager;)Lio/rong/imlib/RongIMClient$OnReceiveMessageListener;
.registers 1
.line 1
iget-object p0, p0, Lio/rong/imlib/cs/CustomServiceManager;->onReceiveMessageListener:Lio/rong/imlib/RongIMClient$OnReceiveMessageListener;
return-object p0
.end method
.method static synthetic access$200()Ljava/lang/String;
.registers 1
.line 1
sget-object v0, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
return-object v0
.end method
.method static synthetic access$300(Lio/rong/imlib/cs/CustomServiceManager;)Ljava/lang/String;
.registers 1
.line 1
iget-object p0, p0, Lio/rong/imlib/cs/CustomServiceManager;->quitStr:Ljava/lang/String;
return-object p0
.end method
.method static synthetic access$500(Lio/rong/imlib/cs/CustomServiceManager;)Ljava/util/HashMap;
.registers 1
.line 1
iget-object p0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
return-object p0
.end method
.method public static getInstance()Lio/rong/imlib/cs/CustomServiceManager;
.registers 1
.line 1
sget-object v0, Lio/rong/imlib/cs/CustomServiceManager$SingletonHolder;->sIns:Lio/rong/imlib/cs/CustomServiceManager;
return-object v0
.end method
.method private registerMsg(Lio/rong/imlib/IHandler;)V
.registers 5
.line 1
:try_start_0
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_6
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_59
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/Class;
.line 2
const-class v2, Lio/rong/imlib/MessageTag;
invoke-virtual {v1, v2}, Ljava/lang/Class;->getAnnotation(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
move-result-object v2
check-cast v2, Lio/rong/imlib/MessageTag;
invoke-interface {v2}, Lio/rong/imlib/MessageTag;->value()Ljava/lang/String;
move-result-object v2
.line 3
invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v1
invoke-interface {p1, v1}, Lio/rong/imlib/IHandler;->registerMessageType(Ljava/lang/String;)V
.line 4
invoke-interface {p1, v2}, Lio/rong/imlib/IHandler;->registerCmdMsgType(Ljava/lang/String;)V
:try_end_28
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_28} :catch_31
.catch Ljava/lang/IncompatibleClassChangeError; {:try_start_0 .. :try_end_28} :catch_29
goto :goto_6
.line 5
:catch_29
sget-object p1, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
const-string v0, "IncompatibleClassChangeError."
invoke-static {p1, v0}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_59
:catch_31
move-exception p1
.line 6
new-instance v0, Ljava/io/StringWriter;
invoke-direct {v0}, Ljava/io/StringWriter;-><init>()V
.line 7
new-instance v1, Ljava/io/PrintWriter;
invoke-direct {v1, v0}, Ljava/io/PrintWriter;-><init>(Ljava/io/Writer;)V
.line 8
invoke-virtual {p1, v1}, Ljava/lang/Exception;->printStackTrace(Ljava/io/PrintWriter;)V
.line 9
sget-object p1, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Exception : \n"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/io/StringWriter;->toString()Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {p1, v0}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
:cond_59
:goto_59
return-void
.end method
# virtual methods
.method public evaluateCustomService(Ljava/lang/String;ILio/rong/imlib/CustomServiceConfig$CSEvaSolveStatus;Ljava/lang/String;Ljava/lang/String;)V
.registers 13
.line 14
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_89
if-nez p3, :cond_a
goto/16 :goto_89
.line 15
:cond_a
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v0, p1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_2e
.line 16
sget-object p2, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
new-instance p3, Ljava/lang/StringBuilder;
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
const-string p4, "evaluateCustomService "
invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, " is not started yet!"
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-static {p2, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 17
:cond_2e
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
.line 18
iget-boolean v1, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->showResolveStatus:Z
if-nez v1, :cond_3c
const/4 p3, -0x1
goto :goto_40
.line 19
:cond_3c
invoke-virtual {p3}, Lio/rong/imlib/CustomServiceConfig$CSEvaSolveStatus;->getValue()I
move-result p3
.line 20
:goto_40
new-instance v1, Lio/rong/message/CSEvaluateMessage$Builder;
invoke-direct {v1}, Lio/rong/message/CSEvaluateMessage$Builder;-><init>()V
.line 21
invoke-static {p5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
if-eqz v2, :cond_4d
iget-object p5, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->sid:Ljava/lang/String;
:cond_4d
invoke-virtual {v1, p5}, Lio/rong/message/CSEvaluateMessage$Builder;->sid(Ljava/lang/String;)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p5
iget-object v1, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->pid:Ljava/lang/String;
.line 22
invoke-virtual {p5, v1}, Lio/rong/message/CSEvaluateMessage$Builder;->pid(Ljava/lang/String;)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p5
iget-object v0, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->uid:Ljava/lang/String;
.line 23
invoke-virtual {p5, v0}, Lio/rong/message/CSEvaluateMessage$Builder;->uid(Ljava/lang/String;)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p5
.line 24
invoke-virtual {p5, p2}, Lio/rong/message/CSEvaluateMessage$Builder;->source(I)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p2
.line 25
invoke-virtual {p2, p3}, Lio/rong/message/CSEvaluateMessage$Builder;->setSolveStatus(I)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p2
.line 26
invoke-virtual {p2, p4}, Lio/rong/message/CSEvaluateMessage$Builder;->suggest(Ljava/lang/String;)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p2
sget-object p3, Lio/rong/imlib/cs/CustomServiceManager$EvaluateType;->EVALUATE_HUMAN:Lio/rong/imlib/cs/CustomServiceManager$EvaluateType;
.line 27
invoke-virtual {p3}, Lio/rong/imlib/cs/CustomServiceManager$EvaluateType;->getValue()I
move-result p3
invoke-virtual {p2, p3}, Lio/rong/message/CSEvaluateMessage$Builder;->type(I)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p2
.line 28
invoke-virtual {p2}, Lio/rong/message/CSEvaluateMessage$Builder;->build()Lio/rong/message/CSEvaluateMessage;
move-result-object v3
.line 29
invoke-static {}, Lio/rong/imlib/RongIMClient;->getInstance()Lio/rong/imlib/RongIMClient;
move-result-object v0
sget-object v1, Lio/rong/imlib/model/Conversation$ConversationType;->CUSTOMER_SERVICE:Lio/rong/imlib/model/Conversation$ConversationType;
const/4 v4, 0x0
const/4 v5, 0x0
new-instance v6, Lio/rong/imlib/cs/CustomServiceManager$21;
invoke-direct {v6, p0}, Lio/rong/imlib/cs/CustomServiceManager$21;-><init>(Lio/rong/imlib/cs/CustomServiceManager;)V
move-object v2, p1
invoke-virtual/range {v0 .. v6}, Lio/rong/imlib/RongIMClient;->sendMessage(Lio/rong/imlib/model/Conversation$ConversationType;Ljava/lang/String;Lio/rong/imlib/model/MessageContent;Ljava/lang/String;Ljava/lang/String;Lio/rong/imlib/IRongCallback$ISendMessageCallback;)V
return-void
.line 30
:cond_89
:goto_89
sget-object p1, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
const-string p2, "evaluateCustomService kefuId or solveStatus should not be null!"
invoke-static {p1, p2}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.end method
.method public evaluateCustomService(Ljava/lang/String;ILio/rong/imlib/CustomServiceConfig$CSEvaSolveStatus;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
.registers 15
.line 31
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_9f
if-nez p3, :cond_a
goto/16 :goto_9f
.line 32
:cond_a
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v0, p1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_2e
.line 33
sget-object p2, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
new-instance p3, Ljava/lang/StringBuilder;
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
const-string p4, "evaluateCustomService "
invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, " is not started yet!"
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-static {p2, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 34
:cond_2e
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
.line 35
new-instance v1, Lio/rong/message/CSEvaluateMessage$Builder;
invoke-direct {v1}, Lio/rong/message/CSEvaluateMessage$Builder;-><init>()V
.line 36
iget-object v2, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->mode:Lio/rong/imlib/model/CustomServiceMode;
sget-object v3, Lio/rong/imlib/model/CustomServiceMode;->CUSTOM_SERVICE_MODE_HUMAN:Lio/rong/imlib/model/CustomServiceMode;
if-eq v2, v3, :cond_49
sget-object v3, Lio/rong/imlib/model/CustomServiceMode;->CUSTOM_SERVICE_MODE_HUMAN_FIRST:Lio/rong/imlib/model/CustomServiceMode;
if-ne v2, v3, :cond_46
goto :goto_49
.line 37
:cond_46
sget-object v2, Lio/rong/imlib/cs/CustomServiceManager$EvaluateType;->EVALUATE_ROBOT:Lio/rong/imlib/cs/CustomServiceManager$EvaluateType;
goto :goto_4b
.line 38
:cond_49
:goto_49
sget-object v2, Lio/rong/imlib/cs/CustomServiceManager$EvaluateType;->EVALUATE_HUMAN:Lio/rong/imlib/cs/CustomServiceManager$EvaluateType;
.line 39
:goto_4b
iget-boolean v3, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->showResolveStatus:Z
if-nez v3, :cond_51
const/4 p3, -0x1
goto :goto_55
.line 40
:cond_51
invoke-virtual {p3}, Lio/rong/imlib/CustomServiceConfig$CSEvaSolveStatus;->getValue()I
move-result p3
.line 41
:goto_55
invoke-static {p6}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-eqz v3, :cond_5d
iget-object p6, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->sid:Ljava/lang/String;
:cond_5d
invoke-virtual {v1, p6}, Lio/rong/message/CSEvaluateMessage$Builder;->sid(Ljava/lang/String;)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p6
iget-object v1, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->pid:Ljava/lang/String;
.line 42
invoke-virtual {p6, v1}, Lio/rong/message/CSEvaluateMessage$Builder;->pid(Ljava/lang/String;)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p6
iget-object v0, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->uid:Ljava/lang/String;
.line 43
invoke-virtual {p6, v0}, Lio/rong/message/CSEvaluateMessage$Builder;->uid(Ljava/lang/String;)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p6
.line 44
invoke-virtual {p6, p2}, Lio/rong/message/CSEvaluateMessage$Builder;->source(I)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p2
.line 45
invoke-virtual {p2, p3}, Lio/rong/message/CSEvaluateMessage$Builder;->setSolveStatus(I)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p2
.line 46
invoke-virtual {p2, p4}, Lio/rong/message/CSEvaluateMessage$Builder;->tablets(Ljava/lang/String;)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p2
.line 47
invoke-virtual {p2, p5}, Lio/rong/message/CSEvaluateMessage$Builder;->suggest(Ljava/lang/String;)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p2
.line 48
invoke-virtual {v2}, Lio/rong/imlib/cs/CustomServiceManager$EvaluateType;->getValue()I
move-result p3
invoke-virtual {p2, p3}, Lio/rong/message/CSEvaluateMessage$Builder;->type(I)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p2
.line 49
invoke-virtual {p2, p7}, Lio/rong/message/CSEvaluateMessage$Builder;->extra(Ljava/lang/String;)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p2
.line 50
invoke-virtual {p2}, Lio/rong/message/CSEvaluateMessage$Builder;->build()Lio/rong/message/CSEvaluateMessage;
move-result-object v3
.line 51
invoke-static {}, Lio/rong/imlib/RongIMClient;->getInstance()Lio/rong/imlib/RongIMClient;
move-result-object v0
sget-object v1, Lio/rong/imlib/model/Conversation$ConversationType;->CUSTOMER_SERVICE:Lio/rong/imlib/model/Conversation$ConversationType;
const/4 v4, 0x0
const/4 v5, 0x0
new-instance v6, Lio/rong/imlib/cs/CustomServiceManager$22;
invoke-direct {v6, p0}, Lio/rong/imlib/cs/CustomServiceManager$22;-><init>(Lio/rong/imlib/cs/CustomServiceManager;)V
move-object v2, p1
invoke-virtual/range {v0 .. v6}, Lio/rong/imlib/RongIMClient;->sendMessage(Lio/rong/imlib/model/Conversation$ConversationType;Ljava/lang/String;Lio/rong/imlib/model/MessageContent;Ljava/lang/String;Ljava/lang/String;Lio/rong/imlib/IRongCallback$ISendMessageCallback;)V
return-void
.line 52
:cond_9f
:goto_9f
sget-object p1, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
const-string p2, "evaluateCustomService kefuId or solveStatus should not be null!"
invoke-static {p1, p2}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.end method
.method public evaluateCustomService(Ljava/lang/String;ZLjava/lang/String;)V
.registers 11
.line 1
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_e
.line 2
sget-object p1, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
const-string p2, "evaluateCustomService kefuId should not be null!"
invoke-static {p1, p2}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 3
:cond_e
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v0, p1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_32
.line 4
sget-object p2, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
new-instance p3, Ljava/lang/StringBuilder;
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "evaluateCustomService "
invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, " is not started yet!"
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-static {p2, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 5
:cond_32
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
.line 6
new-instance v1, Lio/rong/message/CSEvaluateMessage$Builder;
invoke-direct {v1}, Lio/rong/message/CSEvaluateMessage$Builder;-><init>()V
.line 7
invoke-static {p3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
if-eqz v2, :cond_47
iget-object p3, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->sid:Ljava/lang/String;
:cond_47
invoke-virtual {v1, p3}, Lio/rong/message/CSEvaluateMessage$Builder;->sid(Ljava/lang/String;)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p3
iget-object v1, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->pid:Ljava/lang/String;
.line 8
invoke-virtual {p3, v1}, Lio/rong/message/CSEvaluateMessage$Builder;->pid(Ljava/lang/String;)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p3
iget-object v0, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->uid:Ljava/lang/String;
.line 9
invoke-virtual {p3, v0}, Lio/rong/message/CSEvaluateMessage$Builder;->uid(Ljava/lang/String;)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p3
sget-object v0, Lio/rong/imlib/cs/CustomServiceManager$EvaluateType;->EVALUATE_ROBOT:Lio/rong/imlib/cs/CustomServiceManager$EvaluateType;
.line 10
invoke-virtual {v0}, Lio/rong/imlib/cs/CustomServiceManager$EvaluateType;->getValue()I
move-result v0
invoke-virtual {p3, v0}, Lio/rong/message/CSEvaluateMessage$Builder;->type(I)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p3
if-eqz p2, :cond_66
sget-object p2, Lio/rong/imlib/CustomServiceConfig$CSEvaSolveStatus;->RESOLVED:Lio/rong/imlib/CustomServiceConfig$CSEvaSolveStatus;
goto :goto_68
.line 11
:cond_66
sget-object p2, Lio/rong/imlib/CustomServiceConfig$CSEvaSolveStatus;->UNRESOLVED:Lio/rong/imlib/CustomServiceConfig$CSEvaSolveStatus;
:goto_68
invoke-virtual {p2}, Lio/rong/imlib/CustomServiceConfig$CSEvaSolveStatus;->getValue()I
move-result p2
invoke-virtual {p3, p2}, Lio/rong/message/CSEvaluateMessage$Builder;->setSolveStatus(I)Lio/rong/message/CSEvaluateMessage$Builder;
move-result-object p2
.line 12
invoke-virtual {p2}, Lio/rong/message/CSEvaluateMessage$Builder;->build()Lio/rong/message/CSEvaluateMessage;
move-result-object v3
.line 13
invoke-static {}, Lio/rong/imlib/RongIMClient;->getInstance()Lio/rong/imlib/RongIMClient;
move-result-object v0
sget-object v1, Lio/rong/imlib/model/Conversation$ConversationType;->CUSTOMER_SERVICE:Lio/rong/imlib/model/Conversation$ConversationType;
const/4 v4, 0x0
const/4 v5, 0x0
new-instance v6, Lio/rong/imlib/cs/CustomServiceManager$20;
invoke-direct {v6, p0}, Lio/rong/imlib/cs/CustomServiceManager$20;-><init>(Lio/rong/imlib/cs/CustomServiceManager;)V
move-object v2, p1
invoke-virtual/range {v0 .. v6}, Lio/rong/imlib/RongIMClient;->sendMessage(Lio/rong/imlib/model/Conversation$ConversationType;Ljava/lang/String;Lio/rong/imlib/model/MessageContent;Ljava/lang/String;Ljava/lang/String;Lio/rong/imlib/IRongCallback$ISendMessageCallback;)V
return-void
.end method
.method public init(Landroid/content/Context;Lio/rong/imlib/RongIMClient$OnReceiveMessageListener;Lio/rong/imlib/IHandler;)V
.registers 9
const-string v0, "string"
.line 1
sget-object v1, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "init "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-boolean v4, p0, Lio/rong/imlib/cs/CustomServiceManager;->mInitialized:Z
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v1, v2}, Lio/rong/common/RLog;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 2
iget-boolean v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->mInitialized:Z
if-nez v1, :cond_aa
const/4 v1, 0x1
.line 3
iput-boolean v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->mInitialized:Z
.line 4
iget-object v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
const-class v2, Lio/rong/message/CSHandShakeMessage;
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 5
iget-object v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
const-class v2, Lio/rong/message/CSHandShakeResponseMessage;
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 6
iget-object v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
const-class v2, Lio/rong/message/CSChangeModeMessage;
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 7
iget-object v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
const-class v2, Lio/rong/message/CSChangeModeResponseMessage;
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 8
iget-object v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
const-class v2, Lio/rong/message/CSSuspendMessage;
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 9
iget-object v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
const-class v2, Lio/rong/message/CSTerminateMessage;
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 10
iget-object v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
const-class v2, Lio/rong/message/CSEvaluateMessage;
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 11
iget-object v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
const-class v2, Lio/rong/message/CSUpdateMessage;
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 12
iget-object v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
const-class v2, Lio/rong/message/CSPullEvaluateMessage;
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 13
iget-object v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
const-class v2, Lio/rong/message/CSPullLeaveMessage;
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 14
iget-object v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
const-class v2, Lio/rong/message/CSLeaveMessage;
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 15
iput-object p2, p0, Lio/rong/imlib/cs/CustomServiceManager;->onReceiveMessageListener:Lio/rong/imlib/RongIMClient$OnReceiveMessageListener;
.line 16
:try_start_70
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object p2
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const-string v2, "rc_init_failed"
invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v4
invoke-virtual {v1, v2, v0, v4}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v1
invoke-virtual {p2, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object p2
iput-object p2, p0, Lio/rong/imlib/cs/CustomServiceManager;->failureStr:Ljava/lang/String;
.line 17
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object p2
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const-string v2, "rc_quit_custom_service"
invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object p1
invoke-virtual {v1, v2, v0, p1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result p1
invoke-virtual {p2, p1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object p1
iput-object p1, p0, Lio/rong/imlib/cs/CustomServiceManager;->quitStr:Ljava/lang/String;
:try_end_a0
.catch Ljava/lang/Exception; {:try_start_70 .. :try_end_a0} :catch_a1
goto :goto_a7
:catch_a1
move-exception p1
.line 18
sget-object p2, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
invoke-static {p2, v3, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 19
:goto_a7
invoke-static {p0}, Lio/rong/imlib/ModuleManager;->addMessageRouter(Lio/rong/imlib/ModuleManager$MessageRouter;)V
.line 20
:cond_aa
iput-object p3, p0, Lio/rong/imlib/cs/CustomServiceManager;->libStub:Lio/rong/imlib/IHandler;
.line 21
invoke-direct {p0, p3}, Lio/rong/imlib/cs/CustomServiceManager;->registerMsg(Lio/rong/imlib/IHandler;)V
return-void
.end method
.method public leaveMessageToCustomService(Ljava/lang/String;Ljava/util/Map;Lio/rong/imlib/RongIMClient$OperationCallback;)V
.registers 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;",
"Lio/rong/imlib/RongIMClient$OperationCallback;",
")V"
}
.end annotation
.line 1
new-instance v3, Lio/rong/message/CSLeaveMessage;
invoke-direct {v3}, Lio/rong/message/CSLeaveMessage;-><init>()V
.line 2
invoke-virtual {v3, p2}, Lio/rong/message/CSLeaveMessage;->setDataSet(Ljava/util/Map;)V
.line 3
invoke-static {}, Lio/rong/imlib/RongIMClient;->getInstance()Lio/rong/imlib/RongIMClient;
move-result-object v0
sget-object v1, Lio/rong/imlib/model/Conversation$ConversationType;->CUSTOMER_SERVICE:Lio/rong/imlib/model/Conversation$ConversationType;
new-instance v6, Lio/rong/imlib/cs/CustomServiceManager$23;
invoke-direct {v6, p0, p3}, Lio/rong/imlib/cs/CustomServiceManager$23;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/RongIMClient$OperationCallback;)V
const/4 v4, 0x0
const/4 v5, 0x0
move-object v2, p1
invoke-virtual/range {v0 .. v6}, Lio/rong/imlib/RongIMClient;->sendMessage(Lio/rong/imlib/model/Conversation$ConversationType;Ljava/lang/String;Lio/rong/imlib/model/MessageContent;Ljava/lang/String;Ljava/lang/String;Lio/rong/imlib/IRongCallback$ISendMessageCallback;)V
return-void
.end method
.method public onReceived(Lio/rong/imlib/model/Message;IZI)Z
.registers 22
move-object/from16 v1, p0
const-string v0, "isQuestionFlag"
const-string v2, "evaluation"
.line 1
iget-object v3, v1, Lio/rong/imlib/cs/CustomServiceManager;->csMessages:Ljava/util/List;
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getContent()Lio/rong/imlib/model/MessageContent;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v4
invoke-interface {v3, v4}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_448
.line 2
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getContent()Lio/rong/imlib/model/MessageContent;
move-result-object v4
instance-of v4, v4, Lio/rong/message/CSHandShakeResponseMessage;
const-string v5, "1"
const-wide/16 v6, 0x0
const/4 v8, 0x0
const/4 v9, 0x1
if-eqz v4, :cond_1e6
.line 3
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getContent()Lio/rong/imlib/model/MessageContent;
move-result-object v0
check-cast v0, Lio/rong/message/CSHandShakeResponseMessage;
.line 4
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getCode()I
move-result v2
.line 5
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getMsg()Ljava/lang/String;
move-result-object v3
.line 6
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getTargetId()Ljava/lang/String;
move-result-object v13
.line 7
iget-object v4, v1, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v4, v13}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v4
check-cast v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
if-eqz v4, :cond_1e5
.line 8
iget-wide v10, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->time:J
cmp-long v12, v10, v6
if-eqz v12, :cond_1e5
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getSentTime()J
move-result-wide v6
iget-wide v10, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->time:J
cmp-long v12, v6, v10
if-gez v12, :cond_52
goto/16 :goto_1e5
:cond_52
if-nez v2, :cond_67
.line 9
iget-object v6, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->customServiceListener:Ljava/lang/ref/WeakReference;
invoke-virtual {v6}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v6
if-eqz v6, :cond_67
.line 10
iget-object v0, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v5, Lio/rong/imlib/cs/CustomServiceManager$1;
invoke-direct {v5, v1, v4, v2, v3}, Lio/rong/imlib/cs/CustomServiceManager$1;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;ILjava/lang/String;)V
invoke-virtual {v0, v5}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
return v9
.line 11
:cond_67
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getMode()Lio/rong/imlib/model/CustomServiceMode;
move-result-object v2
iput-object v2, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->mode:Lio/rong/imlib/model/CustomServiceMode;
.line 12
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getSid()Ljava/lang/String;
move-result-object v2
iput-object v2, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->sid:Ljava/lang/String;
.line 13
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getUid()Ljava/lang/String;
move-result-object v2
iput-object v2, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->uid:Ljava/lang/String;
.line 14
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getPid()Ljava/lang/String;
move-result-object v2
iput-object v2, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->pid:Ljava/lang/String;
.line 15
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getGroupList()Ljava/util/ArrayList;
move-result-object v2
iput-object v2, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->groupList:Ljava/util/ArrayList;
.line 16
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->isReportResolveStatus()Z
move-result v2
iput-boolean v2, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->showResolveStatus:Z
.line 17
iget-object v2, v1, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v2, v13, v4}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 18
iget-object v2, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->customServiceListener:Ljava/lang/ref/WeakReference;
invoke-virtual {v2}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v2
if-eqz v2, :cond_160
.line 19
new-instance v2, Lio/rong/imlib/CustomServiceConfig;
invoke-direct {v2}, Lio/rong/imlib/CustomServiceConfig;-><init>()V
.line 20
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getCompanyName()Ljava/lang/String;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->companyName:Ljava/lang/String;
.line 21
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->isBlack()Z
move-result v3
iput-boolean v3, v2, Lio/rong/imlib/CustomServiceConfig;->isBlack:Z
.line 22
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getMsg()Ljava/lang/String;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->msg:Ljava/lang/String;
.line 23
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getCompanyIcon()Ljava/lang/String;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->companyIcon:Ljava/lang/String;
.line 24
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getRobotSessionNoEva()Ljava/lang/String;
move-result-object v3
if-eqz v3, :cond_c7
.line 25
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getRobotSessionNoEva()Ljava/lang/String;
move-result-object v3
invoke-virtual {v3, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_c7
const/4 v3, 0x1
goto :goto_c8
:cond_c7
const/4 v3, 0x0
:goto_c8
iput-boolean v3, v2, Lio/rong/imlib/CustomServiceConfig;->robotSessionNoEva:Z
.line 26
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getHumanEvaluateList()Ljava/util/ArrayList;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->humanEvaluateList:Ljava/util/ArrayList;
.line 27
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getUserTipTime()I
move-result v3
iput v3, v2, Lio/rong/imlib/CustomServiceConfig;->userTipTime:I
.line 28
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getUserTipWord()Ljava/lang/String;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->userTipWord:Ljava/lang/String;
.line 29
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getAdminTipTime()I
move-result v3
iput v3, v2, Lio/rong/imlib/CustomServiceConfig;->adminTipTime:I
.line 30
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getAdminTipWord()Ljava/lang/String;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->adminTipWord:Ljava/lang/String;
.line 31
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->isDisableLocation()Z
move-result v3
iput-boolean v3, v2, Lio/rong/imlib/CustomServiceConfig;->isDisableLocation:Z
.line 32
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->isSuspendWhenQuit()I
move-result v3
invoke-static {v3}, Lio/rong/imlib/CustomServiceConfig$CSQuitSuspendType;->valueOf(I)Lio/rong/imlib/CustomServiceConfig$CSQuitSuspendType;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->quitSuspendType:Lio/rong/imlib/CustomServiceConfig$CSQuitSuspendType;
.line 33
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getEvaType()I
move-result v3
if-nez v3, :cond_101
sget-object v3, Lio/rong/imlib/CustomServiceConfig$CSEvaType;->EVA_SEPARATELY:Lio/rong/imlib/CustomServiceConfig$CSEvaType;
goto :goto_103
:cond_101
sget-object v3, Lio/rong/imlib/CustomServiceConfig$CSEvaType;->EVA_UNIFIED:Lio/rong/imlib/CustomServiceConfig$CSEvaType;
:goto_103
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->evaluateType:Lio/rong/imlib/CustomServiceConfig$CSEvaType;
.line 34
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getEntryPoint()I
move-result v3
invoke-static {v3}, Lio/rong/imlib/CustomServiceConfig$CSEvaEntryPoint;->valueOf(I)Lio/rong/imlib/CustomServiceConfig$CSEvaEntryPoint;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->evaEntryPoint:Lio/rong/imlib/CustomServiceConfig$CSEvaEntryPoint;
.line 35
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->isReportResolveStatus()Z
move-result v3
iput-boolean v3, v2, Lio/rong/imlib/CustomServiceConfig;->isReportResolveStatus:Z
.line 36
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getLeaveMessageConfigType()I
move-result v3
if-nez v3, :cond_11e
sget-object v3, Lio/rong/imlib/CustomServiceConfig$CSLeaveMessageType;->NATIVE:Lio/rong/imlib/CustomServiceConfig$CSLeaveMessageType;
goto :goto_120
:cond_11e
sget-object v3, Lio/rong/imlib/CustomServiceConfig$CSLeaveMessageType;->WEB:Lio/rong/imlib/CustomServiceConfig$CSLeaveMessageType;
:goto_120
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->leaveMessageConfigType:Lio/rong/imlib/CustomServiceConfig$CSLeaveMessageType;
.line 37
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getLeaveMessageWebUrl()Landroid/net/Uri;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->uri:Landroid/net/Uri;
.line 38
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getLeaveMessageNativeInfo()Ljava/util/ArrayList;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->leaveMessageNativeInfo:Ljava/util/ArrayList;
.line 39
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getAnnounceMsgFlag()I
move-result v3
if-ne v3, v9, :cond_136
const/4 v3, 0x1
goto :goto_137
:cond_136
const/4 v3, 0x0
:goto_137
const-string v5, ""
if-eqz v3, :cond_142
.line 40
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getAnnounceMsg()Ljava/lang/String;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->announceMsg:Ljava/lang/String;
goto :goto_144
.line 41
:cond_142
iput-object v5, v2, Lio/rong/imlib/CustomServiceConfig;->announceMsg:Ljava/lang/String;
.line 42
:goto_144
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getAnnounceClickFlag()I
move-result v3
if-ne v3, v9, :cond_14b
const/4 v8, 0x1
:cond_14b
if-eqz v8, :cond_154
.line 43
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getAnnounceClickUrl()Ljava/lang/String;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/CustomServiceConfig;->announceClickUrl:Ljava/lang/String;
goto :goto_156
.line 44
:cond_154
iput-object v5, v2, Lio/rong/imlib/CustomServiceConfig;->announceClickUrl:Ljava/lang/String;
.line 45
:goto_156
iget-object v3, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v5, Lio/rong/imlib/cs/CustomServiceManager$2;
invoke-direct {v5, v1, v4, v2}, Lio/rong/imlib/cs/CustomServiceManager$2;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;Lio/rong/imlib/CustomServiceConfig;)V
invoke-virtual {v3, v5}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
.line 46
:cond_160
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getRobotLogo()Ljava/lang/String;
move-result-object v2
.line 47
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getRobotName()Ljava/lang/String;
move-result-object v3
.line 48
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getRobotHelloWord()Ljava/lang/String;
move-result-object v5
.line 49
iput-object v5, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->welcome:Ljava/lang/String;
.line 50
iput-object v3, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->name:Ljava/lang/String;
.line 51
iput-object v2, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->portrait:Ljava/lang/String;
.line 52
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getMode()Lio/rong/imlib/model/CustomServiceMode;
move-result-object v6
sget-object v7, Lio/rong/imlib/model/CustomServiceMode;->CUSTOM_SERVICE_MODE_ROBOT:Lio/rong/imlib/model/CustomServiceMode;
invoke-virtual {v6, v7}, Ljava/lang/Enum;->equals(Ljava/lang/Object;)Z
move-result v6
if-nez v6, :cond_1a0
.line 53
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->getMode()Lio/rong/imlib/model/CustomServiceMode;
move-result-object v6
sget-object v7, Lio/rong/imlib/model/CustomServiceMode;->CUSTOM_SERVICE_MODE_ROBOT_FIRST:Lio/rong/imlib/model/CustomServiceMode;
invoke-virtual {v6, v7}, Ljava/lang/Enum;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_18b
goto :goto_1a0
.line 54
:cond_18b
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->isRequiredChangMode()Z
move-result v2
if-eqz v2, :cond_195
.line 55
invoke-virtual {v1, v13}, Lio/rong/imlib/cs/CustomServiceManager;->switchToHumanMode(Ljava/lang/String;)V
goto :goto_1dc
.line 56
:cond_195
iget-object v2, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v3, Lio/rong/imlib/cs/CustomServiceManager$5;
invoke-direct {v3, v1, v4, v0}, Lio/rong/imlib/cs/CustomServiceManager$5;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;Lio/rong/message/CSHandShakeResponseMessage;)V
invoke-virtual {v2, v3}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
goto :goto_1dc
.line 57
:cond_1a0
:goto_1a0
invoke-static {v5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v6
if-nez v6, :cond_1ca
.line 58
invoke-static {v5}, Lio/rong/message/TextMessage;->obtain(Ljava/lang/String;)Lio/rong/message/TextMessage;
move-result-object v15
if-eqz v2, :cond_1b8
.line 59
new-instance v5, Lio/rong/imlib/model/UserInfo;
invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v2
invoke-direct {v5, v13, v3, v2}, Lio/rong/imlib/model/UserInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Landroid/net/Uri;)V
invoke-virtual {v15, v5}, Lio/rong/imlib/model/MessageContent;->setUserInfo(Lio/rong/imlib/model/UserInfo;)V
.line 60
:cond_1b8
invoke-static {}, Lio/rong/imlib/RongIMClient;->getInstance()Lio/rong/imlib/RongIMClient;
move-result-object v10
sget-object v11, Lio/rong/imlib/model/Conversation$ConversationType;->CUSTOMER_SERVICE:Lio/rong/imlib/model/Conversation$ConversationType;
const/4 v14, 0x0
new-instance v2, Lio/rong/imlib/cs/CustomServiceManager$3;
invoke-direct {v2, v1}, Lio/rong/imlib/cs/CustomServiceManager$3;-><init>(Lio/rong/imlib/cs/CustomServiceManager;)V
move-object v12, v13
move-object/from16 v16, v2
invoke-virtual/range {v10 .. v16}, Lio/rong/imlib/RongIMClient;->insertIncomingMessage(Lio/rong/imlib/model/Conversation$ConversationType;Ljava/lang/String;Ljava/lang/String;Lio/rong/imlib/model/Message$ReceivedStatus;Lio/rong/imlib/model/MessageContent;Lio/rong/imlib/RongIMClient$ResultCallback;)V
.line 61
:cond_1ca
iget-object v2, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->customServiceListener:Ljava/lang/ref/WeakReference;
invoke-virtual {v2}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v2
if-eqz v2, :cond_1dc
.line 62
iget-object v2, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v3, Lio/rong/imlib/cs/CustomServiceManager$4;
invoke-direct {v3, v1, v4, v0}, Lio/rong/imlib/cs/CustomServiceManager$4;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;Lio/rong/message/CSHandShakeResponseMessage;)V
invoke-virtual {v2, v3}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
.line 63
:cond_1dc
:goto_1dc
sget-object v2, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
invoke-virtual {v0}, Lio/rong/message/CSHandShakeResponseMessage;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v2, v0}, Lio/rong/common/RLog;->d(Ljava/lang/String;Ljava/lang/String;)I
:cond_1e5
:goto_1e5
return v9
.line 64
:cond_1e6
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getContent()Lio/rong/imlib/model/MessageContent;
move-result-object v4
instance-of v4, v4, Lio/rong/message/CSChangeModeResponseMessage;
const/4 v10, 0x2
if-eqz v4, :cond_310
.line 65
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getContent()Lio/rong/imlib/model/MessageContent;
move-result-object v3
check-cast v3, Lio/rong/message/CSChangeModeResponseMessage;
.line 66
iget-object v4, v1, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getTargetId()Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v4
check-cast v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
if-eqz v4, :cond_30f
.line 67
iget-object v5, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->customServiceListener:Ljava/lang/ref/WeakReference;
invoke-virtual {v5}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v5
if-eqz v5, :cond_30f
iget-wide v11, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->time:J
cmp-long v5, v11, v6
if-eqz v5, :cond_30f
.line 68
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getSentTime()J
move-result-wide v5
iget-wide v11, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->time:J
cmp-long v7, v5, v11
if-lez v7, :cond_30f
.line 69
invoke-virtual {v3}, Lio/rong/message/CSChangeModeResponseMessage;->getResult()I
move-result v5
if-ne v5, v9, :cond_30f
.line 70
invoke-virtual {v3}, Lio/rong/message/CSChangeModeResponseMessage;->getStatus()I
move-result v5
if-eq v5, v9, :cond_2ad
if-eq v5, v10, :cond_23a
const/4 v6, 0x3
if-eq v5, v6, :cond_22e
goto/16 :goto_2bb
.line 71
:cond_22e
iget-object v5, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v6, Lio/rong/imlib/cs/CustomServiceManager$10;
invoke-direct {v6, v1, v3, v4}, Lio/rong/imlib/cs/CustomServiceManager$10;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/message/CSChangeModeResponseMessage;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;)V
invoke-virtual {v5, v6}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
goto/16 :goto_2bb
.line 72
:cond_23a
iget-object v5, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->mode:Lio/rong/imlib/model/CustomServiceMode;
if-eqz v5, :cond_2bb
.line 73
sget-object v6, Lio/rong/imlib/model/CustomServiceMode;->CUSTOM_SERVICE_MODE_HUMAN:Lio/rong/imlib/model/CustomServiceMode;
invoke-virtual {v5, v6}, Ljava/lang/Enum;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_255
.line 74
sget-object v5, Lio/rong/imlib/model/CustomServiceMode;->CUSTOM_SERVICE_MODE_NO_SERVICE:Lio/rong/imlib/model/CustomServiceMode;
iput-object v5, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->mode:Lio/rong/imlib/model/CustomServiceMode;
.line 75
iget-object v5, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v6, Lio/rong/imlib/cs/CustomServiceManager$7;
invoke-direct {v6, v1, v4}, Lio/rong/imlib/cs/CustomServiceManager$7;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;)V
invoke-virtual {v5, v6}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
goto :goto_2bb
.line 76
:cond_255
iget-object v5, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->mode:Lio/rong/imlib/model/CustomServiceMode;
sget-object v6, Lio/rong/imlib/model/CustomServiceMode;->CUSTOM_SERVICE_MODE_HUMAN_FIRST:Lio/rong/imlib/model/CustomServiceMode;
invoke-virtual {v5, v6}, Ljava/lang/Enum;->equals(Ljava/lang/Object;)Z
move-result v5
if-eqz v5, :cond_2bb
.line 77
sget-object v5, Lio/rong/imlib/model/CustomServiceMode;->CUSTOM_SERVICE_MODE_ROBOT_FIRST:Lio/rong/imlib/model/CustomServiceMode;
iput-object v5, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->mode:Lio/rong/imlib/model/CustomServiceMode;
.line 78
iget-object v5, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v6, Lio/rong/imlib/cs/CustomServiceManager$8;
invoke-direct {v6, v1, v4}, Lio/rong/imlib/cs/CustomServiceManager$8;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;)V
invoke-virtual {v5, v6}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
.line 79
iget-object v5, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->welcome:Ljava/lang/String;
invoke-static {v5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v5
if-nez v5, :cond_2bb
.line 80
iget-object v5, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->welcome:Ljava/lang/String;
invoke-static {v5}, Lio/rong/message/TextMessage;->obtain(Ljava/lang/String;)Lio/rong/message/TextMessage;
move-result-object v15
.line 81
iget-object v5, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->portrait:Ljava/lang/String;
if-eqz v5, :cond_293
.line 82
new-instance v5, Lio/rong/imlib/model/UserInfo;
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getTargetId()Ljava/lang/String;
move-result-object v6
iget-object v7, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->name:Ljava/lang/String;
iget-object v10, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->portrait:Ljava/lang/String;
invoke-static {v10}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object v10
invoke-direct {v5, v6, v7, v10}, Lio/rong/imlib/model/UserInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Landroid/net/Uri;)V
invoke-virtual {v15, v5}, Lio/rong/imlib/model/MessageContent;->setUserInfo(Lio/rong/imlib/model/UserInfo;)V
.line 83
:cond_293
invoke-static {}, Lio/rong/imlib/RongIMClient;->getInstance()Lio/rong/imlib/RongIMClient;
move-result-object v10
sget-object v11, Lio/rong/imlib/model/Conversation$ConversationType;->CUSTOMER_SERVICE:Lio/rong/imlib/model/Conversation$ConversationType;
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getTargetId()Ljava/lang/String;
move-result-object v12
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getTargetId()Ljava/lang/String;
move-result-object v13
const/4 v14, 0x0
new-instance v5, Lio/rong/imlib/cs/CustomServiceManager$9;
invoke-direct {v5, v1}, Lio/rong/imlib/cs/CustomServiceManager$9;-><init>(Lio/rong/imlib/cs/CustomServiceManager;)V
move-object/from16 v16, v5
invoke-virtual/range {v10 .. v16}, Lio/rong/imlib/RongIMClient;->insertIncomingMessage(Lio/rong/imlib/model/Conversation$ConversationType;Ljava/lang/String;Ljava/lang/String;Lio/rong/imlib/model/Message$ReceivedStatus;Lio/rong/imlib/model/MessageContent;Lio/rong/imlib/RongIMClient$ResultCallback;)V
goto :goto_2bb
.line 84
:cond_2ad
sget-object v5, Lio/rong/imlib/model/CustomServiceMode;->CUSTOM_SERVICE_MODE_HUMAN:Lio/rong/imlib/model/CustomServiceMode;
iput-object v5, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->mode:Lio/rong/imlib/model/CustomServiceMode;
.line 85
iget-object v5, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v6, Lio/rong/imlib/cs/CustomServiceManager$6;
invoke-direct {v6, v1, v4}, Lio/rong/imlib/cs/CustomServiceManager$6;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;)V
invoke-virtual {v5, v6}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
.line 86
:cond_2bb
:goto_2bb
iget-object v5, v1, Lio/rong/imlib/cs/CustomServiceManager;->onHumanEvaluateListener:Lio/rong/imlib/cs/CustomServiceManager$OnHumanEvaluateListener;
if-eqz v5, :cond_30f
invoke-virtual {v3}, Lio/rong/message/CSChangeModeResponseMessage;->getEvaluation()Ljava/lang/String;
move-result-object v5
invoke-static {v5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v5
if-nez v5, :cond_30f
const/4 v5, 0x0
.line 87
:try_start_2ca
new-instance v6, Lorg/json/JSONObject;
invoke-virtual {v3}, Lio/rong/message/CSChangeModeResponseMessage;->getEvaluation()Ljava/lang/String;
move-result-object v3
invoke-direct {v6, v3}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
:try_end_2d3
.catch Lorg/json/JSONException; {:try_start_2ca .. :try_end_2d3} :catch_301
.line 88
:try_start_2d3
invoke-virtual {v6, v2}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z
move-result v3
if-eqz v3, :cond_30a
.line 89
invoke-virtual {v6, v2}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object v2
const-string v3, "satisfaction"
.line 90
invoke-virtual {v2, v3}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;
move-result-object v2
if-eqz v2, :cond_30a
.line 91
invoke-virtual {v2}, Lorg/json/JSONArray;->length()I
move-result v3
if-lez v3, :cond_30a
.line 92
invoke-virtual {v2, v8}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;
move-result-object v2
.line 93
invoke-virtual {v2, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z
move-result v3
if-eqz v3, :cond_30a
.line 94
invoke-virtual {v2, v0, v8}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;I)I
move-result v0
if-ne v0, v9, :cond_2fc
const/4 v8, 0x1
:cond_2fc
iput-boolean v8, v4, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->showResolveStatus:Z
:try_end_2fe
.catch Lorg/json/JSONException; {:try_start_2d3 .. :try_end_2fe} :catch_2ff
goto :goto_30a
:catch_2ff
move-exception v0
goto :goto_303
:catch_301
move-exception v0
move-object v6, v5
.line 95
:goto_303
sget-object v2, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
const-string v3, "onReceive "
invoke-static {v2, v3, v0}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 96
:cond_30a
:goto_30a
iget-object v0, v1, Lio/rong/imlib/cs/CustomServiceManager;->onHumanEvaluateListener:Lio/rong/imlib/cs/CustomServiceManager$OnHumanEvaluateListener;
invoke-interface {v0, v6}, Lio/rong/imlib/cs/CustomServiceManager$OnHumanEvaluateListener;->onHumanEvaluate(Lorg/json/JSONObject;)V
:cond_30f
return v9
.line 97
:cond_310
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getContent()Lio/rong/imlib/model/MessageContent;
move-result-object v0
instance-of v0, v0, Lio/rong/message/CSTerminateMessage;
if-eqz v0, :cond_374
.line 98
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getContent()Lio/rong/imlib/model/MessageContent;
move-result-object v0
check-cast v0, Lio/rong/message/CSTerminateMessage;
.line 99
iget-object v2, v1, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getTargetId()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
if-eqz v2, :cond_373
.line 100
iget-object v3, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->customServiceListener:Ljava/lang/ref/WeakReference;
invoke-virtual {v3}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v3
if-eqz v3, :cond_373
.line 101
invoke-virtual {v0}, Lio/rong/message/CSTerminateMessage;->getsid()Ljava/lang/String;
move-result-object v3
iget-object v4, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->sid:Ljava/lang/String;
invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_373
iget-wide v3, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->time:J
cmp-long v5, v3, v6
if-eqz v5, :cond_373
.line 102
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getSentTime()J
move-result-wide v3
iget-wide v5, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->time:J
cmp-long v7, v3, v5
if-lez v7, :cond_373
.line 103
invoke-virtual {v0}, Lio/rong/message/CSTerminateMessage;->getCode()I
move-result v3
if-nez v3, :cond_365
.line 104
invoke-virtual {v0}, Lio/rong/message/CSTerminateMessage;->getMsg()Ljava/lang/String;
move-result-object v0
.line 105
iget-object v3, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v4, Lio/rong/imlib/cs/CustomServiceManager$11;
invoke-direct {v4, v1, v2, v0}, Lio/rong/imlib/cs/CustomServiceManager$11;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;Ljava/lang/String;)V
invoke-virtual {v3, v4}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
goto :goto_373
.line 106
:cond_365
sget-object v0, Lio/rong/imlib/model/CustomServiceMode;->CUSTOM_SERVICE_MODE_ROBOT_FIRST:Lio/rong/imlib/model/CustomServiceMode;
iput-object v0, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->mode:Lio/rong/imlib/model/CustomServiceMode;
.line 107
iget-object v0, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v3, Lio/rong/imlib/cs/CustomServiceManager$12;
invoke-direct {v3, v1, v2}, Lio/rong/imlib/cs/CustomServiceManager$12;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;)V
invoke-virtual {v0, v3}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
:cond_373
:goto_373
return v9
.line 108
:cond_374
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getContent()Lio/rong/imlib/model/MessageContent;
move-result-object v0
instance-of v0, v0, Lio/rong/message/CSUpdateMessage;
if-eqz v0, :cond_402
.line 109
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getContent()Lio/rong/imlib/model/MessageContent;
move-result-object v0
check-cast v0, Lio/rong/message/CSUpdateMessage;
.line 110
iget-object v2, v1, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getTargetId()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
if-eqz v2, :cond_401
.line 111
iget-wide v3, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->time:J
cmp-long v11, v3, v6
if-eqz v11, :cond_401
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getSentTime()J
move-result-wide v3
iget-wide v6, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->time:J
cmp-long v11, v3, v6
if-lez v11, :cond_401
.line 112
invoke-virtual {v0}, Lio/rong/message/CSUpdateMessage;->getSid()Ljava/lang/String;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->sid:Ljava/lang/String;
.line 113
invoke-virtual {v0}, Lio/rong/message/CSUpdateMessage;->getServiceStatus()Ljava/lang/String;
move-result-object v0
const/4 v3, -0x1
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
move-result v4
packed-switch v4, :pswitch_data_44a
goto :goto_3ce
:pswitch_3b3
const-string v4, "3"
invoke-virtual {v0, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_3ce
const/4 v3, 0x2
goto :goto_3ce
:pswitch_3bd
const-string v4, "2"
invoke-virtual {v0, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_3ce
const/4 v3, 0x1
goto :goto_3ce
:pswitch_3c7
invoke-virtual {v0, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_3ce
const/4 v3, 0x0
:cond_3ce
:goto_3ce
if-eqz v3, :cond_3f3
if-eq v3, v9, :cond_3e4
if-eq v3, v10, :cond_3d5
goto :goto_401
.line 114
:cond_3d5
sget-object v0, Lio/rong/imlib/model/CustomServiceMode;->CUSTOM_SERVICE_MODE_NO_SERVICE:Lio/rong/imlib/model/CustomServiceMode;
iput-object v0, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->mode:Lio/rong/imlib/model/CustomServiceMode;
.line 115
iget-object v0, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v3, Lio/rong/imlib/cs/CustomServiceManager$15;
invoke-direct {v3, v1, v2}, Lio/rong/imlib/cs/CustomServiceManager$15;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;)V
invoke-virtual {v0, v3}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
goto :goto_401
.line 116
:cond_3e4
sget-object v0, Lio/rong/imlib/model/CustomServiceMode;->CUSTOM_SERVICE_MODE_HUMAN:Lio/rong/imlib/model/CustomServiceMode;
iput-object v0, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->mode:Lio/rong/imlib/model/CustomServiceMode;
.line 117
iget-object v0, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v3, Lio/rong/imlib/cs/CustomServiceManager$14;
invoke-direct {v3, v1, v2}, Lio/rong/imlib/cs/CustomServiceManager$14;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;)V
invoke-virtual {v0, v3}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
goto :goto_401
.line 118
:cond_3f3
sget-object v0, Lio/rong/imlib/model/CustomServiceMode;->CUSTOM_SERVICE_MODE_ROBOT:Lio/rong/imlib/model/CustomServiceMode;
iput-object v0, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->mode:Lio/rong/imlib/model/CustomServiceMode;
.line 119
iget-object v0, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v3, Lio/rong/imlib/cs/CustomServiceManager$13;
invoke-direct {v3, v1, v2}, Lio/rong/imlib/cs/CustomServiceManager$13;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;)V
invoke-virtual {v0, v3}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
:cond_401
:goto_401
return v9
.line 120
:cond_402
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getContent()Lio/rong/imlib/model/MessageContent;
move-result-object v0
instance-of v0, v0, Lio/rong/message/CSPullEvaluateMessage;
if-eqz v0, :cond_43f
.line 121
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getContent()Lio/rong/imlib/model/MessageContent;
move-result-object v0
check-cast v0, Lio/rong/message/CSPullEvaluateMessage;
.line 122
iget-object v2, v1, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getTargetId()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
if-eqz v2, :cond_43e
.line 123
iget-wide v3, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->time:J
cmp-long v5, v3, v6
if-eqz v5, :cond_43e
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getSentTime()J
move-result-wide v3
iget-wide v5, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->time:J
cmp-long v7, v3, v5
if-lez v7, :cond_43e
.line 124
invoke-virtual {v0}, Lio/rong/message/CSPullEvaluateMessage;->getMsgId()Ljava/lang/String;
move-result-object v3
iput-object v3, v2, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->sid:Ljava/lang/String;
.line 125
iget-object v3, v1, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v4, Lio/rong/imlib/cs/CustomServiceManager$16;
invoke-direct {v4, v1, v2, v0}, Lio/rong/imlib/cs/CustomServiceManager$16;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;Lio/rong/message/CSPullEvaluateMessage;)V
invoke-virtual {v3, v4}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
:cond_43e
return v9
.line 126
:cond_43f
invoke-virtual/range {p1 .. p1}, Lio/rong/imlib/model/Message;->getContent()Lio/rong/imlib/model/MessageContent;
move-result-object v0
instance-of v0, v0, Lio/rong/message/CSPullLeaveMessage;
if-eqz v0, :cond_448
return v8
:cond_448
return v3
nop
:pswitch_data_44a
.packed-switch 0x31
:pswitch_3c7
:pswitch_3bd
:pswitch_3b3
.end packed-switch
.end method
.method public sendChangeModelMessage(Ljava/lang/String;Ljava/lang/String;)V
.registers 13
.line 1
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_e
.line 2
sget-object p1, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
const-string p2, "sendChangeModelMessage kefuId should not be null!"
invoke-static {p1, p2}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 3
:cond_e
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v0, p1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_32
.line 4
sget-object p2, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "sendChangeModelMessage "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, " is not started yet!"
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-static {p2, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 5
:cond_32
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
.line 6
iget-object v1, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->sid:Ljava/lang/String;
iget-object v2, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->uid:Ljava/lang/String;
iget-object v0, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->pid:Ljava/lang/String;
invoke-static {v1, v2, v0, p2}, Lio/rong/message/CSChangeModeMessage;->obtain(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lio/rong/message/CSChangeModeMessage;
move-result-object v6
.line 7
invoke-static {}, Lio/rong/imlib/RongIMClient;->getInstance()Lio/rong/imlib/RongIMClient;
move-result-object v3
sget-object v4, Lio/rong/imlib/model/Conversation$ConversationType;->CUSTOMER_SERVICE:Lio/rong/imlib/model/Conversation$ConversationType;
const/4 v7, 0x0
const/4 v8, 0x0
new-instance v9, Lio/rong/imlib/cs/CustomServiceManager$18;
invoke-direct {v9, p0, p1}, Lio/rong/imlib/cs/CustomServiceManager$18;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Ljava/lang/String;)V
move-object v5, p1
invoke-virtual/range {v3 .. v9}, Lio/rong/imlib/RongIMClient;->sendMessage(Lio/rong/imlib/model/Conversation$ConversationType;Ljava/lang/String;Lio/rong/imlib/model/MessageContent;Ljava/lang/String;Ljava/lang/String;Lio/rong/imlib/IRongCallback$ISendMessageCallback;)V
return-void
.end method
.method public setHumanEvaluateListener(Lio/rong/imlib/cs/CustomServiceManager$OnHumanEvaluateListener;)V
.registers 2
.line 1
iput-object p1, p0, Lio/rong/imlib/cs/CustomServiceManager;->onHumanEvaluateListener:Lio/rong/imlib/cs/CustomServiceManager$OnHumanEvaluateListener;
return-void
.end method
.method public startCustomService(Ljava/lang/String;Lio/rong/imlib/ICustomServiceListener;Lio/rong/imlib/model/CSCustomServiceInfo;)V
.registers 6
const-string v0, ""
.line 1
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-eqz v1, :cond_10
.line 2
sget-object p1, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
const-string p2, "startCustomService kefuId should not be null!"
invoke-static {p1, p2}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 3
:cond_10
iget-object v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
if-eqz v1, :cond_21
.line 4
invoke-virtual {v1, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
if-eqz v1, :cond_21
.line 5
iget-object v1, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v1, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
:cond_21
if-nez p3, :cond_2c
.line 6
new-instance p3, Lio/rong/imlib/model/CSCustomServiceInfo$Builder;
invoke-direct {p3}, Lio/rong/imlib/model/CSCustomServiceInfo$Builder;-><init>()V
.line 7
invoke-virtual {p3}, Lio/rong/imlib/model/CSCustomServiceInfo$Builder;->build()Lio/rong/imlib/model/CSCustomServiceInfo;
move-result-object p3
.line 8
:cond_2c
new-instance v1, Lio/rong/message/CSHandShakeMessage;
invoke-direct {v1}, Lio/rong/message/CSHandShakeMessage;-><init>()V
.line 9
invoke-virtual {v1, p3}, Lio/rong/message/CSHandShakeMessage;->setCustomInfo(Lio/rong/imlib/model/CSCustomServiceInfo;)V
.line 10
new-instance p3, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
invoke-direct {p3, p2}, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;-><init>(Lio/rong/imlib/ICustomServiceListener;)V
.line 11
iget-object p2, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
if-eqz p2, :cond_40
.line 12
invoke-virtual {p2, p1, p3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 13
:cond_40
:try_start_40
sget-object p2, Lio/rong/imlib/model/Conversation$ConversationType;->CUSTOMER_SERVICE:Lio/rong/imlib/model/Conversation$ConversationType;
invoke-static {p1, p2, v1}, Lio/rong/imlib/model/Message;->obtain(Ljava/lang/String;Lio/rong/imlib/model/Conversation$ConversationType;Lio/rong/imlib/model/MessageContent;)Lio/rong/imlib/model/Message;
move-result-object p2
.line 14
iget-object p3, p0, Lio/rong/imlib/cs/CustomServiceManager;->libStub:Lio/rong/imlib/IHandler;
if-eqz p3, :cond_5d
.line 15
iget-object p3, p0, Lio/rong/imlib/cs/CustomServiceManager;->libStub:Lio/rong/imlib/IHandler;
new-instance v1, Lio/rong/imlib/cs/CustomServiceManager$17;
invoke-direct {v1, p0, p1}, Lio/rong/imlib/cs/CustomServiceManager$17;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Ljava/lang/String;)V
invoke-interface {p3, p2, v0, v0, v1}, Lio/rong/imlib/IHandler;->sendMessage(Lio/rong/imlib/model/Message;Ljava/lang/String;Ljava/lang/String;Lio/rong/imlib/ISendMessageCallback;)V
:try_end_54
.catch Ljava/lang/Exception; {:try_start_40 .. :try_end_54} :catch_55
goto :goto_5d
:catch_55
move-exception p1
.line 16
sget-object p2, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
const-string p3, "startCustomService "
invoke-static {p2, p3, p1}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:cond_5d
:goto_5d
return-void
.end method
.method public stopCustomService(Ljava/lang/String;)V
.registers 12
.line 1
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_e
.line 2
sget-object p1, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
const-string v0, "stopCustomService kefuId should not be null!"
invoke-static {p1, v0}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 3
:cond_e
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v0, p1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_32
.line 4
sget-object v0, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "stopCustomService "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, " is not started yet!"
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
return-void
.line 5
:cond_32
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
.line 6
iget-object v1, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->sid:Ljava/lang/String;
iget-object v2, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->uid:Ljava/lang/String;
iget-object v0, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->pid:Ljava/lang/String;
invoke-static {v1, v2, v0}, Lio/rong/message/CSSuspendMessage;->obtain(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lio/rong/message/CSSuspendMessage;
move-result-object v6
.line 7
invoke-static {}, Lio/rong/imlib/RongIMClient;->getInstance()Lio/rong/imlib/RongIMClient;
move-result-object v3
sget-object v4, Lio/rong/imlib/model/Conversation$ConversationType;->CUSTOMER_SERVICE:Lio/rong/imlib/model/Conversation$ConversationType;
const/4 v7, 0x0
const/4 v8, 0x0
new-instance v9, Lio/rong/imlib/cs/CustomServiceManager$24;
invoke-direct {v9, p0}, Lio/rong/imlib/cs/CustomServiceManager$24;-><init>(Lio/rong/imlib/cs/CustomServiceManager;)V
move-object v5, p1
invoke-virtual/range {v3 .. v9}, Lio/rong/imlib/RongIMClient;->sendMessage(Lio/rong/imlib/model/Conversation$ConversationType;Ljava/lang/String;Lio/rong/imlib/model/MessageContent;Ljava/lang/String;Ljava/lang/String;Lio/rong/imlib/IRongCallback$ISendMessageCallback;)V
.line 8
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v0, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
return-void
.end method
.method public switchToHumanMode(Ljava/lang/String;)V
.registers 5
.line 1
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_e
.line 2
sget-object p1, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
const-string v0, "switchToHumanMode kefuId should not be null!"
invoke-static {p1, v0}, Lio/rong/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 3
:cond_e
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v0, p1}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_32
.line 4
sget-object v0, Lio/rong/imlib/cs/CustomServiceManager;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "switchToHumanMode "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, " is not started yet!"
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
return-void
.line 5
:cond_32
iget-object v0, p0, Lio/rong/imlib/cs/CustomServiceManager;->customServiceCache:Ljava/util/HashMap;
invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;
.line 6
iget-object v1, v0, Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;->groupList:Ljava/util/ArrayList;
if-eqz v1, :cond_4f
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
move-result v1
if-lez v1, :cond_4f
.line 7
iget-object p1, p0, Lio/rong/imlib/cs/CustomServiceManager;->mainHandler:Landroid/os/Handler;
new-instance v1, Lio/rong/imlib/cs/CustomServiceManager$19;
invoke-direct {v1, p0, v0}, Lio/rong/imlib/cs/CustomServiceManager$19;-><init>(Lio/rong/imlib/cs/CustomServiceManager;Lio/rong/imlib/cs/CustomServiceManager$CustomServiceProfile;)V
invoke-virtual {p1, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
goto :goto_53
:cond_4f
const/4 v0, 0x0
.line 8
invoke-virtual {p0, p1, v0}, Lio/rong/imlib/cs/CustomServiceManager;->sendChangeModelMessage(Ljava/lang/String;Ljava/lang/String;)V
:goto_53
return-void
.end method