c.smali
.class public Lcom/sdk/plus/h/c;
.super Ljava/lang/Object;
# interfaces
.implements Ljava/lang/Runnable;
# static fields
.field private static d:Lcom/sdk/plus/h/c;
# instance fields
.field private a:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
.field private b:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
.field private c:J
# direct methods
.method private constructor <init>()V
.registers 3
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/sdk/plus/h/c;->a:Ljava/util/ArrayList;
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/sdk/plus/h/c;->b:Ljava/util/ArrayList;
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v0
iput-wide v0, p0, Lcom/sdk/plus/h/c;->c:J
return-void
.end method
.method public static a()Lcom/sdk/plus/h/c;
.registers 3
sget-object v0, Lcom/sdk/plus/h/c;->d:Lcom/sdk/plus/h/c;
if-nez v0, :cond_1c
const-class v1, Lcom/sdk/plus/h/c;
monitor-enter v1
:try_start_7
sget-object v0, Lcom/sdk/plus/h/c;->d:Lcom/sdk/plus/h/c;
if-nez v0, :cond_1b
new-instance v0, Lcom/sdk/plus/h/c;
invoke-direct {v0}, Lcom/sdk/plus/h/c;-><init>()V
sput-object v0, Lcom/sdk/plus/h/c;->d:Lcom/sdk/plus/h/c;
invoke-static {}, Lcom/sdk/plus/k/a$a;->a()Lcom/sdk/plus/k/a;
move-result-object v0
sget-object v2, Lcom/sdk/plus/h/c;->d:Lcom/sdk/plus/h/c;
invoke-virtual {v0, v2}, Lcom/sdk/plus/k/a;->a(Ljava/lang/Runnable;)Z
:cond_1b
monitor-exit v1
:try_end_1c
.catchall {:try_start_7 .. :try_end_1c} :catchall_1f
:cond_1c
sget-object v0, Lcom/sdk/plus/h/c;->d:Lcom/sdk/plus/h/c;
return-object v0
:catchall_1f
move-exception v0
:try_start_20
monitor-exit v1
:try_end_21
.catchall {:try_start_20 .. :try_end_21} :catchall_1f
throw v0
.end method
.method private b()V
.registers 8
sget-object v0, Lcom/sdk/plus/c/b;->e:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_9
:cond_8
:goto_8
return-void
:cond_9
monitor-enter p0
:try_start_a
iget-object v0, p0, Lcom/sdk/plus/h/c;->b:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/sdk/plus/h/c;->a:Ljava/util/ArrayList;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
iget-object v0, p0, Lcom/sdk/plus/h/c;->a:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
monitor-exit p0
:try_end_17
.catchall {:try_start_a .. :try_end_17} :catchall_ef
new-instance v0, Ljava/text/SimpleDateFormat;
const-string v1, "yyyy-MM-dd"
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
move-result-object v2
invoke-direct {v0, v1, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
new-instance v1, Ljava/util/Date;
invoke-direct {v1}, Ljava/util/Date;-><init>()V
invoke-virtual {v0, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v1
sget-object v2, Lcom/sdk/plus/c/b;->b:Ljava/lang/String;
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_8
invoke-static {}, Landroid/os/Environment;->getExternalStorageState()Ljava/lang/String;
move-result-object v0
const-string v3, "mounted"
invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_e2
sget-object v0, Lcom/sdk/plus/c/d;->x:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v3
if-nez v3, :cond_8
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v3, "/"
invoke-virtual {v0, v3}, 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 v3
new-instance v0, Ljava/io/File;
invoke-direct {v0, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v4
if-nez v4, :cond_6b
invoke-virtual {v0}, Ljava/io/File;->mkdir()Z
move-result v0
if-eqz v0, :cond_8
:cond_6b
const/4 v0, 0x0
:try_start_6c
new-instance v4, Ljava/io/File;
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, "."
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, ".log"
invoke-virtual {v1, v2}, 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-direct {v4, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v4}, Ljava/io/File;->exists()Z
move-result v1
if-nez v1, :cond_a1
invoke-virtual {v4}, Ljava/io/File;->createNewFile()Z
move-result v1
if-eqz v1, :cond_8
invoke-static {}, Lcom/sdk/plus/h/a;->a()V
:cond_a1
invoke-static {}, Lcom/sdk/plus/h/a;->b()[B
move-result-object v1
if-nez v1, :cond_ad
invoke-static {}, Lcom/sdk/plus/h/a;->a()V
invoke-virtual {v4}, Ljava/io/File;->delete()Z
:try_end_ad
.catch Ljava/lang/Exception; {:try_start_6c .. :try_end_ad} :catch_fa
.catchall {:try_start_6c .. :try_end_ad} :catchall_115
:cond_ad
:try_start_ad
new-instance v1, Ljavax/crypto/spec/SecretKeySpec;
sget-object v2, Lcom/sdk/plus/c/b;->f:[B
const-string v3, "AES"
invoke-direct {v1, v2, v3}, Ljavax/crypto/spec/SecretKeySpec;-><init>([BLjava/lang/String;)V
invoke-static {v4, v1}, Lcom/sdk/plus/h/a;->a(Ljava/io/File;Ljavax/crypto/spec/SecretKeySpec;)Ljavax/crypto/CipherOutputStream;
:try_end_b9
.catch Ljava/lang/Throwable; {:try_start_ad .. :try_end_b9} :catch_f2
.catch Ljava/lang/Exception; {:try_start_ad .. :try_end_b9} :catch_fa
.catchall {:try_start_ad .. :try_end_b9} :catchall_115
move-result-object v1
:goto_ba
:try_start_ba
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
iget-object v0, p0, Lcom/sdk/plus/h/c;->b:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v3
:goto_c5
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_fc
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v4, "\r\n"
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
:try_end_da
.catch Ljava/lang/Exception; {:try_start_ba .. :try_end_da} :catch_db
.catchall {:try_start_ba .. :try_end_da} :catchall_123
goto :goto_c5
:catch_db
move-exception v0
move-object v0, v1
:goto_dd
if-eqz v0, :cond_e2
:try_start_df
invoke-virtual {v0}, Ljava/io/OutputStream;->close()V
:try_end_e2
.catch Ljava/io/IOException; {:try_start_df .. :try_end_e2} :catch_11f
:cond_e2
:goto_e2
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v0
iput-wide v0, p0, Lcom/sdk/plus/h/c;->c:J
iget-object v0, p0, Lcom/sdk/plus/h/c;->b:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
goto/16 :goto_8
:catchall_ef
move-exception v0
:try_start_f0
monitor-exit p0
:try_end_f1
.catchall {:try_start_f0 .. :try_end_f1} :catchall_ef
throw v0
:catch_f2
move-exception v1
:try_start_f3
new-instance v1, Ljava/io/FileOutputStream;
const/4 v2, 0x1
invoke-direct {v1, v4, v2}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;Z)V
:try_end_f9
.catch Ljava/lang/Exception; {:try_start_f3 .. :try_end_f9} :catch_fa
.catchall {:try_start_f3 .. :try_end_f9} :catchall_115
goto :goto_ba
:catch_fa
move-exception v1
goto :goto_dd
:cond_fc
:try_start_fc
invoke-virtual {v2}, Ljava/lang/StringBuilder;->length()I
move-result v0
if-lez v0, :cond_10f
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
const-string v2, "UTF-8"
invoke-virtual {v0, v2}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B
move-result-object v0
invoke-virtual {v1, v0}, Ljava/io/OutputStream;->write([B)V
:try_end_10f
.catch Ljava/lang/Exception; {:try_start_fc .. :try_end_10f} :catch_db
.catchall {:try_start_fc .. :try_end_10f} :catchall_123
:cond_10f
:try_start_10f
invoke-virtual {v1}, Ljava/io/OutputStream;->close()V
:try_end_112
.catch Ljava/io/IOException; {:try_start_10f .. :try_end_112} :catch_113
goto :goto_e2
:catch_113
move-exception v0
goto :goto_e2
:catchall_115
move-exception v1
move-object v6, v1
move-object v1, v0
move-object v0, v6
:goto_119
if-eqz v1, :cond_11e
:try_start_11b
invoke-virtual {v1}, Ljava/io/OutputStream;->close()V
:try_end_11e
.catch Ljava/io/IOException; {:try_start_11b .. :try_end_11e} :catch_121
:cond_11e
:goto_11e
throw v0
:catch_11f
move-exception v0
goto :goto_e2
:catch_121
move-exception v1
goto :goto_11e
:catchall_123
move-exception v0
goto :goto_119
.end method
# virtual methods
.method public final declared-synchronized a(Ljava/lang/String;)V
.registers 4
monitor-enter p0
:try_start_1
iget-object v0, p0, Lcom/sdk/plus/h/c;->a:Ljava/util/ArrayList;
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
:try_end_6
.catchall {:try_start_1 .. :try_end_6} :catchall_1e
:try_start_6
iget-object v0, p0, Lcom/sdk/plus/h/c;->a:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
const/4 v1, 0x1
if-le v0, v1, :cond_19
iget-object v0, p0, Lcom/sdk/plus/h/c;->a:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
const/16 v1, 0xa
if-lt v0, v1, :cond_1c
:cond_19
invoke-virtual {p0}, Ljava/lang/Object;->notify()V
:try_end_1c
.catch Ljava/lang/Throwable; {:try_start_6 .. :try_end_1c} :catch_21
.catchall {:try_start_6 .. :try_end_1c} :catchall_1e
:cond_1c
:goto_1c
monitor-exit p0
return-void
:catchall_1e
move-exception v0
monitor-exit p0
throw v0
:catch_21
move-exception v0
goto :goto_1c
.end method
.method public run()V
.registers 9
const-wide/32 v6, 0xea60
const-wide/16 v2, 0x0
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Thread;->getName()Ljava/lang/String;
:goto_c
:try_start_c
monitor-enter p0
:try_end_d
.catch Ljava/lang/Throwable; {:try_start_c .. :try_end_d} :catch_2c
.catchall {:try_start_c .. :try_end_d} :catchall_53
:goto_d
:try_start_d
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v0
iget-wide v4, p0, Lcom/sdk/plus/h/c;->c:J
sub-long/2addr v0, v4
cmp-long v4, v0, v6
if-ltz v4, :cond_31
iget-object v4, p0, Lcom/sdk/plus/h/c;->a:Ljava/util/ArrayList;
invoke-virtual {v4}, Ljava/util/ArrayList;->size()I
move-result v4
if-lez v4, :cond_31
move-wide v0, v2
:goto_21
cmp-long v4, v0, v2
if-eqz v4, :cond_4e
invoke-virtual {p0, v0, v1}, Ljava/lang/Object;->wait(J)V
goto :goto_d
:catchall_29
move-exception v0
monitor-exit p0
:try_end_2b
.catchall {:try_start_d .. :try_end_2b} :catchall_29
:try_start_2b
throw v0
:try_end_2c
.catch Ljava/lang/Throwable; {:try_start_2b .. :try_end_2c} :catch_2c
.catchall {:try_start_2b .. :try_end_2c} :catchall_53
:catch_2c
move-exception v0
invoke-direct {p0}, Lcom/sdk/plus/h/c;->b()V
return-void
:cond_31
:try_start_31
iget-object v4, p0, Lcom/sdk/plus/h/c;->a:Ljava/util/ArrayList;
invoke-virtual {v4}, Ljava/util/ArrayList;->size()I
move-result v4
const/16 v5, 0xa
if-lt v4, v5, :cond_3d
move-wide v0, v2
goto :goto_21
:cond_3d
iget-object v4, p0, Lcom/sdk/plus/h/c;->a:Ljava/util/ArrayList;
invoke-virtual {v4}, Ljava/util/ArrayList;->size()I
move-result v4
if-gtz v4, :cond_4b
const-wide v0, 0x7fffffffffffffffL
goto :goto_21
:cond_4b
sub-long v0, v6, v0
goto :goto_21
:cond_4e
monitor-exit p0
:try_end_4f
.catchall {:try_start_31 .. :try_end_4f} :catchall_29
:try_start_4f
invoke-direct {p0}, Lcom/sdk/plus/h/c;->b()V
:try_end_52
.catch Ljava/lang/Throwable; {:try_start_4f .. :try_end_52} :catch_2c
.catchall {:try_start_4f .. :try_end_52} :catchall_53
goto :goto_c
:catchall_53
move-exception v0
invoke-direct {p0}, Lcom/sdk/plus/h/c;->b()V
throw v0
.end method