n$b$1.smali
.class Lcom/iflytek/thirdparty/n$b$1;
.super Ljava/lang/Thread;
.source "SourceFile"
# instance fields
.field final synthetic a:Lcom/iflytek/thirdparty/n$b;
# direct methods
.method constructor <init>(Lcom/iflytek/thirdparty/n$b;Ljava/lang/String;)V
.registers 3
.prologue
.line 1034
iput-object p1, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-direct {p0, p2}, Ljava/lang/Thread;-><init>(Ljava/lang/String;)V
return-void
.end method
# virtual methods
.method public run()V
.registers 14
.prologue
const v11, 0x3a98000
const/16 v10, 0x5207
const/4 v2, 0x0
const/4 v4, 0x0
.line 1037
const-string v0, "alsa data save thread enter"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 1047
:try_start_c
new-instance v3, Landroid/os/MemoryFile;
const/4 v0, 0x0
const v1, 0x3b15000
invoke-direct {v3, v0, v1}, Landroid/os/MemoryFile;-><init>(Ljava/lang/String;I)V
:try_end_15
.catch Ljava/lang/Throwable; {:try_start_c .. :try_end_15} :catch_177
.line 1048
const/4 v0, 0x0
:try_start_16
invoke-virtual {v3, v0}, Landroid/os/MemoryFile;->allowPurging(Z)Z
move v6, v4
move v0, v4
.line 1052
:goto_1b
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v1}, Lcom/iflytek/thirdparty/n$b;->a(Lcom/iflytek/thirdparty/n$b;)Z
move-result v1
if-eqz v1, :cond_c6
.line 1053
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v1}, Lcom/iflytek/thirdparty/n$b;->b(Lcom/iflytek/thirdparty/n$b;)Lcom/iflytek/thirdparty/p;
move-result-object v7
monitor-enter v7
:try_end_2a
.catch Ljava/lang/Throwable; {:try_start_16 .. :try_end_2a} :catch_6d
move v5, v0
.line 1054
:goto_2b
:try_start_2b
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v0}, Lcom/iflytek/thirdparty/n$b;->b(Lcom/iflytek/thirdparty/n$b;)Lcom/iflytek/thirdparty/p;
move-result-object v0
invoke-virtual {v0}, Lcom/iflytek/thirdparty/p;->e()Z
move-result v0
if-nez v0, :cond_a0
.line 1055
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v0}, Lcom/iflytek/thirdparty/n$b;->b(Lcom/iflytek/thirdparty/n$b;)Lcom/iflytek/thirdparty/p;
move-result-object v0
invoke-virtual {v0}, Lcom/iflytek/thirdparty/p;->f()Lcom/iflytek/thirdparty/p$a;
move-result-object v8
.line 1056
invoke-virtual {v8}, Lcom/iflytek/thirdparty/p$a;->getKey()Ljava/lang/Object;
move-result-object v0
check-cast v0, [B
const/4 v9, 0x0
invoke-virtual {v8}, Lcom/iflytek/thirdparty/p$a;->getValue()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/Integer;
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
move-result v1
invoke-virtual {v3, v0, v9, v5, v1}, Landroid/os/MemoryFile;->writeBytes([BIII)V
.line 1057
invoke-virtual {v8}, Lcom/iflytek/thirdparty/p$a;->getValue()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Integer;
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
move-result v0
add-int/2addr v5, v0
.line 1058
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v0}, Lcom/iflytek/thirdparty/n$b;->b(Lcom/iflytek/thirdparty/n$b;)Lcom/iflytek/thirdparty/p;
move-result-object v0
invoke-virtual {v0, v8}, Lcom/iflytek/thirdparty/p;->a(Lcom/iflytek/thirdparty/p$a;)V
goto :goto_2b
.line 1062
:catchall_6a
move-exception v0
monitor-exit v7
:try_end_6c
.catchall {:try_start_2b .. :try_end_6c} :catchall_6a
:try_start_6c
throw v0
:try_end_6d
.catch Ljava/lang/Throwable; {:try_start_6c .. :try_end_6d} :catch_6d
.line 1111
:catch_6d
move-exception v0
move-object v1, v2
.line 1112
:goto_6f
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
.line 1113
const-string v4, "\u4fdd\u5b58\u6587\u4ef6\u5931\u8d25\uff01"
invoke-static {v4}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/String;)V
.line 1114
new-instance v4, Lcom/iflytek/cloud/SpeechError;
invoke-direct {v4, v0, v10}, Lcom/iflytek/cloud/SpeechError;-><init>(Ljava/lang/Throwable;I)V
move-object v0, v1
move-object v1, v4
.line 1118
:cond_7e
:goto_7e
if-eqz v3, :cond_83
.line 1119
:try_start_80
invoke-virtual {v3}, Landroid/os/MemoryFile;->close()V
.line 1122
:cond_83
if-eqz v0, :cond_88
.line 1123
invoke-virtual {v0}, Ljava/io/RandomAccessFile;->close()V
:try_end_88
.catch Ljava/lang/Throwable; {:try_start_80 .. :try_end_88} :catch_16c
.line 1130
:cond_88
:goto_88
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v0, v2}, Lcom/iflytek/thirdparty/n$b;->a(Lcom/iflytek/thirdparty/n$b;Ljava/lang/Thread;)Ljava/lang/Thread;
.line 1132
if-eqz v1, :cond_9a
.line 1133
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
iget-object v0, v0, Lcom/iflytek/thirdparty/n$b;->a:Lcom/iflytek/thirdparty/n;
invoke-static {v0}, Lcom/iflytek/thirdparty/n;->c(Lcom/iflytek/thirdparty/n;)Lcom/iflytek/thirdparty/n$a;
move-result-object v0
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/n$a;->a(Lcom/iflytek/cloud/SpeechError;)V
.line 1136
:cond_9a
const-string v0, "alsa data save thread exit"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 1137
return-void
.line 1061
:cond_a0
:try_start_a0
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v0}, Lcom/iflytek/thirdparty/n$b;->b(Lcom/iflytek/thirdparty/n$b;)Lcom/iflytek/thirdparty/p;
move-result-object v0
invoke-virtual {v0}, Lcom/iflytek/thirdparty/p;->d()V
.line 1062
monitor-exit v7
:try_end_aa
.catchall {:try_start_a0 .. :try_end_aa} :catchall_6a
.line 1064
if-gt v11, v5, :cond_182
.line 1066
const/4 v0, 0x1
move v1, v4
.line 1071
:goto_ae
:try_start_ae
monitor-enter p0
:try_end_af
.catch Ljava/lang/Throwable; {:try_start_ae .. :try_end_af} :catch_6d
.line 1072
:try_start_af
iget-object v5, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v5}, Lcom/iflytek/thirdparty/n$b;->b(Lcom/iflytek/thirdparty/n$b;)Lcom/iflytek/thirdparty/p;
move-result-object v5
invoke-virtual {v5}, Lcom/iflytek/thirdparty/p;->e()Z
move-result v5
if-eqz v5, :cond_be
.line 1074
invoke-virtual {p0}, Ljava/lang/Object;->wait()V
.line 1079
:cond_be
monitor-exit p0
move v6, v0
move v0, v1
goto/16 :goto_1b
:catchall_c3
move-exception v0
monitor-exit p0
:try_end_c5
.catchall {:try_start_af .. :try_end_c5} :catchall_c3
:try_start_c5
throw v0
.line 1082
:cond_c6
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v1}, Lcom/iflytek/thirdparty/n$b;->b(Lcom/iflytek/thirdparty/n$b;)Lcom/iflytek/thirdparty/p;
move-result-object v7
monitor-enter v7
:try_end_cd
.catch Ljava/lang/Throwable; {:try_start_c5 .. :try_end_cd} :catch_6d
move v5, v0
.line 1083
:goto_ce
:try_start_ce
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v0}, Lcom/iflytek/thirdparty/n$b;->b(Lcom/iflytek/thirdparty/n$b;)Lcom/iflytek/thirdparty/p;
move-result-object v0
invoke-virtual {v0}, Lcom/iflytek/thirdparty/p;->e()Z
move-result v0
if-nez v0, :cond_10e
.line 1084
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v0}, Lcom/iflytek/thirdparty/n$b;->b(Lcom/iflytek/thirdparty/n$b;)Lcom/iflytek/thirdparty/p;
move-result-object v0
invoke-virtual {v0}, Lcom/iflytek/thirdparty/p;->f()Lcom/iflytek/thirdparty/p$a;
move-result-object v8
.line 1085
invoke-virtual {v8}, Lcom/iflytek/thirdparty/p$a;->getKey()Ljava/lang/Object;
move-result-object v0
check-cast v0, [B
const/4 v9, 0x0
invoke-virtual {v8}, Lcom/iflytek/thirdparty/p$a;->getValue()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/Integer;
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
move-result v1
invoke-virtual {v3, v0, v9, v5, v1}, Landroid/os/MemoryFile;->writeBytes([BIII)V
.line 1086
invoke-virtual {v8}, Lcom/iflytek/thirdparty/p$a;->getValue()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Integer;
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
move-result v0
add-int/2addr v0, v5
.line 1087
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v1}, Lcom/iflytek/thirdparty/n$b;->b(Lcom/iflytek/thirdparty/n$b;)Lcom/iflytek/thirdparty/p;
move-result-object v1
invoke-virtual {v1, v8}, Lcom/iflytek/thirdparty/p;->a(Lcom/iflytek/thirdparty/p$a;)V
move v5, v0
goto :goto_ce
.line 1090
:cond_10e
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v0}, Lcom/iflytek/thirdparty/n$b;->b(Lcom/iflytek/thirdparty/n$b;)Lcom/iflytek/thirdparty/p;
move-result-object v0
invoke-virtual {v0}, Lcom/iflytek/thirdparty/p;->d()V
.line 1091
monitor-exit v7
:try_end_118
.catchall {:try_start_ce .. :try_end_118} :catchall_167
.line 1093
if-nez v2, :cond_17e
.line 1094
:try_start_11a
new-instance v0, Ljava/io/RandomAccessFile;
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
invoke-static {v1}, Lcom/iflytek/thirdparty/n$b;->c(Lcom/iflytek/thirdparty/n$b;)Ljava/lang/String;
move-result-object v1
const-string v7, "rw"
invoke-direct {v0, v1, v7}, Ljava/io/RandomAccessFile;-><init>(Ljava/lang/String;Ljava/lang/String;)V
:try_end_127
.catch Ljava/lang/Throwable; {:try_start_11a .. :try_end_127} :catch_6d
.line 1096
if-eqz v6, :cond_16a
sub-int v1, v11, v5
.line 1097
:goto_12b
if-lez v1, :cond_17c
:try_start_12d
iget-object v4, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
.line 1098
invoke-static {v4, v0, v3, v5, v1}, Lcom/iflytek/thirdparty/n$b;->a(Lcom/iflytek/thirdparty/n$b;Ljava/io/RandomAccessFile;Landroid/os/MemoryFile;II)Z
move-result v1
if-nez v1, :cond_17c
.line 1099
new-instance v1, Lcom/iflytek/cloud/SpeechError;
const/16 v4, 0x5207
invoke-direct {v1, v4}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
.line 1100
const-string v4, "save last memory file data failed!"
invoke-static {v4}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/String;)V
.line 1103
:goto_141
if-nez v1, :cond_7e
iget-object v4, p0, Lcom/iflytek/thirdparty/n$b$1;->a:Lcom/iflytek/thirdparty/n$b;
const/4 v6, 0x0
const v7, 0x3a98000
.line 1104
invoke-static {v7, v5}, Ljava/lang/Math;->min(II)I
move-result v5
invoke-static {v4, v0, v3, v6, v5}, Lcom/iflytek/thirdparty/n$b;->a(Lcom/iflytek/thirdparty/n$b;Ljava/io/RandomAccessFile;Landroid/os/MemoryFile;II)Z
move-result v4
if-nez v4, :cond_7e
.line 1105
new-instance v1, Lcom/iflytek/cloud/SpeechError;
const/16 v4, 0x5207
invoke-direct {v1, v4}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
.line 1106
const-string v4, "save current memory file data failed!"
invoke-static {v4}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/String;)V
:try_end_15f
.catch Ljava/lang/Throwable; {:try_start_12d .. :try_end_15f} :catch_161
goto/16 :goto_7e
.line 1111
:catch_161
move-exception v1
move-object v12, v1
move-object v1, v0
move-object v0, v12
goto/16 :goto_6f
.line 1091
:catchall_167
move-exception v0
:try_start_168
monitor-exit v7
:try_end_169
.catchall {:try_start_168 .. :try_end_169} :catchall_167
:try_start_169
throw v0
:try_end_16a
.catch Ljava/lang/Throwable; {:try_start_169 .. :try_end_16a} :catch_6d
:cond_16a
move v1, v4
.line 1096
goto :goto_12b
.line 1125
:catch_16c
move-exception v0
.line 1126
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
.line 1127
const-string v0, "\u5173\u95ed\u6587\u4ef6\u5f02\u5e38\uff01"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/String;)V
goto/16 :goto_88
.line 1111
:catch_177
move-exception v0
move-object v1, v2
move-object v3, v2
goto/16 :goto_6f
:cond_17c
move-object v1, v2
goto :goto_141
:cond_17e
move-object v0, v2
move-object v1, v2
goto/16 :goto_7e
:cond_182
move v0, v6
move v1, v5
goto/16 :goto_ae
.end method