y.smali

.class public Lcom/iflytek/thirdparty/y;
.super Lcom/iflytek/thirdparty/s;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/iflytek/thirdparty/y$a;
    }
.end annotation


# instance fields
.field private a:Lcom/iflytek/cloud/SpeechListener;

.field private b:Lcom/iflytek/thirdparty/x;

.field private c:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/iflytek/thirdparty/ad;)V
    .registers 5

    .prologue
    const/4 v1, 0x0

    .line 30
    invoke-direct {p0, p1}, Lcom/iflytek/thirdparty/s;-><init>(Landroid/content/Context;)V

    .line 21
    iput-object v1, p0, Lcom/iflytek/thirdparty/y;->a:Lcom/iflytek/cloud/SpeechListener;

    .line 22
    new-instance v0, Lcom/iflytek/thirdparty/x;

    invoke-direct {v0}, Lcom/iflytek/thirdparty/x;-><init>()V

    iput-object v0, p0, Lcom/iflytek/thirdparty/y;->b:Lcom/iflytek/thirdparty/x;

    .line 23
    iput-object v1, p0, Lcom/iflytek/thirdparty/y;->c:Ljava/lang/String;

    .line 31
    invoke-virtual {p0, p2}, Lcom/iflytek/thirdparty/y;->setParams(Lcom/iflytek/thirdparty/ad;)V

    .line 32
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Lcom/iflytek/thirdparty/ad;Landroid/os/HandlerThread;)V
    .registers 6

    .prologue
    const/4 v1, 0x0

    .line 26
    invoke-direct {p0, p1, p3}, Lcom/iflytek/thirdparty/s;-><init>(Landroid/content/Context;Landroid/os/HandlerThread;)V

    .line 21
    iput-object v1, p0, Lcom/iflytek/thirdparty/y;->a:Lcom/iflytek/cloud/SpeechListener;

    .line 22
    new-instance v0, Lcom/iflytek/thirdparty/x;

    invoke-direct {v0}, Lcom/iflytek/thirdparty/x;-><init>()V

    iput-object v0, p0, Lcom/iflytek/thirdparty/y;->b:Lcom/iflytek/thirdparty/x;

    .line 23
    iput-object v1, p0, Lcom/iflytek/thirdparty/y;->c:Ljava/lang/String;

    .line 27
    invoke-virtual {p0, p2}, Lcom/iflytek/thirdparty/y;->setParams(Lcom/iflytek/thirdparty/ad;)V

    .line 28
    return-void
.end method


# virtual methods
.method public a(Ljava/lang/String;Ljava/lang/String;)Lcom/iflytek/cloud/SpeechError;
    .registers 7

    .prologue
    .line 82
    const-string v0, "auth"

    iput-object v0, p0, Lcom/iflytek/thirdparty/y;->c:Ljava/lang/String;

    .line 83
    const/4 v0, 0x0

    .line 86
    :try_start_5
    iget-object v1, p0, Lcom/iflytek/thirdparty/y;->mContext:Landroid/content/Context;

    invoke-static {v1, p1, p2, p0}, Lcom/iflytek/thirdparty/x;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Lcom/iflytek/thirdparty/s;)V
    :try_end_a
    .catch Lcom/iflytek/cloud/SpeechError; {:try_start_5 .. :try_end_a} :catch_2f
    .catch Ljava/io/IOException; {:try_start_5 .. :try_end_a} :catch_59
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_a} :catch_8a
    .catchall {:try_start_5 .. :try_end_a} :catchall_bc

    .line 104
    if-eqz v0, :cond_2e

    .line 106
    new-instance v1, Ljava/lang/StringBuilder;

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

    invoke-virtual {p0}, Lcom/iflytek/thirdparty/y;->getTag()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " occur Error = "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v0}, Lcom/iflytek/cloud/SpeechError;->toString()Ljava/lang/String;

    move-result-object v2

    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 {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V

    .line 109
    :cond_2e
    :goto_2e
    return-object v0

    .line 88
    :catch_2f
    move-exception v1

    .line 90
    :try_start_30
    invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
    :try_end_33
    .catchall {:try_start_30 .. :try_end_33} :catchall_bc

    .line 104
    if-eqz v1, :cond_e8

    .line 106
    new-instance v0, Ljava/lang/StringBuilder;

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

    invoke-virtual {p0}, Lcom/iflytek/thirdparty/y;->getTag()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, " occur Error = "

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v1}, Lcom/iflytek/cloud/SpeechError;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)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

    move-object v0, v1

    goto :goto_2e

    .line 93
    :catch_59
    move-exception v1

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

    .line 96
    new-instance v1, Lcom/iflytek/cloud/SpeechError;

    const/16 v2, 0x4e2a

    invoke-direct {v1, v2}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
    :try_end_64
    .catchall {:try_start_5a .. :try_end_64} :catchall_bc

    .line 104
    if-eqz v1, :cond_e5

    .line 106
    new-instance v0, Ljava/lang/StringBuilder;

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

    invoke-virtual {p0}, Lcom/iflytek/thirdparty/y;->getTag()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, " occur Error = "

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v1}, Lcom/iflytek/cloud/SpeechError;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)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

    move-object v0, v1

    goto :goto_2e

    .line 98
    :catch_8a
    move-exception v1

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

    .line 101
    new-instance v1, Lcom/iflytek/cloud/SpeechError;

    const/16 v2, 0x520b

    invoke-direct {v1, v2}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
    :try_end_95
    .catchall {:try_start_8b .. :try_end_95} :catchall_bc

    .line 104
    if-eqz v1, :cond_e2

    .line 106
    new-instance v0, Ljava/lang/StringBuilder;

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

    invoke-virtual {p0}, Lcom/iflytek/thirdparty/y;->getTag()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, " occur Error = "

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v1}, Lcom/iflytek/cloud/SpeechError;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)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

    move-object v0, v1

    goto/16 :goto_2e

    .line 104
    :catchall_bc
    move-exception v1

    if-eqz v0, :cond_e1

    .line 106
    new-instance v2, Ljava/lang/StringBuilder;

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

    invoke-virtual {p0}, Lcom/iflytek/thirdparty/y;->getTag()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " occur Error = "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v0}, Lcom/iflytek/cloud/SpeechError;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)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 108
    :cond_e1
    throw v1

    :cond_e2
    move-object v0, v1

    goto/16 :goto_2e

    :cond_e5
    move-object v0, v1

    goto/16 :goto_2e

    :cond_e8
    move-object v0, v1

    goto/16 :goto_2e
