n$b.smali
.class Lcom/iflytek/thirdparty/n$b;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lcom/iflytek/thirdparty/o$b;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/iflytek/thirdparty/n;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x2
name = "b"
.end annotation
# instance fields
.field final synthetic a:Lcom/iflytek/thirdparty/n;
.field private b:I
.field private final c:I
.field private final d:I
.field private final e:I
.field private final f:Lcom/iflytek/thirdparty/p;
.field private final g:Lcom/iflytek/thirdparty/p;
.field private volatile h:Lcom/iflytek/thirdparty/p;
.field private volatile i:Lcom/iflytek/thirdparty/p;
.field private final j:Ljava/lang/String;
.field private k:Ljava/lang/Thread;
.field private l:Z
.field private m:Z
# direct methods
.method private constructor <init>(Lcom/iflytek/thirdparty/n;)V
.registers 10
.prologue
const-wide/32 v1, 0x7d000
const-wide/16 v4, 0x0
const/4 v6, 0x1
const v3, 0xc000
const/4 v7, 0x0
.line 929
iput-object p1, p0, Lcom/iflytek/thirdparty/n$b;->a:Lcom/iflytek/thirdparty/n;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 930
iput v7, p0, Lcom/iflytek/thirdparty/n$b;->b:I
.line 946
iput v3, p0, Lcom/iflytek/thirdparty/n$b;->c:I
.line 947
const v0, 0x7d000
iput v0, p0, Lcom/iflytek/thirdparty/n$b;->d:I
.line 948
const v0, 0x3a98000
iput v0, p0, Lcom/iflytek/thirdparty/n$b;->e:I
.line 949
new-instance v0, Lcom/iflytek/thirdparty/p;
invoke-direct/range {v0 .. v7}, Lcom/iflytek/thirdparty/p;-><init>(JIJZZ)V
iput-object v0, p0, Lcom/iflytek/thirdparty/n$b;->f:Lcom/iflytek/thirdparty/p;
.line 950
new-instance v0, Lcom/iflytek/thirdparty/p;
invoke-direct/range {v0 .. v7}, Lcom/iflytek/thirdparty/p;-><init>(JIJZZ)V
iput-object v0, p0, Lcom/iflytek/thirdparty/n$b;->g:Lcom/iflytek/thirdparty/p;
.line 951
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->f:Lcom/iflytek/thirdparty/p;
iput-object v0, p0, Lcom/iflytek/thirdparty/n$b;->h:Lcom/iflytek/thirdparty/p;
.line 952
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->g:Lcom/iflytek/thirdparty/p;
iput-object v0, p0, Lcom/iflytek/thirdparty/n$b;->i:Lcom/iflytek/thirdparty/p;
.line 953
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;
move-result-object v1
invoke-virtual {v1}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "/aimic_alsa.pcm"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/iflytek/thirdparty/n$b;->j:Ljava/lang/String;
.line 956
const/4 v0, 0x0
iput-object v0, p0, Lcom/iflytek/thirdparty/n$b;->k:Ljava/lang/Thread;
.line 957
iput-boolean v7, p0, Lcom/iflytek/thirdparty/n$b;->l:Z
.line 958
iput-boolean v7, p0, Lcom/iflytek/thirdparty/n$b;->m:Z
return-void
.end method
.method synthetic constructor <init>(Lcom/iflytek/thirdparty/n;Lcom/iflytek/thirdparty/n$1;)V
.registers 3
.prologue
.line 929
invoke-direct {p0, p1}, Lcom/iflytek/thirdparty/n$b;-><init>(Lcom/iflytek/thirdparty/n;)V
return-void
.end method
.method static synthetic a(Lcom/iflytek/thirdparty/n$b;Ljava/lang/Thread;)Ljava/lang/Thread;
.registers 2
.prologue
.line 929
iput-object p1, p0, Lcom/iflytek/thirdparty/n$b;->k:Ljava/lang/Thread;
return-object p1
.end method
.method private a(IZ)V
.registers 11
.prologue
.line 1144
const/4 v0, 0x0
.line 1146
iget-object v2, p0, Lcom/iflytek/thirdparty/n$b;->h:Lcom/iflytek/thirdparty/p;
monitor-enter v2
.line 1147
if-nez p2, :cond_15
:try_start_6
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b;->h:Lcom/iflytek/thirdparty/p;
invoke-virtual {v1}, Lcom/iflytek/thirdparty/p;->b()J
move-result-wide v4
int-to-long v6, p1
add-long/2addr v4, v6
const-wide/32 v6, 0x7d000
cmp-long v1, v4, v6
if-ltz v1, :cond_23
.line 1148
:cond_15
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->h:Lcom/iflytek/thirdparty/p;
.line 1149
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b;->g:Lcom/iflytek/thirdparty/p;
invoke-virtual {v0, v1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_69
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b;->f:Lcom/iflytek/thirdparty/p;
:goto_21
iput-object v1, p0, Lcom/iflytek/thirdparty/n$b;->h:Lcom/iflytek/thirdparty/p;
.line 1151
:cond_23
monitor-exit v2
:try_end_24
.catchall {:try_start_6 .. :try_end_24} :catchall_6c
.line 1153
if-eqz v0, :cond_68
.line 1154
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b;->i:Lcom/iflytek/thirdparty/p;
monitor-enter v1
.line 1155
:try_start_29
iput-object v0, p0, Lcom/iflytek/thirdparty/n$b;->i:Lcom/iflytek/thirdparty/p;
.line 1156
monitor-exit v1
:try_end_2c
.catchall {:try_start_29 .. :try_end_2c} :catchall_6f
.line 1158
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->k:Ljava/lang/Thread;
if-eqz v0, :cond_43
.line 1159
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b;->k:Ljava/lang/Thread;
monitor-enter v1
.line 1160
:try_start_33
sget-object v0, Ljava/lang/Thread$State;->WAITING:Ljava/lang/Thread$State;
iget-object v2, p0, Lcom/iflytek/thirdparty/n$b;->k:Ljava/lang/Thread;
invoke-virtual {v2}, Ljava/lang/Thread;->getState()Ljava/lang/Thread$State;
move-result-object v2
if-ne v0, v2, :cond_42
.line 1161
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->k:Ljava/lang/Thread;
invoke-virtual {v0}, Ljava/lang/Object;->notify()V
.line 1163
:cond_42
monitor-exit v1
:try_end_43
.catchall {:try_start_33 .. :try_end_43} :catchall_72
.line 1166
:cond_43
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b;->h:Lcom/iflytek/thirdparty/p;
monitor-enter v1
.line 1167
const-wide/16 v2, 0x0
:try_start_48
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->h:Lcom/iflytek/thirdparty/p;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/p;->b()J
move-result-wide v4
cmp-long v0, v2, v4
if-eqz v0, :cond_67
.line 1168
const-string v0, "Error: buffer is not null when exchanged!"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/String;)V
.line 1169
iget-object v0, p0, 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
new-instance v2, Lcom/iflytek/cloud/SpeechError;
const/16 v3, 0x5207
invoke-direct {v2, v3}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
invoke-virtual {v0, v2}, Lcom/iflytek/thirdparty/n$a;->a(Lcom/iflytek/cloud/SpeechError;)V
.line 1171
:cond_67
monitor-exit v1
:try_end_68
.catchall {:try_start_48 .. :try_end_68} :catchall_75
.line 1173
:cond_68
return-void
.line 1149
:cond_69
:try_start_69
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b;->g:Lcom/iflytek/thirdparty/p;
goto :goto_21
.line 1151
:catchall_6c
move-exception v0
monitor-exit v2
:try_end_6e
.catchall {:try_start_69 .. :try_end_6e} :catchall_6c
throw v0
.line 1156
:catchall_6f
move-exception v0
:try_start_70
monitor-exit v1
:try_end_71
.catchall {:try_start_70 .. :try_end_71} :catchall_6f
throw v0
.line 1163
:catchall_72
move-exception v0
:try_start_73
monitor-exit v1
:try_end_74
.catchall {:try_start_73 .. :try_end_74} :catchall_72
throw v0
.line 1171
:catchall_75
move-exception v0
:try_start_76
monitor-exit v1
:try_end_77
.catchall {:try_start_76 .. :try_end_77} :catchall_75
throw v0
.end method
.method static synthetic a(Lcom/iflytek/thirdparty/n$b;)Z
.registers 2
.prologue
.line 929
iget-boolean v0, p0, Lcom/iflytek/thirdparty/n$b;->m:Z
return v0
.end method
.method static synthetic a(Lcom/iflytek/thirdparty/n$b;Ljava/io/RandomAccessFile;Landroid/os/MemoryFile;II)Z
.registers 6
.prologue
.line 929
invoke-direct {p0, p1, p2, p3, p4}, Lcom/iflytek/thirdparty/n$b;->a(Ljava/io/RandomAccessFile;Landroid/os/MemoryFile;II)Z
move-result v0
return v0
.end method
.method private a(Ljava/io/RandomAccessFile;Landroid/os/MemoryFile;II)Z
.registers 11
.prologue
const/4 v0, 0x0
.line 1003
const/4 v1, 0x1
.line 1006
if-eqz p1, :cond_31
if-eqz p2, :cond_31
if-ltz p3, :cond_31
if-ltz p4, :cond_31
.line 1007
add-int v2, p3, p4
.line 1008
const/high16 v3, 0x10000
:try_start_e
new-array v3, v3, [B
.line 1011
:goto_10
if-le v2, p3, :cond_37
.line 1012
array-length v4, v3
sub-int v5, v2, p3
invoke-static {v4, v5}, Ljava/lang/Math;->min(II)I
move-result v4
.line 1013
const/4 v5, 0x0
invoke-virtual {p2, v3, p3, v5, v4}, Landroid/os/MemoryFile;->readBytes([BIII)I
move-result v5
if-eq v5, v4, :cond_26
.line 1014
const-string v1, "saveFileFromMemory error: read bytes length error!"
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/String;)V
.line 1030
:goto_25
return v0
.line 1018
:cond_26
add-int/2addr p3, v4
.line 1019
const/4 v5, 0x0
invoke-virtual {p1, v3, v5, v4}, Ljava/io/RandomAccessFile;->write([BII)V
:try_end_2b
.catch Ljava/lang/Throwable; {:try_start_e .. :try_end_2b} :catch_2c
goto :goto_10
.line 1025
:catch_2c
move-exception v1
.line 1027
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
goto :goto_25
.line 1023
:cond_31
:try_start_31
const-string v1, "saveFileFromMemory error: arguments error"
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/String;)V
:try_end_36
.catch Ljava/lang/Throwable; {:try_start_31 .. :try_end_36} :catch_2c
goto :goto_25
:cond_37
move v0, v1
goto :goto_25
.end method
.method static synthetic b(Lcom/iflytek/thirdparty/n$b;)Lcom/iflytek/thirdparty/p;
.registers 2
.prologue
.line 929
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->i:Lcom/iflytek/thirdparty/p;
return-object v0
.end method
.method private b([BI)V
.registers 7
.prologue
.line 976
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->k:Ljava/lang/Thread;
if-nez v0, :cond_2c
.line 977
new-instance v0, Ljava/io/File;
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b;->j:Ljava/lang/String;
invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 978
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v1
if-eqz v1, :cond_14
.line 979
invoke-virtual {v0}, Ljava/io/File;->delete()Z
.line 982
:cond_14
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->f:Lcom/iflytek/thirdparty/p;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/p;->d()V
.line 983
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->g:Lcom/iflytek/thirdparty/p;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/p;->d()V
.line 984
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->f:Lcom/iflytek/thirdparty/p;
iput-object v0, p0, Lcom/iflytek/thirdparty/n$b;->h:Lcom/iflytek/thirdparty/p;
.line 985
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->g:Lcom/iflytek/thirdparty/p;
iput-object v0, p0, Lcom/iflytek/thirdparty/n$b;->i:Lcom/iflytek/thirdparty/p;
.line 986
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/iflytek/thirdparty/n$b;->m:Z
.line 987
invoke-direct {p0}, Lcom/iflytek/thirdparty/n$b;->c()V
.line 991
:cond_2c
const/4 v0, 0x0
:try_start_2d
invoke-direct {p0, p2, v0}, Lcom/iflytek/thirdparty/n$b;->a(IZ)V
.line 993
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b;->h:Lcom/iflytek/thirdparty/p;
monitor-enter v1
:try_end_33
.catch Ljava/lang/Throwable; {:try_start_2d .. :try_end_33} :catch_3e
.line 994
:try_start_33
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->h:Lcom/iflytek/thirdparty/p;
const/4 v2, 0x0
invoke-virtual {v0, p1, v2, p2}, Lcom/iflytek/thirdparty/p;->a([BII)V
.line 995
monitor-exit v1
.line 1000
:goto_3a
return-void
.line 995
:catchall_3b
move-exception v0
monitor-exit v1
:try_end_3d
.catchall {:try_start_33 .. :try_end_3d} :catchall_3b
:try_start_3d
throw v0
:try_end_3e
.catch Ljava/lang/Throwable; {:try_start_3d .. :try_end_3e} :catch_3e
.line 996
:catch_3e
move-exception v0
.line 997
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/Throwable;)V
.line 998
iget-object v1, p0, Lcom/iflytek/thirdparty/n$b;->a:Lcom/iflytek/thirdparty/n;
invoke-static {v1}, Lcom/iflytek/thirdparty/n;->c(Lcom/iflytek/thirdparty/n;)Lcom/iflytek/thirdparty/n$a;
move-result-object v1
new-instance v2, Lcom/iflytek/cloud/SpeechError;
const/16 v3, 0x5207
invoke-direct {v2, v0, v3}, Lcom/iflytek/cloud/SpeechError;-><init>(Ljava/lang/Throwable;I)V
invoke-virtual {v1, v2}, Lcom/iflytek/thirdparty/n$a;->a(Lcom/iflytek/cloud/SpeechError;)V
goto :goto_3a
.end method
.method private b()Z
.registers 2
.prologue
.line 972
iget-boolean v0, p0, Lcom/iflytek/thirdparty/n$b;->l:Z
return v0
.end method
.method static synthetic c(Lcom/iflytek/thirdparty/n$b;)Ljava/lang/String;
.registers 2
.prologue
.line 929
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->j:Ljava/lang/String;
return-object v0
.end method
.method private c()V
.registers 3
.prologue
.line 1034
new-instance v0, Lcom/iflytek/thirdparty/n$b$1;
const-string v1, "AlsaAudioSavingThread"
invoke-direct {v0, p0, v1}, Lcom/iflytek/thirdparty/n$b$1;-><init>(Lcom/iflytek/thirdparty/n$b;Ljava/lang/String;)V
iput-object v0, p0, Lcom/iflytek/thirdparty/n$b;->k:Ljava/lang/Thread;
.line 1140
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->k:Ljava/lang/Thread;
invoke-virtual {v0}, Ljava/lang/Thread;->start()V
.line 1141
return-void
.end method
# virtual methods
.method public a()V
.registers 3
.prologue
const/4 v1, 0x0
.line 961
iput-boolean v1, p0, Lcom/iflytek/thirdparty/n$b;->m:Z
.line 962
invoke-direct {p0}, Lcom/iflytek/thirdparty/n$b;->b()Z
move-result v0
if-eqz v0, :cond_d
.line 963
const/4 v0, 0x1
invoke-direct {p0, v1, v0}, Lcom/iflytek/thirdparty/n$b;->a(IZ)V
.line 965
:cond_d
return-void
.end method
.method public a(Z)V
.registers 2
.prologue
.line 968
iput-boolean p1, p0, Lcom/iflytek/thirdparty/n$b;->l:Z
.line 969
return-void
.end method
.method public a([BI)V
.registers 6
.prologue
.line 935
invoke-direct {p0}, Lcom/iflytek/thirdparty/n$b;->b()Z
move-result v0
if-eqz v0, :cond_9
.line 936
invoke-direct {p0, p1, p2}, Lcom/iflytek/thirdparty/n$b;->b([BI)V
.line 939
:cond_9
iget-object v0, p0, Lcom/iflytek/thirdparty/n$b;->a:Lcom/iflytek/thirdparty/n;
const/4 v1, 0x0
invoke-virtual {v0, p1, v1, p2}, Lcom/iflytek/thirdparty/n;->a([BII)I
move-result v0
iput v0, p0, Lcom/iflytek/thirdparty/n$b;->b:I
.line 940
iget v0, p0, Lcom/iflytek/thirdparty/n$b;->b:I
if-eqz v0, :cond_26
.line 941
iget-object v0, p0, 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
new-instance v1, Lcom/iflytek/cloud/SpeechError;
iget v2, p0, Lcom/iflytek/thirdparty/n$b;->b:I
invoke-direct {v1, v2}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/n$a;->a(Lcom/iflytek/cloud/SpeechError;)V
.line 944
:cond_26
return-void
.end method