discord-jadx/app/src/main/java/androidx/work/impl/utils/PruneWorkRunnable.java
2021-07-24 04:37:17 +02:00

29 lines
985 B
Java

package androidx.work.impl.utils;
import androidx.annotation.RestrictTo;
import androidx.work.Operation;
import androidx.work.impl.OperationImpl;
import androidx.work.impl.WorkManagerImpl;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
public class PruneWorkRunnable implements Runnable {
private final OperationImpl mOperation = new OperationImpl();
private final WorkManagerImpl mWorkManagerImpl;
public PruneWorkRunnable(WorkManagerImpl workManagerImpl) {
this.mWorkManagerImpl = workManagerImpl;
}
public Operation getOperation() {
return this.mOperation;
}
@Override // java.lang.Runnable
public void run() {
try {
this.mWorkManagerImpl.getWorkDatabase().workSpecDao().pruneFinishedWorkWithZeroDependentsIgnoringKeepForAtLeast();
this.mOperation.setState(Operation.SUCCESS);
} catch (Throwable th) {
this.mOperation.setState(new Operation.State.FAILURE(th));
}
}
}