.class public Landroidx/work/impl/background/systemalarm/a;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lm1/a;


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


# instance fields
.field public final r:Landroid/content/Context;

.field public final s:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Lm1/a;",
            ">;"
        }
    .end annotation
.end field

.field public final t:Ljava/lang/Object;


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

    const-string v0, "CommandHandler"

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

    move-result-object v0

    sput-object v0, Landroidx/work/impl/background/systemalarm/a;->u:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .registers 2

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

    iput-object p1, p0, Landroidx/work/impl/background/systemalarm/a;->r:Landroid/content/Context;

    new-instance p1, Ljava/util/HashMap;

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

    iput-object p1, p0, Landroidx/work/impl/background/systemalarm/a;->s:Ljava/util/Map;

    new-instance p1, Ljava/lang/Object;

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

    iput-object p1, p0, Landroidx/work/impl/background/systemalarm/a;->t:Ljava/lang/Object;

    return-void
.end method

.method public static b(Landroid/content/Context;)Landroid/content/Intent;
    .registers 3

    new-instance v0, Landroid/content/Intent;

    const-class v1, Landroidx/work/impl/background/systemalarm/SystemAlarmService;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string p0, "ACTION_CONSTRAINTS_CHANGED"

    invoke-virtual {v0, p0}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    return-object v0
.end method

