y$a.smali

.class public final Lcom/tencent/bugly/proguard/y$a;
.super Ljava/lang/Object;
.source "BUGLY"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/tencent/bugly/proguard/y;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "a"
.end annotation


# instance fields
.field private a:Z

.field private b:Ljava/io/File;

.field private c:Ljava/lang/String;

.field private d:J

.field private e:J


# direct methods
.method public constructor <init>(Ljava/lang/String;)V
    .registers 4

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

    .line 353
    const-wide/16 v0, 0x7800

    iput-wide v0, p0, Lcom/tencent/bugly/proguard/y$a;->e:J

    .line 361
    if-eqz p1, :cond_11

    const-string v0, ""

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_12

    .line 366
    :cond_11
    :goto_11
    return-void

    .line 364
    :cond_12
    iput-object p1, p0, Lcom/tencent/bugly/proguard/y$a;->c:Ljava/lang/String;

    .line 365
    invoke-direct {p0}, Lcom/tencent/bugly/proguard/y$a;->a()Z

    move-result v0

    iput-boolean v0, p0, Lcom/tencent/bugly/proguard/y$a;->a:Z

    goto :goto_11
.end method

.method static synthetic a(Lcom/tencent/bugly/proguard/y$a;)Ljava/io/File;
    .registers 2

    .prologue
    .line 348
    iget-object v0, p0, Lcom/tencent/bugly/proguard/y$a;->b:Ljava/io/File;

    return-object v0
.end method

.method private a()Z
    .registers 4

    .prologue
    const/4 v0, 0x0

    .line 375
    :try_start_1
    new-instance v1, Ljava/io/File;

    iget-object v2, p0, Lcom/tencent/bugly/proguard/y$a;->c:Ljava/lang/String;

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

    iput-object v1, p0, Lcom/tencent/bugly/proguard/y$a;->b:Ljava/io/File;

    .line 376
    iget-object v1, p0, Lcom/tencent/bugly/proguard/y$a;->b:Ljava/io/File;

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

    move-result v1

    if-eqz v1, :cond_1e

    .line 377
    iget-object v1, p0, Lcom/tencent/bugly/proguard/y$a;->b:Ljava/io/File;

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

    move-result v1

    .line 378
    if-nez v1, :cond_1e

    .line 379
    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/tencent/bugly/proguard/y$a;->a:Z

    .line 395
    :goto_1d
    return v0

    .line 383
    :cond_1e
    iget-object v1, p0, Lcom/tencent/bugly/proguard/y$a;->b:Ljava/io/File;

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

    move-result v1

    .line 384
    if-nez v1, :cond_31

    .line 385
    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/tencent/bugly/proguard/y$a;->a:Z
    :try_end_29
    .catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_29} :catch_2a

    goto :goto_1d

    .line 388
    :catch_2a
    move-exception v1

    .line 389
    invoke-static {v1}, Lcom/tencent/bugly/proguard/x;->a(Ljava/lang/Throwable;)Z

    .line 390
    iput-boolean v0, p0, Lcom/tencent/bugly/proguard/y$a;->a:Z

    goto :goto_1d

    .line 395
    :cond_31
    const/4 v0, 0x1

    goto :goto_1d
.end method

.method static synthetic b(Lcom/tencent/bugly/proguard/y$a;)J
    .registers 3

    .prologue
    .line 348
    iget-wide v0, p0, Lcom/tencent/bugly/proguard/y$a;->e:J

    return-wide v0
.end method

.method static synthetic c(Lcom/tencent/bugly/proguard/y$a;)Z
    .registers 2

    .prologue
    .line 348
    invoke-direct {p0}, Lcom/tencent/bugly/proguard/y$a;->a()Z

    move-result v0

    return v0
.end method

.method static synthetic d(Lcom/tencent/bugly/proguard/y$a;)Z
    .registers 2

    .prologue
    .line 348
    iget-boolean v0, p0, Lcom/tencent/bugly/proguard/y$a;->a:Z

    return v0
