ab$4.smali

.class Lcom/iflytek/thirdparty/ab$4;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Lcom/iflytek/thirdparty/aa;


# instance fields
.field final synthetic a:Ljava/lang/String;

.field final synthetic b:Lcom/iflytek/thirdparty/ab;


# direct methods
.method constructor <init>(Lcom/iflytek/thirdparty/ab;Ljava/lang/String;)V
    .registers 3

    .prologue
    .line 543
    iput-object p1, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    iput-object p2, p0, Lcom/iflytek/thirdparty/ab$4;->a:Ljava/lang/String;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Lcom/iflytek/cloud/SpeechError;)V
    .registers 4

    .prologue
    .line 548
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->j(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/SynthesizerListener;

    move-result-object v0

    if-eqz v0, :cond_1e

    if-eqz p1, :cond_1e

    .line 550
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->k(Lcom/iflytek/thirdparty/ab;)Z

    move-result v0

    if-eqz v0, :cond_1f

    .line 551
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    iget-object v0, v0, Lcom/iflytek/thirdparty/ab;->e:Landroid/os/Handler;

    const/4 v1, 0x6

    invoke-static {v0, v1, p1}, Landroid/os/Message;->obtain(Landroid/os/Handler;ILjava/lang/Object;)Landroid/os/Message;

    move-result-object v0

    invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V

    .line 557
    :cond_1e
    :goto_1e
    return-void

    .line 553
    :cond_1f
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->j(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/SynthesizerListener;

    move-result-object v0

    invoke-interface {v0, p1}, Lcom/iflytek/cloud/SynthesizerListener;->onCompleted(Lcom/iflytek/cloud/SpeechError;)V

    goto :goto_1e
.end method

.method public a(Ljava/util/ArrayList;IIILjava/lang/String;)V
    .registers 15
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<[B>;III",
            "Ljava/lang/String;",
            ")V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/iflytek/cloud/SpeechError;
        }
    .end annotation

    .prologue
    const/16 v8, 0x4e2a

    const/4 v7, 0x6

    const/4 v6, 0x1

    const/4 v3, 0x0

    const/4 v2, 0x0

    .line 563
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->l(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/thirdparty/s;

    move-result-object v0

    if-eqz v0, :cond_73

    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->m(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/thirdparty/s;

    move-result-object v0

    invoke-virtual {v0}, Lcom/iflytek/thirdparty/s;->getParam()Lcom/iflytek/thirdparty/ad;

    move-result-object v0

    const-string v1, "tts_data_notify"

    invoke-virtual {v0, v1, v2}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Z)Z

    move-result v0

    if-eqz v0, :cond_73

    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    .line 564
    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->j(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/SynthesizerListener;

    move-result-object v0

    if-eqz v0, :cond_73

    if-eqz p1, :cond_73

    move v1, v2

    .line 566
    :goto_2b
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ge v1, v0, :cond_73

    .line 568
    invoke-virtual {p1, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [B

    .line 569
    new-instance v4, Landroid/os/Bundle;

    invoke-direct {v4}, Landroid/os/Bundle;-><init>()V

    .line 570
    const-string v5, "buffer"

    invoke-virtual {v4, v5, v0}, Landroid/os/Bundle;->putByteArray(Ljava/lang/String;[B)V

    .line 571
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->k(Lcom/iflytek/thirdparty/ab;)Z

    move-result v0

    if-eqz v0, :cond_67

    .line 573
    invoke-static {}, Landroid/os/Message;->obtain()Landroid/os/Message;

    move-result-object v0

    .line 574
    const/16 v5, 0x5209

    iput v5, v0, Landroid/os/Message;->what:I

    .line 575
    iput v2, v0, Landroid/os/Message;->arg1:I

    .line 576
    iput v2, v0, Landroid/os/Message;->arg2:I

    .line 577
    iput-object v4, v0, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 578
    iget-object v4, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    iget-object v4, v4, Lcom/iflytek/thirdparty/ab;->e:Landroid/os/Handler;

    const/4 v5, 0x7

    invoke-static {v4, v5, v2, v2, v0}, Landroid/os/Message;->obtain(Landroid/os/Handler;IIILjava/lang/Object;)Landroid/os/Message;

    move-result-object v0

    invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V

    .line 566
    :goto_63
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_2b

    .line 581
    :cond_67
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->j(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/SynthesizerListener;

    move-result-object v0

    const/16 v5, 0x5209

    invoke-interface {v0, v5, v2, v2, v4}, Lcom/iflytek/cloud/SynthesizerListener;->onEvent(IIILandroid/os/Bundle;)V

    goto :goto_63

    .line 587
    :cond_73
    :try_start_73
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->c(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/record/b;

    move-result-object v0

    invoke-virtual {v0, p1, p2, p3, p4}, Lcom/iflytek/cloud/record/b;->a(Ljava/util/ArrayList;III)V

    .line 589
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->j(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/SynthesizerListener;

    move-result-object v0

    if-eqz v0, :cond_b1

    .line 591
    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    .line 592
    const-string v1, "percent"

    invoke-virtual {v0, v1, p2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 593
    const-string v1, "begpos"

    invoke-virtual {v0, v1, p3}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 594
    const-string v1, "endpos"

    invoke-virtual {v0, v1, p4}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 595
    const-string v1, "spellinfo"

    invoke-virtual {v0, v1, p5}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 596
    iget-object v1, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v1}, Lcom/iflytek/thirdparty/ab;->k(Lcom/iflytek/thirdparty/ab;)Z

    move-result v1

    if-eqz v1, :cond_131

    .line 597
    iget-object v1, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    iget-object v1, v1, Lcom/iflytek/thirdparty/ab;->e:Landroid/os/Handler;

    const/4 v4, 0x2

    invoke-static {v1, v4, v0}, Landroid/os/Message;->obtain(Landroid/os/Handler;ILjava/lang/Object;)Landroid/os/Message;

    move-result-object v0

    invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V

    .line 604
    :cond_b1
    :goto_b1
    const/16 v0, 0x64

    if-lt p2, v0, :cond_130

    .line 606
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->n(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/thirdparty/s;

    move-result-object v0

    if-eqz v0, :cond_13c

    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->o(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/thirdparty/s;

    move-result-object v0

    invoke-virtual {v0}, Lcom/iflytek/thirdparty/s;->getParam()Lcom/iflytek/thirdparty/ad;

    move-result-object v0

    const-string v1, "tts_data_notify"

    const/4 v4, 0x0

    invoke-virtual {v0, v1, v4}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Z)Z

    move-result v0

    if-eqz v0, :cond_13c

    .line 609
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->p(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/thirdparty/s;

    move-result-object v0

    invoke-virtual {v0}, Lcom/iflytek/thirdparty/s;->getParam()Lcom/iflytek/thirdparty/ad;

    move-result-object v0

    const-string v1, "audio_format"

    const/4 v3, 0x0

    invoke-virtual {v0, v1, v3}, Lcom/iflytek/thirdparty/ad;->b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 611
    iget-object v1, p0, Lcom/iflytek/thirdparty/ab$4;->a:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_17b

    iget-object v1, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v1}, Lcom/iflytek/thirdparty/ab;->c(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/record/b;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/iflytek/cloud/record/b;->a(Ljava/lang/String;)Z

    move-result v0

    if-eq v0, v6, :cond_17b

    .line 613
    new-instance v0, Ljava/io/IOException;

    invoke-direct {v0}, Ljava/io/IOException;-><init>()V

    throw v0
    :try_end_fb
    .catch Ljava/io/IOException; {:try_start_73 .. :try_end_fb} :catch_fb

    .line 644
    :catch_fb
    move-exception v0

    .line 645
    invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V

    .line 647
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->j(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/SynthesizerListener;

    move-result-object v0

    if-eqz v0, :cond_11f

    .line 649
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->k(Lcom/iflytek/thirdparty/ab;)Z

    move-result v0

    if-eqz v0, :cond_1a4

    .line 650
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    iget-object v0, v0, Lcom/iflytek/thirdparty/ab;->e:Landroid/os/Handler;

    new-instance v1, Lcom/iflytek/cloud/SpeechError;

    invoke-direct {v1, v8}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V

    invoke-static {v0, v7, v1}, Landroid/os/Message;->obtain(Landroid/os/Handler;ILjava/lang/Object;)Landroid/os/Message;

    move-result-object v0

    invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V

    .line 663
    :cond_11f
    :goto_11f
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->s(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/thirdparty/s;

    move-result-object v0

    if-eqz v0, :cond_130

    .line 665
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->t(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/thirdparty/s;

    move-result-object v0

    invoke-virtual {v0, v2}, Lcom/iflytek/thirdparty/s;->cancel(Z)V

    .line 669
    :cond_130
    :goto_130
    return-void

    .line 600
    :cond_131
    :try_start_131
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->j(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/SynthesizerListener;

    move-result-object v0

    invoke-interface {v0, p2, p3, p4, p5}, Lcom/iflytek/cloud/SynthesizerListener;->onBufferProgress(IIILjava/lang/String;)V

    goto/16 :goto_b1

    .line 619
    :cond_13c
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->q(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/thirdparty/s;

    move-result-object v0

    if-eqz v0, :cond_1b9

    .line 621
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->r(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/thirdparty/s;

    move-result-object v0

    invoke-virtual {v0}, Lcom/iflytek/thirdparty/s;->getParam()Lcom/iflytek/thirdparty/ad;

    move-result-object v0

    const-string v1, "audio_format"

    const/4 v3, 0x0

    invoke-virtual {v0, v1, v3}, Lcom/iflytek/thirdparty/ad;->b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 623
    :goto_155
    iget-object v1, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v1}, Lcom/iflytek/thirdparty/ab;->c(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/record/b;

    move-result-object v1

    invoke-virtual {v1}, Lcom/iflytek/cloud/record/b;->c()I

    move-result v1

    if-nez v1, :cond_169

    .line 625
    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 629
    :cond_169
    iget-object v1, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v1}, Lcom/iflytek/thirdparty/ab;->c(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/record/b;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/iflytek/cloud/record/b;->a(Ljava/lang/String;)Z

    move-result v0

    if-eq v0, v6, :cond_17b

    .line 631
    new-instance v0, Ljava/io/IOException;

    invoke-direct {v0}, Ljava/io/IOException;-><init>()V

    throw v0

    .line 634
    :cond_17b
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->j(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/SynthesizerListener;

    move-result-object v0

    if-eqz v0, :cond_130

    .line 636
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->k(Lcom/iflytek/thirdparty/ab;)Z

    move-result v0

    if-eqz v0, :cond_199

    .line 638
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    iget-object v0, v0, Lcom/iflytek/thirdparty/ab;->e:Landroid/os/Handler;

    const/4 v1, 0x6

    const/4 v3, 0x0

    invoke-static {v0, v1, v3}, Landroid/os/Message;->obtain(Landroid/os/Handler;ILjava/lang/Object;)Landroid/os/Message;

    move-result-object v0

    invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V

    goto :goto_130

    .line 640
    :cond_199
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->j(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/SynthesizerListener;

    move-result-object v0

    const/4 v1, 0x0

    invoke-interface {v0, v1}, Lcom/iflytek/cloud/SynthesizerListener;->onCompleted(Lcom/iflytek/cloud/SpeechError;)V
    :try_end_1a3
    .catch Ljava/io/IOException; {:try_start_131 .. :try_end_1a3} :catch_fb

    goto :goto_130

    .line 653
    :cond_1a4
    :try_start_1a4
    iget-object v0, p0, Lcom/iflytek/thirdparty/ab$4;->b:Lcom/iflytek/thirdparty/ab;

    invoke-static {v0}, Lcom/iflytek/thirdparty/ab;->j(Lcom/iflytek/thirdparty/ab;)Lcom/iflytek/cloud/SynthesizerListener;

    move-result-object v0

    new-instance v1, Lcom/iflytek/cloud/SpeechError;

    const/16 v3, 0x4e2a

    invoke-direct {v1, v3}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V

    invoke-interface {v0, v1}, Lcom/iflytek/cloud/SynthesizerListener;->onCompleted(Lcom/iflytek/cloud/SpeechError;)V
    :try_end_1b4
    .catch Ljava/lang/Exception; {:try_start_1a4 .. :try_end_1b4} :catch_1b6

    goto/16 :goto_11f

    .line 654
    :catch_1b6
    move-exception v0

    goto/16 :goto_11f

    :cond_1b9
    move-object v0, v3

    goto :goto_155
.end method