.end method

.method public a(Lcom/iflytek/cloud/SpeechListener;)V
    .registers 3

    .prologue
    .line 39
    iput-object p1, p0, Lcom/iflytek/thirdparty/y;->a:Lcom/iflytek/cloud/SpeechListener;

    .line 40
    const/16 v0, 0xb

    invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/y;->sendMsg(I)V

    .line 41
    return-void
.end method

.method public a(Lcom/iflytek/cloud/SpeechListener;Ljava/lang/String;)V
    .registers 4

    .prologue
    .line 48
    sget-object v0, Lcom/iflytek/thirdparty/s$b;->b:Lcom/iflytek/thirdparty/s$b;

    invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/y;->setStatus(Lcom/iflytek/thirdparty/s$b;)V

    .line 49
    const-string v0, "sch"

    iput-object v0, p0, Lcom/iflytek/thirdparty/y;->c:Ljava/lang/String;

    .line 50
    iput-object p1, p0, Lcom/iflytek/thirdparty/y;->a:Lcom/iflytek/cloud/SpeechListener;

    .line 59
    const/16 v0, 0xc

    invoke-virtual {p0, v0, p2}, Lcom/iflytek/thirdparty/y;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;

    move-result-object v0

    .line 60
    invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/y;->sendMsg(Landroid/os/Message;)V

    .line 61
    return-void
.end method

