f.smali
.class public Lcom/iflytek/thirdparty/f;
.super Lcom/iflytek/thirdparty/s;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/iflytek/thirdparty/f$a;
}
.end annotation
# instance fields
.field private a:Lcom/iflytek/thirdparty/h;
.field private b:Lcom/iflytek/cloud/SpeechListener;
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/os/HandlerThread;)V
.registers 4
.prologue
.line 27
invoke-direct {p0, p1, p2}, Lcom/iflytek/thirdparty/s;-><init>(Landroid/content/Context;Landroid/os/HandlerThread;)V
.line 23
new-instance v0, Lcom/iflytek/thirdparty/h;
invoke-direct {v0}, Lcom/iflytek/thirdparty/h;-><init>()V
iput-object v0, p0, Lcom/iflytek/thirdparty/f;->a:Lcom/iflytek/thirdparty/h;
.line 28
return-void
.end method
# virtual methods
.method public a(Lcom/iflytek/thirdparty/ad;Lcom/iflytek/thirdparty/f$a;)V
.registers 5
.prologue
.line 31
iput-object p2, p0, Lcom/iflytek/thirdparty/f;->b:Lcom/iflytek/cloud/SpeechListener;
.line 32
invoke-virtual {p0, p1}, Lcom/iflytek/thirdparty/f;->setParams(Lcom/iflytek/thirdparty/ad;)V
.line 33
invoke-static {}, Landroid/os/Message;->obtain()Landroid/os/Message;
move-result-object v0
.line 34
const/16 v1, 0xd
iput v1, v0, Landroid/os/Message;->what:I
.line 36
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/f;->sendMsg(Landroid/os/Message;)V
.line 37
return-void
.end method
.method public getClientID()Ljava/lang/String;
.registers 2
.prologue
.line 77
iget-object v0, p0, Lcom/iflytek/thirdparty/f;->a:Lcom/iflytek/thirdparty/h;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/h;->getClientID()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public getSessionID()Ljava/lang/String;
.registers 2
.prologue
.line 72
iget-object v0, p0, Lcom/iflytek/thirdparty/f;->a:Lcom/iflytek/thirdparty/h;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/h;->f()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method protected onEnd(Lcom/iflytek/cloud/SpeechError;)V
.registers 3
.prologue
.line 64
invoke-super {p0, p1}, Lcom/iflytek/thirdparty/s;->onEnd(Lcom/iflytek/cloud/SpeechError;)V
.line 65
iget-object v0, p0, Lcom/iflytek/thirdparty/f;->b:Lcom/iflytek/cloud/SpeechListener;
if-eqz v0, :cond_c
.line 66
iget-object v0, p0, Lcom/iflytek/thirdparty/f;->b:Lcom/iflytek/cloud/SpeechListener;
invoke-interface {v0, p1}, Lcom/iflytek/cloud/SpeechListener;->onCompleted(Lcom/iflytek/cloud/SpeechError;)V
.line 68
:cond_c
return-void
.end method
.method protected onMsgProcess(Landroid/os/Message;)V
.registers 8
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Throwable;,
Lcom/iflytek/cloud/SpeechError;
}
.end annotation
.prologue
.line 41
iget v0, p1, Landroid/os/Message;->what:I
packed-switch v0, :pswitch_data_4a
.line 60
:goto_5
return-void
.line 43
:pswitch_6
const-class v1, Lcom/iflytek/thirdparty/f;
monitor-enter v1
.line 44
:try_start_9
iget-object v0, p0, Lcom/iflytek/thirdparty/f;->a:Lcom/iflytek/thirdparty/h;
iget-object v2, p0, Lcom/iflytek/thirdparty/f;->mContext:Landroid/content/Context;
invoke-virtual {v0, v2, p0}, Lcom/iflytek/thirdparty/h;->a(Landroid/content/Context;Lcom/iflytek/thirdparty/s;)I
move-result v0
.line 45
const-string v2, "{\'ret\':%d,\'cmd\':%s}"
const/4 v3, 0x2
new-array v3, v3, [Ljava/lang/Object;
const/4 v4, 0x0
.line 46
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
aput-object v0, v3, v4
const/4 v0, 0x1
invoke-virtual {p0}, Lcom/iflytek/thirdparty/f;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v4
const-string v5, "cmd"
invoke-virtual {v4, v5}, Lcom/iflytek/thirdparty/ad;->e(Ljava/lang/String;)Ljava/lang/String;
move-result-object v4
aput-object v4, v3, v0
.line 45
invoke-static {v2, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
.line 48
iget-object v2, p0, Lcom/iflytek/thirdparty/f;->b:Lcom/iflytek/cloud/SpeechListener;
if-eqz v2, :cond_3f
.line 49
iget-object v2, p0, Lcom/iflytek/thirdparty/f;->b:Lcom/iflytek/cloud/SpeechListener;
invoke-virtual {p0}, Lcom/iflytek/thirdparty/f;->getParamEncoding()Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B
move-result-object v0
invoke-interface {v2, v0}, Lcom/iflytek/cloud/SpeechListener;->onBufferReceived([B)V
.line 53
:cond_3f
const/16 v0, 0x15
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/f;->sendMsg(I)V
.line 54
monitor-exit v1
goto :goto_5
:catchall_46
move-exception v0
monitor-exit v1
:try_end_48
.catchall {:try_start_9 .. :try_end_48} :catchall_46
throw v0
.line 41
nop
:pswitch_data_4a
.packed-switch 0xd
:pswitch_6
.end packed-switch
.end method