.class public Landroidx/work/impl/utils/ForceStopRunnable;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroidx/work/impl/utils/ForceStopRunnable$BroadcastReceiver;
    }
.end annotation


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

.field public static final v:J


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

.field public final s:Lm1/j;

.field public t:I


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

    const-string v0, "ForceStopRunnable"

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

    move-result-object v0

    sput-object v0, Landroidx/work/impl/utils/ForceStopRunnable;->u:Ljava/lang/String;

    sget-object v0, Ljava/util/concurrent/TimeUnit;->DAYS:Ljava/util/concurrent/TimeUnit;

    const-wide/16 v1, 0xe42

    invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J

    move-result-wide v0

    sput-wide v0, Landroidx/work/impl/utils/ForceStopRunnable;->v:J

    return-void
.end method

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

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

    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object p1

    iput-object p1, p0, Landroidx/work/impl/utils/ForceStopRunnable;->r:Landroid/content/Context;

    iput-object p2, p0, Landroidx/work/impl/utils/ForceStopRunnable;->s:Lm1/j;

    const/4 p1, 0x0

    iput p1, p0, Landroidx/work/impl/utils/ForceStopRunnable;->t:I

    return-void
.end method

.method public static b(Landroid/content/Context;I)Landroid/app/PendingIntent;
    .registers 5

    .line 1
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    new-instance v1, Landroid/content/ComponentName;

    const-class v2, Landroidx/work/impl/utils/ForceStopRunnable$BroadcastReceiver;

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

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

    const-string v1, "ACTION_FORCE_STOP_RESCHEDULE"

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

    const/4 v1, -0x1

    .line 2
    invoke-static {p0, v1, v0, p1}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object p0

    return-object p0
.end method

.method public static d(Landroid/content/Context;)V
    .registers 6
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "ClassVerificationFailure"
        }
    .end annotation

    const-string v0, "alarm"

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

    move-result-object v0

    check-cast v0, Landroid/app/AlarmManager;

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

    move-result v1

    if-eqz v1, :cond_11

    const/high16 v1, 0xa000000

    goto :goto_13

    :cond_11
    const/high16 v1, 0x8000000

    :goto_13
    invoke-static {p0, v1}, Landroidx/work/impl/utils/ForceStopRunnable;->b(Landroid/content/Context;I)Landroid/app/PendingIntent;

    move-result-object p0

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

    move-result-wide v1

    sget-wide v3, Landroidx/work/impl/utils/ForceStopRunnable;->v:J

    add-long/2addr v1, v3

    if-eqz v0, :cond_24

    const/4 v3, 0x0

    invoke-virtual {v0, v3, v1, v2, p0}, Landroid/app/AlarmManager;->setExact(IJLandroid/app/PendingIntent;)V

    :cond_24
    return-void
.end method


