SpeechComponent.smali
.class public final Lcom/iflytek/speech/SpeechComponent;
.super Ljava/lang/Object;
.source "SourceFile"
# instance fields
.field private mEngines:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
.field private mPackageName:Ljava/lang/String;
# direct methods
.method public constructor <init>(Ljava/lang/String;)V
.registers 3
.prologue
.line 30
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 19
const-string v0, ""
iput-object v0, p0, Lcom/iflytek/speech/SpeechComponent;->mPackageName:Ljava/lang/String;
.line 24
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/iflytek/speech/SpeechComponent;->mEngines:Ljava/util/ArrayList;
.line 31
if-eqz p1, :cond_12
.line 32
iput-object p1, p0, Lcom/iflytek/speech/SpeechComponent;->mPackageName:Ljava/lang/String;
.line 34
:cond_12
return-void
.end method
# virtual methods
.method public addEngine(Ljava/lang/String;)V
.registers 3
.prologue
.line 57
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_b
.line 58
iget-object v0, p0, Lcom/iflytek/speech/SpeechComponent;->mEngines:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 60
:cond_b
return-void
.end method
.method public getEngines()Ljava/util/ArrayList;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/ArrayList",
"<",
"Ljava/lang/String;",
">;"
}
.end annotation
.prologue
.line 49
iget-object v0, p0, Lcom/iflytek/speech/SpeechComponent;->mEngines:Ljava/util/ArrayList;
return-object v0
.end method
.method public getPackageName()Ljava/lang/String;
.registers 2
.prologue
.line 41
iget-object v0, p0, Lcom/iflytek/speech/SpeechComponent;->mPackageName:Ljava/lang/String;
return-object v0
.end method
.method public isEngineAvaible(Ljava/lang/String;)Z
.registers 5
.prologue
const/4 v1, 0x0
.line 68
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_9
move v0, v1
.line 85
:goto_8
return v0
.line 71
:cond_9
iget-object v0, p0, Lcom/iflytek/speech/SpeechComponent;->mEngines:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
if-nez v0, :cond_13
move v0, v1
.line 72
goto :goto_8
.line 75
:cond_13
iget-object v0, p0, Lcom/iflytek/speech/SpeechComponent;->mEngines:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_19
:goto_19
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_32
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
.line 78
:try_start_25
invoke-virtual {v0, p1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
:try_end_28
.catch Ljava/lang/Exception; {:try_start_25 .. :try_end_28} :catch_2d
move-result v0
if-eqz v0, :cond_19
.line 79
const/4 v0, 0x1
goto :goto_8
.line 81
:catch_2d
move-exception v0
.line 82
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
goto :goto_19
:cond_32
move v0, v1
.line 85
goto :goto_8
.end method