SpeechTranscripter.smali

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


# static fields
.field private static sInstance:Lcom/iflytek/cloud/SpeechTranscripter;


# instance fields
.field private mTranscripter:Lcom/iflytek/cloud/speech/impl/SpeechTranscripterImpl;


# direct methods
.method static constructor <clinit>()V
    .registers 1

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

    sput-object v0, Lcom/iflytek/cloud/SpeechTranscripter;->sInstance:Lcom/iflytek/cloud/SpeechTranscripter;

    return-void
.end method

.method protected constructor <init>(Landroid/content/Context;Lcom/iflytek/cloud/InitListener;)V
    .registers 4

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

    .line 64
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/iflytek/cloud/SpeechTranscripter;->mTranscripter:Lcom/iflytek/cloud/speech/impl/SpeechTranscripterImpl;

    .line 116
    invoke-static {}, Lcom/iflytek/msc/MSC;->isLoaded()Z

    move-result v0

    if-eqz v0, :cond_13

    .line 117
    new-instance v0, Lcom/iflytek/cloud/speech/impl/SpeechTranscripterImpl;

    invoke-direct {v0, p1}, Lcom/iflytek/cloud/speech/impl/SpeechTranscripterImpl;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/iflytek/cloud/SpeechTranscripter;->mTranscripter:Lcom/iflytek/cloud/speech/impl/SpeechTranscripterImpl;

    .line 119
    :cond_13
    return-void
.end method

.method private clearOnceParameter()V
    .registers 3

    .prologue
    const/4 v1, 0x0

    .line 190
    const-string v0, "sid"

    invoke-virtual {p0, v0, v1}, Lcom/iflytek/cloud/SpeechTranscripter;->setParameter(Ljava/lang/String;Ljava/lang/String;)Z

    .line 191
    const-string v0, "spos"

    invoke-virtual {p0, v0, v1}, Lcom/iflytek/cloud/SpeechTranscripter;->setParameter(Ljava/lang/String;Ljava/lang/String;)Z

    .line 192
    const-string v0, "syncid"

    invoke-virtual {p0, v0, v1}, Lcom/iflytek/cloud/SpeechTranscripter;->setParameter(Ljava/lang/String;Ljava/lang/String;)Z

    .line 194
    return-void
.end method

.method public static declared-synchronized createTranscripter(Landroid/content/Context;Lcom/iflytek/cloud/InitListener;)Lcom/iflytek/cloud/SpeechTranscripter;
    .registers 5

    .prologue
    .line 80
    const-class v1, Lcom/iflytek/cloud/SpeechTranscripter;

    monitor-enter v1

    :try_start_3
    sget-object v2, Lcom/iflytek/cloud/SpeechTranscripter;->sSync:Ljava/lang/Object;

    monitor-enter v2
    :try_end_6
    .catchall {:try_start_3 .. :try_end_6} :catchall_25

    .line 81
    :try_start_6
    sget-object v0, Lcom/iflytek/cloud/SpeechTranscripter;->sInstance:Lcom/iflytek/cloud/SpeechTranscripter;

    if-nez v0, :cond_17

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

    move-result-object v0

    if-eqz v0, :cond_17

    .line 82
    new-instance v0, Lcom/iflytek/cloud/SpeechTranscripter;

    invoke-direct {v0, p0, p1}, Lcom/iflytek/cloud/SpeechTranscripter;-><init>(Landroid/content/Context;Lcom/iflytek/cloud/InitListener;)V

    sput-object v0, Lcom/iflytek/cloud/SpeechTranscripter;->sInstance:Lcom/iflytek/cloud/SpeechTranscripter;

    .line 84
    :cond_17
    monitor-exit v2
    :try_end_18
    .catchall {:try_start_6 .. :try_end_18} :catchall_22

    .line 86
    if-eqz p1, :cond_1e

    .line 87
    const/4 v0, 0x0

    :try_start_1b
    invoke-interface {p1, v0}, Lcom/iflytek/cloud/InitListener;->onInit(I)V

    .line 90
    :cond_1e
    sget-object v0, Lcom/iflytek/cloud/SpeechTranscripter;->sInstance:Lcom/iflytek/cloud/SpeechTranscripter;
    :try_end_20
    .catchall {:try_start_1b .. :try_end_20} :catchall_25

    monitor-exit v1

    return-object v0

    .line 84
    :catchall_22
    move-exception v0

    :try_start_23
    monitor-exit v2
    :try_end_24
    .catchall {:try_start_23 .. :try_end_24} :catchall_22

    :try_start_24
    throw v0
    :try_end_25
    .catchall {:try_start_24 .. :try_end_25} :catchall_25

    .line 80
    :catchall_25
    move-exception v0