80 lines
2.5 KiB
Smali
80 lines
2.5 KiB
Smali
.class public Landroidx/work/impl/utils/PruneWorkRunnable;
|
|
.super Ljava/lang/Object;
|
|
.source "PruneWorkRunnable.java"
|
|
|
|
# interfaces
|
|
.implements Ljava/lang/Runnable;
|
|
|
|
|
|
# instance fields
|
|
.field private final mOperation:Landroidx/work/impl/OperationImpl;
|
|
|
|
.field private final mWorkManagerImpl:Landroidx/work/impl/WorkManagerImpl;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroidx/work/impl/WorkManagerImpl;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Landroidx/work/impl/utils/PruneWorkRunnable;->mWorkManagerImpl:Landroidx/work/impl/WorkManagerImpl;
|
|
|
|
new-instance p1, Landroidx/work/impl/OperationImpl;
|
|
|
|
invoke-direct {p1}, Landroidx/work/impl/OperationImpl;-><init>()V
|
|
|
|
iput-object p1, p0, Landroidx/work/impl/utils/PruneWorkRunnable;->mOperation:Landroidx/work/impl/OperationImpl;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getOperation()Landroidx/work/Operation;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/work/impl/utils/PruneWorkRunnable;->mOperation:Landroidx/work/impl/OperationImpl;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public run()V
|
|
.locals 3
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Landroidx/work/impl/utils/PruneWorkRunnable;->mWorkManagerImpl:Landroidx/work/impl/WorkManagerImpl;
|
|
|
|
invoke-virtual {v0}, Landroidx/work/impl/WorkManagerImpl;->getWorkDatabase()Landroidx/work/impl/WorkDatabase;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroidx/work/impl/WorkDatabase;->workSpecDao()Landroidx/work/impl/model/WorkSpecDao;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Landroidx/work/impl/model/WorkSpecDao;->pruneFinishedWorkWithZeroDependentsIgnoringKeepForAtLeast()V
|
|
|
|
iget-object v0, p0, Landroidx/work/impl/utils/PruneWorkRunnable;->mOperation:Landroidx/work/impl/OperationImpl;
|
|
|
|
sget-object v1, Landroidx/work/Operation;->SUCCESS:Landroidx/work/Operation$State$SUCCESS;
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/work/impl/OperationImpl;->setState(Landroidx/work/Operation$State;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
iget-object v1, p0, Landroidx/work/impl/utils/PruneWorkRunnable;->mOperation:Landroidx/work/impl/OperationImpl;
|
|
|
|
new-instance v2, Landroidx/work/Operation$State$FAILURE;
|
|
|
|
invoke-direct {v2, v0}, Landroidx/work/Operation$State$FAILURE;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
invoke-virtual {v1, v2}, Landroidx/work/impl/OperationImpl;->setState(Landroidx/work/Operation$State;)V
|
|
|
|
return-void
|
|
.end method
|