.end method


# virtual methods
.method public final a(Ljava/lang/String;)Z
    .registers 10

    .prologue
    const/4 v1, 0x1

    const/4 v0, 0x0

    .line 405
    iget-boolean v2, p0, Lcom/tencent/bugly/proguard/y$a;->a:Z

    if-nez v2, :cond_7

    .line 430
    :cond_6
    :goto_6
    return v0

    .line 408
    :cond_7
    const/4 v3, 0x0

    .line 410
    :try_start_8
    new-instance v2, Ljava/io/FileOutputStream;

    iget-object v4, p0, Lcom/tencent/bugly/proguard/y$a;->b:Ljava/io/File;

    const/4 v5, 0x1

    invoke-direct {v2, v4, v5}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;Z)V
    :try_end_10
    .catch Ljava/lang/Throwable; {:try_start_8 .. :try_end_10} :catch_2e
    .catchall {:try_start_8 .. :try_end_10} :catchall_3e

    .line 411
    :try_start_10
    const-string v3, "UTF-8"

    invoke-virtual {p1, v3}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v3

    .line 412
    invoke-virtual {v2, v3}, Ljava/io/FileOutputStream;->write([B)V

    .line 413
    invoke-virtual {v2}, Ljava/io/FileOutputStream;->flush()V

    .line 414
    invoke-virtual {v2}, Ljava/io/FileOutputStream;->close()V

    .line 415
    iget-wide v4, p0, Lcom/tencent/bugly/proguard/y$a;->d:J

    array-length v3, v3

    int-to-long v6, v3

    add-long/2addr v4, v6

    iput-wide v4, p0, Lcom/tencent/bugly/proguard/y$a;->d:J

    .line 416
    const/4 v3, 0x1

    iput-boolean v3, p0, Lcom/tencent/bugly/proguard/y$a;->a:Z
    :try_end_29
    .catch Ljava/lang/Throwable; {:try_start_10 .. :try_end_29} :catch_4c
    .catchall {:try_start_10 .. :try_end_29} :catchall_4a

    .line 422
    :try_start_29
    invoke-virtual {v2}, Ljava/io/FileOutputStream;->close()V
    :try_end_2c
    .catch Ljava/io/IOException; {:try_start_29 .. :try_end_2c} :catch_46

    :goto_2c
    move v0, v1

    .line 430
    goto :goto_6

    .line 417
    :catch_2e
    move-exception v1

    move-object v2, v3

    .line 418
    :goto_30
    :try_start_30
    invoke-static {v1}, Lcom/tencent/bugly/proguard/x;->a(Ljava/lang/Throwable;)Z

    .line 419
    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/tencent/bugly/proguard/y$a;->a:Z
    :try_end_36
    .catchall {:try_start_30 .. :try_end_36} :catchall_4a

    .line 420
    if-eqz v2, :cond_6

    .line 424
    :try_start_38
    invoke-virtual {v2}, Ljava/io/FileOutputStream;->close()V
    :try_end_3b
    .catch Ljava/io/IOException; {:try_start_38 .. :try_end_3b} :catch_3c

    goto :goto_6

    :catch_3c
    move-exception v1

    goto :goto_6

    .line 422
    :catchall_3e
    move-exception v0

    move-object v2, v3

    :goto_40
    if-eqz v2, :cond_45

    .line 424
    :try_start_42
    invoke-virtual {v2}, Ljava/io/FileOutputStream;->close()V
    :try_end_45
    .catch Ljava/io/IOException; {:try_start_42 .. :try_end_45} :catch_48

    .line 427
    :cond_45
    :goto_45
    throw v0

    :catch_46
    move-exception v0

    goto :goto_2c

    :catch_48
    move-exception v1

    goto :goto_45

    .line 422
    :catchall_4a
    move-exception v0

    goto :goto_40

    .line 417
    :catch_4c
    move-exception v1

    goto :goto_30
.end method