# virtual methods
.method public a()V
    .registers 16

    .line 1
    iget-object v0, p0, Landroidx/work/impl/utils/ForceStopRunnable;->r:Landroid/content/Context;

    iget-object v1, p0, Landroidx/work/impl/utils/ForceStopRunnable;->s:Lm1/j;

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

    const-string v2, "jobscheduler"

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

    move-result-object v2

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

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

    move-result-object v0

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

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

    move-result-object v3

    check-cast v3, Lu1/i;

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

    const-string v4, "SELECT DISTINCT work_spec_id FROM SystemIdInfo"

    const/4 v5, 0x0

    .line 5
    invoke-static {v4, v5}, Lb1/j;->e(Ljava/lang/String;I)Lb1/j;

    move-result-object v4

    iget-object v6, v3, Lu1/i;->a:Lb1/h;

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

    iget-object v3, v3, Lu1/i;->a:Lb1/h;

    const/4 v6, 0x0

    invoke-static {v3, v4, v5, v6}, Ld1/b;->a(Lb1/h;Le1/d;ZLandroid/os/CancellationSignal;)Landroid/database/Cursor;

    move-result-object v3

    :try_start_30
    new-instance v7, Ljava/util/ArrayList;

    invoke-interface {v3}, Landroid/database/Cursor;->getCount()I

    move-result v8

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

    :goto_39
    invoke-interface {v3}, Landroid/database/Cursor;->moveToNext()Z

    move-result v8

    if-eqz v8, :cond_47

    invoke-interface {v3, v5}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    :try_end_46
    .catchall {:try_start_30 .. :try_end_46} :catchall_21d

    goto :goto_39

    :cond_47
    invoke-interface {v3}, Landroid/database/Cursor;->close()V

    invoke-virtual {v4}, Lb1/j;->q()V

    if-eqz v0, :cond_54

    .line 6
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v3

    goto :goto_55

    :cond_54
    move v3, v5

    :goto_55
    new-instance v4, Ljava/util/HashSet;

    invoke-direct {v4, v3}, Ljava/util/HashSet;-><init>(I)V

    if-eqz v0, :cond_88

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

    move-result v3

    if-nez v3, :cond_88

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

    move-result-object v0

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

    move-result v3

    if-eqz v3, :cond_88

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

    move-result-object v3

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

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

    move-result-object v8

    invoke-static {v8}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v9

    if-nez v9, :cond_80

    invoke-virtual {v4, v8}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    goto :goto_66

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

    move-result v3

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

    goto :goto_66

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

    move-result-object v0

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

    move-result v2

    const/4 v3, 0x1

    if-eqz v2, :cond_ae

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

    move-result-object v2

    check-cast v2, Ljava/lang/String;

    invoke-virtual {v4, v2}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_8c

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

    move-result-object v0

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

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

    const-string v8, "Reconciling jobs"

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

    move v0, v3

    goto :goto_af

    :cond_ae
    move v0, v5

    :goto_af
    const-wide/16 v8, -0x1

    if-eqz v0, :cond_df

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

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

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

    move-result-object v2

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

    move-result-object v4

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

    move-result v7

    if-eqz v7, :cond_d3

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

    move-result-object v7

    check-cast v7, Ljava/lang/String;

    move-object v10, v2

    check-cast v10, Lu1/r;

    invoke-virtual {v10, v7, v8, v9}, Lu1/r;->l(Ljava/lang/String;J)I

    goto :goto_c0

    :cond_d3
    invoke-virtual {v1}, Lb1/h;->k()V
    :try_end_d6
    .catchall {:try_start_b8 .. :try_end_d6} :catchall_da

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

    goto :goto_df

    :catchall_da
    move-exception v0

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

    throw v0

    .line 9
    :cond_df
    :goto_df
    iget-object v1, p0, Landroidx/work/impl/utils/ForceStopRunnable;->s:Lm1/j;

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

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

    move-result-object v2

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

    move-result-object v4

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

    :try_start_ee
    check-cast v2, Lu1/r;

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

    move-result-object v7

    move-object v10, v7

    check-cast v10, Ljava/util/ArrayList;

    invoke-virtual {v10}, Ljava/util/ArrayList;->isEmpty()Z

    move-result v10

    xor-int/2addr v10, v3

    if-eqz v10, :cond_121

    check-cast v7, Ljava/util/ArrayList;

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

    move-result-object v7

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

    move-result v11

    if-eqz v11, :cond_121

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

    move-result-object v11

    check-cast v11, Lu1/p;

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

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

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

    aput-object v14, v13, v5

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

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

    invoke-virtual {v2, v11, v8, v9}, Lu1/r;->l(Ljava/lang/String;J)I

    goto :goto_104

    :cond_121
    check-cast v4, Lu1/o;

    invoke-virtual {v4}, Lu1/o;->b()V

    invoke-virtual {v1}, Lb1/h;->k()V
    :try_end_129
    .catchall {:try_start_ee .. :try_end_129} :catchall_218

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

    if-nez v10, :cond_133

    if-eqz v0, :cond_131

    goto :goto_133

    :cond_131
    move v0, v5

    goto :goto_134

    :cond_133
    :goto_133
    move v0, v3

    .line 12
    :goto_134
    iget-object v1, p0, Landroidx/work/impl/utils/ForceStopRunnable;->s:Lm1/j;

    .line 13
    iget-object v1, v1, Lm1/j;->g:Lv1/h;

    .line 14
    iget-object v1, v1, Lv1/h;->a:Landroidx/work/impl/WorkDatabase;

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

    move-result-object v1

    check-cast v1, Lu1/f;

    const-string v2, "reschedule_needed"

    invoke-virtual {v1, v2}, Lu1/f;->a(Ljava/lang/String;)Ljava/lang/Long;

    move-result-object v1

    if-eqz v1, :cond_154

    invoke-virtual {v1}, Ljava/lang/Long;->longValue()J

    move-result-wide v7

    const-wide/16 v9, 0x1

    cmp-long v1, v7, v9

    if-nez v1, :cond_154

    move v1, v3

    goto :goto_155

    :cond_154
    move v1, v5

    :goto_155
    if-eqz v1, :cond_182

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

    move-result-object v0

    sget-object v1, Landroidx/work/impl/utils/ForceStopRunnable;->u:Ljava/lang/String;

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

    const-string v4, "Rescheduling Workers."

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

    iget-object v0, p0, Landroidx/work/impl/utils/ForceStopRunnable;->s:Lm1/j;

    invoke-virtual {v0}, Lm1/j;->e()V

    iget-object v0, p0, Landroidx/work/impl/utils/ForceStopRunnable;->s:Lm1/j;

    .line 16
    iget-object v0, v0, Lm1/j;->g:Lv1/h;

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

    .line 18
    new-instance v1, Lu1/d;

    invoke-direct {v1, v2, v5}, Lu1/d;-><init>(Ljava/lang/String;Z)V

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

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

    move-result-object v0

    check-cast v0, Lu1/f;

    invoke-virtual {v0, v1}, Lu1/f;->b(Lu1/d;)V

    goto/16 :goto_217

    :cond_182
    const/high16 v1, 0x20000000

    .line 19
    :try_start_184
    invoke-static {}, Lh0/a;->a()Z

    move-result v2

    if-eqz v2, :cond_18c

    const/high16 v1, 0x22000000

    :cond_18c
    iget-object v2, p0, Landroidx/work/impl/utils/ForceStopRunnable;->r:Landroid/content/Context;

    invoke-static {v2, v1}, Landroidx/work/impl/utils/ForceStopRunnable;->b(Landroid/content/Context;I)Landroid/app/PendingIntent;

    move-result-object v1

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

    const/16 v4, 0x1e

    if-lt v2, v4, :cond_1cc

    if-eqz v1, :cond_19d

    invoke-virtual {v1}, Landroid/app/PendingIntent;->cancel()V

    :cond_19d
    iget-object v1, p0, Landroidx/work/impl/utils/ForceStopRunnable;->r:Landroid/content/Context;

    const-string v2, "activity"

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

    move-result-object v1

    check-cast v1, Landroid/app/ActivityManager;

    invoke-virtual {v1, v6, v5, v5}, Landroid/app/ActivityManager;->getHistoricalProcessExitReasons(Ljava/lang/String;II)Ljava/util/List;

    move-result-object v1

    if-eqz v1, :cond_1d4

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

    move-result v2

    if-nez v2, :cond_1d4

    move v2, v5

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

    move-result v4

    if-ge v2, v4, :cond_1d4

    invoke-interface {v1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Landroid/app/ApplicationExitInfo;

    invoke-virtual {v4}, Landroid/app/ApplicationExitInfo;->getReason()I

    move-result v4

    const/16 v6, 0xa

    if-ne v4, v6, :cond_1c9

    goto :goto_1e8

    :cond_1c9
    add-int/lit8 v2, v2, 0x1

    goto :goto_1b4

    :cond_1cc
    if-nez v1, :cond_1d4

    iget-object v1, p0, Landroidx/work/impl/utils/ForceStopRunnable;->r:Landroid/content/Context;

    invoke-static {v1}, Landroidx/work/impl/utils/ForceStopRunnable;->d(Landroid/content/Context;)V
    :try_end_1d3
    .catch Ljava/lang/SecurityException; {:try_start_184 .. :try_end_1d3} :catch_1d8
    .catch Ljava/lang/IllegalArgumentException; {:try_start_184 .. :try_end_1d3} :catch_1d6

    goto :goto_1e8

    :cond_1d4
    move v3, v5

    goto :goto_1e8

    :catch_1d6
    move-exception v1

    goto :goto_1d9

    :catch_1d8
    move-exception v1

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

    move-result-object v2

    sget-object v4, Landroidx/work/impl/utils/ForceStopRunnable;->u:Ljava/lang/String;

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

    aput-object v1, v6, v5

    const-string v1, "Ignoring exception"

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

    :goto_1e8
    if-eqz v3, :cond_1fd

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

    move-result-object v0

    sget-object v1, Landroidx/work/impl/utils/ForceStopRunnable;->u:Ljava/lang/String;

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

    const-string v3, "Application was force-stopped, rescheduling."

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

    iget-object v0, p0, Landroidx/work/impl/utils/ForceStopRunnable;->s:Lm1/j;

    invoke-virtual {v0}, Lm1/j;->e()V

    goto :goto_217

    :cond_1fd
    if-eqz v0, :cond_217

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

    move-result-object v0

    sget-object v1, Landroidx/work/impl/utils/ForceStopRunnable;->u:Ljava/lang/String;

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

    const-string v3, "Found unfinished work, scheduling it."

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

    iget-object v0, p0, Landroidx/work/impl/utils/ForceStopRunnable;->s:Lm1/j;

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

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

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

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

    :cond_217
    :goto_217
    return-void

    :catchall_218
    move-exception v0

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

    throw v0

    :catchall_21d
    move-exception v0

    .line 26
    invoke-interface {v3}, Landroid/database/Cursor;->close()V

    invoke-virtual {v4}, Lb1/j;->q()V

    throw v0
.end method

.method public c()Z
    .registers 7

    iget-object v0, p0, Landroidx/work/impl/utils/ForceStopRunnable;->s:Lm1/j;

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

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

    const/4 v1, 0x0

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    const/4 v2, 0x1

    const/4 v3, 0x0

    if-eqz v1, :cond_1e

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

    move-result-object v0

    sget-object v1, Landroidx/work/impl/utils/ForceStopRunnable;->u:Ljava/lang/String;

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

    const-string v4, "The default process name was not specified."

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

    return v2

    :cond_1e
    iget-object v1, p0, Landroidx/work/impl/utils/ForceStopRunnable;->r:Landroid/content/Context;

    invoke-static {v1, v0}, Lv1/i;->a(Landroid/content/Context;Landroidx/work/b;)Z

    move-result v0

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

    move-result-object v1

    sget-object v4, Landroidx/work/impl/utils/ForceStopRunnable;->u:Ljava/lang/String;

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

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

    move-result-object v5

    aput-object v5, v2, v3

    const-string v5, "Is default app process = %s"

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

    move-result-object v2

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

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

    return v0
.end method

.method public run()V
    .registers 12

    :try_start_0
    invoke-virtual {p0}, Landroidx/work/impl/utils/ForceStopRunnable;->c()Z

    move-result v0
    :try_end_4
    .catchall {:try_start_0 .. :try_end_4} :catchall_7f

    if-nez v0, :cond_c

    iget-object v0, p0, Landroidx/work/impl/utils/ForceStopRunnable;->s:Lm1/j;

    invoke-virtual {v0}, Lm1/j;->d()V

    return-void

    :catch_c
    :cond_c
    :goto_c
    :try_start_c
    iget-object v0, p0, Landroidx/work/impl/utils/ForceStopRunnable;->r:Landroid/content/Context;

    invoke-static {v0}, Lm1/i;->a(Landroid/content/Context;)V

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

    move-result-object v0

    sget-object v1, Landroidx/work/impl/utils/ForceStopRunnable;->u:Ljava/lang/String;

    const-string v2, "Performing cleanup operations."

    const/4 v3, 0x0

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

    invoke-virtual {v0, v1, v2, v4}, Ll1/i;->a(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Throwable;)V
    :try_end_1f
    .catchall {:try_start_c .. :try_end_1f} :catchall_7f

    :try_start_1f
    invoke-virtual {p0}, Landroidx/work/impl/utils/ForceStopRunnable;->a()V
    :try_end_22
    .catch Landroid/database/sqlite/SQLiteCantOpenDatabaseException; {:try_start_1f .. :try_end_22} :catch_32
    .catch Landroid/database/sqlite/SQLiteDatabaseCorruptException; {:try_start_1f .. :try_end_22} :catch_30
    .catch Landroid/database/sqlite/SQLiteDatabaseLockedException; {:try_start_1f .. :try_end_22} :catch_2e
    .catch Landroid/database/sqlite/SQLiteTableLockedException; {:try_start_1f .. :try_end_22} :catch_2c
    .catch Landroid/database/sqlite/SQLiteConstraintException; {:try_start_1f .. :try_end_22} :catch_2a
    .catch Landroid/database/sqlite/SQLiteAccessPermException; {:try_start_1f .. :try_end_22} :catch_28
    .catchall {:try_start_1f .. :try_end_22} :catchall_7f

    iget-object v0, p0, Landroidx/work/impl/utils/ForceStopRunnable;->s:Lm1/j;

    invoke-virtual {v0}, Lm1/j;->d()V

    return-void

    :catch_28
    move-exception v0

    goto :goto_33

    :catch_2a
    move-exception v0

    goto :goto_33

    :catch_2c
    move-exception v0

    goto :goto_33

    :catch_2e
    move-exception v0

    goto :goto_33

    :catch_30
    move-exception v0

    goto :goto_33

    :catch_32
    move-exception v0

    :goto_33
    :try_start_33
    iget v1, p0, Landroidx/work/impl/utils/ForceStopRunnable;->t:I

    const/4 v2, 0x1

    add-int/2addr v1, v2

    iput v1, p0, Landroidx/work/impl/utils/ForceStopRunnable;->t:I

    const/4 v4, 0x3

    if-ge v1, v4, :cond_63

    int-to-long v4, v1

    const-wide/16 v6, 0x12c

    mul-long/2addr v4, v6

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

    move-result-object v1

    sget-object v8, Landroidx/work/impl/utils/ForceStopRunnable;->u:Ljava/lang/String;

    const-string v9, "Retrying after %s"

    new-array v10, v2, [Ljava/lang/Object;

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

    move-result-object v4

    aput-object v4, v10, v3

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

    move-result-object v4

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

    aput-object v0, v2, v3

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

    iget v0, p0, Landroidx/work/impl/utils/ForceStopRunnable;->t:I
    :try_end_5d
    .catchall {:try_start_33 .. :try_end_5d} :catchall_7f

    int-to-long v0, v0

    mul-long/2addr v0, v6

    .line 1
    :try_start_5f
    invoke-static {v0, v1}, Ljava/lang/Thread;->sleep(J)V
    :try_end_62
    .catch Ljava/lang/InterruptedException; {:try_start_5f .. :try_end_62} :catch_c
    .catchall {:try_start_5f .. :try_end_62} :catchall_7f

    goto :goto_c

    :cond_63
    :try_start_63
    const-string v1, "The file system on the device is in a bad state. WorkManager cannot access the app\'s internal data store."

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

    move-result-object v4

    sget-object v5, Landroidx/work/impl/utils/ForceStopRunnable;->u:Ljava/lang/String;

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

    aput-object v0, v2, v3

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

    new-instance v2, Ljava/lang/IllegalStateException;

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

    iget-object v0, p0, Landroidx/work/impl/utils/ForceStopRunnable;->s:Lm1/j;

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

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

    throw v2
    :try_end_7f
    .catchall {:try_start_63 .. :try_end_7f} :catchall_7f

    :catchall_7f
    move-exception v0

    iget-object v1, p0, Landroidx/work/impl/utils/ForceStopRunnable;->s:Lm1/j;

    invoke-virtual {v1}, Lm1/j;->d()V

    throw v0
.end method
