d.smali
.class public Lcom/iflytek/thirdparty/d;
.super Lcom/iflytek/thirdparty/s;
.source "SourceFile"
# interfaces
.implements Lcom/iflytek/cloud/record/PcmRecorder$PcmRecordListener;
# static fields
.field public static j:I
.field public static k:I
# instance fields
.field protected volatile a:Lcom/iflytek/cloud/RecognizerListener;
.field protected b:Z
.field protected c:Z
.field protected d:Z
.field protected e:Z
.field protected f:I
.field protected g:Z
.field protected h:Lcom/iflytek/thirdparty/c;
.field protected i:Lcom/iflytek/cloud/record/PcmRecorder;
.field protected l:Ljava/lang/String;
.field protected m:Ljava/util/concurrent/ConcurrentLinkedQueue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/ConcurrentLinkedQueue",
"<[B>;"
}
.end annotation
.end field
.field protected n:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
.field protected o:Lcom/iflytek/thirdparty/u;
.field protected p:I
.field private q:Z
.field private r:Ljava/lang/String;
.field private s:Z
.field private t:I
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
const/4 v0, 0x0
.line 69
sput v0, Lcom/iflytek/thirdparty/d;->j:I
.line 70
sput v0, Lcom/iflytek/thirdparty/d;->k:I
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Lcom/iflytek/thirdparty/ad;Landroid/os/HandlerThread;)V
.registers 7
.prologue
const/4 v0, 0x1
const/4 v2, 0x0
const/4 v1, 0x0
.line 94
invoke-direct {p0, p1, p3}, Lcom/iflytek/thirdparty/s;-><init>(Landroid/content/Context;Landroid/os/HandlerThread;)V
.line 49
iput-object v2, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
.line 52
iput-boolean v1, p0, Lcom/iflytek/thirdparty/d;->b:Z
.line 54
iput-boolean v1, p0, Lcom/iflytek/thirdparty/d;->c:Z
.line 56
iput-boolean v1, p0, Lcom/iflytek/thirdparty/d;->d:Z
.line 58
iput-boolean v1, p0, Lcom/iflytek/thirdparty/d;->e:Z
.line 60
iput v0, p0, Lcom/iflytek/thirdparty/d;->f:I
.line 63
iput-boolean v0, p0, Lcom/iflytek/thirdparty/d;->g:Z
.line 65
new-instance v0, Lcom/iflytek/thirdparty/c;
invoke-direct {v0}, Lcom/iflytek/thirdparty/c;-><init>()V
iput-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
.line 66
iput-object v2, p0, Lcom/iflytek/thirdparty/d;->i:Lcom/iflytek/cloud/record/PcmRecorder;
.line 73
iput-object v2, p0, Lcom/iflytek/thirdparty/d;->l:Ljava/lang/String;
.line 76
iput-object v2, p0, Lcom/iflytek/thirdparty/d;->m:Ljava/util/concurrent/ConcurrentLinkedQueue;
.line 79
iput-object v2, p0, Lcom/iflytek/thirdparty/d;->n:Ljava/util/ArrayList;
.line 82
new-instance v0, Lcom/iflytek/thirdparty/u;
invoke-direct {v0}, Lcom/iflytek/thirdparty/u;-><init>()V
iput-object v0, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
.line 85
iput v1, p0, Lcom/iflytek/thirdparty/d;->p:I
.line 88
iput-boolean v1, p0, Lcom/iflytek/thirdparty/d;->q:Z
.line 89
iput-object v2, p0, Lcom/iflytek/thirdparty/d;->r:Ljava/lang/String;
.line 91
iput-boolean v1, p0, Lcom/iflytek/thirdparty/d;->s:Z
.line 260
iput v1, p0, Lcom/iflytek/thirdparty/d;->t:I
.line 95
new-instance v0, Ljava/util/concurrent/ConcurrentLinkedQueue;
invoke-direct {v0}, Ljava/util/concurrent/ConcurrentLinkedQueue;-><init>()V
iput-object v0, p0, Lcom/iflytek/thirdparty/d;->m:Ljava/util/concurrent/ConcurrentLinkedQueue;
.line 96
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/iflytek/thirdparty/d;->n:Ljava/util/ArrayList;
.line 97
iput-boolean v1, p0, Lcom/iflytek/thirdparty/d;->e:Z
.line 98
invoke-virtual {p0, p2}, Lcom/iflytek/thirdparty/d;->setParams(Lcom/iflytek/thirdparty/ad;)V
.line 99
return-void
.end method
.method private a(Z[B)V
.registers 9
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/iflytek/cloud/SpeechError;,
Ljava/io/UnsupportedEncodingException;
}
.end annotation
.prologue
const/4 v5, 0x0
const/4 v4, 0x0
.line 455
.line 456
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
iput-wide v0, p0, Lcom/iflytek/thirdparty/d;->mStatusBegin:J
.line 457
if-eqz p2, :cond_8c
array-length v0, p2
if-lez v0, :cond_8c
.line 459
new-instance v0, Ljava/lang/String;
const-string v1, "utf-8"
invoke-direct {v0, p2, v1}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
.line 480
:goto_14
iget-object v1, p0, Lcom/iflytek/thirdparty/d;->n:Ljava/util/ArrayList;
invoke-virtual {v1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 481
iget-object v1, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
if-eqz v1, :cond_6c
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->isRunning()Z
move-result v1
if-eqz v1, :cond_6c
.line 485
new-instance v1, Landroid/os/Bundle;
invoke-direct {v1}, Landroid/os/Bundle;-><init>()V
.line 486
const-string v2, "session_id"
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getSessionID()Ljava/lang/String;
move-result-object v3
invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 487
iget-object v2, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
const/16 v3, 0x4e21
invoke-interface {v2, v3, v4, v4, v1}, Lcom/iflytek/cloud/RecognizerListener;->onEvent(IIILandroid/os/Bundle;)V
.line 488
if-eqz p1, :cond_5d
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v1
const-string v2, "request_audio_url"
invoke-virtual {v1, v2, v4}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Z)Z
move-result v1
if-eqz v1, :cond_5d
.line 490
new-instance v1, Landroid/os/Bundle;
invoke-direct {v1}, Landroid/os/Bundle;-><init>()V
.line 491
const-string v2, "audio_url"
iget-object v3, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
invoke-virtual {v3}, Lcom/iflytek/thirdparty/c;->d()Ljava/lang/String;
move-result-object v3
invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 492
iget-object v2, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
const/16 v3, 0x59d9
invoke-interface {v2, v3, v4, v4, v1}, Lcom/iflytek/cloud/RecognizerListener;->onEvent(IIILandroid/os/Bundle;)V
.line 496
:cond_5d
new-instance v1, Lcom/iflytek/cloud/RecognizerResult;
invoke-direct {v1, v0}, Lcom/iflytek/cloud/RecognizerResult;-><init>(Ljava/lang/String;)V
.line 497
const-string v0, "GetNotifyResult"
invoke-static {v0, v5}, Lcom/iflytek/cloud/msc/util/log/PerfLogger;->appendInfo(Ljava/lang/String;Ljava/lang/String;)V
.line 498
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
invoke-interface {v0, v1, p1}, Lcom/iflytek/cloud/RecognizerListener;->onResult(Lcom/iflytek/cloud/RecognizerResult;Z)V
.line 501
:cond_6c
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "msc result time:"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v2
invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 503
if-eqz p1, :cond_8b
.line 505
invoke-virtual {p0, v5}, Lcom/iflytek/thirdparty/d;->exit(Lcom/iflytek/cloud/SpeechError;)V
.line 507
:cond_8b
return-void
.line 460
:cond_8c
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->n:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
if-gtz v0, :cond_cd
.line 463
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "local_grammar"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/ad;->e(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 464
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_b4
const-string v1, "sms.irf"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_b4
.line 465
new-instance v0, Lcom/iflytek/cloud/SpeechError;
const/16 v1, 0x4e25
invoke-direct {v0, v1}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
throw v0
.line 467
:cond_b4
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "asr_nomatch_error"
const/4 v2, 0x1
invoke-virtual {v0, v1, v2}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Z)Z
move-result v0
if-eqz v0, :cond_c9
.line 468
new-instance v0, Lcom/iflytek/cloud/SpeechError;
const/16 v1, 0x2786
invoke-direct {v0, v1}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
throw v0
.line 470
:cond_c9
const-string v0, ""
goto/16 :goto_14
.line 475
:cond_cd
const-string v0, ""
goto/16 :goto_14
.end method
# virtual methods
.method public a()I
.registers 2
.prologue
.line 107
iget v0, p0, Lcom/iflytek/thirdparty/d;->f:I
return v0
.end method
.method public a([BII)I
.registers 5
.prologue
.line 698
invoke-virtual {p0, p1, p2, p3}, Lcom/iflytek/thirdparty/d;->onRecordBuffer([BII)V
.line 699
const/4 v0, 0x0
return v0
.end method
.method protected a(Landroid/os/Message;)V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.prologue
.line 301
iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
check-cast v0, [B
check-cast v0, [B
.line 302
if-eqz v0, :cond_b
array-length v1, v0
if-nez v1, :cond_c
.line 309
:cond_b
:goto_b
return-void
.line 306
:cond_c
iget-object v1, p0, Lcom/iflytek/thirdparty/d;->m:Ljava/util/concurrent/ConcurrentLinkedQueue;
invoke-virtual {v1, v0}, Ljava/util/concurrent/ConcurrentLinkedQueue;->add(Ljava/lang/Object;)Z
.line 308
const/4 v1, 0x1
invoke-virtual {p0, v0, v1}, Lcom/iflytek/thirdparty/d;->a([BZ)V
goto :goto_b
.end method
.method public declared-synchronized a(Lcom/iflytek/cloud/RecognizerListener;)V
.registers 3
.prologue
.line 145
monitor-enter p0
:try_start_1
iput-object p1, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
.line 146
const-string v0, "[isr]startListening called"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 148
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->start()V
:try_end_b
.catchall {:try_start_1 .. :try_end_b} :catchall_d
.line 149
monitor-exit p0
return-void
.line 145
:catchall_d
move-exception v0
monitor-exit p0
throw v0
.end method
.method public a([BI)V
.registers 7
.prologue
.line 125
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
if-eqz v0, :cond_25
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->isRunning()Z
move-result v0
if-eqz v0, :cond_25
.line 127
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
invoke-interface {v0, p2, p1}, Lcom/iflytek/cloud/RecognizerListener;->onVolumeChanged(I[B)V
.line 128
iget-boolean v0, p0, Lcom/iflytek/thirdparty/d;->q:Z
if-eqz v0, :cond_25
.line 130
new-instance v0, Landroid/os/Bundle;
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
.line 131
const-string v1, "data"
invoke-virtual {v0, v1, p1}, Landroid/os/Bundle;->putByteArray(Ljava/lang/String;[B)V
.line 132
iget-object v1, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
const/16 v2, 0x520b
const/4 v3, 0x0
invoke-interface {v1, v2, p2, v3, v0}, Lcom/iflytek/cloud/RecognizerListener;->onEvent(IIILandroid/os/Bundle;)V
.line 135
:cond_25
return-void
.end method
.method protected a([BZ)V
.registers 7
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/iflytek/cloud/SpeechError;
}
.end annotation
.prologue
const/4 v3, 0x0
.line 678
iget-boolean v0, p0, Lcom/iflytek/thirdparty/d;->c:Z
if-nez v0, :cond_1b
.line 679
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/iflytek/thirdparty/d;->c:Z
.line 680
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "app_fau"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 682
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
if-eqz v0, :cond_1b
.line 684
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
const/16 v1, 0x55f2
const/4 v2, 0x0
invoke-interface {v0, v1, v3, v3, v2}, Lcom/iflytek/cloud/RecognizerListener;->onEvent(IIILandroid/os/Bundle;)V
.line 688
:cond_1b
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
array-length v1, p1
invoke-virtual {v0, p1, v1}, Lcom/iflytek/thirdparty/c;->a([BI)V
.line 690
if-eqz p2, :cond_42
.line 691
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/c;->b()I
move-result v0
.line 692
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "QISRAudioWrite volume:"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogI(Ljava/lang/String;)V
.line 693
invoke-virtual {p0, p1, v0}, Lcom/iflytek/thirdparty/d;->a([BI)V
.line 695
:cond_42
return-void
.end method
.method public declared-synchronized a(Z)Z
.registers 4
.prologue
.line 315
monitor-enter p0
:try_start_1
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "stopRecognize, current status is :"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getStatus()Lcom/iflytek/thirdparty/s$b;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, " usercancel : "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 316
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "app_stop"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 317
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->h()V
.line 319
iput-boolean p1, p0, Lcom/iflytek/thirdparty/d;->e:Z
.line 320
const/4 v0, 0x3
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/d;->sendMsg(I)V
:try_end_35
.catchall {:try_start_1 .. :try_end_35} :catchall_38
.line 321
const/4 v0, 0x1
monitor-exit p0
return v0
.line 315
:catchall_38
move-exception v0
monitor-exit p0
throw v0
.end method
.method public b()Ljava/util/concurrent/ConcurrentLinkedQueue;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/concurrent/ConcurrentLinkedQueue",
"<[B>;"
}
.end annotation
.prologue
.line 115
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->m:Ljava/util/concurrent/ConcurrentLinkedQueue;
return-object v0
.end method
.method b(Landroid/os/Message;)V
.registers 6
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/iflytek/cloud/SpeechError;,
Ljava/lang/InterruptedException;,
Ljava/io/UnsupportedEncodingException;
}
.end annotation
.prologue
const/4 v3, 0x1
.line 640
iget v1, p1, Landroid/os/Message;->arg1:I
.line 641
iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
check-cast v0, [B
check-cast v0, [B
.line 644
packed-switch v1, :pswitch_data_38
.line 666
:goto_c
:pswitch_c
return-void
.line 648
:pswitch_d
iget-boolean v1, p0, Lcom/iflytek/thirdparty/d;->d:Z
if-nez v1, :cond_1a
.line 649
iput-boolean v3, p0, Lcom/iflytek/thirdparty/d;->d:Z
.line 650
iget-object v1, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v2, "app_frs"
invoke-virtual {v1, v2}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 652
:cond_1a
const/4 v1, 0x0
invoke-direct {p0, v1, v0}, Lcom/iflytek/thirdparty/d;->a(Z[B)V
goto :goto_c
.line 655
:pswitch_1f
iget-boolean v1, p0, Lcom/iflytek/thirdparty/d;->d:Z
if-nez v1, :cond_2c
.line 656
iput-boolean v3, p0, Lcom/iflytek/thirdparty/d;->d:Z
.line 657
iget-object v1, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v2, "app_frs"
invoke-virtual {v1, v2}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 659
:cond_2c
iget-object v1, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v2, "app_lrs"
invoke-virtual {v1, v2}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 660
invoke-direct {p0, v3, v0}, Lcom/iflytek/thirdparty/d;->a(Z[B)V
goto :goto_c
.line 644
nop
:pswitch_data_38
.packed-switch 0x0
:pswitch_d
:pswitch_c
:pswitch_c
:pswitch_c
:pswitch_c
:pswitch_1f
.end packed-switch
.end method
.method protected c()V
.registers 9
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.prologue
const/4 v7, 0x1
const/4 v6, 0x0
const/4 v5, -0x1
.line 194
const-string v0, "[isr]start connecting"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 195
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "engine_type"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/ad;->e(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 198
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v1
const-string v2, "net_check"
invoke-virtual {v1, v2, v7}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Z)Z
move-result v1
.line 199
if-eqz v1, :cond_2b
.line 200
const-string v1, "cloud"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_95
.line 202
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/NetworkUtil;->checkNetwork(Landroid/content/Context;)V
.line 213
:cond_2b
:goto_2b
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "record_read_rate"
const/16 v2, 0x28
invoke-virtual {v0, v1, v2}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;I)I
move-result v0
.line 216
iget v1, p0, Lcom/iflytek/thirdparty/d;->f:I
if-eq v1, v5, :cond_7b
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->isRunning()Z
move-result v1
if-eqz v1, :cond_7b
.line 217
const-string v1, "[isr]start record"
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 219
iget v1, p0, Lcom/iflytek/thirdparty/d;->f:I
const/4 v2, -0x2
if-ne v1, v2, :cond_b9
.line 222
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v1
const-string v2, "asr_source_path"
invoke-virtual {v1, v2}, Lcom/iflytek/thirdparty/ad;->e(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 223
new-instance v2, Lcom/iflytek/cloud/record/a;
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getSampleRate()I
move-result v3
iget v4, p0, Lcom/iflytek/thirdparty/d;->f:I
invoke-direct {v2, v3, v0, v4, v1}, Lcom/iflytek/cloud/record/a;-><init>(IIILjava/lang/String;)V
iput-object v2, p0, Lcom/iflytek/thirdparty/d;->i:Lcom/iflytek/cloud/record/PcmRecorder;
.line 240
:cond_62
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "rec_open"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 241
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->i:Lcom/iflytek/cloud/record/PcmRecorder;
invoke-virtual {v0, p0}, Lcom/iflytek/cloud/record/PcmRecorder;->startRecording(Lcom/iflytek/cloud/record/PcmRecorder$PcmRecordListener;)V
.line 243
iget v0, p0, Lcom/iflytek/thirdparty/d;->mSpeechTimeOut:I
if-eq v5, v0, :cond_7b
.line 245
const/16 v0, 0x9
sget-object v1, Lcom/iflytek/thirdparty/s$a;->b:Lcom/iflytek/thirdparty/s$a;
iget v2, p0, Lcom/iflytek/thirdparty/d;->mSpeechTimeOut:I
invoke-virtual {p0, v0, v1, v6, v2}, Lcom/iflytek/thirdparty/d;->sendMsg(ILcom/iflytek/thirdparty/s$a;ZI)V
.line 249
:cond_7b
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
if-eqz v0, :cond_88
iget v0, p0, Lcom/iflytek/thirdparty/d;->f:I
if-le v0, v5, :cond_88
.line 251
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
invoke-interface {v0}, Lcom/iflytek/cloud/RecognizerListener;->onBeginOfSpeech()V
.line 254
:cond_88
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "app_ssb"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 257
sget-object v0, Lcom/iflytek/thirdparty/s$a;->a:Lcom/iflytek/thirdparty/s$a;
invoke-virtual {p0, v7, v0, v6, v6}, Lcom/iflytek/thirdparty/d;->sendMsg(ILcom/iflytek/thirdparty/s$a;ZI)V
.line 258
return-void
.line 203
:cond_95
const-string v1, "mixed"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_a5
const-string v1, "mixed"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2b
.line 206
:cond_a5
:try_start_a5
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/NetworkUtil;->checkNetwork(Landroid/content/Context;)V
:try_end_aa
.catch Ljava/lang/Exception; {:try_start_a5 .. :try_end_aa} :catch_ab
goto :goto_2b
.line 207
:catch_ab
move-exception v0
.line 208
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "engine_type"
const-string v2, "local"
invoke-virtual {v0, v1, v2}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Ljava/lang/String;)V
goto/16 :goto_2b
.line 227
:cond_b9
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v1
const-string v2, "bluetooth"
iget-boolean v3, p0, Lcom/iflytek/thirdparty/d;->s:Z
invoke-virtual {v1, v2, v3}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Z)Z
move-result v1
iput-boolean v1, p0, Lcom/iflytek/thirdparty/d;->s:Z
.line 228
iget-boolean v1, p0, Lcom/iflytek/thirdparty/d;->s:Z
if-eqz v1, :cond_ce
.line 229
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->startBluetooth()V
.line 232
:cond_ce
new-instance v1, Lcom/iflytek/cloud/record/PcmRecorder;
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getSampleRate()I
move-result v2
iget v3, p0, Lcom/iflytek/thirdparty/d;->f:I
invoke-direct {v1, v2, v0, v3}, Lcom/iflytek/cloud/record/PcmRecorder;-><init>(III)V
iput-object v1, p0, Lcom/iflytek/thirdparty/d;->i:Lcom/iflytek/cloud/record/PcmRecorder;
.line 234
const/4 v0, 0x3
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/d;->hasMessages(I)Z
move-result v0
if-eqz v0, :cond_62
.line 236
new-instance v0, Lcom/iflytek/cloud/SpeechError;
const/16 v1, 0x2786
invoke-direct {v0, v1}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
throw v0
.end method
.method public cancel(Z)V
.registers 5
.prologue
.line 346
if-eqz p1, :cond_18
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->isRunning()Z
move-result v0
if-eqz v0, :cond_18
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
if-eqz v0, :cond_18
.line 347
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
new-instance v1, Lcom/iflytek/cloud/SpeechError;
const/16 v2, 0x4e31
invoke-direct {v1, v2}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
invoke-interface {v0, v1}, Lcom/iflytek/cloud/RecognizerListener;->onError(Lcom/iflytek/cloud/SpeechError;)V
.line 349
:cond_18
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->h()V
.line 351
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getStatus()Lcom/iflytek/thirdparty/s$b;
move-result-object v0
sget-object v1, Lcom/iflytek/thirdparty/s$b;->c:Lcom/iflytek/thirdparty/s$b;
if-ne v0, v1, :cond_26
.line 352
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/iflytek/thirdparty/d;->e:Z
.line 354
:cond_26
invoke-super {p0, p1}, Lcom/iflytek/thirdparty/s;->cancel(Z)V
.line 355
return-void
.end method
.method protected d()V
.registers 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.prologue
const/4 v4, 0x0
.line 267
const-string v0, "SDKSessionBegin"
const/4 v1, 0x0
invoke-static {v0, v1}, Lcom/iflytek/cloud/msc/util/log/PerfLogger;->appendInfo(Ljava/lang/String;Ljava/lang/String;)V
.line 268
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
iget-object v1, p0, Lcom/iflytek/thirdparty/d;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/iflytek/thirdparty/d;->l:Ljava/lang/String;
invoke-virtual {v0, v1, v2, p0}, Lcom/iflytek/thirdparty/c;->sessionBegin(Landroid/content/Context;Ljava/lang/String;Lcom/iflytek/thirdparty/s;)I
move-result v0
.line 269
if-nez v0, :cond_44
iget-object v1, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
iget-object v1, v1, Lcom/iflytek/thirdparty/c;->mClientID:[C
if-eqz v1, :cond_44
.line 272
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->isRunning()Z
move-result v0
if-eqz v0, :cond_43
.line 274
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
iget-object v0, v0, Lcom/iflytek/thirdparty/c;->mClientID:[C
const-string v1, "rsltCb"
const-string v2, "stusCb"
const-string v3, "errCb"
invoke-static {v0, v1, v2, v3, p0}, Lcom/iflytek/msc/MSC;->QISRRegisterNotify([CLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)I
.line 275
sget-object v0, Lcom/iflytek/thirdparty/s$b;->c:Lcom/iflytek/thirdparty/s$b;
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/d;->setStatus(Lcom/iflytek/thirdparty/s$b;)V
.line 276
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "asr_net_perf"
invoke-virtual {v0, v1, v4}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Z)Z
move-result v0
if-eqz v0, :cond_43
.line 277
const/4 v0, 0x7
sget-object v1, Lcom/iflytek/thirdparty/s$a;->a:Lcom/iflytek/thirdparty/s$a;
invoke-virtual {p0, v0, v1, v4, v4}, Lcom/iflytek/thirdparty/d;->sendMsg(ILcom/iflytek/thirdparty/s$a;ZI)V
.line 292
:cond_43
:goto_43
return-void
.line 283
:cond_44
iget v1, p0, Lcom/iflytek/thirdparty/d;->t:I
add-int/lit8 v1, v1, 0x1
iput v1, p0, Lcom/iflytek/thirdparty/d;->t:I
.line 284
iget v1, p0, Lcom/iflytek/thirdparty/d;->t:I
const/16 v2, 0x28
if-le v1, v2, :cond_56
.line 285
new-instance v1, Lcom/iflytek/cloud/SpeechError;
invoke-direct {v1, v0}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
throw v1
.line 286
:cond_56
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->isRunning()Z
move-result v0
if-eqz v0, :cond_43
.line 288
const-wide/16 v0, 0xf
invoke-static {v0, v1}, Ljava/lang/Thread;->sleep(J)V
.line 289
const/4 v0, 0x1
sget-object v1, Lcom/iflytek/thirdparty/s$a;->a:Lcom/iflytek/thirdparty/s$a;
invoke-virtual {p0, v0, v1, v4, v4}, Lcom/iflytek/thirdparty/d;->sendMsg(ILcom/iflytek/thirdparty/s$a;ZI)V
goto :goto_43
.end method
.method protected e()V
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/iflytek/cloud/SpeechError;,
Ljava/io/IOException;,
Ljava/lang/InterruptedException;
}
.end annotation
.prologue
.line 332
const-string v0, "recording stop"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 333
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->h()V
.line 335
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "app_lau"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 337
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/c;->a()V
.line 339
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->updateTimeoutMsg()V
.line 340
return-void
.end method
.method errCb([CI[B)V
.registers 5
.prologue
.line 604
new-instance v0, Lcom/iflytek/cloud/SpeechError;
invoke-direct {v0, p2}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/d;->onError(Lcom/iflytek/cloud/SpeechError;)V
.line 605
return-void
.end method
.method public f()V
.registers 6
.prologue
const/4 v4, 0x0
.line 364
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->isRunning()Z
move-result v0
if-eqz v0, :cond_23
.line 366
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
const-string v1, "netperf"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/c;->a(Ljava/lang/String;)I
move-result v0
.line 367
iget-object v1, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
if-eqz v1, :cond_1b
.line 368
iget-object v1, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
const/16 v2, 0x2711
const/4 v3, 0x0
invoke-interface {v1, v2, v0, v4, v3}, Lcom/iflytek/cloud/RecognizerListener;->onEvent(IIILandroid/os/Bundle;)V
.line 370
:cond_1b
const/4 v0, 0x7
sget-object v1, Lcom/iflytek/thirdparty/s$a;->b:Lcom/iflytek/thirdparty/s$a;
const/16 v2, 0x64
invoke-virtual {p0, v0, v1, v4, v2}, Lcom/iflytek/thirdparty/d;->sendMsg(ILcom/iflytek/thirdparty/s$a;ZI)V
.line 372
:cond_23
return-void
.end method
.method public g()V
.registers 3
.prologue
.line 438
sget-object v0, Lcom/iflytek/thirdparty/s$b;->c:Lcom/iflytek/thirdparty/s$b;
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getStatus()Lcom/iflytek/thirdparty/s$b;
move-result-object v1
if-ne v0, v1, :cond_1a
.line 440
const-string v0, "isr recognize vadEndCall"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 442
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
if-eqz v0, :cond_16
.line 443
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
invoke-interface {v0}, Lcom/iflytek/cloud/RecognizerListener;->onEndOfSpeech()V
.line 444
:cond_16
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/d;->a(Z)Z
.line 446
:cond_1a
return-void
.end method
.method public getClientID()Ljava/lang/String;
.registers 2
.prologue
.line 793
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/c;->getClientID()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public getSessionID()Ljava/lang/String;
.registers 2
.prologue
.line 782
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->r:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_10
.line 783
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/c;->c()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/iflytek/thirdparty/d;->r:Ljava/lang/String;
.line 785
:cond_10
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->r:Ljava/lang/String;
return-object v0
.end method
.method protected h()V
.registers 6
.prologue
const/4 v4, 0x0
const/4 v3, 0x0
.line 617
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->i:Lcom/iflytek/cloud/record/PcmRecorder;
if-eqz v0, :cond_30
.line 618
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->i:Lcom/iflytek/cloud/record/PcmRecorder;
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v1
const-string v2, "record_force_stop"
invoke-virtual {v1, v2, v3}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Z)Z
move-result v1
invoke-virtual {v0, v1}, Lcom/iflytek/cloud/record/PcmRecorder;->stopRecord(Z)V
.line 619
iput-object v4, p0, Lcom/iflytek/thirdparty/d;->i:Lcom/iflytek/cloud/record/PcmRecorder;
.line 620
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "rec_close"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 622
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
if-eqz v0, :cond_29
.line 624
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
const/16 v1, 0x55f3
invoke-interface {v0, v1, v3, v3, v4}, Lcom/iflytek/cloud/RecognizerListener;->onEvent(IIILandroid/os/Bundle;)V
.line 627
:cond_29
iget-boolean v0, p0, Lcom/iflytek/thirdparty/d;->s:Z
if-eqz v0, :cond_30
.line 628
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->stopBluetooth()V
.line 631
:cond_30
return-void
.end method
.method public i()Lcom/iflytek/thirdparty/u;
.registers 2
.prologue
.line 761
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
return-object v0
.end method
.method public isLongInput()Z
.registers 2
.prologue
.line 552
iget-boolean v0, p0, Lcom/iflytek/thirdparty/d;->g:Z
return v0
.end method
.method protected onEnd(Lcom/iflytek/cloud/SpeechError;)V
.registers 8
.prologue
const/4 v5, 0x0
const/4 v4, 0x0
.line 376
const-string v0, "onSessionEnd"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 377
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->h()V
.line 378
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
const-string v1, "upflow"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/c;->a(Ljava/lang/String;)I
move-result v0
sput v0, Lcom/iflytek/thirdparty/d;->j:I
.line 379
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
const-string v1, "downflow"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/c;->a(Ljava/lang/String;)I
move-result v0
sput v0, Lcom/iflytek/thirdparty/d;->k:I
.line 380
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getSessionID()Ljava/lang/String;
.line 383
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->n:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
if-gtz v0, :cond_3f
if-nez p1, :cond_3f
.line 384
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "asr_nomatch_error"
const/4 v2, 0x1
invoke-virtual {v0, v1, v2}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Z)Z
move-result v0
if-eqz v0, :cond_3f
.line 386
new-instance p1, Lcom/iflytek/cloud/SpeechError;
const/16 v0, 0x2786
invoke-direct {p1, v0}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
.line 389
:cond_3f
if-eqz p1, :cond_8f
.line 390
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "app_ret"
invoke-virtual {p1}, Lcom/iflytek/cloud/SpeechError;->getErrorCode()I
move-result v2
int-to-long v2, v2
invoke-virtual {v0, v1, v2, v3, v4}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;JZ)V
.line 397
:goto_4d
iget-object v1, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v2, "rec_ustop"
iget-boolean v0, p0, Lcom/iflytek/thirdparty/d;->e:Z
if-eqz v0, :cond_99
const-string v0, "1"
:goto_57
invoke-virtual {v1, v2, v0, v4}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;Ljava/lang/String;Z)V
.line 398
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
const-string v1, "sessinfo"
iget-object v2, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
invoke-virtual {v2}, Lcom/iflytek/thirdparty/u;->a()Ljava/lang/String;
move-result-object v2
invoke-virtual {v0, v1, v2}, Lcom/iflytek/thirdparty/c;->a(Ljava/lang/String;Ljava/lang/String;)Z
.line 400
const-string v0, "SessionEndBegin"
invoke-static {v0, v5}, Lcom/iflytek/cloud/msc/util/log/PerfLogger;->appendInfo(Ljava/lang/String;Ljava/lang/String;)V
.line 401
iget-boolean v0, p0, Lcom/iflytek/thirdparty/d;->mUserCancel:Z
if-eqz v0, :cond_9c
.line 402
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
const-string v1, "user abort"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/c;->sessionEnd(Ljava/lang/String;)V
.line 407
:goto_77
const-string v0, "SessionEndEnd"
invoke-static {v0, v5}, Lcom/iflytek/cloud/msc/util/log/PerfLogger;->appendInfo(Ljava/lang/String;Ljava/lang/String;)V
.line 409
invoke-super {p0, p1}, Lcom/iflytek/thirdparty/s;->onEnd(Lcom/iflytek/cloud/SpeechError;)V
.line 411
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
if-eqz v0, :cond_8c
.line 413
iget-boolean v0, p0, Lcom/iflytek/thirdparty/d;->mUserCancel:Z
if-eqz v0, :cond_c3
.line 415
const-string v0, "RecognizerListener#onCancel"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 431
:cond_8c
:goto_8c
iput-object v5, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
.line 432
return-void
.line 392
:cond_8f
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "app_ret"
const-wide/16 v2, 0x0
invoke-virtual {v0, v1, v2, v3, v4}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;JZ)V
goto :goto_4d
.line 397
:cond_99
const-string v0, "0"
goto :goto_57
.line 403
:cond_9c
if-eqz p1, :cond_bb
.line 404
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "error"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {p1}, Lcom/iflytek/cloud/SpeechError;->getErrorCode()I
move-result v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/c;->sessionEnd(Ljava/lang/String;)V
goto :goto_77
.line 406
:cond_bb
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->h:Lcom/iflytek/thirdparty/c;
const-string v1, "success"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/c;->sessionEnd(Ljava/lang/String;)V
goto :goto_77
.line 419
:cond_c3
const-string v0, "RecognizerListener#onEnd"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 421
if-eqz p1, :cond_8c
.line 423
new-instance v0, Landroid/os/Bundle;
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
.line 424
const-string v1, "session_id"
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getSessionID()Ljava/lang/String;
move-result-object v2
invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 425
iget-object v1, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
const/16 v2, 0x4e21
invoke-interface {v1, v2, v4, v4, v0}, Lcom/iflytek/cloud/RecognizerListener;->onEvent(IIILandroid/os/Bundle;)V
.line 427
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->a:Lcom/iflytek/cloud/RecognizerListener;
invoke-interface {v0, p1}, Lcom/iflytek/cloud/RecognizerListener;->onError(Lcom/iflytek/cloud/SpeechError;)V
goto :goto_8c
.end method
.method public onError(Lcom/iflytek/cloud/SpeechError;)V
.registers 2
.prologue
.line 744
invoke-virtual {p0, p1}, Lcom/iflytek/thirdparty/d;->exit(Lcom/iflytek/cloud/SpeechError;)V
.line 745
return-void
.end method
.method protected onMsgProcess(Landroid/os/Message;)V
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Throwable;,
Lcom/iflytek/cloud/SpeechError;
}
.end annotation
.prologue
.line 159
invoke-super {p0, p1}, Lcom/iflytek/thirdparty/s;->onMsgProcess(Landroid/os/Message;)V
.line 161
iget v0, p1, Landroid/os/Message;->what:I
packed-switch v0, :pswitch_data_26
.line 187
:goto_8
:pswitch_8
return-void
.line 164
:pswitch_9
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->c()V
goto :goto_8
.line 167
:pswitch_d
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->d()V
goto :goto_8
.line 170
:pswitch_11
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->g()V
goto :goto_8
.line 173
:pswitch_15
invoke-virtual {p0, p1}, Lcom/iflytek/thirdparty/d;->a(Landroid/os/Message;)V
goto :goto_8
.line 176
:pswitch_19
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->e()V
goto :goto_8
.line 179
:pswitch_1d
invoke-virtual {p0, p1}, Lcom/iflytek/thirdparty/d;->b(Landroid/os/Message;)V
goto :goto_8
.line 182
:pswitch_21
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->f()V
goto :goto_8
.line 161
nop
:pswitch_data_26
.packed-switch 0x0
:pswitch_9
:pswitch_d
:pswitch_15
:pswitch_19
:pswitch_1d
:pswitch_8
:pswitch_8
:pswitch_21
:pswitch_8
:pswitch_11
.end packed-switch
.end method
.method protected onParseParam()V
.registers 6
.prologue
const/4 v4, 0x0
.line 531
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "cloud_grammar"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/ad;->e(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/iflytek/thirdparty/d;->l:Ljava/lang/String;
.line 533
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "audio_source"
const/4 v2, 0x1
invoke-virtual {v0, v1, v2}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;I)I
move-result v0
iput v0, p0, Lcom/iflytek/thirdparty/d;->f:I
.line 535
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "domain"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/ad;->e(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lcom/iflytek/thirdparty/af;->a(Ljava/lang/String;)Z
move-result v0
iput-boolean v0, p0, Lcom/iflytek/thirdparty/d;->g:Z
.line 537
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "filter_audio_time"
invoke-virtual {v0, v1, v4}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;I)I
move-result v0
.line 538
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v1
const-string v2, "sample_rate"
iget v3, p0, Lcom/iflytek/thirdparty/d;->mSampleRate:I
invoke-virtual {v1, v2, v3}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;I)I
move-result v1
div-int/lit16 v1, v1, 0x3e8
mul-int/lit8 v1, v1, 0x10
div-int/lit8 v1, v1, 0x8
mul-int/2addr v0, v1
iput v0, p0, Lcom/iflytek/thirdparty/d;->p:I
.line 541
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "speech_timeout"
iget v2, p0, Lcom/iflytek/thirdparty/d;->mSpeechTimeOut:I
invoke-virtual {v0, v1, v2}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;I)I
move-result v0
iput v0, p0, Lcom/iflytek/thirdparty/d;->mSpeechTimeOut:I
.line 544
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "notify_record_data"
invoke-virtual {v0, v1, v4}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Z)Z
move-result v0
iput-boolean v0, p0, Lcom/iflytek/thirdparty/d;->q:Z
.line 546
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "mSpeechTimeOut="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
iget v1, p0, Lcom/iflytek/thirdparty/d;->mSpeechTimeOut:I
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 547
invoke-super {p0}, Lcom/iflytek/thirdparty/s;->onParseParam()V
.line 548
return-void
.end method
.method public onRecordBuffer([BII)V
.registers 9
.prologue
const/4 v4, 0x2
const/4 v3, 0x0
.line 710
if-eqz p1, :cond_9
if-lez p3, :cond_9
array-length v0, p1
if-ge v0, p3, :cond_a
.line 736
:cond_9
:goto_9
return-void
.line 712
:cond_a
if-lez p3, :cond_9
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->isRunning()Z
move-result v0
if-eqz v0, :cond_9
.line 714
iget-boolean v0, p0, Lcom/iflytek/thirdparty/d;->b:Z
if-nez v0, :cond_20
.line 715
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/iflytek/thirdparty/d;->b:Z
.line 716
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "rec_start"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 719
:cond_20
iget v0, p0, Lcom/iflytek/thirdparty/d;->p:I
if-lez v0, :cond_48
.line 720
iget v0, p0, Lcom/iflytek/thirdparty/d;->p:I
if-lt v0, p3, :cond_2e
.line 721
iget v0, p0, Lcom/iflytek/thirdparty/d;->p:I
sub-int/2addr v0, p3
iput v0, p0, Lcom/iflytek/thirdparty/d;->p:I
goto :goto_9
.line 724
:cond_2e
iget v0, p0, Lcom/iflytek/thirdparty/d;->p:I
sub-int v0, p3, v0
new-array v0, v0, [B
.line 725
iget v1, p0, Lcom/iflytek/thirdparty/d;->p:I
add-int/2addr v1, p2
iget v2, p0, Lcom/iflytek/thirdparty/d;->p:I
sub-int v2, p3, v2
invoke-static {p1, v1, v0, v3, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 726
invoke-virtual {p0, v4, v0}, Lcom/iflytek/thirdparty/d;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;
move-result-object v0
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/d;->sendMsg(Landroid/os/Message;)V
.line 727
iput v3, p0, Lcom/iflytek/thirdparty/d;->p:I
goto :goto_9
.line 731
:cond_48
new-array v0, p3, [B
.line 732
invoke-static {p1, p2, v0, v3, p3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 733
invoke-virtual {p0, v4, v0}, Lcom/iflytek/thirdparty/d;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;
move-result-object v0
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/d;->sendMsg(Landroid/os/Message;)V
goto :goto_9
.end method
.method public onRecordReleased()V
.registers 2
.prologue
.line 769
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->i:Lcom/iflytek/cloud/record/PcmRecorder;
if-eqz v0, :cond_e
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->i:Lcom/iflytek/cloud/record/PcmRecorder;
instance-of v0, v0, Lcom/iflytek/cloud/record/a;
if-eqz v0, :cond_e
.line 772
const/4 v0, 0x1
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/d;->a(Z)Z
.line 774
:cond_e
return-void
.end method
.method public onRecordStarted(Z)V
.registers 4
.prologue
.line 752
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "rec_ready"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 753
return-void
.end method
.method rsltCb([C[BII)V
.registers 10
.prologue
const/4 v4, 0x4
const/4 v3, 0x0
.line 583
if-eqz p2, :cond_3b
.line 584
const-string v0, "MscRecognizer"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "rsltCb:"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, "result:"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
new-instance v2, Ljava/lang/String;
invoke-direct {v2, p2}, Ljava/lang/String;-><init>([B)V
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;Ljava/lang/String;)V
.line 587
:goto_2b
invoke-virtual {p0, v4, p4, v3, p2}, Lcom/iflytek/thirdparty/d;->obtainMessage(IIILjava/lang/Object;)Landroid/os/Message;
move-result-object v0
.line 590
invoke-virtual {p0, v4}, Lcom/iflytek/thirdparty/d;->hasMessages(I)Z
move-result v1
if-eqz v1, :cond_5a
.line 591
sget-object v1, Lcom/iflytek/thirdparty/s$a;->b:Lcom/iflytek/thirdparty/s$a;
invoke-virtual {p0, v0, v1, v3, v3}, Lcom/iflytek/thirdparty/d;->sendMsg(Landroid/os/Message;Lcom/iflytek/thirdparty/s$a;ZI)V
.line 594
:goto_3a
return-void
.line 586
:cond_3b
const-string v0, "MscRecognizer"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "rsltCb:"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, "result:null"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogI(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_2b
.line 593
:cond_5a
sget-object v1, Lcom/iflytek/thirdparty/s$a;->a:Lcom/iflytek/thirdparty/s$a;
invoke-virtual {p0, v0, v1, v3, v3}, Lcom/iflytek/thirdparty/d;->sendMsg(Landroid/os/Message;Lcom/iflytek/thirdparty/s$a;ZI)V
goto :goto_3a
.end method
.method protected start()V
.registers 3
.prologue
.line 153
iget-object v0, p0, Lcom/iflytek/thirdparty/d;->o:Lcom/iflytek/thirdparty/u;
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/u;->a(Lcom/iflytek/thirdparty/ad;)V
.line 154
invoke-super {p0}, Lcom/iflytek/thirdparty/s;->start()V
.line 155
return-void
.end method
.method stusCb([CIII[B)V
.registers 9
.prologue
.line 566
if-nez p2, :cond_2a
const/4 v0, 0x3
if-ne p3, v0, :cond_2a
.line 568
const-string v0, "MscRecognizer"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "stusCb:"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, ",type:"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;Ljava/lang/String;)V
.line 569
invoke-virtual {p0}, Lcom/iflytek/thirdparty/d;->g()V
.line 571
:cond_2a
return-void
.end method