.class public abstract Lv1/d;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field public final r:Lm1/b;


# direct methods
.method public constructor <init>()V
    .registers 2

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

    new-instance v0, Lm1/b;

    invoke-direct {v0}, Lm1/b;-><init>()V

    iput-object v0, p0, Lv1/d;->r:Lm1/b;

    return-void
.end method


# virtual methods
.method public a(Lm1/j;Ljava/lang/String;)V
    .registers 12

    .line 1
    iget-object v0, p1, Lm1/j;->c:Landroidx/work/impl/WorkDatabase;

    .line 2
    invoke-virtual {v0}, Landroidx/work/impl/WorkDatabase;->q()Lu1/q;

    move-result-object v1

    invoke-virtual {v0}, Landroidx/work/impl/WorkDatabase;->l()Lu1/b;

    move-result-object v0

    new-instance v2, Ljava/util/LinkedList;

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

    invoke-virtual {v2, p2}, Ljava/util/LinkedList;->add(Ljava/lang/Object;)Z

    :goto_12
    invoke-virtual {v2}, Ljava/util/LinkedList;->isEmpty()Z

    move-result v3

    const/4 v4, 0x0

    const/4 v5, 0x1

    if-nez v3, :cond_43

    invoke-virtual {v2}, Ljava/util/LinkedList;->remove()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    move-object v6, v1

    check-cast v6, Lu1/r;

    invoke-virtual {v6, v3}, Lu1/r;->f(Ljava/lang/String;)Landroidx/work/f;

    move-result-object v7

    sget-object v8, Landroidx/work/f;->t:Landroidx/work/f;

    if-eq v7, v8, :cond_38

    sget-object v8, Landroidx/work/f;->u:Landroidx/work/f;

    if-eq v7, v8, :cond_38

    sget-object v7, Landroidx/work/f;->w:Landroidx/work/f;

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

    aput-object v3, v5, v4

    invoke-virtual {v6, v7, v5}, Lu1/r;->p(Landroidx/work/f;[Ljava/lang/String;)I

    :cond_38
    move-object v4, v0

    check-cast v4, Lu1/c;

    invoke-virtual {v4, v3}, Lu1/c;->a(Ljava/lang/String;)Ljava/util/List;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/util/LinkedList;->addAll(Ljava/util/Collection;)Z

    goto :goto_12

    .line 3
    :cond_43
    iget-object v0, p1, Lm1/j;->f:Lm1/c;

    .line 4
    iget-object v1, v0, Lm1/c;->B:Ljava/lang/Object;

    monitor-enter v1

    :try_start_48
    invoke-static {}, Ll1/i;->c()Ll1/i;

    move-result-object v2

    sget-object v3, Lm1/c;->C:Ljava/lang/String;

    const-string v6, "Processor cancelling %s"

    new-array v7, v5, [Ljava/lang/Object;

    aput-object p2, v7, v4

    invoke-static {v6, v7}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    new-array v7, v4, [Ljava/lang/Throwable;

    invoke-virtual {v2, v3, v6, v7}, Ll1/i;->a(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V

    iget-object v2, v0, Lm1/c;->z:Ljava/util/Set;

    invoke-interface {v2, p2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    iget-object v2, v0, Lm1/c;->w:Ljava/util/Map;

    invoke-interface {v2, p2}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lm1/m;

    if-eqz v2, :cond_6d

    move v4, v5

    :cond_6d
    if-nez v2, :cond_77

    iget-object v2, v0, Lm1/c;->x:Ljava/util/Map;

    invoke-interface {v2, p2}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lm1/m;

    :cond_77
    invoke-static {p2, v2}, Lm1/c;->c(Ljava/lang/String;Lm1/m;)Z

    if-eqz v4, :cond_7f

    invoke-virtual {v0}, Lm1/c;->h()V

    :cond_7f
    monitor-exit v1
    :try_end_80
    .catchall {:try_start_48 .. :try_end_80} :catchall_97

    .line 5
    iget-object p1, p1, Lm1/j;->e:Ljava/util/List;

    .line 6
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_86
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_96

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

    move-result-object v0

    check-cast v0, Lm1/d;

    invoke-interface {v0, p2}, Lm1/d;->b(Ljava/lang/String;)V

    goto :goto_86

    :cond_96
    return-void

    :catchall_97
    move-exception p1

    .line 7
    :try_start_98
    monitor-exit v1
    :try_end_99
    .catchall {:try_start_98 .. :try_end_99} :catchall_97

    throw p1
.end method

.method public b(Lm1/j;)V
    .registers 4

    .line 1
    iget-object v0, p1, Lm1/j;->b:Landroidx/work/b;

    .line 2
    iget-object v1, p1, Lm1/j;->c:Landroidx/work/impl/WorkDatabase;

    .line 3
    iget-object p1, p1, Lm1/j;->e:Ljava/util/List;

    .line 4
    invoke-static {v0, v1, p1}, Lm1/e;->a(Landroidx/work/b;Landroidx/work/impl/WorkDatabase;Ljava/util/List;)V

    return-void
.end method

.method public abstract c()V
.end method

.method public run()V
    .registers 4

    :try_start_0
    invoke-virtual {p0}, Lv1/d;->c()V

    iget-object v0, p0, Lv1/d;->r:Lm1/b;

    sget-object v1, Ll1/k;->a:Ll1/k$b$c;

    invoke-virtual {v0, v1}, Lm1/b;->a(Ll1/k$b;)V
    :try_end_a
    .catchall {:try_start_0 .. :try_end_a} :catchall_b

    goto :goto_16

    :catchall_b
    move-exception v0

    iget-object v1, p0, Lv1/d;->r:Lm1/b;

    new-instance v2, Ll1/k$b$a;

    invoke-direct {v2, v0}, Ll1/k$b$a;-><init>(Ljava/lang/Throwable;)V

    invoke-virtual {v1, v2}, Lm1/b;->a(Ll1/k$b;)V

    :goto_16
    return-void
.end method