.method public a(Lcom/iflytek/cloud/SpeechListener;Ljava/lang/String;[B)V
    .registers 6

    .prologue
    .line 70
    const-string v0, "uup"

    iput-object v0, p0, Lcom/iflytek/thirdparty/y;->c:Ljava/lang/String;

    .line 71
    iput-object p1, p0, Lcom/iflytek/thirdparty/y;->a:Lcom/iflytek/cloud/SpeechListener;

    .line 72
    new-instance v0, Lcom/iflytek/thirdparty/y$a;

    invoke-direct {v0, p0, p3, p2}, Lcom/iflytek/thirdparty/y$a;-><init>(Lcom/iflytek/thirdparty/y;[BLjava/lang/String;)V

    .line 73
    const/16 v1, 0xa

    invoke-virtual {p0, v1, v0}, Lcom/iflytek/thirdparty/y;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;

    move-result-object v0

    .line 74
    invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/y;->sendMsg(Landroid/os/Message;)V

    .line 75
    return-void
.end method

.method public getClientID()Ljava/lang/String;
    .registers 2

    .prologue
    .line 173
    const/4 v0, 0x0

    return-object v0
.end method

.method public getSessionID()Ljava/lang/String;
    .registers 2

    .prologue
    .line 213
    const/4 v0, 0x0

    return-object v0
.end method

.method protected onEnd(Lcom/iflytek/cloud/SpeechError;)V
    .registers 3

    .prologue
    .line 160
    invoke-super {p0, p1}, Lcom/iflytek/thirdparty/s;->onEnd(Lcom/iflytek/cloud/SpeechError;)V

    .line 161
    iget-object v0, p0, Lcom/iflytek/thirdparty/y;->a:Lcom/iflytek/cloud/SpeechListener;

    if-eqz v0, :cond_10

    .line 163
    iget-boolean v0, p0, Lcom/iflytek/thirdparty/y;->mUserCancel:Z

    if-nez v0, :cond_10

    .line 164
    iget-object v0, p0, Lcom/iflytek/thirdparty/y;->a:Lcom/iflytek/cloud/SpeechListener;

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

    .line 168
    :cond_10
    return-void
.end method

.method protected onMsgProcess(Landroid/os/Message;)V
    .registers 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Throwable;,
            Lcom/iflytek/cloud/SpeechError;
        }
    .end annotation

    .prologue
    const/4 v1, 0x0

    const/16 v3, 0x4e29

    .line 117
    invoke-super {p0, p1}, Lcom/iflytek/thirdparty/s;->onMsgProcess(Landroid/os/Message;)V

    .line 119
    invoke-static {}, Lcom/iflytek/cloud/SpeechUtility;->getUtility()Lcom/iflytek/cloud/SpeechUtility;

    move-result-object v0

    if-nez v0, :cond_1c

    .line 120
    const-string v0, "MscCommon process while utility is null!"

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

    .line 121
    new-instance v0, Lcom/iflytek/cloud/SpeechError;

    const/16 v1, 0x4e2f

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

    invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/y;->exit(Lcom/iflytek/cloud/SpeechError;)V

    .line 157
    :goto_1b
    return-void

    .line 126
    :cond_1c
    iget v0, p1, Landroid/os/Message;->what:I

    packed-switch v0, :pswitch_data_8c

    move-object v0, v1

    .line 148
    :goto_22
    if-nez v0, :cond_7b

    .line 149
    new-instance v0, Lcom/iflytek/cloud/SpeechError;

    const/16 v1, 0x4e24

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

    throw v0

    .line 129
    :pswitch_2c
    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Lcom/iflytek/thirdparty/y$a;

    .line 130
    invoke-virtual {v0}, Lcom/iflytek/thirdparty/y$a;->a()[B

    move-result-object v2

    if-eqz v2, :cond_3d

    invoke-virtual {v0}, Lcom/iflytek/thirdparty/y$a;->a()[B

    move-result-object v2

    array-length v2, v2

    if-gtz v2, :cond_43

    .line 131
    :cond_3d
    new-instance v0, Lcom/iflytek/cloud/SpeechError;

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

    throw v0

    .line 132
    :cond_43
    iget-object v2, p0, Lcom/iflytek/thirdparty/y;->b:Lcom/iflytek/thirdparty/x;

    iget-object v3, p0, Lcom/iflytek/thirdparty/y;->mContext:Landroid/content/Context;

    invoke-virtual {v0}, Lcom/iflytek/thirdparty/y$a;->b()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v0}, Lcom/iflytek/thirdparty/y$a;->a()[B

    move-result-object v0

    invoke-virtual {v2, v3, v4, v0, p0}, Lcom/iflytek/thirdparty/x;->a(Landroid/content/Context;Ljava/lang/String;[BLcom/iflytek/thirdparty/s;)[B

    move-result-object v0

    goto :goto_22

    .line 135
    :pswitch_54
    iget-object v0, p0, Lcom/iflytek/thirdparty/y;->b:Lcom/iflytek/thirdparty/x;

    iget-object v2, p0, Lcom/iflytek/thirdparty/y;->mContext:Landroid/content/Context;

    invoke-virtual {v0, v2, p0}, Lcom/iflytek/thirdparty/x;->a(Landroid/content/Context;Lcom/iflytek/thirdparty/s;)[B

    move-result-object v0

    goto :goto_22

    .line 138
    :pswitch_5d
    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Ljava/lang/String;

    .line 139
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_6d

    .line 140
    new-instance v0, Lcom/iflytek/cloud/SpeechError;

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

    throw v0

    .line 141
    :cond_6d
    sget-object v2, Lcom/iflytek/thirdparty/s$b;->d:Lcom/iflytek/thirdparty/s$b;

    invoke-virtual {p0, v2}, Lcom/iflytek/thirdparty/y;->setStatus(Lcom/iflytek/thirdparty/s$b;)V

    .line 142
    iget-object v2, p0, Lcom/iflytek/thirdparty/y;->b:Lcom/iflytek/thirdparty/x;

    iget-object v3, p0, Lcom/iflytek/thirdparty/y;->mContext:Landroid/content/Context;

    invoke-virtual {v2, v3, p0, v0}, Lcom/iflytek/thirdparty/x;->a(Landroid/content/Context;Lcom/iflytek/thirdparty/s;Ljava/lang/String;)[B

    move-result-object v0

    goto :goto_22

    .line 150
    :cond_7b
    iget-object v2, p0, Lcom/iflytek/thirdparty/y;->a:Lcom/iflytek/cloud/SpeechListener;

    if-eqz v2, :cond_88

    .line 152
    iget-boolean v2, p0, Lcom/iflytek/thirdparty/y;->mUserCancel:Z

    if-nez v2, :cond_88

    .line 153
    iget-object v2, p0, Lcom/iflytek/thirdparty/y;->a:Lcom/iflytek/cloud/SpeechListener;

    invoke-interface {v2, v0}, Lcom/iflytek/cloud/SpeechListener;->onBufferReceived([B)V

    .line 156
    :cond_88
    invoke-virtual {p0, v1}, Lcom/iflytek/thirdparty/y;->exit(Lcom/iflytek/cloud/SpeechError;)V

    goto :goto_1b

    .line 126
    :pswitch_data_8c
    .packed-switch 0xa
        :pswitch_2c
        :pswitch_54
        :pswitch_5d
    .end packed-switch
.end method