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

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field public final synthetic r:Ljava/util/UUID;

.field public final synthetic s:Landroidx/work/c;

.field public final synthetic t:Lw1/c;

.field public final synthetic u:Lv1/q;


# direct methods
.method public constructor <init>(Lv1/q;Ljava/util/UUID;Landroidx/work/c;Lw1/c;)V
    .registers 5

    iput-object p1, p0, Lv1/p;->u:Lv1/q;

    iput-object p2, p0, Lv1/p;->r:Ljava/util/UUID;

    iput-object p3, p0, Lv1/p;->s:Landroidx/work/c;

    iput-object p4, p0, Lv1/p;->t:Lw1/c;

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

    return-void
.end method


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

    iget-object v0, p0, Lv1/p;->r:Ljava/util/UUID;

    invoke-virtual {v0}, Ljava/util/UUID;->toString()Ljava/lang/String;

    move-result-object v0

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

    move-result-object v1

    sget-object v2, Lv1/q;->c:Ljava/lang/String;

    const/4 v3, 0x2

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

    iget-object v4, p0, Lv1/p;->r:Ljava/util/UUID;

    const/4 v5, 0x0

    aput-object v4, v3, v5

    iget-object v4, p0, Lv1/p;->s:Landroidx/work/c;

    const/4 v6, 0x1

    aput-object v4, v3, v6

    const-string v4, "Updating progress for %s (%s)"

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

    move-result-object v3

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

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

    iget-object v1, p0, Lv1/p;->u:Lv1/q;

    iget-object v1, v1, Lv1/q;->a:Landroidx/work/impl/WorkDatabase;

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

    :try_start_2b
    iget-object v1, p0, Lv1/p;->u:Lv1/q;

    iget-object v1, v1, Lv1/q;->a:Landroidx/work/impl/WorkDatabase;

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

    move-result-object v1

    check-cast v1, Lu1/r;

    invoke-virtual {v1, v0}, Lu1/r;->i(Ljava/lang/String;)Lu1/p;

    move-result-object v1

    if-eqz v1, :cond_94

    iget-object v1, v1, Lu1/p;->b:Landroidx/work/f;

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

    if-ne v1, v3, :cond_73

    new-instance v1, Lu1/m;

    iget-object v2, p0, Lv1/p;->s:Landroidx/work/c;

    invoke-direct {v1, v0, v2}, Lu1/m;-><init>(Ljava/lang/String;Landroidx/work/c;)V

    iget-object v0, p0, Lv1/p;->u:Lv1/q;

    iget-object v0, v0, Lv1/q;->a:Landroidx/work/impl/WorkDatabase;

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

    move-result-object v0

    check-cast v0, Lu1/o;

    .line 1
    iget-object v2, v0, Lu1/o;->a:Lb1/h;

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

    iget-object v2, v0, Lu1/o;->a:Lb1/h;

    invoke-virtual {v2}, Lb1/h;->c()V
    :try_end_5c
    .catchall {:try_start_2b .. :try_end_5c} :catchall_9c

    :try_start_5c
    iget-object v2, v0, Lu1/o;->b:Lb1/b;

    invoke-virtual {v2, v1}, Lb1/b;->e(Ljava/lang/Object;)V

    iget-object v1, v0, Lu1/o;->a:Lb1/h;

    invoke-virtual {v1}, Lb1/h;->k()V
    :try_end_66
    .catchall {:try_start_5c .. :try_end_66} :catchall_6c

    :try_start_66
    iget-object v0, v0, Lu1/o;->a:Lb1/h;

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

    goto :goto_86

    :catchall_6c
    move-exception v1

    iget-object v0, v0, Lu1/o;->a:Lb1/h;

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

    throw v1

    .line 2
    :cond_73
    invoke-static {}, Ll1/i;->c()Ll1/i;

    move-result-object v1

    const-string v3, "Ignoring setProgressAsync(...). WorkSpec (%s) is not in a RUNNING state."

    new-array v4, v6, [Ljava/lang/Object;

    aput-object v0, v4, v5

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

    move-result-object v0

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

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

    :goto_86
    iget-object v0, p0, Lv1/p;->t:Lw1/c;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lw1/c;->j(Ljava/lang/Object;)Z

    iget-object v0, p0, Lv1/p;->u:Lv1/q;

    iget-object v0, v0, Lv1/q;->a:Landroidx/work/impl/WorkDatabase;

    invoke-virtual {v0}, Lb1/h;->k()V

    goto :goto_b1

    :cond_94
    const-string v0, "Calls to setProgressAsync() must complete before a ListenableWorker signals completion of work by returning an instance of Result."

    new-instance v1, Ljava/lang/IllegalStateException;

    invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v1
    :try_end_9c
    .catchall {:try_start_66 .. :try_end_9c} :catchall_9c

    :catchall_9c
    move-exception v0

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

    move-result-object v1

    sget-object v2, Lv1/q;->c:Ljava/lang/String;

    const-string v3, "Error updating Worker progress"

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

    aput-object v0, v4, v5

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

    iget-object v1, p0, Lv1/p;->t:Lw1/c;

    invoke-virtual {v1, v0}, Lw1/c;->k(Ljava/lang/Throwable;)Z
    :try_end_b1
    .catchall {:try_start_9d .. :try_end_b1} :catchall_b9

    :goto_b1
    iget-object v0, p0, Lv1/p;->u:Lv1/q;

    iget-object v0, v0, Lv1/q;->a:Landroidx/work/impl/WorkDatabase;

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

    return-void

    :catchall_b9
    move-exception v0

    iget-object v1, p0, Lv1/p;->u:Lv1/q;

    iget-object v1, v1, Lv1/q;->a:Landroidx/work/impl/WorkDatabase;

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

    throw v0
.end method
