814 lines
21 KiB
Smali
814 lines
21 KiB
Smali
.class abstract Lcom/iflytek/speech/SpeechModuleAidl;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
# interfaces
|
|
.implements Lcom/iflytek/speech/ISpeechModule;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<I::",
|
|
"Landroid/os/IInterface;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Lcom/iflytek/speech/ISpeechModule;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private mBindAction:Ljava/lang/String;
|
|
|
|
.field private mConnection:Landroid/content/ServiceConnection;
|
|
|
|
.field protected mContext:Landroid/content/Context;
|
|
|
|
.field private mInitListener:Lcom/iflytek/cloud/InitListener;
|
|
|
|
.field private mParams:Ljava/util/HashMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field protected mService:Landroid/os/IInterface;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"TI;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field protected mSynLock:Ljava/lang/Object;
|
|
|
|
.field private mUiHandler:Landroid/os/Handler;
|
|
|
|
.field private volatile userDestroy:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Lcom/iflytek/cloud/InitListener;Ljava/lang/String;)V
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
new-instance v0, Ljava/lang/Object;
|
|
|
|
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mSynLock:Ljava/lang/Object;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 12
|
|
iput-object v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mContext:Landroid/content/Context;
|
|
|
|
.line 17
|
|
iput-object v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mConnection:Landroid/content/ServiceConnection;
|
|
|
|
.line 22
|
|
iput-object v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mInitListener:Lcom/iflytek/cloud/InitListener;
|
|
|
|
.line 27
|
|
iput-object v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mBindAction:Ljava/lang/String;
|
|
|
|
.line 32
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mParams:Ljava/util/HashMap;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 34
|
|
iput-boolean v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->userDestroy:Z
|
|
|
|
.line 104
|
|
new-instance v0, Lcom/iflytek/speech/SpeechModuleAidl$2;
|
|
|
|
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, p0, v1}, Lcom/iflytek/speech/SpeechModuleAidl$2;-><init>(Lcom/iflytek/speech/SpeechModuleAidl;Landroid/os/Looper;)V
|
|
|
|
iput-object v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mUiHandler:Landroid/os/Handler;
|
|
|
|
.line 105
|
|
iput-object p1, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mContext:Landroid/content/Context;
|
|
|
|
.line 106
|
|
iput-object p2, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mInitListener:Lcom/iflytek/cloud/InitListener;
|
|
|
|
.line 107
|
|
iput-object p3, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mBindAction:Ljava/lang/String;
|
|
|
|
.line 109
|
|
invoke-direct {p0}, Lcom/iflytek/speech/SpeechModuleAidl;->bindService()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$000(Lcom/iflytek/speech/SpeechModuleAidl;Landroid/os/IBinder;)Landroid/os/IInterface;
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1}, Lcom/iflytek/speech/SpeechModuleAidl;->getService(Landroid/os/IBinder;)Landroid/os/IInterface;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic access$100(Lcom/iflytek/speech/SpeechModuleAidl;)Lcom/iflytek/cloud/InitListener;
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget-object p0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mInitListener:Lcom/iflytek/cloud/InitListener;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic access$200(Lcom/iflytek/speech/SpeechModuleAidl;)Landroid/os/Handler;
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget-object p0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mUiHandler:Landroid/os/Handler;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic access$300(Lcom/iflytek/speech/SpeechModuleAidl;)Z
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget-boolean p0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->userDestroy:Z
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method static synthetic access$400(Lcom/iflytek/speech/SpeechModuleAidl;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/iflytek/speech/SpeechModuleAidl;->bindService()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private bindService()V
|
|
.locals 4
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mContext:Landroid/content/Context;
|
|
|
|
iget-object v1, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mBindAction:Ljava/lang/String;
|
|
|
|
invoke-virtual {p0, v0, v1}, Lcom/iflytek/speech/SpeechModuleAidl;->isActionInstalled(Landroid/content/Context;Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mInitListener:Lcom/iflytek/cloud/InitListener;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 4
|
|
iget-object v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mUiHandler:Landroid/os/Handler;
|
|
|
|
const/16 v1, 0x5209
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {v0, v1, v3, v3, v2}, Landroid/os/Message;->obtain(Landroid/os/Handler;IIILjava/lang/Object;)Landroid/os/Message;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/os/Message;->sendToTarget()V
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
.line 9
|
|
:cond_1
|
|
invoke-virtual {p0}, Lcom/iflytek/speech/SpeechModuleAidl;->getIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
.line 10
|
|
iget-object v1, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mBindAction:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
const-string v1, "com.iflytek.vflynote"
|
|
|
|
.line 13
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 16
|
|
new-instance v1, Lcom/iflytek/speech/SpeechModuleAidl$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/iflytek/speech/SpeechModuleAidl$1;-><init>(Lcom/iflytek/speech/SpeechModuleAidl;)V
|
|
|
|
iput-object v1, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mConnection:Landroid/content/ServiceConnection;
|
|
|
|
.line 46
|
|
:try_start_0
|
|
iget-object v2, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mContext:Landroid/content/Context;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
invoke-virtual {v2, v0, v1, v3}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
|
|
:try_end_0
|
|
.catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
.line 48
|
|
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private getService(Landroid/os/IBinder;)Landroid/os/IInterface;
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/os/IBinder;",
|
|
")TI;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 1
|
|
:try_start_0
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getGenericSuperclass()Ljava/lang/reflect/Type;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/reflect/ParameterizedType;
|
|
|
|
.line 2
|
|
invoke-interface {v1}, Ljava/lang/reflect/ParameterizedType;->getActualTypeArguments()[Ljava/lang/reflect/Type;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
check-cast v1, Ljava/lang/Class;
|
|
|
|
.line 3
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
.line 4
|
|
invoke-virtual {p0}, Lcom/iflytek/speech/SpeechModuleAidl;->getTag()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v5, "className = "
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
.line 6
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v3, "$Stub"
|
|
|
|
invoke-virtual {v1, v3}, 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}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
:try_end_0
|
|
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_6
|
|
.catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_0} :catch_5
|
|
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_4
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_3
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_2
|
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
const-string v3, "asInterface"
|
|
|
|
const/4 v4, 0x1
|
|
|
|
:try_start_1
|
|
new-array v5, v4, [Ljava/lang/Class;
|
|
|
|
.line 7
|
|
const-class v6, Landroid/os/IBinder;
|
|
|
|
aput-object v6, v5, v2
|
|
|
|
invoke-virtual {v1, v3, v5}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v1
|
|
|
|
new-array v3, v4, [Ljava/lang/Object;
|
|
|
|
aput-object p1, v3, v2
|
|
|
|
.line 8
|
|
invoke-virtual {v1, v0, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/os/IInterface;
|
|
:try_end_1
|
|
.catch Ljava/lang/ClassNotFoundException; {:try_start_1 .. :try_end_1} :catch_6
|
|
.catch Ljava/lang/SecurityException; {:try_start_1 .. :try_end_1} :catch_5
|
|
.catch Ljava/lang/NoSuchMethodException; {:try_start_1 .. :try_end_1} :catch_4
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_1 .. :try_end_1} :catch_3
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_2
|
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_1 .. :try_end_1} :catch_1
|
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
return-object p1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 22
|
|
invoke-static {p1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_0
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
.line 23
|
|
invoke-static {p1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_0
|
|
|
|
:catch_2
|
|
move-exception p1
|
|
|
|
.line 24
|
|
invoke-static {p1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_0
|
|
|
|
:catch_3
|
|
move-exception p1
|
|
|
|
.line 25
|
|
invoke-static {p1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_0
|
|
|
|
:catch_4
|
|
move-exception p1
|
|
|
|
.line 26
|
|
invoke-static {p1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_0
|
|
|
|
:catch_5
|
|
move-exception p1
|
|
|
|
.line 27
|
|
invoke-static {p1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
|
|
|
|
goto :goto_0
|
|
|
|
:catch_6
|
|
move-exception p1
|
|
|
|
.line 28
|
|
invoke-static {p1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public destory()Z
|
|
.locals 3
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/iflytek/speech/SpeechModuleAidl;->getTag()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "destory"
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 3
|
|
:try_start_0
|
|
iput-boolean v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->userDestroy:Z
|
|
|
|
.line 4
|
|
iget-object v1, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mConnection:Landroid/content/ServiceConnection;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 5
|
|
iget-object v2, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mContext:Landroid/content/Context;
|
|
|
|
invoke-virtual {v2, v1}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 6
|
|
iput-object v1, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mConnection:Landroid/content/ServiceConnection;
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:cond_0
|
|
return v0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
.line 10
|
|
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getIntent()Landroid/content/Intent;
|
|
.locals 5
|
|
|
|
.line 1
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
|
|
|
|
.line 2
|
|
iget-object v1, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mParams:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v1}, Ljava/util/HashMap;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
.line 4
|
|
iget-object v1, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mParams:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v1}, Ljava/util/HashMap;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
.line 5
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 6
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
.line 7
|
|
iget-object v3, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mParams:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v3, v2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
goto :goto_0
|
|
|
|
.line 11
|
|
:cond_0
|
|
new-instance v1, Lcom/iflytek/cloud/b/a;
|
|
|
|
iget-object v2, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mParams:Ljava/util/HashMap;
|
|
|
|
const-string v3, "params"
|
|
|
|
invoke-virtual {v2, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-direct {v1, v2, v3}, Lcom/iflytek/cloud/b/a;-><init>(Ljava/lang/String;[[Ljava/lang/String;)V
|
|
|
|
.line 12
|
|
invoke-virtual {v1}, Lcom/iflytek/cloud/b/a;->c()Ljava/util/HashMap;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 13
|
|
invoke-virtual {v1}, Ljava/util/HashMap;->isEmpty()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
.line 14
|
|
invoke-virtual {v1}, Ljava/util/HashMap;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
.line 15
|
|
:goto_1
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
.line 16
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
.line 17
|
|
invoke-virtual {v1, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v3, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
goto :goto_1
|
|
|
|
.line 23
|
|
:cond_1
|
|
invoke-static {}, Lcom/iflytek/cloud/SpeechUtility;->getUtility()Lcom/iflytek/cloud/SpeechUtility;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "appid"
|
|
|
|
.line 25
|
|
invoke-virtual {v1, v2}, Lcom/iflytek/cloud/SpeechUtility;->getParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "caller.appid"
|
|
|
|
invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 26
|
|
iget-object v1, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mContext:Landroid/content/Context;
|
|
|
|
const-string v2, "caller.name"
|
|
|
|
invoke-static {v1, v2}, Lcom/iflytek/speech/UtilityConfig;->getCallerInfo(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 27
|
|
iget-object v1, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mContext:Landroid/content/Context;
|
|
|
|
const-string v2, "caller.pkg"
|
|
|
|
invoke-static {v1, v2}, Lcom/iflytek/speech/UtilityConfig;->getCallerInfo(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 28
|
|
iget-object v1, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mContext:Landroid/content/Context;
|
|
|
|
const-string v2, "caller.ver.name"
|
|
|
|
invoke-static {v1, v2}, Lcom/iflytek/speech/UtilityConfig;->getCallerInfo(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 29
|
|
iget-object v1, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mContext:Landroid/content/Context;
|
|
|
|
const-string v2, "caller.ver.code"
|
|
|
|
invoke-static {v1, v2}, Lcom/iflytek/speech/UtilityConfig;->getCallerInfo(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getParameter(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mParams:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/String;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method protected final getTag()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public isActionInstalled(Landroid/content/Context;Ljava/lang/String;)Z
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 1
|
|
invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 4
|
|
:cond_0
|
|
invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
|
|
|
|
move-result-object p1
|
|
|
|
.line 5
|
|
new-instance v1, Landroid/content/Intent;
|
|
|
|
invoke-direct {v1, p2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 6
|
|
invoke-virtual {p1, v1, v0}, Landroid/content/pm/PackageManager;->resolveService(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public isAvailable()Z
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mService:Landroid/os/IInterface;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public setParameter(Ljava/lang/String;Ljava/lang/String;)I
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/16 p1, 0x4e2c
|
|
|
|
return p1
|
|
|
|
.line 5
|
|
:cond_0
|
|
invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 6
|
|
iget-object p2, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mParams:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {p2, p1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
return v1
|
|
|
|
.line 10
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/iflytek/speech/SpeechModuleAidl;->mParams:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v0, p1, p2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
return v1
|
|
.end method
|