g.smali
.class public Lcom/iflytek/thirdparty/g;
.super Lcom/iflytek/thirdparty/s;
.source "SourceFile"
# interfaces
.implements Lcom/iflytek/cloud/record/PcmRecorder$PcmRecordListener;
# instance fields
.field protected volatile a:Lcom/iflytek/cloud/VerifierListener;
.field protected b:J
.field protected c:Z
.field protected d:Lcom/iflytek/thirdparty/h;
.field protected e:Lcom/iflytek/cloud/record/PcmRecorder;
.field protected f:Ljava/lang/String;
.field protected g:Ljava/lang/String;
.field protected h:Lcom/iflytek/cloud/VerifierResult;
.field protected i:Ljava/util/concurrent/ConcurrentLinkedQueue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/ConcurrentLinkedQueue",
"<[B>;"
}
.end annotation
.end field
.field protected j:I
.field private k:J
.field private l:I
.field private m:Ljava/lang/String;
.field private n:Z
# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/iflytek/thirdparty/ad;Landroid/os/HandlerThread;)V
.registers 10
.prologue
const-wide/16 v4, 0x0
const/4 v3, 0x1
const/4 v2, 0x0
const/4 v1, 0x0
.line 79
invoke-direct {p0, p1, p3}, Lcom/iflytek/thirdparty/s;-><init>(Landroid/content/Context;Landroid/os/HandlerThread;)V
.line 49
iput-object v1, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
.line 51
iput-wide v4, p0, Lcom/iflytek/thirdparty/g;->b:J
.line 54
iput-boolean v3, p0, Lcom/iflytek/thirdparty/g;->c:Z
.line 56
new-instance v0, Lcom/iflytek/thirdparty/h;
invoke-direct {v0}, Lcom/iflytek/thirdparty/h;-><init>()V
iput-object v0, p0, Lcom/iflytek/thirdparty/g;->d:Lcom/iflytek/thirdparty/h;
.line 57
iput-object v1, p0, Lcom/iflytek/thirdparty/g;->e:Lcom/iflytek/cloud/record/PcmRecorder;
.line 60
const-string v0, "train"
iput-object v0, p0, Lcom/iflytek/thirdparty/g;->f:Ljava/lang/String;
.line 62
const-string v0, ""
iput-object v0, p0, Lcom/iflytek/thirdparty/g;->g:Ljava/lang/String;
.line 64
iput-object v1, p0, Lcom/iflytek/thirdparty/g;->h:Lcom/iflytek/cloud/VerifierResult;
.line 67
iput-object v1, p0, Lcom/iflytek/thirdparty/g;->i:Ljava/util/concurrent/ConcurrentLinkedQueue;
.line 69
iput v3, p0, Lcom/iflytek/thirdparty/g;->j:I
.line 70
iput-wide v4, p0, Lcom/iflytek/thirdparty/g;->k:J
.line 72
iput v2, p0, Lcom/iflytek/thirdparty/g;->l:I
.line 74
iput-object v1, p0, Lcom/iflytek/thirdparty/g;->m:Ljava/lang/String;
.line 76
iput-boolean v2, p0, Lcom/iflytek/thirdparty/g;->n:Z
.line 80
new-instance v0, Ljava/util/concurrent/ConcurrentLinkedQueue;
invoke-direct {v0}, Ljava/util/concurrent/ConcurrentLinkedQueue;-><init>()V
iput-object v0, p0, Lcom/iflytek/thirdparty/g;->i:Ljava/util/concurrent/ConcurrentLinkedQueue;
.line 81
invoke-virtual {p0, p2}, Lcom/iflytek/thirdparty/g;->setParams(Lcom/iflytek/thirdparty/ad;)V
.line 82
return-void
.end method
.method private g()Z
.registers 3
.prologue
.line 115
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "sst"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/ad;->e(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 116
const-string v1, "train"
invoke-virtual {v1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v0
return v0
.end method
.method private h()V
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/iflytek/cloud/SpeechError;,
Ljava/io/IOException;,
Ljava/lang/InterruptedException;
}
.end annotation
.prologue
.line 244
const-string v0, "record stop msg in"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 245
invoke-direct {p0}, Lcom/iflytek/thirdparty/g;->g()Z
move-result v0
if-nez v0, :cond_e
.line 246
invoke-direct {p0}, Lcom/iflytek/thirdparty/g;->k()V
.line 249
:cond_e
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->d:Lcom/iflytek/thirdparty/h;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/h;->a()V
.line 253
const/4 v0, 0x4
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/g;->sendMsg(I)V
.line 255
const-string v0, "record stop msg out"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 256
return-void
.end method
.method private i()V
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/iflytek/cloud/SpeechError;,
Ljava/io/UnsupportedEncodingException;
}
.end annotation
.prologue
.line 329
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->d:Lcom/iflytek/thirdparty/h;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/h;->e()Lcom/iflytek/thirdparty/t$a;
move-result-object v0
.line 331
sget-object v1, Lcom/iflytek/thirdparty/g$1;->a:[I
invoke-virtual {v0}, Lcom/iflytek/thirdparty/t$a;->ordinal()I
move-result v0
aget v0, v1, v0
packed-switch v0, :pswitch_data_16
.line 340
:goto_11
:pswitch_11
return-void
.line 335
:pswitch_12
invoke-direct {p0}, Lcom/iflytek/thirdparty/g;->j()V
goto :goto_11
.line 331
:pswitch_data_16
.packed-switch 0x1
:pswitch_11
:pswitch_12
.end packed-switch
.end method
.method private j()V
.registers 6
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/iflytek/cloud/SpeechError;,
Ljava/io/UnsupportedEncodingException;
}
.end annotation
.prologue
const/4 v4, 0x0
const/4 v3, 0x0
.line 355
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
iput-wide v0, p0, Lcom/iflytek/thirdparty/g;->mStatusBegin:J
.line 356
new-instance v0, Ljava/lang/String;
iget-object v1, p0, Lcom/iflytek/thirdparty/g;->d:Lcom/iflytek/thirdparty/h;
invoke-virtual {v1}, Lcom/iflytek/thirdparty/h;->d()[B
move-result-object v1
const-string v2, "utf-8"
invoke-direct {v0, v1, v2}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
.line 357
new-instance v1, Lcom/iflytek/cloud/VerifierResult;
invoke-direct {v1, v0}, Lcom/iflytek/cloud/VerifierResult;-><init>(Ljava/lang/String;)V
iput-object v1, p0, Lcom/iflytek/thirdparty/g;->h:Lcom/iflytek/cloud/VerifierResult;
.line 359
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
if-eqz v0, :cond_35
.line 361
new-instance v0, Landroid/os/Bundle;
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
.line 362
const-string v1, "session_id"
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->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 363
iget-object v1, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
const/16 v2, 0x4e21
invoke-interface {v1, v2, v3, v3, v0}, Lcom/iflytek/cloud/VerifierListener;->onEvent(IIILandroid/os/Bundle;)V
.line 367
:cond_35
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->f:Ljava/lang/String;
const-string v1, "train"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_63
.line 370
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->h:Lcom/iflytek/cloud/VerifierResult;
iget v0, v0, Lcom/iflytek/cloud/VerifierResult;->ret:I
if-nez v0, :cond_63
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->h:Lcom/iflytek/cloud/VerifierResult;
iget v0, v0, Lcom/iflytek/cloud/VerifierResult;->suc:I
iget-object v1, p0, Lcom/iflytek/thirdparty/g;->h:Lcom/iflytek/cloud/VerifierResult;
iget v1, v1, Lcom/iflytek/cloud/VerifierResult;->rgn:I
if-ge v0, v1, :cond_63
.line 372
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
if-eqz v0, :cond_5f
.line 373
const-string v0, "GetNotifyResult"
invoke-static {v0, v4}, Lcom/iflytek/cloud/msc/util/log/PerfLogger;->appendInfo(Ljava/lang/String;Ljava/lang/String;)V
.line 374
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
iget-object v1, p0, Lcom/iflytek/thirdparty/g;->h:Lcom/iflytek/cloud/VerifierResult;
invoke-interface {v0, v1}, Lcom/iflytek/cloud/VerifierListener;->onResult(Lcom/iflytek/cloud/VerifierResult;)V
.line 376
:cond_5f
invoke-virtual {p0, v3}, Lcom/iflytek/thirdparty/g;->sendMsg(I)V
.line 387
:goto_62
return-void
.line 380
:cond_63
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
if-eqz v0, :cond_73
.line 381
const-string v0, "GetNotifyResult"
invoke-static {v0, v4}, Lcom/iflytek/cloud/msc/util/log/PerfLogger;->appendInfo(Ljava/lang/String;Ljava/lang/String;)V
.line 382
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
iget-object v1, p0, Lcom/iflytek/thirdparty/g;->h:Lcom/iflytek/cloud/VerifierResult;
invoke-interface {v0, v1}, Lcom/iflytek/cloud/VerifierListener;->onResult(Lcom/iflytek/cloud/VerifierResult;)V
.line 386
:cond_73
invoke-virtual {p0, v4}, Lcom/iflytek/thirdparty/g;->exit(Lcom/iflytek/cloud/SpeechError;)V
goto :goto_62
.end method
.method private k()V
.registers 5
.prologue
.line 405
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->e:Lcom/iflytek/cloud/record/PcmRecorder;
if-eqz v0, :cond_1e
.line 406
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->e:Lcom/iflytek/cloud/record/PcmRecorder;
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v1
const-string v2, "record_force_stop"
const/4 v3, 0x0
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 407
const/4 v0, 0x0
iput-object v0, p0, Lcom/iflytek/thirdparty/g;->e:Lcom/iflytek/cloud/record/PcmRecorder;
.line 409
iget-boolean v0, p0, Lcom/iflytek/thirdparty/g;->n:Z
if-eqz v0, :cond_1e
.line 410
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->stopBluetooth()V
.line 413
:cond_1e
return-void
.end method
# virtual methods
.method protected a(Landroid/os/Message;)V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.prologue
.line 225
iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
check-cast v0, [B
check-cast v0, [B
.line 226
if-eqz v0, :cond_b
array-length v1, v0
if-nez v1, :cond_c
.line 233
:cond_b
:goto_b
return-void
.line 230
:cond_c
iget-object v1, p0, Lcom/iflytek/thirdparty/g;->i:Ljava/util/concurrent/ConcurrentLinkedQueue;
invoke-virtual {v1, v0}, Ljava/util/concurrent/ConcurrentLinkedQueue;->add(Ljava/lang/Object;)Z
.line 232
const/4 v1, 0x1
invoke-virtual {p0, v0, v1}, Lcom/iflytek/thirdparty/g;->a([BZ)V
goto :goto_b
.end method
.method public declared-synchronized a(Lcom/iflytek/cloud/VerifierListener;)V
.registers 3
.prologue
.line 85
monitor-enter p0
:try_start_1
const-string v0, "Isv Msc startVerify in"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 86
iput-object p1, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
.line 88
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->start()V
.line 89
const-string v0, "Isv Msc startVerify out"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
:try_end_10
.catchall {:try_start_1 .. :try_end_10} :catchall_12
.line 90
monitor-exit p0
return-void
.line 85
:catchall_12
move-exception v0
monitor-exit p0
throw v0
.end method
.method public a([BI)V
.registers 4
.prologue
.line 431
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->isRunning()Z
move-result v0
if-eqz v0, :cond_b
.line 433
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
invoke-interface {v0, p2, p1}, Lcom/iflytek/cloud/VerifierListener;->onVolumeChanged(I[B)V
.line 435
:cond_b
return-void
.end method
.method protected a([BZ)V
.registers 5
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/iflytek/cloud/SpeechError;
}
.end annotation
.prologue
.line 441
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->d:Lcom/iflytek/thirdparty/h;
array-length v1, p1
invoke-virtual {v0, p1, v1}, Lcom/iflytek/thirdparty/h;->a([BI)V
.line 444
if-eqz p2, :cond_13
.line 445
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->d:Lcom/iflytek/thirdparty/h;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/h;->b()Z
move-result v0
if-eqz v0, :cond_14
.line 446
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->d()V
.line 452
:cond_13
:goto_13
return-void
.line 448
:cond_14
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->d:Lcom/iflytek/thirdparty/h;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/h;->c()I
move-result v0
.line 449
invoke-virtual {p0, p1, v0}, Lcom/iflytek/thirdparty/g;->a([BI)V
goto :goto_13
.end method
.method public declared-synchronized a()Z
.registers 3
.prologue
.line 93
monitor-enter p0
:try_start_1
const-string v0, "Isv Msc stopRecord in"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 94
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->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-eq v0, v1, :cond_2b
.line 95
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "endVerify fail 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/g;->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
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
:try_end_28
.catchall {:try_start_1 .. :try_end_28} :catchall_3f
.line 96
const/4 v0, 0x0
.line 105
:goto_29
monitor-exit p0
return v0
.line 98
:cond_2b
:try_start_2b
invoke-direct {p0}, Lcom/iflytek/thirdparty/g;->g()Z
move-result v0
if-nez v0, :cond_34
.line 99
invoke-direct {p0}, Lcom/iflytek/thirdparty/g;->k()V
.line 102
:cond_34
const/4 v0, 0x3
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/g;->sendMsg(I)V
.line 104
const-string v0, "Isv Msc stopRecord out"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
:try_end_3d
.catchall {:try_start_2b .. :try_end_3d} :catchall_3f
.line 105
const/4 v0, 0x1
goto :goto_29
.line 93
:catchall_3f
move-exception v0
monitor-exit p0
throw v0
.end method
.method protected b()V
.registers 8
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.prologue
const/16 v6, 0x9
const/4 v5, 0x1
const/4 v4, 0x0
.line 167
const-string v0, "isv msc msg start in"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 168
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->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 169
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v1
const-string v2, "net_check"
invoke-virtual {v1, v2, v5}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Z)Z
move-result v1
.line 170
const-string v2, "cloud"
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2c
if-eqz v1, :cond_2c
.line 171
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/NetworkUtil;->checkNetwork(Landroid/content/Context;)V
.line 173
:cond_2c
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->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 176
iget v1, p0, Lcom/iflytek/thirdparty/g;->j:I
const/4 v2, -0x1
if-eq v1, v2, :cond_73
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->isRunning()Z
move-result v1
if-eqz v1, :cond_73
.line 177
const-string v1, "[isv]start record"
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 178
iget-object v1, p0, Lcom/iflytek/thirdparty/g;->e:Lcom/iflytek/cloud/record/PcmRecorder;
if-nez v1, :cond_73
.line 179
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v1
const-string v2, "bluetooth"
iget-boolean v3, p0, Lcom/iflytek/thirdparty/g;->n: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/g;->n:Z
.line 180
iget-boolean v1, p0, Lcom/iflytek/thirdparty/g;->n:Z
if-eqz v1, :cond_61
.line 181
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->startBluetooth()V
.line 184
:cond_61
new-instance v1, Lcom/iflytek/cloud/record/PcmRecorder;
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getSampleRate()I
move-result v2
iget v3, p0, Lcom/iflytek/thirdparty/g;->j:I
invoke-direct {v1, v2, v0, v3}, Lcom/iflytek/cloud/record/PcmRecorder;-><init>(III)V
iput-object v1, p0, Lcom/iflytek/thirdparty/g;->e:Lcom/iflytek/cloud/record/PcmRecorder;
.line 185
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->e:Lcom/iflytek/cloud/record/PcmRecorder;
invoke-virtual {v0, p0}, Lcom/iflytek/cloud/record/PcmRecorder;->startRecording(Lcom/iflytek/cloud/record/PcmRecorder$PcmRecordListener;)V
.line 189
:cond_73
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getStatus()Lcom/iflytek/thirdparty/s$b;
move-result-object v0
sget-object v1, Lcom/iflytek/thirdparty/s$b;->e:Lcom/iflytek/thirdparty/s$b;
if-eq v0, v1, :cond_84
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
if-eqz v0, :cond_84
.line 190
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
invoke-interface {v0}, Lcom/iflytek/cloud/VerifierListener;->onBeginOfSpeech()V
.line 193
:cond_84
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
iput-wide v0, p0, Lcom/iflytek/thirdparty/g;->b:J
.line 196
invoke-virtual {p0, v6}, Lcom/iflytek/thirdparty/g;->removeMessages(I)V
.line 197
sget-object v0, Lcom/iflytek/thirdparty/s$a;->b:Lcom/iflytek/thirdparty/s$a;
iget v1, p0, Lcom/iflytek/thirdparty/g;->mSpeechTimeOut:I
invoke-virtual {p0, v6, v0, v4, v1}, Lcom/iflytek/thirdparty/g;->sendMsg(ILcom/iflytek/thirdparty/s$a;ZI)V
.line 199
sget-object v0, Lcom/iflytek/thirdparty/s$a;->a:Lcom/iflytek/thirdparty/s$a;
invoke-virtual {p0, v5, v0, v4, v4}, Lcom/iflytek/thirdparty/g;->sendMsg(ILcom/iflytek/thirdparty/s$a;ZI)V
.line 201
const-string v0, "isv msc msg start out"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 202
return-void
.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
.line 267
invoke-direct {p0}, Lcom/iflytek/thirdparty/g;->g()Z
move-result v0
if-nez v0, :cond_9
.line 268
invoke-direct {p0}, Lcom/iflytek/thirdparty/g;->k()V
.line 269
:cond_9
invoke-direct {p0}, Lcom/iflytek/thirdparty/g;->i()V
.line 271
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getStatus()Lcom/iflytek/thirdparty/s$b;
move-result-object v0
sget-object v1, Lcom/iflytek/thirdparty/s$b;->d:Lcom/iflytek/thirdparty/s$b;
if-ne v0, v1, :cond_1d
.line 272
const/4 v0, 0x4
sget-object v1, Lcom/iflytek/thirdparty/s$a;->b:Lcom/iflytek/thirdparty/s$a;
const/4 v2, 0x0
const/16 v3, 0x14
invoke-virtual {p0, v0, v1, v2, v3}, Lcom/iflytek/thirdparty/g;->sendMsg(ILcom/iflytek/thirdparty/s$a;ZI)V
.line 278
:cond_1d
return-void
.end method
.method protected c()V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.prologue
.line 211
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->d:Lcom/iflytek/thirdparty/h;
iget-object v0, v0, Lcom/iflytek/thirdparty/h;->mClientID:[C
if-nez v0, :cond_15
.line 213
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 214
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->d:Lcom/iflytek/thirdparty/h;
iget-object v1, p0, Lcom/iflytek/thirdparty/g;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/iflytek/thirdparty/g;->g:Ljava/lang/String;
invoke-virtual {v0, v1, v2, p0}, Lcom/iflytek/thirdparty/h;->sessionBegin(Landroid/content/Context;Ljava/lang/String;Lcom/iflytek/thirdparty/s;)I
.line 216
:cond_15
sget-object v0, Lcom/iflytek/thirdparty/s$b;->c:Lcom/iflytek/thirdparty/s$b;
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/g;->setStatus(Lcom/iflytek/thirdparty/s$b;)V
.line 217
return-void
.end method
.method public cancel(Z)V
.registers 5
.prologue
.line 121
if-eqz p1, :cond_18
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->isRunning()Z
move-result v0
if-eqz v0, :cond_18
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
if-eqz v0, :cond_18
.line 122
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
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/VerifierListener;->onError(Lcom/iflytek/cloud/SpeechError;)V
.line 125
:cond_18
invoke-direct {p0}, Lcom/iflytek/thirdparty/g;->k()V
.line 127
invoke-super {p0, p1}, Lcom/iflytek/thirdparty/s;->cancel(Z)V
.line 128
return-void
.end method
.method public d()V
.registers 3
.prologue
.line 346
sget-object v0, Lcom/iflytek/thirdparty/s$b;->c:Lcom/iflytek/thirdparty/s$b;
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getStatus()Lcom/iflytek/thirdparty/s$b;
move-result-object v1
if-ne v0, v1, :cond_19
.line 347
const-string v0, "Isv Msc vadEndCall"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 348
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->a()Z
.line 349
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
if-eqz v0, :cond_19
.line 350
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
invoke-interface {v0}, Lcom/iflytek/cloud/VerifierListener;->onEndOfSpeech()V
.line 352
:cond_19
return-void
.end method
.method public e()Ljava/util/concurrent/ConcurrentLinkedQueue;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/concurrent/ConcurrentLinkedQueue",
"<[B>;"
}
.end annotation
.prologue
.line 458
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->i:Ljava/util/concurrent/ConcurrentLinkedQueue;
return-object v0
.end method
.method public f()I
.registers 2
.prologue
.line 506
iget v0, p0, Lcom/iflytek/thirdparty/g;->j:I
return v0
.end method
.method public getClientID()Ljava/lang/String;
.registers 2
.prologue
.line 520
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->d: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 528
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->m:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_10
.line 529
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->d:Lcom/iflytek/thirdparty/h;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/h;->f()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/iflytek/thirdparty/g;->m:Ljava/lang/String;
.line 531
:cond_10
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->m:Ljava/lang/String;
return-object v0
.end method
.method protected onEnd(Lcom/iflytek/cloud/SpeechError;)V
.registers 7
.prologue
const/4 v4, 0x0
const/4 v3, 0x0
.line 282
const-string v0, "isv msc onEnd in"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 283
invoke-direct {p0}, Lcom/iflytek/thirdparty/g;->k()V
.line 285
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getSessionID()Ljava/lang/String;
.line 287
const-string v0, "SessionEndBegin"
invoke-static {v0, v3}, Lcom/iflytek/cloud/msc/util/log/PerfLogger;->appendInfo(Ljava/lang/String;Ljava/lang/String;)V
.line 289
iget-boolean v0, p0, Lcom/iflytek/thirdparty/g;->mUserCancel:Z
if-eqz v0, :cond_35
.line 290
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->d:Lcom/iflytek/thirdparty/h;
const-string v1, "user abort"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/h;->sessionEnd(Ljava/lang/String;)V
.line 295
:goto_1d
const-string v0, "SessionEndEnd"
invoke-static {v0, v3}, Lcom/iflytek/cloud/msc/util/log/PerfLogger;->appendInfo(Ljava/lang/String;Ljava/lang/String;)V
.line 297
invoke-super {p0, p1}, Lcom/iflytek/thirdparty/s;->onEnd(Lcom/iflytek/cloud/SpeechError;)V
.line 299
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
if-eqz v0, :cond_2d
.line 301
iget-boolean v0, p0, Lcom/iflytek/thirdparty/g;->mUserCancel:Z
if-eqz v0, :cond_5c
.line 319
:cond_2d
:goto_2d
iput-object v3, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
.line 320
const-string v0, "isv msc onEnd out"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 321
return-void
.line 291
:cond_35
if-eqz p1, :cond_54
.line 292
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->d:Lcom/iflytek/thirdparty/h;
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/h;->sessionEnd(Ljava/lang/String;)V
goto :goto_1d
.line 294
:cond_54
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->d:Lcom/iflytek/thirdparty/h;
const-string v1, "success"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/h;->sessionEnd(Ljava/lang/String;)V
goto :goto_1d
.line 307
:cond_5c
const-string v0, "VerifyListener#onEnd"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 309
if-eqz p1, :cond_2d
.line 311
new-instance v0, Landroid/os/Bundle;
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
.line 312
const-string v1, "session_id"
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->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 313
iget-object v1, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
const/16 v2, 0x4e21
invoke-interface {v1, v2, v4, v4, v0}, Lcom/iflytek/cloud/VerifierListener;->onEvent(IIILandroid/os/Bundle;)V
.line 315
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->a:Lcom/iflytek/cloud/VerifierListener;
invoke-interface {v0, p1}, Lcom/iflytek/cloud/VerifierListener;->onError(Lcom/iflytek/cloud/SpeechError;)V
goto :goto_2d
.end method
.method public onError(Lcom/iflytek/cloud/SpeechError;)V
.registers 2
.prologue
.line 492
invoke-virtual {p0, p1}, Lcom/iflytek/thirdparty/g;->exit(Lcom/iflytek/cloud/SpeechError;)V
.line 493
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 136
invoke-super {p0, p1}, Lcom/iflytek/thirdparty/s;->onMsgProcess(Landroid/os/Message;)V
.line 138
iget v0, p1, Landroid/os/Message;->what:I
packed-switch v0, :pswitch_data_22
.line 163
:goto_8
:pswitch_8
return-void
.line 141
:pswitch_9
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->b()V
goto :goto_8
.line 144
:pswitch_d
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->c()V
goto :goto_8
.line 147
:pswitch_11
invoke-virtual {p0, p1}, Lcom/iflytek/thirdparty/g;->a(Landroid/os/Message;)V
goto :goto_8
.line 150
:pswitch_15
invoke-direct {p0}, Lcom/iflytek/thirdparty/g;->h()V
goto :goto_8
.line 153
:pswitch_19
invoke-virtual {p0, p1}, Lcom/iflytek/thirdparty/g;->b(Landroid/os/Message;)V
goto :goto_8
.line 156
:pswitch_1d
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->d()V
goto :goto_8
.line 138
nop
:pswitch_data_22
.packed-switch 0x0
:pswitch_9
:pswitch_d
:pswitch_11
:pswitch_15
:pswitch_19
:pswitch_8
:pswitch_8
:pswitch_8
:pswitch_8
:pswitch_1d
.end packed-switch
.end method
.method protected onParseParam()V
.registers 5
.prologue
.line 392
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "speech_timeout"
iget v2, p0, Lcom/iflytek/thirdparty/g;->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/g;->mSpeechTimeOut:I
.line 393
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "vid"
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/g;->g:Ljava/lang/String;
.line 394
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->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/g;->j:I
.line 395
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "filter_audio_time"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;I)I
move-result v0
.line 396
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v1
const-string v2, "sample_rate"
iget v3, p0, Lcom/iflytek/thirdparty/g;->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/g;->l:I
.line 397
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/g;->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 398
invoke-super {p0}, Lcom/iflytek/thirdparty/s;->onParseParam()V
.line 399
return-void
.end method
.method public onRecordBuffer([BII)V
.registers 9
.prologue
const/4 v4, 0x2
const/4 v3, 0x0
.line 467
sget-object v0, Lcom/iflytek/thirdparty/s$b;->c:Lcom/iflytek/thirdparty/s$b;
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->getStatus()Lcom/iflytek/thirdparty/s$b;
move-result-object v1
if-eq v0, v1, :cond_b
.line 488
:cond_a
:goto_a
return-void
.line 470
:cond_b
if-lez p3, :cond_a
.line 471
iget v0, p0, Lcom/iflytek/thirdparty/g;->l:I
if-lez v0, :cond_35
.line 472
iget v0, p0, Lcom/iflytek/thirdparty/g;->l:I
if-lt v0, p3, :cond_1b
.line 473
iget v0, p0, Lcom/iflytek/thirdparty/g;->l:I
sub-int/2addr v0, p3
iput v0, p0, Lcom/iflytek/thirdparty/g;->l:I
goto :goto_a
.line 476
:cond_1b
iget v0, p0, Lcom/iflytek/thirdparty/g;->l:I
sub-int v0, p3, v0
new-array v0, v0, [B
.line 477
iget v1, p0, Lcom/iflytek/thirdparty/g;->l:I
add-int/2addr v1, p2
iget v2, p0, Lcom/iflytek/thirdparty/g;->l: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 478
invoke-virtual {p0, v4, v0}, Lcom/iflytek/thirdparty/g;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;
move-result-object v0
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/g;->sendMsg(Landroid/os/Message;)V
.line 479
iput v3, p0, Lcom/iflytek/thirdparty/g;->l:I
goto :goto_a
.line 483
:cond_35
new-array v0, p3, [B
.line 484
invoke-static {p1, p2, v0, v3, p3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 485
invoke-virtual {p0, v4, v0}, Lcom/iflytek/thirdparty/g;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;
move-result-object v0
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/g;->sendMsg(Landroid/os/Message;)V
goto :goto_a
.end method
.method public onRecordReleased()V
.registers 2
.prologue
.line 510
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->e:Lcom/iflytek/cloud/record/PcmRecorder;
if-eqz v0, :cond_d
iget-object v0, p0, Lcom/iflytek/thirdparty/g;->e:Lcom/iflytek/cloud/record/PcmRecorder;
instance-of v0, v0, Lcom/iflytek/cloud/record/a;
if-eqz v0, :cond_d
.line 513
invoke-virtual {p0}, Lcom/iflytek/thirdparty/g;->a()Z
.line 515
:cond_d
return-void
.end method
.method public onRecordStarted(Z)V
.registers 8
.prologue
.line 498
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "time cost: onRecordStarted:"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v2
iget-wide v4, p0, Lcom/iflytek/thirdparty/g;->k:J
sub-long/2addr v2, v4
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 499
return-void
.end method