2026-07-06 19:54:44 +08:00

168 lines
3.5 KiB
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
.locals 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const-string v0, ""
.line 2
iput-object v0, p0, Lcom/iflytek/speech/SpeechComponent;->mPackageName:Ljava/lang/String;
.line 7
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;
if-eqz p1, :cond_0
.line 16
iput-object p1, p0, Lcom/iflytek/speech/SpeechComponent;->mPackageName:Ljava/lang/String;
:cond_0
return-void
.end method
# virtual methods
.method public addEngine(Ljava/lang/String;)V
.locals 1
.line 1
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_0
.line 2
iget-object v0, p0, Lcom/iflytek/speech/SpeechComponent;->mEngines:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
:cond_0
return-void
.end method
.method public getEngines()Ljava/util/ArrayList;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/ArrayList<",
"Ljava/lang/String;",
">;"
}
.end annotation
.line 1
iget-object v0, p0, Lcom/iflytek/speech/SpeechComponent;->mEngines:Ljava/util/ArrayList;
return-object v0
.end method
.method public getPackageName()Ljava/lang/String;
.locals 1
.line 1
iget-object v0, p0, Lcom/iflytek/speech/SpeechComponent;->mPackageName:Ljava/lang/String;
return-object v0
.end method
.method public isEngineAvaible(Ljava/lang/String;)Z
.locals 3
.line 1
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
const/4 v1, 0x0
if-eqz v0, :cond_0
return v1
.line 4
:cond_0
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_1
return v1
.line 8
:cond_1
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 v0
:cond_2
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_3
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/String;
.line 11
:try_start_0
invoke-virtual {v2, p1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v2
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
if-eqz v2, :cond_2
const/4 p1, 0x1
return p1
:catch_0
move-exception v2
.line 15
invoke-static {v2}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
goto :goto_0
:cond_3
return v1
.end method