cbw.smali

.class public Ldxoptimizer/cbw;
.super Ljava/lang/Object;
.source "TrafficAnalyerManager.java"


# direct methods
.method public static a(Landroid/content/Context;)V
    .registers 3

    .prologue
    .line 32
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0xf

    if-lt v0, v1, :cond_c

    .line 33
    invoke-static {p0}, Ldxoptimizer/cbw;->b(Landroid/content/Context;)V

    .line 34
    invoke-static {p0}, Ldxoptimizer/cbw;->c(Landroid/content/Context;)V

    .line 37
    :cond_c
    return-void
.end method

.method private static a(Landroid/content/Context;Ldxoptimizer/cby;)V
    .registers 8

    .prologue
    const/4 v1, 0x0

    .line 303
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v2

    .line 304
    invoke-static {p0}, Ldxoptimizer/cbu;->b(Landroid/content/Context;)J

    move-result-wide v4

    .line 306
    cmp-long v0, v2, v4

    if-gez v0, :cond_1f

    const/4 v0, 0x1

    .line 308
    :goto_e
    invoke-static {p0}, Ldxoptimizer/cbu;->a(Landroid/content/Context;)Z

    move-result v2

    .line 310
    if-nez v2, :cond_16

    if-eqz v0, :cond_1e

    .line 312
    :cond_16
    invoke-virtual {p1}, Ldxoptimizer/cby;->c()V

    .line 313
    if-eqz v2, :cond_1e

    .line 314
    invoke-static {p0, v1}, Ldxoptimizer/cbu;->a(Landroid/content/Context;Z)V

    .line 317
    :cond_1e
    return-void

    :cond_1f
    move v0, v1

    .line 306
    goto :goto_e
.end method