.method public static c(Landroid/content/Context;Ljava/lang/String;)Landroid/content/Intent;
    .registers 4

    new-instance v0, Landroid/content/Intent;

    const-class v1, Landroidx/work/impl/background/systemalarm/SystemAlarmService;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string p0, "ACTION_DELAY_MET"

    invoke-virtual {v0, p0}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    const-string p0, "KEY_WORKSPEC_ID"

    invoke-virtual {v0, p0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    return-object v0
.end method

.method public static d(Landroid/content/Context;Ljava/lang/String;)Landroid/content/Intent;
    .registers 4

    new-instance v0, Landroid/content/Intent;

    const-class v1, Landroidx/work/impl/background/systemalarm/SystemAlarmService;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string p0, "ACTION_SCHEDULE_WORK"

    invoke-virtual {v0, p0}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    const-string p0, "KEY_WORKSPEC_ID"

    invoke-virtual {v0, p0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    return-object v0
.end method


# virtual methods
.method public a(Ljava/lang/String;Z)V
    .registers 5

    iget-object v0, p0, Landroidx/work/impl/background/systemalarm/a;->t:Ljava/lang/Object;

    monitor-enter v0

    :try_start_3
    iget-object v1, p0, Landroidx/work/impl/background/systemalarm/a;->s:Ljava/util/Map;

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

    move-result-object v1

    check-cast v1, Lm1/a;

    if-eqz v1, :cond_10

    invoke-interface {v1, p1, p2}, Lm1/a;->a(Ljava/lang/String;Z)V

    :cond_10
    monitor-exit v0

    return-void

    :catchall_12
    move-exception p1

    monitor-exit v0
    :try_end_14
    .catchall {:try_start_3 .. :try_end_14} :catchall_12

    throw p1
.end method

.method public e(Landroid/content/Intent;ILandroidx/work/impl/background/systemalarm/d;)V
    .registers 14

    invoke-virtual {p1}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v0

    const-string v1, "ACTION_CONSTRAINTS_CHANGED"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    const/4 v2, 0x0

    const/4 v3, 0x1

    if-eqz v1, :cond_11c

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

    move-result-object v0

    sget-object v1, Landroidx/work/impl/background/systemalarm/a;->u:Ljava/lang/String;

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

    aput-object p1, v4, v2

    const-string p1, "Handling constraints changed %s"

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

    move-result-object p1

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

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

    new-instance p1, Landroidx/work/impl/background/systemalarm/b;

    iget-object v0, p0, Landroidx/work/impl/background/systemalarm/a;->r:Landroid/content/Context;

    invoke-direct {p1, v0, p2, p3}, Landroidx/work/impl/background/systemalarm/b;-><init>(Landroid/content/Context;ILandroidx/work/impl/background/systemalarm/d;)V

    .line 2
    iget-object p2, p3, Landroidx/work/impl/background/systemalarm/d;->v:Lm1/j;

    .line 3
    iget-object p2, p2, Lm1/j;->c:Landroidx/work/impl/WorkDatabase;

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

    move-result-object p2

    check-cast p2, Lu1/r;

    invoke-virtual {p2}, Lu1/r;->e()Ljava/util/List;

    move-result-object p2

    sget-object p3, Landroidx/work/impl/background/systemalarm/ConstraintProxy;->a:Ljava/lang/String;

    .line 5
    move-object p3, p2

    check-cast p3, Ljava/util/ArrayList;

    invoke-virtual {p3}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    move v4, v2

    move v5, v4

    move v6, v5

    move v7, v6

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

    move-result v8

    if-eqz v8, :cond_6e

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

    move-result-object v8

    check-cast v8, Lu1/p;

    iget-object v8, v8, Lu1/p;->j:Ll1/b;

    .line 6
    iget-boolean v9, v8, Ll1/b;->d:Z

    or-int/2addr v4, v9

    .line 7
    iget-boolean v9, v8, Ll1/b;->b:Z

    or-int/2addr v5, v9

    .line 8
    iget-boolean v9, v8, Ll1/b;->e:Z

    or-int/2addr v6, v9

    .line 9
    iget-object v8, v8, Ll1/b;->a:Landroidx/work/d;

    .line 10
    sget-object v9, Landroidx/work/d;->r:Landroidx/work/d;

    if-eq v8, v9, :cond_64

    move v8, v3

    goto :goto_65

    :cond_64
    move v8, v2

    :goto_65
    or-int/2addr v7, v8

    if-eqz v4, :cond_45

    if-eqz v5, :cond_45

    if-eqz v6, :cond_45

    if-eqz v7, :cond_45

    :cond_6e
    sget-object v1, Landroidx/work/impl/background/systemalarm/ConstraintProxyUpdateReceiver;->a:Ljava/lang/String;

    .line 11
    new-instance v1, Landroid/content/Intent;

    const-string v8, "androidx.work.impl.background.systemalarm.UpdateProxies"

    invoke-direct {v1, v8}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    new-instance v8, Landroid/content/ComponentName;

    const-class v9, Landroidx/work/impl/background/systemalarm/ConstraintProxyUpdateReceiver;

    invoke-direct {v8, v0, v9}, Landroid/content/ComponentName;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-virtual {v1, v8}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;

    const-string v8, "KEY_BATTERY_NOT_LOW_PROXY_ENABLED"

    invoke-virtual {v1, v8, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    move-result-object v4

    const-string v8, "KEY_BATTERY_CHARGING_PROXY_ENABLED"

    invoke-virtual {v4, v8, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    move-result-object v4

    const-string v5, "KEY_STORAGE_NOT_LOW_PROXY_ENABLED"

    invoke-virtual {v4, v5, v6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    move-result-object v4

    const-string v5, "KEY_NETWORK_STATE_PROXY_ENABLED"

    invoke-virtual {v4, v5, v7}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 12
    invoke-virtual {v0, v1}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V

    .line 13
    iget-object v0, p1, Landroidx/work/impl/background/systemalarm/b;->d:Lq1/d;

    invoke-virtual {v0, p2}, Lq1/d;->b(Ljava/lang/Iterable;)V

    new-instance p2, Ljava/util/ArrayList;

    invoke-virtual {p3}, Ljava/util/ArrayList;->size()I

    move-result v0

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

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    invoke-virtual {p3}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object p3

    :cond_b1
    :goto_b1
    invoke-interface {p3}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_d9

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

    move-result-object v4

    check-cast v4, Lu1/p;

    iget-object v5, v4, Lu1/p;->a:Ljava/lang/String;

    invoke-virtual {v4}, Lu1/p;->a()J

    move-result-wide v6

    cmp-long v6, v0, v6

    if-ltz v6, :cond_b1

    invoke-virtual {v4}, Lu1/p;->b()Z

    move-result v6

    if-eqz v6, :cond_d5

    iget-object v6, p1, Landroidx/work/impl/background/systemalarm/b;->d:Lq1/d;

    invoke-virtual {v6, v5}, Lq1/d;->a(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_b1

    :cond_d5
    invoke-virtual {p2, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_b1

    :cond_d9
    invoke-virtual {p2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object p2

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

    move-result p3

    if-eqz p3, :cond_115

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

    move-result-object p3

    check-cast p3, Lu1/p;

    iget-object p3, p3, Lu1/p;->a:Ljava/lang/String;

    iget-object v0, p1, Landroidx/work/impl/background/systemalarm/b;->a:Landroid/content/Context;

    invoke-static {v0, p3}, Landroidx/work/impl/background/systemalarm/a;->c(Landroid/content/Context;Ljava/lang/String;)Landroid/content/Intent;

    move-result-object v0

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

    move-result-object v1

    sget-object v4, Landroidx/work/impl/background/systemalarm/b;->e:Ljava/lang/String;

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

    aput-object p3, v5, v2

    const-string p3, "Creating a delay_met command for workSpec with id (%s)"

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

    move-result-object p3

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

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

    iget-object p3, p1, Landroidx/work/impl/background/systemalarm/b;->c:Landroidx/work/impl/background/systemalarm/d;

    new-instance v1, Landroidx/work/impl/background/systemalarm/d$b;

    iget v4, p1, Landroidx/work/impl/background/systemalarm/b;->b:I

    invoke-direct {v1, p3, v0, v4}, Landroidx/work/impl/background/systemalarm/d$b;-><init>(Landroidx/work/impl/background/systemalarm/d;Landroid/content/Intent;I)V

    .line 14
    iget-object p3, p3, Landroidx/work/impl/background/systemalarm/d;->x:Landroid/os/Handler;

    invoke-virtual {p3, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_dd

    .line 15
    :cond_115
    iget-object p1, p1, Landroidx/work/impl/background/systemalarm/b;->d:Lq1/d;

    invoke-virtual {p1}, Lq1/d;->c()V

    goto/16 :goto_37a

    :cond_11c
    const-string v1, "ACTION_RESCHEDULE"

    .line 16
    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    const/4 v4, 0x2

    if-eqz v1, :cond_147

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

    move-result-object v0

    sget-object v1, Landroidx/work/impl/background/systemalarm/a;->u:Ljava/lang/String;

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

    aput-object p1, v4, v2

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    aput-object p1, v4, v3

    const-string p1, "Handling reschedule %s, %s"

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

    move-result-object p1

    new-array p2, v2, [Ljava/lang/Throwable;

    invoke-virtual {v0, v1, p1, p2}, Ll1/i;->a(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V

    .line 18
    iget-object p1, p3, Landroidx/work/impl/background/systemalarm/d;->v:Lm1/j;

    .line 19
    invoke-virtual {p1}, Lm1/j;->e()V

    goto/16 :goto_37a

    .line 20
    :cond_147
    invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v1

    const-string v5, "KEY_WORKSPEC_ID"

    filled-new-array {v5}, [Ljava/lang/String;

    move-result-object v5

    if-eqz v1, :cond_16b

    .line 21
    invoke-virtual {v1}, Landroid/os/Bundle;->isEmpty()Z

    move-result v6

    if-eqz v6, :cond_15a

    goto :goto_16b

    :cond_15a
    move v6, v2

    :goto_15b
    if-ge v6, v3, :cond_169

    aget-object v7, v5, v6

    invoke-virtual {v1, v7}, Landroid/os/Bundle;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v7

    if-nez v7, :cond_166

    goto :goto_16b

    :cond_166
    add-int/lit8 v6, v6, 0x1

    goto :goto_15b

    :cond_169
    move v1, v3

    goto :goto_16c

    :cond_16b
    :goto_16b
    move v1, v2

    :goto_16c
    if-nez v1, :cond_189

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

    move-result-object p1

    sget-object p2, Landroidx/work/impl/background/systemalarm/a;->u:Ljava/lang/String;

    const-string p3, "Invalid request for %s, requires %s."

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

    aput-object v0, v1, v2

    const-string v0, "KEY_WORKSPEC_ID"

    aput-object v0, v1, v3

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

    move-result-object p3

    new-array v0, v2, [Ljava/lang/Throwable;

    invoke-virtual {p1, p2, p3, v0}, Ll1/i;->b(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V

    goto/16 :goto_37a

    :cond_189
    const-string v1, "ACTION_SCHEDULE_WORK"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_272

    .line 23
    invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object p1

    const-string v0, "KEY_WORKSPEC_ID"

    invoke-virtual {p1, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

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

    move-result-object v0

    sget-object v1, Landroidx/work/impl/background/systemalarm/a;->u:Ljava/lang/String;

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

    aput-object p1, v5, v2

    const-string v6, "Handling schedule work for %s"

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

    move-result-object v5

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

    invoke-virtual {v0, v1, v5, v6}, Ll1/i;->a(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V

    .line 24
    iget-object v0, p3, Landroidx/work/impl/background/systemalarm/d;->v:Lm1/j;

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

    .line 26
    invoke-virtual {v0}, Lb1/h;->c()V

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

    move-result-object v5

    check-cast v5, Lu1/r;

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

    move-result-object v5
    :try_end_1c1
    .catchall {:try_start_1b7 .. :try_end_1c1} :catchall_26d

    const-string v6, "Skipping scheduling "

    if-nez v5, :cond_1e7

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

    move-result-object p2

    new-instance p3, Ljava/lang/StringBuilder;

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

    invoke-virtual {p3, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, " because it\'s no longer in the DB"

    invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    new-array p3, v2, [Ljava/lang/Throwable;

    invoke-virtual {p2, v1, p1, p3}, Ll1/i;->f(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V
    :try_end_1e2
    .catchall {:try_start_1c5 .. :try_end_1e2} :catchall_26d

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

    goto/16 :goto_37a

    :cond_1e7
    :try_start_1e7
    iget-object v7, v5, Lu1/p;->b:Landroidx/work/f;

    invoke-virtual {v7}, Landroidx/work/f;->b()Z

    move-result v7

    if-eqz v7, :cond_20d

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

    move-result-object p2

    new-instance p3, Ljava/lang/StringBuilder;

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

    invoke-virtual {p3, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, "because it is finished."

    invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    new-array p3, v2, [Ljava/lang/Throwable;

    invoke-virtual {p2, v1, p1, p3}, Ll1/i;->f(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V

    goto :goto_1e2

    :cond_20d
    invoke-virtual {v5}, Lu1/p;->a()J

    move-result-wide v6

    invoke-virtual {v5}, Lu1/p;->b()Z

    move-result v5

    if-nez v5, :cond_238

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

    move-result-object p2

    const-string v5, "Setting up Alarms for %s at %s"

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

    aput-object p1, v4, v2

    invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v8

    aput-object v8, v4, v3

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

    move-result-object v3

    new-array v2, v2, [Ljava/lang/Throwable;

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

    iget-object p2, p0, Landroidx/work/impl/background/systemalarm/a;->r:Landroid/content/Context;

    .line 27
    iget-object p3, p3, Landroidx/work/impl/background/systemalarm/d;->v:Lm1/j;

    .line 28
    invoke-static {p2, p3, p1, v6, v7}, Lo1/a;->b(Landroid/content/Context;Lm1/j;Ljava/lang/String;J)V

    goto :goto_268

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

    move-result-object v5

    const-string v8, "Opportunistically setting an alarm for %s at %s"

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

    aput-object p1, v4, v2

    invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v9

    aput-object v9, v4, v3

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

    move-result-object v3

    new-array v2, v2, [Ljava/lang/Throwable;

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

    iget-object v1, p0, Landroidx/work/impl/background/systemalarm/a;->r:Landroid/content/Context;

    .line 29
    iget-object v2, p3, Landroidx/work/impl/background/systemalarm/d;->v:Lm1/j;

    .line 30
    invoke-static {v1, v2, p1, v6, v7}, Lo1/a;->b(Landroid/content/Context;Lm1/j;Ljava/lang/String;J)V

    iget-object p1, p0, Landroidx/work/impl/background/systemalarm/a;->r:Landroid/content/Context;

    invoke-static {p1}, Landroidx/work/impl/background/systemalarm/a;->b(Landroid/content/Context;)Landroid/content/Intent;

    move-result-object p1

    new-instance v1, Landroidx/work/impl/background/systemalarm/d$b;

    invoke-direct {v1, p3, p1, p2}, Landroidx/work/impl/background/systemalarm/d$b;-><init>(Landroidx/work/impl/background/systemalarm/d;Landroid/content/Intent;I)V

    .line 31
    iget-object p1, p3, Landroidx/work/impl/background/systemalarm/d;->x:Landroid/os/Handler;

    invoke-virtual {p1, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 32
    :goto_268
    invoke-virtual {v0}, Lb1/h;->k()V
    :try_end_26b
    .catchall {:try_start_1e7 .. :try_end_26b} :catchall_26d

    goto/16 :goto_1e2

    :catchall_26d
    move-exception p1

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

    throw p1

    :cond_272
    const-string v1, "ACTION_DELAY_MET"

    .line 33
    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_2cd

    .line 34
    invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object p1

    iget-object v1, p0, Landroidx/work/impl/background/systemalarm/a;->t:Ljava/lang/Object;

    monitor-enter v1

    :try_start_281
    const-string v0, "KEY_WORKSPEC_ID"

    invoke-virtual {p1, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

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

    move-result-object v0

    sget-object v4, Landroidx/work/impl/background/systemalarm/a;->u:Ljava/lang/String;

    const-string v5, "Handing delay met for %s"

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

    aput-object p1, v6, v2

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

    move-result-object v5

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

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

    iget-object v0, p0, Landroidx/work/impl/background/systemalarm/a;->s:Ljava/util/Map;

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

    move-result v0

    if-nez v0, :cond_2b4

    new-instance v0, Landroidx/work/impl/background/systemalarm/c;

    iget-object v2, p0, Landroidx/work/impl/background/systemalarm/a;->r:Landroid/content/Context;

    invoke-direct {v0, v2, p2, p1, p3}, Landroidx/work/impl/background/systemalarm/c;-><init>(Landroid/content/Context;ILjava/lang/String;Landroidx/work/impl/background/systemalarm/d;)V

    iget-object p2, p0, Landroidx/work/impl/background/systemalarm/a;->s:Ljava/util/Map;

    invoke-interface {p2, p1, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    invoke-virtual {v0}, Landroidx/work/impl/background/systemalarm/c;->f()V

    goto :goto_2c7

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

    move-result-object p2

    const-string p3, "WorkSpec %s is already being handled for ACTION_DELAY_MET"

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

    aput-object p1, v0, v2

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

    move-result-object p1

    new-array p3, v2, [Ljava/lang/Throwable;

    invoke-virtual {p2, v4, p1, p3}, Ll1/i;->a(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V

    :goto_2c7
    monitor-exit v1

    goto/16 :goto_37a

    :catchall_2ca
    move-exception p1

    monitor-exit v1
    :try_end_2cc
    .catchall {:try_start_281 .. :try_end_2cc} :catchall_2ca

    throw p1

    :cond_2cd
    const-string v1, "ACTION_STOP_WORK"

    .line 35
    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_32e

    .line 36
    invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object p1

    const-string p2, "KEY_WORKSPEC_ID"

    invoke-virtual {p1, p2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

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

    move-result-object p2

    sget-object v0, Landroidx/work/impl/background/systemalarm/a;->u:Ljava/lang/String;

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

    aput-object p1, v1, v2

    const-string v4, "Handing stopWork work for %s"

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

    move-result-object v1

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

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

    .line 37
    iget-object p2, p3, Landroidx/work/impl/background/systemalarm/d;->v:Lm1/j;

    .line 38
    invoke-virtual {p2, p1}, Lm1/j;->f(Ljava/lang/String;)V

    iget-object p2, p0, Landroidx/work/impl/background/systemalarm/a;->r:Landroid/content/Context;

    .line 39
    iget-object v0, p3, Landroidx/work/impl/background/systemalarm/d;->v:Lm1/j;

    .line 40
    sget-object v1, Lo1/a;->a:Ljava/lang/String;

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

    .line 42
    invoke-virtual {v0}, Landroidx/work/impl/WorkDatabase;->n()Lu1/h;

    move-result-object v0

    check-cast v0, Lu1/i;

    invoke-virtual {v0, p1}, Lu1/i;->a(Ljava/lang/String;)Lu1/g;

    move-result-object v1

    if-eqz v1, :cond_32a

    iget v1, v1, Lu1/g;->b:I

    invoke-static {p2, p1, v1}, Lo1/a;->a(Landroid/content/Context;Ljava/lang/String;I)V

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

    move-result-object p2

    sget-object v1, Lo1/a;->a:Ljava/lang/String;

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

    aput-object p1, v3, v2

    const-string v4, "Removing SystemIdInfo for workSpecId (%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, v2, [Ljava/lang/Throwable;

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

    invoke-virtual {v0, p1}, Lu1/i;->c(Ljava/lang/String;)V

    .line 43
    :cond_32a
    invoke-virtual {p3, p1, v2}, Landroidx/work/impl/background/systemalarm/d;->a(Ljava/lang/String;Z)V

    goto :goto_37a

    :cond_32e
    const-string p3, "ACTION_EXECUTION_COMPLETED"

    .line 44
    invoke-virtual {p3, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p3

    if-eqz p3, :cond_365

    .line 45
    invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object p3

    const-string v0, "KEY_WORKSPEC_ID"

    invoke-virtual {p3, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const-string v1, "KEY_NEEDS_RESCHEDULE"

    invoke-virtual {p3, v1}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result p3

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

    move-result-object v1

    sget-object v5, Landroidx/work/impl/background/systemalarm/a;->u:Ljava/lang/String;

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

    aput-object p1, v4, v2

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    aput-object p1, v4, v3

    const-string p1, "Handling onExecutionCompleted %s, %s"

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

    move-result-object p1

    new-array p2, v2, [Ljava/lang/Throwable;

    invoke-virtual {v1, v5, p1, p2}, Ll1/i;->a(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V

    invoke-virtual {p0, v0, p3}, Landroidx/work/impl/background/systemalarm/a;->a(Ljava/lang/String;Z)V

    goto :goto_37a

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

    move-result-object p2

    sget-object p3, Landroidx/work/impl/background/systemalarm/a;->u:Ljava/lang/String;

    const-string v0, "Ignoring intent %s"

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

    aput-object p1, v1, v2

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

    move-result-object p1

    new-array v0, v2, [Ljava/lang/Throwable;

    invoke-virtual {p2, p3, p1, v0}, Ll1/i;->f(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V

    :goto_37a
    return-void
.end method
