FaceRequest.smali

.class public Lcom/iflytek/cloud/FaceRequest;
.super Lcom/iflytek/thirdparty/v;
.source "SourceFile"


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


# instance fields
.field private a:Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;

.field private b:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 2

    .prologue
    .line 63
    invoke-direct {p0}, Lcom/iflytek/thirdparty/v;-><init>()V

    .line 64
    iput-object p1, p0, Lcom/iflytek/cloud/FaceRequest;->b:Landroid/content/Context;

    .line 65
    return-void
.end method


# virtual methods
.method public cancel()V
    .registers 2

    .prologue
    .line 103
    monitor-enter p0

    .line 104
    :try_start_1
    iget-object v0, p0, Lcom/iflytek/cloud/FaceRequest;->a:Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;

    if-eqz v0, :cond_d

    .line 105
    iget-object v0, p0, Lcom/iflytek/cloud/FaceRequest;->a:Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;

    invoke-virtual {v0}, Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;->cancel()V

    .line 106
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/iflytek/cloud/FaceRequest;->a:Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;

    .line 108
    :cond_d
    monitor-exit p0

    .line 109
    return-void

    .line 108
    :catchall_f
    move-exception v0

    monitor-exit p0
    :try_end_11
    .catchall {:try_start_1 .. :try_end_11} :catchall_f

    throw v0
.end method

.method public destroy()Z
    .registers 2

    .prologue
    .line 156
    iget-object v0, p0, Lcom/iflytek/cloud/FaceRequest;->a:Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;

    invoke-virtual {v0}, Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;->destroy()Z

    move-result v0

    .line 157
    if-eqz v0, :cond_c

    .line 158
    invoke-super {p0}, Lcom/iflytek/thirdparty/v;->destroy()Z

    move-result v0

    .line 161
    :cond_c
    return v0
.end method

.method public getParameter(Ljava/lang/String;)Ljava/lang/String;
    .registers 3

    .prologue
    .line 152
    invoke-super {p0, p1}, Lcom/iflytek/thirdparty/v;->getParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public sendRequest([BLcom/iflytek/cloud/RequestListener;)I
    .registers 6

    .prologue
    .line 84
    monitor-enter p0

    .line 85
    :try_start_1
    iget-object v0, p0, Lcom/iflytek/cloud/FaceRequest;->a:Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;

    if-eqz v0, :cond_d

    .line 86
    iget-object v0, p0, Lcom/iflytek/cloud/FaceRequest;->a:Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;

    invoke-virtual {v0}, Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;->cancel()V

    .line 87
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/iflytek/cloud/FaceRequest;->a:Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;

    .line 89
    :cond_d
    new-instance v0, Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;

    iget-object v1, p0, Lcom/iflytek/cloud/FaceRequest;->b:Landroid/content/Context;

    iget-object v2, p0, Lcom/iflytek/cloud/FaceRequest;->mSessionParams:Lcom/iflytek/thirdparty/ad;

    invoke-direct {v0, v1, v2}, Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;-><init>(Landroid/content/Context;Lcom/iflytek/thirdparty/ad;)V

    iput-object v0, p0, Lcom/iflytek/cloud/FaceRequest;->a:Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;

    .line 90
    iget-object v0, p0, Lcom/iflytek/cloud/FaceRequest;->a:Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;

    new-instance v1, Lcom/iflytek/cloud/FaceRequest$a;

    invoke-direct {v1, p0, p2}, Lcom/iflytek/cloud/FaceRequest$a;-><init>(Lcom/iflytek/cloud/FaceRequest;Lcom/iflytek/cloud/RequestListener;)V

    invoke-virtual {v0, p1, v1}, Lcom/iflytek/cloud/speech/impl/FaceRequestImpl;->sendRequest([BLcom/iflytek/cloud/RequestListener;)I

    move-result v0

    monitor-exit p0

    return v0

    .line 91
    :catchall_25
    move-exception v0

    monitor-exit p0
    :try_end_27
    .catchall {:try_start_1 .. :try_end_27} :catchall_25

    throw v0
.end method

.method public setParameter(Ljava/lang/String;Ljava/lang/String;)Z
    .registers 4

    .prologue
    .line 133
    invoke-super {p0, p1, p2}, Lcom/iflytek/thirdparty/v;->setParameter(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v0

    return v0
.end method