.class public Lp1/b;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lm1/d;


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


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

.field public final s:Landroid/app/job/JobScheduler;

.field public final t:Lm1/j;

.field public final u:Lp1/a;


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

    const-string v0, "SystemJobScheduler"

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

    move-result-object v0

    sput-object v0, Lp1/b;->v:Ljava/lang/String;

    return-void
.end method

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

    const-string v0, "jobscheduler"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/job/JobScheduler;

    new-instance v1, Lp1/a;

    invoke-direct {v1, p1}, Lp1/a;-><init>(Landroid/content/Context;)V

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

    iput-object p1, p0, Lp1/b;->r:Landroid/content/Context;

    iput-object p2, p0, Lp1/b;->t:Lm1/j;

    iput-object v0, p0, Lp1/b;->s:Landroid/app/job/JobScheduler;

    iput-object v1, p0, Lp1/b;->u:Lp1/a;

    return-void
.end method

.method public static a(Landroid/app/job/JobScheduler;I)V
    .registers 8

    :try_start_0
    invoke-virtual {p0, p1}, Landroid/app/job/JobScheduler;->cancel(I)V
    :try_end_3
    .catchall {:try_start_0 .. :try_end_3} :catchall_4

    goto :goto_26

    :catchall_4
    move-exception p0

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

    move-result-object v0

    sget-object v1, Lp1/b;->v:Ljava/lang/String;

    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v2

    const/4 v3, 0x1

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

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

    move-result-object p1

    const/4 v5, 0x0

    aput-object p1, v4, v5

    const-string p1, "Exception while trying to cancel job (%d)"

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

    move-result-object p1

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

    aput-object p0, v2, v5

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

    :goto_26
    return-void
.end method

