c.smali

.class public Lcom/baidu/techain/ae/c;
.super Ljava/lang/Object;

# interfaces
.implements Lcom/baidu/techain/ae/a;


# instance fields
.field public a:Landroid/content/Context;

.field private b:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/baidu/techain/ab/d;",
            ">;>;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 2

    .prologue
    .line 0
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 1000
    iput-object p1, p0, Lcom/baidu/techain/ae/c;->a:Landroid/content/Context;

    .line 0
    return-void
.end method

.method private a([B)Ljava/lang/String;
    .registers 5

    .prologue
    const/4 v0, 0x0

    .line 0
    array-length v1, p1

    if-gtz v1, :cond_5

    :cond_4
    :goto_4
    return-object v0

    :cond_5
    iget-object v1, p0, Lcom/baidu/techain/ae/c;->a:Landroid/content/Context;

    invoke-static {v1}, Lcom/baidu/techain/ad/b;->a(Landroid/content/Context;)Lcom/baidu/techain/ad/b;

    move-result-object v1

    invoke-virtual {v1}, Lcom/baidu/techain/ad/b;->a()Lcom/baidu/techain/ab/a;

    move-result-object v1

    .line 2000
    iget-boolean v1, v1, Lcom/baidu/techain/ab/a;->a:Z

    .line 0
    if-nez v1, :cond_18

    invoke-static {p1}, Lcom/baidu/techain/af/y;->a([B)Ljava/lang/String;

    move-result-object v0

    goto :goto_4

    :cond_18
    iget-object v1, p0, Lcom/baidu/techain/ae/c;->a:Landroid/content/Context;

    invoke-static {v1}, Lcom/baidu/techain/af/af;->a(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_4

    invoke-static {v1}, Lcom/baidu/techain/af/af;->a(Ljava/lang/String;)[B

    move-result-object v1

    if-eqz v1, :cond_4

    array-length v2, v1

    if-lez v2, :cond_4

    :try_start_2d
    invoke-static {v1, p1}, Lcom/baidu/techain/af/ga;->a([B[B)[B

    move-result-object v1

    const/4 v2, 0x2

    invoke-static {v1, v2}, Landroid/util/Base64;->decode([BI)[B

    move-result-object v1

    invoke-static {v1}, Lcom/baidu/techain/af/y;->a([B)Ljava/lang/String;
    :try_end_39
    .catch Ljava/security/InvalidAlgorithmParameterException; {:try_start_2d .. :try_end_39} :catch_3b
    .catch Ljava/security/NoSuchAlgorithmException; {:try_start_2d .. :try_end_39} :catch_40
    .catch Ljava/security/InvalidKeyException; {:try_start_2d .. :try_end_39} :catch_45
    .catch Ljavax/crypto/NoSuchPaddingException; {:try_start_2d .. :try_end_39} :catch_4a
    .catch Ljavax/crypto/BadPaddingException; {:try_start_2d .. :try_end_39} :catch_4f
    .catch Ljavax/crypto/IllegalBlockSizeException; {:try_start_2d .. :try_end_39} :catch_54

    move-result-object v0

    goto :goto_4

    :catch_3b
    move-exception v1

    invoke-static {v1}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_4

    :catch_40
    move-exception v1

    invoke-static {v1}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_4

    :catch_45
    move-exception v1

    invoke-static {v1}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_4

    :catch_4a
    move-exception v1

    invoke-static {v1}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_4

    :catch_4f
    move-exception v1

    invoke-static {v1}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_4

    :catch_54
    move-exception v1

    invoke-static {v1}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_4
.end method

.method private a(Ljava/lang/String;)Ljava/util/List;
    .registers 11
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    const/4 v8, -0x1

    const/4 v7, 0x4

    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    new-array v0, v7, [B

    new-array v4, v7, [B

    const/4 v2, 0x0

    :try_start_c
    new-instance v1, Ljava/io/FileInputStream;

    new-instance v5, Ljava/io/File;

    invoke-direct {v5, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-direct {v1, v5}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
    :try_end_16
    .catch Ljava/lang/Exception; {:try_start_c .. :try_end_16} :catch_7a
    .catchall {:try_start_c .. :try_end_16} :catchall_77

    :goto_16
    :try_start_16
    invoke-virtual {v1, v0}, Ljava/io/FileInputStream;->read([B)I

    move-result v2

    if-eq v2, v8, :cond_23

    if-eq v2, v7, :cond_27

    const-string v0, "eventData read from cache file failed because magicNumber error"

    invoke-static {v0}, Lcom/baidu/techain/aa/c;->d(Ljava/lang/String;)V
    :try_end_23
    .catch Ljava/lang/Exception; {:try_start_16 .. :try_end_23} :catch_36
    .catchall {:try_start_16 .. :try_end_23} :catchall_4c

    :cond_23
    :goto_23
    invoke-static {v1}, Lcom/baidu/techain/af/ke;->a(Ljava/io/Closeable;)V

    :goto_26
    return-object v3

    :cond_27
    :try_start_27
    invoke-static {v0}, Lcom/baidu/techain/af/d;->a([B)I

    move-result v2

    const v5, -0x22334456

    if-eq v2, v5, :cond_3e

    const-string v0, "eventData read from cache file failed because magicNumber error"

    invoke-static {v0}, Lcom/baidu/techain/aa/c;->d(Ljava/lang/String;)V
    :try_end_35
    .catch Ljava/lang/Exception; {:try_start_27 .. :try_end_35} :catch_36
    .catchall {:try_start_27 .. :try_end_35} :catchall_4c

    goto :goto_23

    :catch_36
    move-exception v0

    :goto_37
    :try_start_37
    invoke-static {v0}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V
    :try_end_3a
    .catchall {:try_start_37 .. :try_end_3a} :catchall_4c

    invoke-static {v1}, Lcom/baidu/techain/af/ke;->a(Ljava/io/Closeable;)V

    goto :goto_26

    :cond_3e
    :try_start_3e
    invoke-virtual {v1, v4}, Ljava/io/FileInputStream;->read([B)I

    move-result v2

    if-eq v2, v8, :cond_23

    if-eq v2, v7, :cond_51

    const-string v0, "eventData read from cache file failed cause lengthBuffer error"

    invoke-static {v0}, Lcom/baidu/techain/aa/c;->d(Ljava/lang/String;)V
    :try_end_4b
    .catch Ljava/lang/Exception; {:try_start_3e .. :try_end_4b} :catch_36
    .catchall {:try_start_3e .. :try_end_4b} :catchall_4c

    goto :goto_23

    :catchall_4c
    move-exception v0

    :goto_4d
    invoke-static {v1}, Lcom/baidu/techain/af/ke;->a(Ljava/io/Closeable;)V

    throw v0

    :cond_51
    :try_start_51
    invoke-static {v4}, Lcom/baidu/techain/af/d;->a([B)I

    move-result v2

    if-lez v2, :cond_5b

    const/16 v5, 0x1000

    if-le v2, v5, :cond_61

    :cond_5b
    const-string v0, "eventData read from cache file failed cause lengthBuffer < 1 || lengthBuffer > 4K"

    invoke-static {v0}, Lcom/baidu/techain/aa/c;->d(Ljava/lang/String;)V

    goto :goto_23

    :cond_61
    new-array v5, v2, [B

    invoke-virtual {v1, v5}, Ljava/io/FileInputStream;->read([B)I

    move-result v6

    if-eq v6, v2, :cond_6f

    const-string v0, "eventData read from cache file failed cause buffer size not equal length"

    invoke-static {v0}, Lcom/baidu/techain/aa/c;->d(Ljava/lang/String;)V

    goto :goto_23

    :cond_6f
    invoke-direct {p0, v5}, Lcom/baidu/techain/ae/c;->a([B)Ljava/lang/String;

    move-result-object v2

    invoke-interface {v3, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_76
    .catch Ljava/lang/Exception; {:try_start_51 .. :try_end_76} :catch_36
    .catchall {:try_start_51 .. :try_end_76} :catchall_4c

    goto :goto_16

    :catchall_77
    move-exception v0

    move-object v1, v2

    goto :goto_4d

    :catch_7a
    move-exception v0

    move-object v1, v2

    goto :goto_37
.end method

.method private a([Lcom/baidu/techain/ab/d;Ljava/lang/String;)V
    .registers 9

    array-length v0, p1

    if-lez v0, :cond_9

    invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_a

    :cond_9
    :goto_9
    return-void

    :cond_a
    const/4 v2, 0x0

    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    :try_start_10
    new-instance v1, Ljava/io/BufferedOutputStream;

    new-instance v3, Ljava/io/FileOutputStream;

    const/4 v4, 0x1

    invoke-direct {v3, v0, v4}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;Z)V

    invoke-direct {v1, v3}, Ljava/io/BufferedOutputStream;-><init>(Ljava/io/OutputStream;)V
    :try_end_1b
    .catch Ljava/lang/Exception; {:try_start_10 .. :try_end_1b} :catch_6c
    .catchall {:try_start_10 .. :try_end_1b} :catchall_64

    :try_start_1b
    array-length v2, p1

    const/4 v0, 0x0

    :goto_1d
    if-ge v0, v2, :cond_60

    aget-object v3, p1, v0

    if-eqz v3, :cond_3a

    invoke-virtual {v3}, Lcom/baidu/techain/ab/d;->b()Ljava/lang/String;

    move-result-object v3

    invoke-direct {p0, v3}, Lcom/baidu/techain/ae/c;->b(Ljava/lang/String;)[B

    move-result-object v3

    if-eqz v3, :cond_35

    array-length v4, v3

    if-lez v4, :cond_35

    array-length v4, v3

    const/16 v5, 0x1000

    if-le v4, v5, :cond_3d

    :cond_35
    const-string v3, "event data throw a invalid item "

    invoke-static {v3}, Lcom/baidu/techain/aa/c;->d(Ljava/lang/String;)V

    :cond_3a
    :goto_3a
    add-int/lit8 v0, v0, 0x1

    goto :goto_1d

    :cond_3d
    const v4, -0x22334456

    invoke-static {v4}, Lcom/baidu/techain/af/d;->a(I)[B

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/io/BufferedOutputStream;->write([B)V

    array-length v4, v3

    invoke-static {v4}, Lcom/baidu/techain/af/d;->a(I)[B

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/io/BufferedOutputStream;->write([B)V

    invoke-virtual {v1, v3}, Ljava/io/BufferedOutputStream;->write([B)V

    invoke-virtual {v1}, Ljava/io/BufferedOutputStream;->flush()V
    :try_end_55
    .catch Ljava/lang/Exception; {:try_start_1b .. :try_end_55} :catch_56
    .catchall {:try_start_1b .. :try_end_55} :catchall_6a

    goto :goto_3a

    :catch_56
    move-exception v0

    :goto_57
    :try_start_57
    const-string v2, "event data write to cache file failed cause exception"

    invoke-static {v2, v0}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
    :try_end_5c
    .catchall {:try_start_57 .. :try_end_5c} :catchall_6a

    invoke-static {v1}, Lcom/baidu/techain/af/ke;->a(Ljava/io/Closeable;)V

    goto :goto_9

    :cond_60
    invoke-static {v1}, Lcom/baidu/techain/af/ke;->a(Ljava/io/Closeable;)V

    goto :goto_9

    :catchall_64
    move-exception v0

    move-object v1, v2

    :goto_66
    invoke-static {v1}, Lcom/baidu/techain/af/ke;->a(Ljava/io/Closeable;)V

    throw v0

    :catchall_6a
    move-exception v0

    goto :goto_66

    :catch_6c
    move-exception v0

    move-object v1, v2

    goto :goto_57
.end method

.method private b(Ljava/lang/String;)[B
    .registers 7

    .prologue
    const/4 v4, 0x1

    const/4 v0, 0x0

    .line 0
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_9

    :cond_8
    :goto_8
    return-object v0

    :cond_9
    iget-object v1, p0, Lcom/baidu/techain/ae/c;->a:Landroid/content/Context;

    invoke-static {v1}, Lcom/baidu/techain/ad/b;->a(Landroid/content/Context;)Lcom/baidu/techain/ad/b;

    move-result-object v1

    invoke-virtual {v1}, Lcom/baidu/techain/ad/b;->a()Lcom/baidu/techain/ab/a;

    move-result-object v1

    .line 3000
    iget-boolean v1, v1, Lcom/baidu/techain/ab/a;->a:Z

    .line 0
    if-nez v1, :cond_1c

    invoke-static {p1}, Lcom/baidu/techain/af/y;->c(Ljava/lang/String;)[B

    move-result-object v0

    goto :goto_8

    :cond_1c
    iget-object v1, p0, Lcom/baidu/techain/ae/c;->a:Landroid/content/Context;

    invoke-static {v1}, Lcom/baidu/techain/af/af;->a(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-static {p1}, Lcom/baidu/techain/af/y;->c(Ljava/lang/String;)[B

    move-result-object v2

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_8

    if-eqz v2, :cond_8

    array-length v3, v2

    if-le v3, v4, :cond_8

    invoke-static {v1}, Lcom/baidu/techain/af/af;->a(Ljava/lang/String;)[B

    move-result-object v1

    if-eqz v1, :cond_8

    :try_start_37
    array-length v3, v1

    if-le v3, v4, :cond_8

    const/4 v3, 0x2

    invoke-static {v2, v3}, Landroid/util/Base64;->encode([BI)[B

    move-result-object v2

    invoke-static {v1, v2}, Lcom/baidu/techain/af/ga;->b([B[B)[B
    :try_end_42
    .catch Ljava/lang/Exception; {:try_start_37 .. :try_end_42} :catch_44

    move-result-object v0

    goto :goto_8

    :catch_44
    move-exception v1

    invoke-static {v1}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_8
.end method


# virtual methods
.method public final a()V
    .registers 13

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/baidu/techain/ae/c;->a:Landroid/content/Context;

    const-string v2, "event"

    const-string v3, "eventUploading"

    invoke-static {v0, v2, v3}, Lcom/baidu/techain/af/af;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/baidu/techain/ae/c;->a:Landroid/content/Context;

    const-string v2, "eventUploading"

    invoke-static {v0, v2}, Lcom/baidu/techain/af/af;->b(Landroid/content/Context;Ljava/lang/String;)[Ljava/io/File;

    move-result-object v6

    if-eqz v6, :cond_17

    array-length v0, v6

    if-gtz v0, :cond_18

    :cond_17
    return-void

    :cond_18
    array-length v7, v6

    const/4 v0, 0x0

    move v5, v0

    move-object v2, v1

    move-object v3, v1

    move-object v0, v1

    :goto_1e
    if-ge v5, v7, :cond_17

    aget-object v8, v6, v5

    if-nez v8, :cond_44

    if-eqz v2, :cond_2f

    invoke-virtual {v2}, Ljava/nio/channels/FileLock;->isValid()Z

    move-result v1

    if-eqz v1, :cond_2f

    :try_start_2c
    invoke-virtual {v2}, Ljava/nio/channels/FileLock;->release()V
    :try_end_2f
    .catch Ljava/io/IOException; {:try_start_2c .. :try_end_2f} :catch_3f

    :cond_2f
    :goto_2f
    invoke-static {v3}, Lcom/baidu/techain/af/ke;->a(Ljava/io/Closeable;)V

    if-eqz v0, :cond_fb

    invoke-virtual {v0}, Ljava/io/File;->delete()Z

    move-object v1, v2

    move-object v2, v3

    :cond_39
    :goto_39
    add-int/lit8 v3, v5, 0x1

    move v5, v3

    move-object v3, v2

    move-object v2, v1

    goto :goto_1e

    :catch_3f
    move-exception v1

    invoke-static {v1}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_2f

    :cond_44
    :try_start_44
    invoke-virtual {v8}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v9

    new-instance v1, Ljava/io/File;

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v10, ".lock"

    invoke-virtual {v4, v10}, 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-direct {v1, v4}, Ljava/io/File;-><init>(Ljava/lang/String;)V
    :try_end_60
    .catch Ljava/lang/Exception; {:try_start_44 .. :try_end_60} :catch_e8
    .catchall {:try_start_44 .. :try_end_60} :catchall_de

    :try_start_60
    invoke-static {v1}, Lcom/baidu/techain/af/ke;->c(Ljava/io/File;)Z

    new-instance v4, Ljava/io/RandomAccessFile;

    const-string v0, "rw"

    invoke-direct {v4, v1, v0}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V
    :try_end_6a
    .catch Ljava/lang/Exception; {:try_start_60 .. :try_end_6a} :catch_ee
    .catchall {:try_start_60 .. :try_end_6a} :catchall_e3

    :try_start_6a
    invoke-virtual {v4}, Ljava/io/RandomAccessFile;->getChannel()Ljava/nio/channels/FileChannel;

    move-result-object v0

    invoke-virtual {v0}, Ljava/nio/channels/FileChannel;->lock()Ljava/nio/channels/FileLock;
    :try_end_71
    .catch Ljava/lang/Exception; {:try_start_6a .. :try_end_71} :catch_f5
    .catchall {:try_start_6a .. :try_end_71} :catchall_e5

    move-result-object v0

    :try_start_72
    invoke-direct {p0, v9}, Lcom/baidu/techain/ae/c;->a(Ljava/lang/String;)Ljava/util/List;

    move-result-object v2

    invoke-virtual {p0, v2}, Lcom/baidu/techain/ae/c;->a(Ljava/util/List;)V

    invoke-virtual {v8}, Ljava/io/File;->delete()Z
    :try_end_7c
    .catch Ljava/lang/Exception; {:try_start_72 .. :try_end_7c} :catch_97
    .catchall {:try_start_72 .. :try_end_7c} :catchall_b9

    if-eqz v0, :cond_87

    invoke-virtual {v0}, Ljava/nio/channels/FileLock;->isValid()Z

    move-result v2

    if-eqz v2, :cond_87

    :try_start_84
    invoke-virtual {v0}, Ljava/nio/channels/FileLock;->release()V
    :try_end_87
    .catch Ljava/io/IOException; {:try_start_84 .. :try_end_87} :catch_92

    :cond_87
    :goto_87
    invoke-static {v4}, Lcom/baidu/techain/af/ke;->a(Ljava/io/Closeable;)V

    invoke-virtual {v1}, Ljava/io/File;->delete()Z

    move-object v2, v4

    move-object v11, v0

    move-object v0, v1

    move-object v1, v11

    goto :goto_39

    :catch_92
    move-exception v2

    invoke-static {v2}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_87

    :catch_97
    move-exception v2

    move-object v3, v2

    move-object v2, v4

    move-object v11, v0

    move-object v0, v1

    move-object v1, v11

    :goto_9d
    :try_start_9d
    invoke-static {v3}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V
    :try_end_a0
    .catchall {:try_start_9d .. :try_end_a0} :catchall_d7

    if-eqz v1, :cond_ab

    invoke-virtual {v1}, Ljava/nio/channels/FileLock;->isValid()Z

    move-result v3

    if-eqz v3, :cond_ab

    :try_start_a8
    invoke-virtual {v1}, Ljava/nio/channels/FileLock;->release()V
    :try_end_ab
    .catch Ljava/io/IOException; {:try_start_a8 .. :try_end_ab} :catch_b4

    :cond_ab
    :goto_ab
    invoke-static {v2}, Lcom/baidu/techain/af/ke;->a(Ljava/io/Closeable;)V

    if-eqz v0, :cond_39

    invoke-virtual {v0}, Ljava/io/File;->delete()Z

    goto :goto_39

    :catch_b4
    move-exception v3

    invoke-static {v3}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_ab

    :catchall_b9
    move-exception v2

    move-object v3, v4

    move-object v11, v0

    move-object v0, v2

    move-object v2, v11

    :goto_be
    if-eqz v2, :cond_c9

    invoke-virtual {v2}, Ljava/nio/channels/FileLock;->isValid()Z

    move-result v4

    if-eqz v4, :cond_c9

    :try_start_c6
    invoke-virtual {v2}, Ljava/nio/channels/FileLock;->release()V
    :try_end_c9
    .catch Ljava/io/IOException; {:try_start_c6 .. :try_end_c9} :catch_d2

    :cond_c9
    :goto_c9
    invoke-static {v3}, Lcom/baidu/techain/af/ke;->a(Ljava/io/Closeable;)V

    if-eqz v1, :cond_d1

    invoke-virtual {v1}, Ljava/io/File;->delete()Z

    :cond_d1
    throw v0

    :catch_d2
    move-exception v2

    invoke-static {v2}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_c9

    :catchall_d7
    move-exception v3

    move-object v11, v3

    move-object v3, v2

    move-object v2, v1

    move-object v1, v0

    move-object v0, v11

    goto :goto_be

    :catchall_de
    move-exception v1

    move-object v11, v1

    move-object v1, v0

    move-object v0, v11

    goto :goto_be

    :catchall_e3
    move-exception v0

    goto :goto_be

    :catchall_e5
    move-exception v0

    move-object v3, v4

    goto :goto_be

    :catch_e8
    move-exception v1

    move-object v11, v1

    move-object v1, v2

    move-object v2, v3

    move-object v3, v11

    goto :goto_9d

    :catch_ee
    move-exception v0

    move-object v11, v0

    move-object v0, v1

    move-object v1, v2

    move-object v2, v3

    move-object v3, v11

    goto :goto_9d

    :catch_f5
    move-exception v0

    move-object v3, v0

    move-object v0, v1

    move-object v1, v2

    move-object v2, v4

    goto :goto_9d

    :cond_fb
    move-object v1, v2

    move-object v2, v3

    goto/16 :goto_39
.end method

.method public final a(Lcom/baidu/techain/ab/d;)V
    .registers 5

    .prologue
    .line 0
    instance-of v0, p1, Lcom/baidu/techain/ab/b;

    if-nez v0, :cond_5

    :cond_4
    :goto_4
    return-void

    :cond_5
    iget-object v0, p0, Lcom/baidu/techain/ae/c;->b:Ljava/util/HashMap;

    if-eqz v0, :cond_4

    check-cast p1, Lcom/baidu/techain/ab/b;

    .line 7000
    iget v0, p1, Lcom/baidu/techain/ab/d;->e:I

    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    .line 0
    iget-object v0, p0, Lcom/baidu/techain/ae/c;->b:Ljava/util/HashMap;

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/ArrayList;

    if-nez v0, :cond_20

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    :cond_20
    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    iget-object v2, p0, Lcom/baidu/techain/ae/c;->b:Ljava/util/HashMap;

    invoke-virtual {v2, v1, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_4
.end method

.method public final a(Ljava/util/HashMap;)V
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/baidu/techain/ab/d;",
            ">;>;)V"
        }
    .end annotation

    iput-object p1, p0, Lcom/baidu/techain/ae/c;->b:Ljava/util/HashMap;

    return-void
.end method

.method public a(Ljava/util/List;)V
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;)V"
        }
    .end annotation

    iget-object v0, p0, Lcom/baidu/techain/ae/c;->a:Landroid/content/Context;

    invoke-static {v0, p1}, Lcom/baidu/techain/af/af;->a(Landroid/content/Context;Ljava/util/List;)V

    return-void
.end method

.method public final b()V
    .registers 11

    .prologue
    const/4 v1, 0x0

    const/4 v5, 0x0

    .line 0
    iget-object v0, p0, Lcom/baidu/techain/ae/c;->b:Ljava/util/HashMap;

    if-nez v0, :cond_7

    :goto_6
    return-void

    :cond_7
    iget-object v0, p0, Lcom/baidu/techain/ae/c;->b:Ljava/util/HashMap;

    invoke-virtual {v0}, Ljava/util/HashMap;->size()I

    move-result v0

    if-lez v0, :cond_119

    iget-object v0, p0, Lcom/baidu/techain/ae/c;->b:Ljava/util/HashMap;

    invoke-virtual {v0}, Ljava/util/HashMap;->keySet()Ljava/util/Set;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v6

    :cond_19
    :goto_19
    invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_119

    invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    iget-object v2, p0, Lcom/baidu/techain/ae/c;->b:Ljava/util/HashMap;

    invoke-virtual {v2, v0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/util/ArrayList;

    if-eqz v0, :cond_19

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-lez v2, :cond_19

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v2

    new-array v7, v2, [Lcom/baidu/techain/ab/d;

    invoke-virtual {v0, v7}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    .line 4000
    array-length v0, v7

    if-lez v0, :cond_19

    aget-object v0, v7, v5

    if-eqz v0, :cond_19

    aget-object v0, v7, v5

    .line 5000
    iget-object v2, p0, Lcom/baidu/techain/ae/c;->a:Landroid/content/Context;

    const-string v3, "event"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getExternalFilesDir(Ljava/lang/String;)Ljava/io/File;

    move-result-object v2

    .line 6000
    iget v0, v0, Lcom/baidu/techain/ab/d;->e:I

    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    .line 5000
    if-nez v2, :cond_96

    move-object v0, v1

    .line 4000
    :cond_58
    :goto_58
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_19

    :try_start_5e
    new-instance v2, Ljava/io/File;

    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 v3

    const-string v4, ".lock"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-static {v2}, Lcom/baidu/techain/af/ke;->c(Ljava/io/File;)Z

    new-instance v3, Ljava/io/RandomAccessFile;

    const-string v4, "rw"

    invoke-direct {v3, v2, v4}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V
    :try_end_80
    .catch Ljava/lang/Exception; {:try_start_5e .. :try_end_80} :catch_e8
    .catchall {:try_start_5e .. :try_end_80} :catchall_103

    :try_start_80
    invoke-virtual {v3}, Ljava/io/RandomAccessFile;->getChannel()Ljava/nio/channels/FileChannel;

    move-result-object v2

    invoke-virtual {v2}, Ljava/nio/channels/FileChannel;->lock()Ljava/nio/channels/FileLock;
    :try_end_87
    .catch Ljava/lang/Exception; {:try_start_80 .. :try_end_87} :catch_125
    .catchall {:try_start_80 .. :try_end_87} :catchall_120

    move-result-object v2

    :try_start_88
    array-length v8, v7

    move v4, v5

    :goto_8a
    if-ge v4, v8, :cond_d3

    aget-object v9, v7, v4

    if-eqz v9, :cond_93

    invoke-direct {p0, v7, v0}, Lcom/baidu/techain/ae/c;->a([Lcom/baidu/techain/ab/d;Ljava/lang/String;)V
    :try_end_93
    .catch Ljava/lang/Exception; {:try_start_88 .. :try_end_93} :catch_128
    .catchall {:try_start_88 .. :try_end_93} :catchall_122

    :cond_93
    add-int/lit8 v4, v4, 0x1

    goto :goto_8a

    .line 5000
    :cond_96
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    sget-object v3, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, 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

    move v2, v5

    :goto_b2
    const/16 v0, 0x64

    if-ge v2, v0, :cond_12a

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iget-object v4, p0, Lcom/baidu/techain/ae/c;->a:Landroid/content/Context;

    invoke-static {v4, v0}, Lcom/baidu/techain/af/af;->a(Landroid/content/Context;Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_58

    add-int/lit8 v0, v2, 0x1

    move v2, v0

    goto :goto_b2

    .line 4000
    :cond_d3
    if-eqz v2, :cond_de

    invoke-virtual {v2}, Ljava/nio/channels/FileLock;->isValid()Z

    move-result v0

    if-eqz v0, :cond_de

    :try_start_db
    invoke-virtual {v2}, Ljava/nio/channels/FileLock;->release()V
    :try_end_de
    .catch Ljava/io/IOException; {:try_start_db .. :try_end_de} :catch_e3

    :cond_de
    :goto_de
    invoke-static {v3}, Lcom/baidu/techain/af/ke;->a(Ljava/io/Closeable;)V

    goto/16 :goto_19

    :catch_e3
    move-exception v0

    invoke-static {v0}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_de

    :catch_e8
    move-exception v0

    move-object v2, v1

    move-object v3, v1

    :goto_eb
    :try_start_eb
    invoke-static {v0}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V
    :try_end_ee
    .catchall {:try_start_eb .. :try_end_ee} :catchall_122

    if-eqz v2, :cond_f9

    invoke-virtual {v2}, Ljava/nio/channels/FileLock;->isValid()Z

    move-result v0

    if-eqz v0, :cond_f9

    :try_start_f6
    invoke-virtual {v2}, Ljava/nio/channels/FileLock;->release()V
    :try_end_f9
    .catch Ljava/io/IOException; {:try_start_f6 .. :try_end_f9} :catch_fe

    :cond_f9
    :goto_f9
    invoke-static {v3}, Lcom/baidu/techain/af/ke;->a(Ljava/io/Closeable;)V

    goto/16 :goto_19

    :catch_fe
    move-exception v0

    invoke-static {v0}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_f9

    :catchall_103
    move-exception v0

    move-object v3, v1

    :goto_105
    if-eqz v1, :cond_110

    invoke-virtual {v1}, Ljava/nio/channels/FileLock;->isValid()Z

    move-result v2

    if-eqz v2, :cond_110

    :try_start_10d
    invoke-virtual {v1}, Ljava/nio/channels/FileLock;->release()V
    :try_end_110
    .catch Ljava/io/IOException; {:try_start_10d .. :try_end_110} :catch_114

    :cond_110
    :goto_110
    invoke-static {v3}, Lcom/baidu/techain/af/ke;->a(Ljava/io/Closeable;)V

    throw v0

    :catch_114
    move-exception v1

    invoke-static {v1}, Lcom/baidu/techain/aa/c;->a(Ljava/lang/Throwable;)V

    goto :goto_110

    .line 0
    :cond_119
    iget-object v0, p0, Lcom/baidu/techain/ae/c;->b:Ljava/util/HashMap;

    invoke-virtual {v0}, Ljava/util/HashMap;->clear()V

    goto/16 :goto_6

    .line 4000
    :catchall_120
    move-exception v0

    goto :goto_105

    :catchall_122
    move-exception v0

    move-object v1, v2

    goto :goto_105

    :catch_125
    move-exception v0

    move-object v2, v1

    goto :goto_eb

    :catch_128
    move-exception v0

    goto :goto_eb

    :cond_12a
    move-object v0, v1

    goto/16 :goto_58
.end method