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

# interfaces
.implements Ljava/lang/Runnable;


# static fields
.field public static final u:Ljava/lang/String;


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

.field public final s:Ljava/lang/String;

.field public final t:Z


# direct methods
.method public static constructor <clinit>()V
    .registers 1

    const-string v0, "StopWorkRunnable"

    invoke-static {v0}, Ll1/i;->e(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lv1/l;->u:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>(Lm1/j;Ljava/lang/String;Z)V
    .registers 4

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

    iput-object p1, p0, Lv1/l;->r:Lm1/j;

    iput-object p2, p0, Lv1/l;->s:Ljava/lang/String;

    iput-boolean p3, p0, Lv1/l;->t:Z

    return-void
.end method


# virtual methods
.method public run()V
    .registers 10

    iget-object v0, p0, Lv1/l;->r:Lm1/j;

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

    .line 2
    iget-object v0, v0, Lm1/j;->f:Lm1/c;

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

    move-result-object v2

    invoke-virtual {v1}, Lb1/h;->c()V

    :try_start_d
    iget-object v3, p0, Lv1/l;->s:Ljava/lang/String;

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

    monitor-enter v4
    :try_end_12
    .catchall {:try_start_d .. :try_end_12} :catchall_75

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

    invoke-interface {v0, v3}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    monitor-exit v4
    :try_end_19
    .catchall {:try_start_12 .. :try_end_19} :catchall_72

    .line 5
    :try_start_19
    iget-boolean v3, p0, Lv1/l;->t:Z

    const/4 v4, 0x1

    const/4 v5, 0x0

    if-eqz v3, :cond_2a

    iget-object v0, p0, Lv1/l;->r:Lm1/j;

    .line 6
    iget-object v0, v0, Lm1/j;->f:Lm1/c;

    .line 7
    iget-object v2, p0, Lv1/l;->s:Ljava/lang/String;

    invoke-virtual {v0, v2}, Lm1/c;->i(Ljava/lang/String;)Z

    move-result v0

    goto :goto_4d

    :cond_2a
    if-nez v0, :cond_43

    iget-object v0, p0, Lv1/l;->s:Ljava/lang/String;

    check-cast v2, Lu1/r;

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

    move-result-object v0

    sget-object v3, Landroidx/work/f;->s:Landroidx/work/f;

    if-ne v0, v3, :cond_43

    sget-object v0, Landroidx/work/f;->r:Landroidx/work/f;

    new-array v3, v4, [Ljava/lang/String;

    iget-object v6, p0, Lv1/l;->s:Ljava/lang/String;

    aput-object v6, v3, v5

    invoke-virtual {v2, v0, v3}, Lu1/r;->p(Landroidx/work/f;[Ljava/lang/String;)I

    :cond_43
    iget-object v0, p0, Lv1/l;->r:Lm1/j;

    .line 8
    iget-object v0, v0, Lm1/j;->f:Lm1/c;

    .line 9
    iget-object v2, p0, Lv1/l;->s:Ljava/lang/String;

    invoke-virtual {v0, v2}, Lm1/c;->j(Ljava/lang/String;)Z

    move-result v0

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

    move-result-object v2

    sget-object v3, Lv1/l;->u:Ljava/lang/String;

    const-string v6, "StopWorkRunnable for %s; Processor.stopWork = %s"

    const/4 v7, 0x2

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

    iget-object v8, p0, Lv1/l;->s:Ljava/lang/String;

    aput-object v8, v7, v5

    invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    aput-object v0, v7, v4

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

    move-result-object v0

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

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

    invoke-virtual {v1}, Lb1/h;->k()V
    :try_end_6e
    .catchall {:try_start_19 .. :try_end_6e} :catchall_75

    invoke-virtual {v1}, Lb1/h;->g()V

    return-void

    :catchall_72
    move-exception v0

    .line 10
    :try_start_73
    monitor-exit v4
    :try_end_74
    .catchall {:try_start_73 .. :try_end_74} :catchall_72

    :try_start_74
    throw v0
    :try_end_75
    .catchall {:try_start_74 .. :try_end_75} :catchall_75

    :catchall_75
    move-exception v0

    .line 11
    invoke-virtual {v1}, Lb1/h;->g()V

    throw v0
.end method
