.class public final Lu1/c;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lu1/b;


# instance fields
.field public final a:Lb1/h;

.field public final b:Lb1/b;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lb1/b<",
            "Lu1/a;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Lb1/h;)V
    .registers 3

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

    iput-object p1, p0, Lu1/c;->a:Lb1/h;

    new-instance v0, Lu1/c$a;

    invoke-direct {v0, p0, p1}, Lu1/c$a;-><init>(Lu1/c;Lb1/h;)V

    iput-object v0, p0, Lu1/c;->b:Lb1/b;

    return-void
.end method


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

    const-string v0, "SELECT work_spec_id FROM dependency WHERE prerequisite_id=?"

    const/4 v1, 0x1

    invoke-static {v0, v1}, Lb1/j;->e(Ljava/lang/String;I)Lb1/j;

    move-result-object v0

    if-nez p1, :cond_d

    invoke-virtual {v0, v1}, Lb1/j;->o(I)V

    goto :goto_10

    :cond_d
    invoke-virtual {v0, v1, p1}, Lb1/j;->p(ILjava/lang/String;)V

    :goto_10
    iget-object p1, p0, Lu1/c;->a:Lb1/h;

    invoke-virtual {p1}, Lb1/h;->b()V

    iget-object p1, p0, Lu1/c;->a:Lb1/h;

    const/4 v1, 0x0

    const/4 v2, 0x0

    invoke-static {p1, v0, v2, v1}, Ld1/b;->a(Lb1/h;Le1/d;ZLandroid/os/CancellationSignal;)Landroid/database/Cursor;

    move-result-object p1

    :try_start_1d
    new-instance v1, Ljava/util/ArrayList;

    invoke-interface {p1}, Landroid/database/Cursor;->getCount()I

    move-result v3

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

    :goto_26
    invoke-interface {p1}, Landroid/database/Cursor;->moveToNext()Z

    move-result v3

    if-eqz v3, :cond_34

    invoke-interface {p1, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    :try_end_33
    .catchall {:try_start_1d .. :try_end_33} :catchall_3b

    goto :goto_26

    :cond_34
    invoke-interface {p1}, Landroid/database/Cursor;->close()V

    invoke-virtual {v0}, Lb1/j;->q()V

    return-object v1

    :catchall_3b
    move-exception v1

    invoke-interface {p1}, Landroid/database/Cursor;->close()V

    invoke-virtual {v0}, Lb1/j;->q()V

    throw v1
.end method

.method public b(Ljava/lang/String;)Z
    .registers 6

    const-string v0, "SELECT COUNT(*)=0 FROM dependency WHERE work_spec_id=? AND prerequisite_id IN (SELECT id FROM workspec WHERE state!=2)"

    const/4 v1, 0x1

    invoke-static {v0, v1}, Lb1/j;->e(Ljava/lang/String;I)Lb1/j;

    move-result-object v0

    if-nez p1, :cond_d

    invoke-virtual {v0, v1}, Lb1/j;->o(I)V

    goto :goto_10

    :cond_d
    invoke-virtual {v0, v1, p1}, Lb1/j;->p(ILjava/lang/String;)V

    :goto_10
    iget-object p1, p0, Lu1/c;->a:Lb1/h;

    invoke-virtual {p1}, Lb1/h;->b()V

    iget-object p1, p0, Lu1/c;->a:Lb1/h;

    const/4 v2, 0x0

    const/4 v3, 0x0

    invoke-static {p1, v0, v3, v2}, Ld1/b;->a(Lb1/h;Le1/d;ZLandroid/os/CancellationSignal;)Landroid/database/Cursor;

    move-result-object p1

    :try_start_1d
    invoke-interface {p1}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v2

    if-eqz v2, :cond_2c

    invoke-interface {p1, v3}, Landroid/database/Cursor;->getInt(I)I

    move-result v2
    :try_end_27
    .catchall {:try_start_1d .. :try_end_27} :catchall_33

    if-eqz v2, :cond_2a

    goto :goto_2b

    :cond_2a
    move v1, v3

    :goto_2b
    move v3, v1

    :cond_2c
    invoke-interface {p1}, Landroid/database/Cursor;->close()V

    invoke-virtual {v0}, Lb1/j;->q()V

    return v3

    :catchall_33
    move-exception v1

    invoke-interface {p1}, Landroid/database/Cursor;->close()V

    invoke-virtual {v0}, Lb1/j;->q()V

    throw v1
.end method