.method public static d(Landroid/content/Context;Landroid/app/job/JobScheduler;Ljava/lang/String;)Ljava/util/List;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Landroid/app/job/JobScheduler;",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/List<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation

    invoke-static {p0, p1}, Lp1/b;->e(Landroid/content/Context;Landroid/app/job/JobScheduler;)Ljava/util/List;

    move-result-object p0

    if-nez p0, :cond_8

    const/4 p0, 0x0

    return-object p0

    :cond_8
    new-instance p1, Ljava/util/ArrayList;

    const/4 v0, 0x2

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

    invoke-interface {p0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p0

    :cond_12
    :goto_12
    invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_34

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

    move-result-object v0

    check-cast v0, Landroid/app/job/JobInfo;

    invoke-static {v0}, Lp1/b;->g(Landroid/app/job/JobInfo;)Ljava/lang/String;

    move-result-object v1

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

    move-result v1

    if-eqz v1, :cond_12

    invoke-virtual {v0}, Landroid/app/job/JobInfo;->getId()I

    move-result v0

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

    move-result-object v0

    invoke-virtual {p1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_12

    :cond_34
    return-object p1
.end method

.method public static e(Landroid/content/Context;Landroid/app/job/JobScheduler;)Ljava/util/List;
    .registers 7
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Landroid/app/job/JobScheduler;",
            ")",
            "Ljava/util/List<",
            "Landroid/app/job/JobInfo;",
            ">;"
        }
    .end annotation

    const/4 v0, 0x0

    :try_start_1
    invoke-virtual {p1}, Landroid/app/job/JobScheduler;->getAllPendingJobs()Ljava/util/List;

    move-result-object p1
    :try_end_5
    .catchall {:try_start_1 .. :try_end_5} :catchall_6

    goto :goto_19

    :catchall_6
    move-exception p1

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

    move-result-object v1

    sget-object v2, Lp1/b;->v:Ljava/lang/String;

    const/4 v3, 0x1

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

    const/4 v4, 0x0

    aput-object p1, v3, v4

    const-string p1, "getAllPendingJobs() is not reliable on this device."

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

    move-object p1, v0

    :goto_19
    if-nez p1, :cond_1c

    return-object v0

    :cond_1c
    new-instance v0, Ljava/util/ArrayList;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v1

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

    new-instance v1, Landroid/content/ComponentName;

    const-class v2, Landroidx/work/impl/background/systemjob/SystemJobService;

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

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

    move-result-object p0

    :cond_30
    :goto_30
    invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z

    move-result p1

    if-eqz p1, :cond_4a

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

    move-result-object p1

    check-cast p1, Landroid/app/job/JobInfo;

    invoke-virtual {p1}, Landroid/app/job/JobInfo;->getService()Landroid/content/ComponentName;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/content/ComponentName;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_30

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_30

    :cond_4a
    return-object v0
.end method

.method public static g(Landroid/app/job/JobInfo;)Ljava/lang/String;
    .registers 3

    const-string v0, "EXTRA_WORK_SPEC_ID"

    invoke-virtual {p0}, Landroid/app/job/JobInfo;->getExtras()Landroid/os/PersistableBundle;

    move-result-object p0

    if-eqz p0, :cond_13

    :try_start_8
    invoke-virtual {p0, v0}, Landroid/os/PersistableBundle;->containsKey(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_13

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

    move-result-object p0
    :try_end_12
    .catch Ljava/lang/NullPointerException; {:try_start_8 .. :try_end_12} :catch_13

    return-object p0

    :catch_13
    :cond_13
    const/4 p0, 0x0

    return-object p0
.end method


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

    iget-object v0, p0, Lp1/b;->r:Landroid/content/Context;

    iget-object v1, p0, Lp1/b;->s:Landroid/app/job/JobScheduler;

    invoke-static {v0, v1, p1}, Lp1/b;->d(Landroid/content/Context;Landroid/app/job/JobScheduler;Ljava/lang/String;)Ljava/util/List;

    move-result-object v0

    if-eqz v0, :cond_37

    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v1

    if-nez v1, :cond_37

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

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

    move-result v1

    if-eqz v1, :cond_2a

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

    move-result-object v1

    check-cast v1, Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    iget-object v2, p0, Lp1/b;->s:Landroid/app/job/JobScheduler;

    invoke-static {v2, v1}, Lp1/b;->a(Landroid/app/job/JobScheduler;I)V

    goto :goto_14

    :cond_2a
    iget-object v0, p0, Lp1/b;->t:Lm1/j;

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

    .line 2
    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;->c(Ljava/lang/String;)V

    :cond_37
    return-void
.end method

.method public varargs c([Lu1/p;)V
    .registers 12

    iget-object v0, p0, Lp1/b;->t:Lm1/j;

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

    .line 2
    new-instance v1, Lv1/f;

    invoke-direct {v1, v0}, Lv1/f;-><init>(Landroidx/work/impl/WorkDatabase;)V

    array-length v2, p1

    const/4 v3, 0x0

    move v4, v3

    :goto_c
    if-ge v4, v2, :cond_b7

    aget-object v5, p1, v4

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

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

    move-result-object v6

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

    check-cast v6, Lu1/r;

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

    move-result-object v6
    :try_end_1f
    .catchall {:try_start_13 .. :try_end_1f} :catchall_b2

    const-string v7, "Skipping scheduling "

    if-nez v6, :cond_45

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

    move-result-object v6

    sget-object v8, Lp1/b;->v:Ljava/lang/String;

    new-instance v9, Ljava/lang/StringBuilder;

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

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

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

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

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

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

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

    move-result-object v5

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

    invoke-virtual {v6, v8, v5, v7}, Ll1/i;->f(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V

    goto :goto_a8

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

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

    if-eq v6, v8, :cond_6d

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

    move-result-object v6

    sget-object v8, Lp1/b;->v:Ljava/lang/String;

    new-instance v9, Ljava/lang/StringBuilder;

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

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

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

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

    const-string v5, " because it is no longer enqueued"

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

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

    move-result-object v5

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

    invoke-virtual {v6, v8, v5, v7}, Ll1/i;->f(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V

    goto :goto_a8

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

    move-result-object v6

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

    check-cast v6, Lu1/i;

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

    move-result-object v6

    if-eqz v6, :cond_7e

    iget v7, v6, Lu1/g;->b:I

    goto :goto_8f

    :cond_7e
    iget-object v7, p0, Lp1/b;->t:Lm1/j;

    .line 3
    iget-object v7, v7, Lm1/j;->b:Landroidx/work/b;

    .line 4
    invoke-static {v7}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v7, p0, Lp1/b;->t:Lm1/j;

    .line 5
    iget-object v7, v7, Lm1/j;->b:Landroidx/work/b;

    .line 6
    iget v7, v7, Landroidx/work/b;->g:I

    .line 7
    invoke-virtual {v1, v3, v7}, Lv1/f;->b(II)I

    move-result v7

    :goto_8f
    if-nez v6, :cond_a5

    new-instance v6, Lu1/g;

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

    invoke-direct {v6, v8, v7}, Lu1/g;-><init>(Ljava/lang/String;I)V

    iget-object v8, p0, Lp1/b;->t:Lm1/j;

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

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

    move-result-object v8

    check-cast v8, Lu1/i;

    invoke-virtual {v8, v6}, Lu1/i;->b(Lu1/g;)V

    :cond_a5
    invoke-virtual {p0, v5, v7}, Lp1/b;->h(Lu1/p;I)V

    :goto_a8
    invoke-virtual {v0}, Lb1/h;->k()V
    :try_end_ab
    .catchall {:try_start_23 .. :try_end_ab} :catchall_b2

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

    add-int/lit8 v4, v4, 0x1

    goto/16 :goto_c

    :catchall_b2
    move-exception p1

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

    throw p1

    :cond_b7
    return-void
.end method

.method public f()Z
    .registers 2

    const/4 v0, 0x1

    return v0
.end method

.method public h(Lu1/p;I)V
    .registers 20

    move-object/from16 v1, p0

    move-object/from16 v2, p1

    iget-object v0, v1, Lp1/b;->u:Lp1/a;

    invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 1
    iget-object v3, v2, Lu1/p;->j:Ll1/b;

    new-instance v4, Landroid/os/PersistableBundle;

    invoke-direct {v4}, Landroid/os/PersistableBundle;-><init>()V

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

    const-string v6, "EXTRA_WORK_SPEC_ID"

    invoke-virtual {v4, v6, v5}, Landroid/os/PersistableBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual/range {p1 .. p1}, Lu1/p;->c()Z

    move-result v5

    const-string v6, "EXTRA_IS_PERIODIC"

    invoke-virtual {v4, v6, v5}, Landroid/os/PersistableBundle;->putBoolean(Ljava/lang/String;Z)V

    new-instance v5, Landroid/app/job/JobInfo$Builder;

    iget-object v0, v0, Lp1/a;->a:Landroid/content/ComponentName;

    move/from16 v6, p2

    invoke-direct {v5, v6, v0}, Landroid/app/job/JobInfo$Builder;-><init>(ILandroid/content/ComponentName;)V

    .line 2
    iget-boolean v0, v3, Ll1/b;->b:Z

    .line 3
    invoke-virtual {v5, v0}, Landroid/app/job/JobInfo$Builder;->setRequiresCharging(Z)Landroid/app/job/JobInfo$Builder;

    move-result-object v0

    .line 4
    iget-boolean v5, v3, Ll1/b;->c:Z

    .line 5
    invoke-virtual {v0, v5}, Landroid/app/job/JobInfo$Builder;->setRequiresDeviceIdle(Z)Landroid/app/job/JobInfo$Builder;

    move-result-object v0

    invoke-virtual {v0, v4}, Landroid/app/job/JobInfo$Builder;->setExtras(Landroid/os/PersistableBundle;)Landroid/app/job/JobInfo$Builder;

    move-result-object v0

    .line 6
    iget-object v4, v3, Ll1/b;->a:Landroidx/work/d;

    .line 7
    sget v5, Landroid/os/Build$VERSION;->SDK_INT:I

    const/4 v7, 0x3

    const/4 v8, 0x2

    const/16 v9, 0x1e

    const/16 v10, 0x1a

    const/4 v11, 0x1

    const/4 v12, 0x0

    if-lt v5, v9, :cond_5e

    sget-object v9, Landroidx/work/d;->w:Landroidx/work/d;

    if-ne v4, v9, :cond_5e

    new-instance v4, Landroid/net/NetworkRequest$Builder;

    invoke-direct {v4}, Landroid/net/NetworkRequest$Builder;-><init>()V

    const/16 v9, 0x19

    invoke-virtual {v4, v9}, Landroid/net/NetworkRequest$Builder;->addCapability(I)Landroid/net/NetworkRequest$Builder;

    move-result-object v4

    invoke-virtual {v4}, Landroid/net/NetworkRequest$Builder;->build()Landroid/net/NetworkRequest;

    move-result-object v4

    invoke-virtual {v0, v4}, Landroid/app/job/JobInfo$Builder;->setRequiredNetwork(Landroid/net/NetworkRequest;)Landroid/app/job/JobInfo$Builder;

    goto :goto_91

    .line 8
    :cond_5e
    invoke-virtual {v4}, Ljava/lang/Enum;->ordinal()I

    move-result v9

    if-eqz v9, :cond_8d

    if-eq v9, v11, :cond_8b

    if-eq v9, v8, :cond_89

    if-eq v9, v7, :cond_87

    const/4 v13, 0x4

    if-eq v9, v13, :cond_6e

    goto :goto_71

    :cond_6e
    if-lt v5, v10, :cond_71

    goto :goto_8e

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

    move-result-object v9

    sget-object v13, Lp1/a;->b:Ljava/lang/String;

    new-array v14, v11, [Ljava/lang/Object;

    aput-object v4, v14, v12

    const-string v4, "API version too low. Cannot convert network type value %s"

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

    move-result-object v4

    new-array v14, v12, [Ljava/lang/Throwable;

    invoke-virtual {v9, v13, v4, v14}, Ll1/i;->a(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V

    goto :goto_8b

    :cond_87
    move v13, v7

    goto :goto_8e

    :cond_89
    move v13, v8

    goto :goto_8e

    :cond_8b
    :goto_8b
    move v13, v11

    goto :goto_8e

    :cond_8d
    move v13, v12

    .line 9
    :goto_8e
    invoke-virtual {v0, v13}, Landroid/app/job/JobInfo$Builder;->setRequiredNetworkType(I)Landroid/app/job/JobInfo$Builder;

    .line 10
    :goto_91
    iget-boolean v4, v3, Ll1/b;->c:Z

    if-nez v4, :cond_a3

    .line 11
    iget-object v4, v2, Lu1/p;->l:Landroidx/work/a;

    sget-object v9, Landroidx/work/a;->s:Landroidx/work/a;

    if-ne v4, v9, :cond_9d

    move v4, v12

    goto :goto_9e

    :cond_9d
    move v4, v11

    :goto_9e
    iget-wide v13, v2, Lu1/p;->m:J

    invoke-virtual {v0, v13, v14, v4}, Landroid/app/job/JobInfo$Builder;->setBackoffCriteria(JI)Landroid/app/job/JobInfo$Builder;

    :cond_a3
    invoke-virtual/range {p1 .. p1}, Lu1/p;->a()J

    move-result-wide v13

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

    move-result-wide v15

    sub-long/2addr v13, v15

    const-wide/16 v7, 0x0

    invoke-static {v13, v14, v7, v8}, Ljava/lang/Math;->max(JJ)J

    move-result-wide v13

    const/16 v15, 0x1c

    if-gt v5, v15, :cond_b7

    goto :goto_bb

    :cond_b7
    cmp-long v5, v13, v7

    if-lez v5, :cond_bf

    :goto_bb
    invoke-virtual {v0, v13, v14}, Landroid/app/job/JobInfo$Builder;->setMinimumLatency(J)Landroid/app/job/JobInfo$Builder;

    goto :goto_c6

    :cond_bf
    iget-boolean v5, v2, Lu1/p;->q:Z

    if-nez v5, :cond_c6

    invoke-virtual {v0, v11}, Landroid/app/job/JobInfo$Builder;->setImportantWhileForeground(Z)Landroid/app/job/JobInfo$Builder;

    :cond_c6
    :goto_c6
    invoke-virtual {v3}, Ll1/b;->a()Z

    move-result v5

    if-eqz v5, :cond_f7

    .line 12
    iget-object v5, v3, Ll1/b;->h:Ll1/c;

    .line 13
    iget-object v5, v5, Ll1/c;->a:Ljava/util/Set;

    .line 14
    invoke-interface {v5}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v5

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

    move-result v15

    if-eqz v15, :cond_ed

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

    move-result-object v15

    check-cast v15, Ll1/c$a;

    .line 15
    iget-boolean v4, v15, Ll1/c$a;->b:Z

    .line 16
    new-instance v9, Landroid/app/job/JobInfo$TriggerContentUri;

    .line 17
    iget-object v15, v15, Ll1/c$a;->a:Landroid/net/Uri;

    .line 18
    invoke-direct {v9, v15, v4}, Landroid/app/job/JobInfo$TriggerContentUri;-><init>(Landroid/net/Uri;I)V

    .line 19
    invoke-virtual {v0, v9}, Landroid/app/job/JobInfo$Builder;->addTriggerContentUri(Landroid/app/job/JobInfo$TriggerContentUri;)Landroid/app/job/JobInfo$Builder;

    goto :goto_d4

    .line 20
    :cond_ed
    iget-wide v4, v3, Ll1/b;->f:J

    .line 21
    invoke-virtual {v0, v4, v5}, Landroid/app/job/JobInfo$Builder;->setTriggerContentUpdateDelay(J)Landroid/app/job/JobInfo$Builder;

    .line 22
    iget-wide v4, v3, Ll1/b;->g:J

    .line 23
    invoke-virtual {v0, v4, v5}, Landroid/app/job/JobInfo$Builder;->setTriggerContentMaxDelay(J)Landroid/app/job/JobInfo$Builder;

    :cond_f7
    invoke-virtual {v0, v12}, Landroid/app/job/JobInfo$Builder;->setPersisted(Z)Landroid/app/job/JobInfo$Builder;

    sget v4, Landroid/os/Build$VERSION;->SDK_INT:I

    if-lt v4, v10, :cond_108

    .line 24
    iget-boolean v4, v3, Ll1/b;->d:Z

    .line 25
    invoke-virtual {v0, v4}, Landroid/app/job/JobInfo$Builder;->setRequiresBatteryNotLow(Z)Landroid/app/job/JobInfo$Builder;

    .line 26
    iget-boolean v3, v3, Ll1/b;->e:Z

    .line 27
    invoke-virtual {v0, v3}, Landroid/app/job/JobInfo$Builder;->setRequiresStorageNotLow(Z)Landroid/app/job/JobInfo$Builder;

    :cond_108
    iget v3, v2, Lu1/p;->k:I

    if-lez v3, :cond_10e

    move v3, v11

    goto :goto_10f

    :cond_10e
    move v3, v12

    :goto_10f
    cmp-long v4, v13, v7

    if-lez v4, :cond_115

    move v4, v11

    goto :goto_116

    :cond_115
    move v4, v12

    :goto_116
    invoke-static {}, Lh0/a;->a()Z

    move-result v5

    if-eqz v5, :cond_127

    iget-boolean v5, v2, Lu1/p;->q:Z

    if-eqz v5, :cond_127

    if-nez v3, :cond_127

    if-nez v4, :cond_127

    invoke-virtual {v0, v11}, Landroid/app/job/JobInfo$Builder;->setExpedited(Z)Landroid/app/job/JobInfo$Builder;

    :cond_127
    invoke-virtual {v0}, Landroid/app/job/JobInfo$Builder;->build()Landroid/app/job/JobInfo;

    move-result-object v0

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

    move-result-object v3

    sget-object v4, Lp1/b;->v:Ljava/lang/String;

    const/4 v5, 0x2

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

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

    aput-object v5, v7, v12

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

    move-result-object v5

    aput-object v5, v7, v11

    const-string v5, "Scheduling work ID %s Job ID %s"

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

    move-result-object v5

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

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

    :try_start_149
    iget-object v3, v1, Lp1/b;->s:Landroid/app/job/JobScheduler;

    invoke-virtual {v3, v0}, Landroid/app/job/JobScheduler;->schedule(Landroid/app/job/JobInfo;)I

    move-result v0

    if-nez v0, :cond_1a3

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

    move-result-object v0

    const-string v3, "Unable to schedule work ID %s"

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

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

    aput-object v7, v5, v12

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

    move-result-object v3

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

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

    iget-boolean v0, v2, Lu1/p;->q:Z

    if-eqz v0, :cond_1a3

    iget-object v0, v2, Lu1/p;->r:Landroidx/work/e;

    sget-object v3, Landroidx/work/e;->r:Landroidx/work/e;

    if-ne v0, v3, :cond_1a3

    iput-boolean v12, v2, Lu1/p;->q:Z

    const-string v0, "Scheduling a non-expedited job (work ID %s)"

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

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

    aput-object v5, v3, v12

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

    move-result-object v0

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

    move-result-object v3

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

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

    invoke-virtual/range {p0 .. p2}, Lp1/b;->h(Lu1/p;I)V
    :try_end_18a
    .catch Ljava/lang/IllegalStateException; {:try_start_149 .. :try_end_18a} :catch_1a4
    .catchall {:try_start_149 .. :try_end_18a} :catchall_18b

    goto :goto_1a3

    :catchall_18b
    move-exception v0

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

    move-result-object v3

    sget-object v4, Lp1/b;->v:Ljava/lang/String;

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

    aput-object v2, v5, v12

    const-string v2, "Unable to schedule %s"

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

    move-result-object v2

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

    aput-object v0, v5, v12

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

    :cond_1a3
    :goto_1a3
    return-void

    :catch_1a4
    move-exception v0

    iget-object v2, v1, Lp1/b;->r:Landroid/content/Context;

    iget-object v3, v1, Lp1/b;->s:Landroid/app/job/JobScheduler;

    invoke-static {v2, v3}, Lp1/b;->e(Landroid/content/Context;Landroid/app/job/JobScheduler;)Ljava/util/List;

    move-result-object v2

    if-eqz v2, :cond_1b4

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    goto :goto_1b5

    :cond_1b4
    move v2, v12

    :goto_1b5
    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v3

    const/4 v4, 0x3

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

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

    move-result-object v2

    aput-object v2, v4, v12

    iget-object v2, v1, Lp1/b;->t:Lm1/j;

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

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

    move-result-object v2

    check-cast v2, Lu1/r;

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

    move-result-object v2

    check-cast v2, Ljava/util/ArrayList;

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

    move-result v2

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

    move-result-object v2

    aput-object v2, v4, v11

    iget-object v2, v1, Lp1/b;->t:Lm1/j;

    .line 31
    iget-object v2, v2, Lm1/j;->b:Landroidx/work/b;

    .line 32
    iget v2, v2, Landroidx/work/b;->h:I

    .line 33
    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    const/4 v5, 0x2

    aput-object v2, v4, v5

    const-string v2, "JobScheduler 100 job limit exceeded.  We count %d WorkManager jobs in JobScheduler; we have %d tracked jobs in our DB; our Configuration limit is %d."

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

    move-result-object v2

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

    move-result-object v3

    sget-object v4, Lp1/b;->v:Ljava/lang/String;

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

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

    new-instance v3, Ljava/lang/IllegalStateException;

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

    throw v3
.end method
