cey$3.smali

.class final Ldxoptimizer/cey$3;
.super Landroid/content/pm/IPackageStatsObserver$Stub;
.source "StorageUtils.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Ldxoptimizer/cey;->a(Landroid/content/Context;Ljava/lang/String;Z)J
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation


# instance fields
.field final synthetic a:[J

.field final synthetic b:Z

.field final synthetic c:Ljava/lang/String;

.field final synthetic d:Ljava/util/concurrent/CountDownLatch;


# direct methods
.method constructor <init>([JZLjava/lang/String;Ljava/util/concurrent/CountDownLatch;)V
    .registers 5

    .prologue
    .line 405
    iput-object p1, p0, Ldxoptimizer/cey$3;->a:[J

    iput-boolean p2, p0, Ldxoptimizer/cey$3;->b:Z

    iput-object p3, p0, Ldxoptimizer/cey$3;->c:Ljava/lang/String;

    iput-object p4, p0, Ldxoptimizer/cey$3;->d:Ljava/util/concurrent/CountDownLatch;

    invoke-direct {p0}, Landroid/content/pm/IPackageStatsObserver$Stub;-><init>()V

    return-void
.end method

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

    .prologue
    const/4 v0, 0x0

    .line 408
    invoke-static {p1}, Ldxoptimizer/py;->a(Ljava/lang/String;)[Ljava/io/File;

    move-result-object v2

    .line 409
    if-nez v2, :cond_8

    .line 418
    :cond_7
    :goto_7
    return v0

    .line 413
    :cond_8
    array-length v3, v2

    move v1, v0

    :goto_a
    if-ge v1, v3, :cond_7

    aget-object v4, v2, v1

    .line 414
    if-eqz v4, :cond_18

    invoke-virtual {v4}, Ljava/io/File;->canWrite()Z

    move-result v4

    if-eqz v4, :cond_18

    .line 415
    const/4 v0, 0x1

    goto :goto_7

    .line 413
    :cond_18
    add-int/lit8 v1, v1, 0x1

    goto :goto_a
.end method


# virtual methods
.method public onGetStatsCompleted(Landroid/content/pm/PackageStats;Z)V
    .registers 13
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "ObsoleteSdkInt"
        }
    .end annotation

    .prologue
    const-wide/16 v8, 0x0

    const/4 v6, 0x0

    .line 424
    if-eqz p2, :cond_3c

    if-eqz p1, :cond_3c

    .line 425
    iget-object v0, p0, Ldxoptimizer/cey$3;->a:[J

    iget-wide v2, p1, Landroid/content/pm/PackageStats;->cacheSize:J

    aput-wide v2, v0, v6

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

    const/16 v1, 0xb

    if-lt v0, v1, :cond_28

    .line 427
    iget-boolean v0, p0, Ldxoptimizer/cey$3;->b:Z

    if-nez v0, :cond_1f

    iget-object v0, p0, Ldxoptimizer/cey$3;->c:Ljava/lang/String;

    invoke-direct {p0, v0}, Ldxoptimizer/cey$3;->a(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_28

    .line 430
    :cond_1f
    iget-object v0, p0, Ldxoptimizer/cey$3;->a:[J

    aget-wide v2, v0, v6

    iget-wide v4, p1, Landroid/content/pm/PackageStats;->externalCacheSize:J

    add-long/2addr v2, v4

    aput-wide v2, v0, v6

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

    const/16 v1, 0x11

    if-lt v0, v1, :cond_3c

    .line 434
    iget-object v0, p0, Ldxoptimizer/cey$3;->a:[J

    aget-wide v0, v0, v6

    const-wide/16 v2, 0x3000

    cmp-long v0, v0, v2

    if-nez v0, :cond_42

    .line 436
    iget-object v0, p0, Ldxoptimizer/cey$3;->a:[J

    aput-wide v8, v0, v6

    .line 446
    :cond_3c
    :goto_3c
    iget-object v0, p0, Ldxoptimizer/cey$3;->d:Ljava/util/concurrent/CountDownLatch;

    invoke-virtual {v0}, Ljava/util/concurrent/CountDownLatch;->countDown()V

    .line 447
    return-void

    .line 437
    :cond_42
    iget-object v0, p0, Ldxoptimizer/cey$3;->a:[J

    aget-wide v0, v0, v6

    const-wide/16 v2, 0x1000

    cmp-long v0, v0, v2

    if-nez v0, :cond_51

    .line 439
    iget-object v0, p0, Ldxoptimizer/cey$3;->a:[J

    aput-wide v8, v0, v6

    goto :goto_3c

    .line 440
    :cond_51
    iget-object v0, p0, Ldxoptimizer/cey$3;->a:[J

    aget-wide v0, v0, v6

    const-wide/16 v2, 0x2000

    cmp-long v0, v0, v2

    if-nez v0, :cond_3c

    .line 442
    iget-object v0, p0, Ldxoptimizer/cey$3;->a:[J

    aput-wide v8, v0, v6

    goto :goto_3c
.end method