.method private static a(Ldxoptimizer/cbt;)V
    .registers 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Lcom/dianxinos/optimizer/trafficanalyzer/StatsParseException;
        }
    .end annotation

    .prologue
    const/4 v0, 0x0

    .line 255
    const/16 v1, 0x9

    new-array v1, v1, [Ljava/lang/String;

    const-string v2, "idx"

    aput-object v2, v1, v0

    const/4 v2, 0x1

    const-string v3, "iface"

    aput-object v3, v1, v2

    const/4 v2, 0x2

    const-string v3, "acct_tag_hex"

    aput-object v3, v1, v2

    const/4 v2, 0x3

    const-string v3, "uid_tag_int"

    aput-object v3, v1, v2

    const/4 v2, 0x4

    const-string v3, "cnt_set"

    aput-object v3, v1, v2

    const/4 v2, 0x5

    const-string v3, "rx_bytes"

    aput-object v3, v1, v2

    const/4 v2, 0x6

    const-string v3, "rx_packets"

    aput-object v3, v1, v2

    const/4 v2, 0x7

    const-string v3, "tx_bytes"

    aput-object v3, v1, v2

    const/16 v2, 0x8

    const-string v3, "tx_packets"

    aput-object v3, v1, v2

    .line 259
    array-length v2, v1

    :goto_33
    if-ge v0, v2, :cond_47

    aget-object v3, v1, v0

    .line 260
    invoke-virtual {p0}, Ldxoptimizer/cbt;->c()Ljava/lang/String;

    move-result-object v4

    .line 261
    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-nez v5, :cond_44

    .line 262
    invoke-static {v4, v3}, Ldxoptimizer/cbw;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 259
    :cond_44
    add-int/lit8 v0, v0, 0x1

    goto :goto_33

    .line 265
    :cond_47
    invoke-virtual {p0}, Ldxoptimizer/cbt;->b()V

    .line 266
    return-void
.end method

.method private static a(Ljava/lang/String;Ljava/lang/String;)V
    .registers 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/dianxinos/optimizer/trafficanalyzer/StatsParseException;
        }
    .end annotation

    .prologue
    .line 286
    new-instance v0, Lcom/dianxinos/optimizer/trafficanalyzer/StatsParseException;

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "Unknown field \""

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

    move-result-object v1

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

    move-result-object v1

    const-string v2, "\" when check "

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

    move-result-object v1

    invoke-virtual {v1, p1}, 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 {v0, v1}, Lcom/dianxinos/optimizer/trafficanalyzer/StatsParseException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method private static a(Ljava/lang/String;)Z
    .registers 7

    .prologue
    const/4 v0, 0x1

    const/4 v1, 0x0

    .line 269
    const-string v2, "rmnet"

    invoke-virtual {p0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_b

    .line 277
    :cond_a
    :goto_a
    return v0

    .line 272
    :cond_b
    sget-object v3, Ldxoptimizer/cbv;->a:[Ljava/lang/String;

    array-length v4, v3

    move v2, v1

    :goto_f
    if-ge v2, v4, :cond_1c

    aget-object v5, v3, v2

    .line 273
    invoke-virtual {v5, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-nez v5, :cond_a

    .line 272
    add-int/lit8 v2, v2, 0x1

    goto :goto_f

    :cond_1c
    move v0, v1

    .line 277
    goto :goto_a
.end method

.method public static b(Landroid/content/Context;)V
    .registers 7

    .prologue
    const-wide/32 v4, 0x124f80

    .line 44
    invoke-static {p0}, Ldxoptimizer/cbu;->c(Landroid/content/Context;)J

    move-result-wide v0

    .line 45
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    .line 46
    sub-long v0, v2, v0

    .line 47
    cmp-long v0, v0, v4

    if-ltz v0, :cond_2a

    .line 48
    invoke-static {}, Ldxoptimizer/cbn;->a()Ldxoptimizer/cbn;

    move-result-object v0

    new-instance v1, Ldxoptimizer/cbw$1;

    invoke-direct {v1, p0}, Ldxoptimizer/cbw$1;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0, v1}, Ldxoptimizer/cbn;->b(Ljava/lang/Runnable;)V

    .line 54
    invoke-static {p0, v2, v3}, Ldxoptimizer/cbu;->b(Landroid/content/Context;J)V

    .line 55
    const-string v0, "com.dianxinos.optimizer.action.ALARM_EVENT_TRAFFIC_ANALYER"

    .line 56
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    add-long/2addr v2, v4

    .line 55
    invoke-static {v0, v2, v3}, Ldxoptimizer/aeg;->a(Ljava/lang/String;J)V

    .line 58
    :cond_2a
    return-void
.end method

.method private static b(Ljava/lang/String;)Z
    .registers 2

    .prologue
    .line 281
    const-string v0, "wlan"

    invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_10

    const-string v0, "eth"

    invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_12

    :cond_10
    const/4 v0, 0x1

    :goto_11
    return v0

    :cond_12
    const/4 v0, 0x0

    goto :goto_11
.end method

.method private static c(Ljava/lang/String;)I
    .registers 4

    .prologue
    const/4 v0, 0x0

    .line 294
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v1

    .line 295
    const/16 v2, 0xa

    if-le v1, v2, :cond_17

    .line 296
    add-int/lit8 v1, v1, -0x8

    invoke-virtual {p0, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/Long;->decode(Ljava/lang/String;)Ljava/lang/Long;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Long;->intValue()I

    move-result v0

    .line 298
    :cond_17
    return v0
.end method

.method public static c(Landroid/content/Context;)V
    .registers 9

    .prologue
    const-wide/32 v6, 0x5265c00

    .line 65
    invoke-static {p0}, Ldxoptimizer/cbu;->d(Landroid/content/Context;)J

    move-result-wide v2

    .line 66
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    .line 67
    sub-long v0, v4, v2

    .line 68
    cmp-long v0, v0, v6

    if-ltz v0, :cond_2b

    const/4 v0, 0x1

    .line 72
    :goto_12
    if-eqz v0, :cond_2a

    .line 73
    const-wide/16 v0, 0x0

    cmp-long v0, v2, v0

    if-eqz v0, :cond_1d

    .line 74
    invoke-static {p0}, Ldxoptimizer/cbw;->f(Landroid/content/Context;)V

    .line 76
    :cond_1d
    invoke-static {p0, v4, v5}, Ldxoptimizer/cbu;->c(Landroid/content/Context;J)V

    .line 77
    const-string v0, "com.dianxinos.optimizer.action.ALARM_EVENT_TRAFFIC_ANALYER_REPORT"

    .line 78
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    add-long/2addr v2, v6

    .line 77
    invoke-static {v0, v2, v3}, Ldxoptimizer/aeg;->a(Ljava/lang/String;J)V

    .line 80
    :cond_2a
    return-void

    .line 68
    :cond_2b
    const/4 v0, 0x0

    goto :goto_12
.end method

.method public static d(Landroid/content/Context;)V
    .registers 2

    .prologue
    .line 323
    const/4 v0, 0x1

    invoke-static {p0, v0}, Ldxoptimizer/cbu;->a(Landroid/content/Context;Z)V

    .line 324
    return-void
.end method

.method static synthetic e(Landroid/content/Context;)V
    .registers 1

    .prologue
    .line 23
    invoke-static {p0}, Ldxoptimizer/cbw;->g(Landroid/content/Context;)V

    return-void
.end method

.method private static f(Landroid/content/Context;)V
    .registers 7

    .prologue
    .line 88
    :try_start_0
    invoke-static {}, Ldxoptimizer/afs;->a()Ldxoptimizer/afs;

    move-result-object v0

    sget-object v1, Ldxoptimizer/cby;->a:Landroid/net/Uri;

    const-class v2, Ldxoptimizer/cbz;

    .line 89
    invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v2

    .line 88
    invoke-virtual {v0, v1, v2}, Ldxoptimizer/afs;->a(Landroid/net/Uri;Ljava/lang/String;)Z

    .line 90
    new-instance v0, Ldxoptimizer/cby;

    invoke-direct {v0, p0}, Ldxoptimizer/cby;-><init>(Landroid/content/Context;)V

    .line 91
    invoke-virtual {v0}, Ldxoptimizer/cby;->a()Lorg/json/JSONArray;

    move-result-object v1

    .line 92
    if-eqz v1, :cond_43

    .line 93
    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2}, Lorg/json/JSONObject;-><init>()V

    .line 94
    const-string v3, "traffic_tags"

    invoke-virtual {v2, v3, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 95
    const-string v1, "start_time"

    .line 96
    invoke-static {p0}, Ldxoptimizer/cbu;->e(Landroid/content/Context;)J

    move-result-wide v4

    .line 95
    invoke-virtual {v2, v1, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    .line 97
    const-string v1, "end_time"

    .line 98
    invoke-static {p0}, Ldxoptimizer/cbu;->f(Landroid/content/Context;)J

    move-result-wide v4

    .line 97
    invoke-virtual {v2, v1, v4, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;

    .line 103
    const-string v1, "tfic_da"

    invoke-static {v1, v2}, Ldxoptimizer/cgh;->a(Ljava/lang/String;Lorg/json/JSONObject;)V

    .line 106
    invoke-virtual {v0}, Ldxoptimizer/cby;->b()V

    .line 107
    const-wide/16 v0, 0x0

    invoke-static {p0, v0, v1}, Ldxoptimizer/cbu;->d(Landroid/content/Context;J)V
    :try_end_43
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_43} :catch_53
    .catchall {:try_start_0 .. :try_end_43} :catchall_64

    .line 114
    :cond_43
    invoke-static {}, Ldxoptimizer/afs;->a()Ldxoptimizer/afs;

    move-result-object v0

    sget-object v1, Ldxoptimizer/cby;->a:Landroid/net/Uri;

    const-class v2, Ldxoptimizer/cbz;

    .line 115
    invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v2

    .line 114
    invoke-virtual {v0, v1, v2}, Ldxoptimizer/afs;->b(Landroid/net/Uri;Ljava/lang/String;)V

    .line 118
    :goto_52
    return-void

    .line 109
    :catch_53
    move-exception v0

    .line 114
    invoke-static {}, Ldxoptimizer/afs;->a()Ldxoptimizer/afs;

    move-result-object v0

    sget-object v1, Ldxoptimizer/cby;->a:Landroid/net/Uri;

    const-class v2, Ldxoptimizer/cbz;

    .line 115
    invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v2

    .line 114
    invoke-virtual {v0, v1, v2}, Ldxoptimizer/afs;->b(Landroid/net/Uri;Ljava/lang/String;)V

    goto :goto_52

    :catchall_64
    move-exception v0

    invoke-static {}, Ldxoptimizer/afs;->a()Ldxoptimizer/afs;

    move-result-object v1

    sget-object v2, Ldxoptimizer/cby;->a:Landroid/net/Uri;

    const-class v3, Ldxoptimizer/cbz;

    .line 115
    invoke-virtual {v3}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v3

    .line 114
    invoke-virtual {v1, v2, v3}, Ldxoptimizer/afs;->b(Landroid/net/Uri;Ljava/lang/String;)V

    throw v0
.end method

.method private static g(Landroid/content/Context;)V
    .registers 22

    .prologue
    .line 124
    new-instance v4, Ljava/io/File;

    const-string v2, "/proc/net/xt_qtaguid/stats"

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

    .line 125
    invoke-virtual {v4}, Ljava/io/File;->exists()Z

    move-result v2

    if-nez v2, :cond_e

    .line 251
    :cond_d
    :goto_d
    return-void

    .line 132
    :cond_e
    const-string v2, "traffic_analyer"

    move-object/from16 v0, p0

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

    move-result-object v14

    .line 133
    const/4 v3, 0x0

    .line 135
    :try_start_17
    new-instance v2, Ljava/io/FileInputStream;

    invoke-direct {v2, v4}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
    :try_end_1c
    .catch Ljava/lang/Exception; {:try_start_17 .. :try_end_1c} :catch_b6
    .catchall {:try_start_17 .. :try_end_1c} :catchall_c5

    .line 136
    :try_start_1c
    invoke-static {v2, v14}, Ldxoptimizer/cdp;->a(Ljava/io/InputStream;Ljava/io/File;)V
    :try_end_1f
    .catch Ljava/lang/Exception; {:try_start_1c .. :try_end_1f} :catch_1b9
    .catchall {:try_start_1c .. :try_end_1f} :catchall_1b1

    .line 143
    if-eqz v2, :cond_24

    .line 145
    :try_start_21
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V
    :try_end_24
    .catch Ljava/io/IOException; {:try_start_21 .. :try_end_24} :catch_b0

    .line 153
    :cond_24
    :goto_24
    const/4 v2, 0x0

    .line 155
    :try_start_25
    invoke-static {}, Ldxoptimizer/afs;->a()Ldxoptimizer/afs;

    move-result-object v3

    sget-object v4, Ldxoptimizer/cby;->a:Landroid/net/Uri;

    const-class v5, Ldxoptimizer/cbz;

    .line 156
    invoke-virtual {v5}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v5

    .line 155
    invoke-virtual {v3, v4, v5}, Ldxoptimizer/afs;->a(Landroid/net/Uri;Ljava/lang/String;)Z

    .line 157
    invoke-static {}, Landroid/os/Process;->myUid()I

    move-result v15

    .line 161
    new-instance v11, Ldxoptimizer/cbt;

    new-instance v3, Ljava/io/FileInputStream;

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

    move-result-object v4

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

    invoke-direct {v11, v3}, Ldxoptimizer/cbt;-><init>(Ljava/io/InputStream;)V
    :try_end_46
    .catch Ljava/io/IOException; {:try_start_25 .. :try_end_46} :catch_1ae
    .catch Lcom/dianxinos/optimizer/trafficanalyzer/StatsParseException; {:try_start_25 .. :try_end_46} :catch_1a5
    .catch Ljava/lang/NumberFormatException; {:try_start_25 .. :try_end_46} :catch_1a8
    .catch Landroid/database/sqlite/SQLiteException; {:try_start_25 .. :try_end_46} :catch_1ab
    .catchall {:try_start_25 .. :try_end_46} :catchall_1a1

    .line 163
    :try_start_46
    invoke-static {v11}, Ldxoptimizer/cbw;->a(Ldxoptimizer/cbt;)V

    .line 165
    new-instance v2, Ldxoptimizer/cby;

    move-object/from16 v0, p0

    invoke-direct {v2, v0}, Ldxoptimizer/cby;-><init>(Landroid/content/Context;)V

    .line 166
    move-object/from16 v0, p0

    invoke-static {v0, v2}, Ldxoptimizer/cbw;->a(Landroid/content/Context;Ldxoptimizer/cby;)V

    .line 168
    invoke-static/range {p0 .. p0}, Ldxoptimizer/cbu;->e(Landroid/content/Context;)J

    move-result-wide v4

    const-wide/16 v6, 0x0

    cmp-long v3, v4, v6

    if-nez v3, :cond_68

    .line 169
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    move-object/from16 v0, p0

    invoke-static {v0, v4, v5}, Ldxoptimizer/cbu;->d(Landroid/content/Context;J)V

    .line 172
    :cond_68
    :goto_68
    invoke-virtual {v11}, Ldxoptimizer/cbt;->a()Z

    move-result v3

    if-eqz v3, :cond_178

    .line 173
    invoke-virtual {v11}, Ldxoptimizer/cbt;->e()I

    .line 174
    invoke-virtual {v11}, Ldxoptimizer/cbt;->c()Ljava/lang/String;

    move-result-object v4

    .line 175
    invoke-static {v4}, Ldxoptimizer/cbw;->a(Ljava/lang/String;)Z

    move-result v10

    .line 176
    invoke-static {v4}, Ldxoptimizer/cbw;->b(Ljava/lang/String;)Z

    move-result v3

    .line 177
    if-nez v10, :cond_d1

    if-nez v3, :cond_d1

    .line 178
    invoke-virtual {v11}, Ldxoptimizer/cbt;->b()V
    :try_end_84
    .catch Ljava/io/IOException; {:try_start_46 .. :try_end_84} :catch_85
    .catch Lcom/dianxinos/optimizer/trafficanalyzer/StatsParseException; {:try_start_46 .. :try_end_84} :catch_e3
    .catch Ljava/lang/NumberFormatException; {:try_start_46 .. :try_end_84} :catch_f4
    .catch Landroid/database/sqlite/SQLiteException; {:try_start_46 .. :try_end_84} :catch_11b
    .catchall {:try_start_46 .. :try_end_84} :catchall_136

    goto :goto_68

    .line 239
    :catch_85
    move-exception v2

    move-object v2, v11

    .line 244
    :goto_87
    invoke-static {}, Ldxoptimizer/afs;->a()Ldxoptimizer/afs;

    move-result-object v3

    sget-object v4, Ldxoptimizer/cby;->a:Landroid/net/Uri;

    const-class v5, Ldxoptimizer/cbz;

    .line 245
    invoke-virtual {v5}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v5

    .line 244
    invoke-virtual {v3, v4, v5}, Ldxoptimizer/afs;->b(Landroid/net/Uri;Ljava/lang/String;)V

    .line 246
    invoke-static {v2}, Ldxoptimizer/cdp;->a(Ljava/io/Closeable;)V

    .line 247
    invoke-virtual {v14}, Ljava/io/File;->delete()Z

    .line 248
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    move-object/from16 v0, p0

    invoke-static {v0, v2, v3}, Ldxoptimizer/cbu;->e(Landroid/content/Context;J)V

    .line 249
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v2

    move-object/from16 v0, p0

    invoke-static {v0, v2, v3}, Ldxoptimizer/cbu;->a(Landroid/content/Context;J)V

    goto/16 :goto_d

    .line 146
    :catch_b0
    move-exception v2

    .line 147
    invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V

    goto/16 :goto_24

    .line 137
    :catch_b6
    move-exception v2

    move-object v2, v3

    .line 143
    :goto_b8
    if-eqz v2, :cond_d

    .line 145
    :try_start_ba
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V
    :try_end_bd
    .catch Ljava/io/IOException; {:try_start_ba .. :try_end_bd} :catch_bf

    goto/16 :goto_d

    .line 146
    :catch_bf
    move-exception v2

    .line 147
    invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V

    goto/16 :goto_d

    .line 143
    :catchall_c5
    move-exception v2

    :goto_c6
    if-eqz v3, :cond_cb

    .line 145
    :try_start_c8
    invoke-virtual {v3}, Ljava/io/InputStream;->close()V
    :try_end_cb
    .catch Ljava/io/IOException; {:try_start_c8 .. :try_end_cb} :catch_cc

    .line 148
    :cond_cb
    :goto_cb
    throw v2

    .line 146
    :catch_cc
    move-exception v3

    .line 147
    invoke-virtual {v3}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_cb

    .line 181
    :cond_d1
    :try_start_d1
    invoke-virtual {v11}, Ldxoptimizer/cbt;->c()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Ldxoptimizer/cbw;->c(Ljava/lang/String;)I

    move-result v3

    .line 182
    invoke-virtual {v11}, Ldxoptimizer/cbt;->e()I

    move-result v5

    .line 184
    if-eq v15, v5, :cond_e6

    .line 185
    invoke-virtual {v11}, Ldxoptimizer/cbt;->b()V

    goto :goto_68

    .line 239
    :catch_e3
    move-exception v2

    move-object v2, v11

    goto :goto_87

    .line 188
    :cond_e6
    invoke-virtual {v11}, Ldxoptimizer/cbt;->e()I

    move-result v5

    .line 189
    const/4 v6, 0x1

    if-eq v5, v6, :cond_f7

    if-eqz v5, :cond_f7

    .line 190
    invoke-virtual {v11}, Ldxoptimizer/cbt;->b()V

    goto/16 :goto_68

    .line 239
    :catch_f4
    move-exception v2

    move-object v2, v11

    goto :goto_87

    .line 193
    :cond_f7
    invoke-virtual {v11}, Ldxoptimizer/cbt;->d()J

    move-result-wide v6

    .line 194
    invoke-virtual {v11}, Ldxoptimizer/cbt;->d()J

    .line 195
    invoke-virtual {v11}, Ldxoptimizer/cbt;->d()J

    move-result-wide v8

    .line 197
    add-long/2addr v8, v6

    .line 200
    invoke-virtual {v2, v3, v4, v5, v10}, Ldxoptimizer/cby;->a(ILjava/lang/String;IZ)[J

    move-result-object v6

    .line 201
    const/4 v7, 0x0

    aget-wide v12, v6, v7

    .line 202
    const/4 v7, 0x1

    aget-wide v16, v6, v7

    .line 203
    const/4 v7, 0x2

    aget-wide v6, v6, v7

    .line 204
    const-wide/16 v18, -0x1

    cmp-long v6, v6, v18

    if-nez v6, :cond_11f

    .line 205
    invoke-virtual {v11}, Ldxoptimizer/cbt;->b()V

    goto/16 :goto_68

    .line 239
    :catch_11b
    move-exception v2

    move-object v2, v11

    goto/16 :goto_87

    .line 208
    :cond_11f
    const/4 v6, 0x0

    .line 209
    const-wide/16 v18, -0x1

    cmp-long v7, v16, v18

    if-nez v7, :cond_15f

    .line 210
    const/4 v6, 0x1

    move/from16 v20, v6

    move-wide v6, v12

    move/from16 v12, v20

    .line 224
    :goto_12c
    if-eqz v12, :cond_131

    .line 225
    invoke-virtual/range {v2 .. v10}, Ldxoptimizer/cby;->a(ILjava/lang/String;IJJZ)V

    .line 234
    :cond_131
    invoke-virtual {v11}, Ldxoptimizer/cbt;->b()V
    :try_end_134
    .catch Ljava/io/IOException; {:try_start_d1 .. :try_end_134} :catch_85
    .catch Lcom/dianxinos/optimizer/trafficanalyzer/StatsParseException; {:try_start_d1 .. :try_end_134} :catch_e3
    .catch Ljava/lang/NumberFormatException; {:try_start_d1 .. :try_end_134} :catch_f4
    .catch Landroid/database/sqlite/SQLiteException; {:try_start_d1 .. :try_end_134} :catch_11b
    .catchall {:try_start_d1 .. :try_end_134} :catchall_136

    goto/16 :goto_68

    .line 244
    :catchall_136
    move-exception v2

    :goto_137
    invoke-static {}, Ldxoptimizer/afs;->a()Ldxoptimizer/afs;

    move-result-object v3

    sget-object v4, Ldxoptimizer/cby;->a:Landroid/net/Uri;

    const-class v5, Ldxoptimizer/cbz;

    .line 245
    invoke-virtual {v5}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v5

    .line 244
    invoke-virtual {v3, v4, v5}, Ldxoptimizer/afs;->b(Landroid/net/Uri;Ljava/lang/String;)V

    .line 246
    invoke-static {v11}, Ldxoptimizer/cdp;->a(Ljava/io/Closeable;)V

    .line 247
    invoke-virtual {v14}, Ljava/io/File;->delete()Z

    .line 248
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    move-object/from16 v0, p0

    invoke-static {v0, v4, v5}, Ldxoptimizer/cbu;->e(Landroid/content/Context;J)V

    .line 249
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v4

    move-object/from16 v0, p0

    invoke-static {v0, v4, v5}, Ldxoptimizer/cbu;->a(Landroid/content/Context;J)V

    throw v2

    .line 212
    :cond_15f
    cmp-long v7, v8, v16

    if-lez v7, :cond_16d

    .line 213
    sub-long v6, v8, v16

    add-long/2addr v12, v6

    .line 214
    const/4 v6, 0x1

    move/from16 v20, v6

    move-wide v6, v12

    move/from16 v12, v20

    goto :goto_12c

    .line 215
    :cond_16d
    cmp-long v7, v8, v16

    if-gez v7, :cond_1bc

    .line 220
    const/4 v6, 0x1

    move/from16 v20, v6

    move-wide v6, v12

    move/from16 v12, v20

    goto :goto_12c

    .line 244
    :cond_178
    invoke-static {}, Ldxoptimizer/afs;->a()Ldxoptimizer/afs;

    move-result-object v2

    sget-object v3, Ldxoptimizer/cby;->a:Landroid/net/Uri;

    const-class v4, Ldxoptimizer/cbz;

    .line 245
    invoke-virtual {v4}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v4

    .line 244
    invoke-virtual {v2, v3, v4}, Ldxoptimizer/afs;->b(Landroid/net/Uri;Ljava/lang/String;)V

    .line 246
    invoke-static {v11}, Ldxoptimizer/cdp;->a(Ljava/io/Closeable;)V

    .line 247
    invoke-virtual {v14}, Ljava/io/File;->delete()Z

    .line 248
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    move-object/from16 v0, p0

    invoke-static {v0, v2, v3}, Ldxoptimizer/cbu;->e(Landroid/content/Context;J)V

    .line 249
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v2

    move-object/from16 v0, p0

    invoke-static {v0, v2, v3}, Ldxoptimizer/cbu;->a(Landroid/content/Context;J)V

    goto/16 :goto_d

    .line 244
    :catchall_1a1
    move-exception v3

    move-object v11, v2

    move-object v2, v3

    goto :goto_137

    .line 239
    :catch_1a5
    move-exception v3

    goto/16 :goto_87

    :catch_1a8
    move-exception v3

    goto/16 :goto_87

    :catch_1ab
    move-exception v3

    goto/16 :goto_87

    :catch_1ae
    move-exception v3

    goto/16 :goto_87

    .line 143
    :catchall_1b1
    move-exception v3

    move-object/from16 v20, v3

    move-object v3, v2

    move-object/from16 v2, v20

    goto/16 :goto_c6

    .line 137
    :catch_1b9
    move-exception v3

    goto/16 :goto_b8

    :cond_1bc
    move/from16 v20, v6

    move-wide v6, v12

    move/from16 v12, v20

    goto/16 :goto_12c
.end method