- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
141 lines
7.0 KiB
Java
141 lines
7.0 KiB
Java
package androidx.work.impl.utils;
|
|
|
|
import androidx.work.ListenableFutureKt;
|
|
import androidx.work.WorkInfo;
|
|
import androidx.work.WorkQuery;
|
|
import androidx.work.impl.WorkDatabase;
|
|
import androidx.work.impl.model.WorkSpec;
|
|
import androidx.work.impl.model.WorkSpecDao;
|
|
import androidx.work.impl.utils.taskexecutor.SerialExecutor;
|
|
import androidx.work.impl.utils.taskexecutor.TaskExecutor;
|
|
import com.google.common.util.concurrent.ListenableFuture;
|
|
import java.util.List;
|
|
import java.util.UUID;
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class StatusRunnable {
|
|
public static final ListenableFuture forStringIds(WorkDatabase workDatabase, TaskExecutor executor, final List<String> ids) {
|
|
Intrinsics.checkNotNullParameter(workDatabase, "<this>");
|
|
Intrinsics.checkNotNullParameter(executor, "executor");
|
|
Intrinsics.checkNotNullParameter(ids, "ids");
|
|
return loadStatusFuture(workDatabase, executor, new Function1() { // from class: androidx.work.impl.utils.StatusRunnable$forStringIds$1
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
{
|
|
super(1);
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function1
|
|
public final List<WorkInfo> invoke(WorkDatabase db) {
|
|
Intrinsics.checkNotNullParameter(db, "db");
|
|
List<WorkInfo> apply = WorkSpec.WORK_INFO_MAPPER.apply(db.workSpecDao().getWorkStatusPojoForIds(ids));
|
|
Intrinsics.checkNotNullExpressionValue(apply, "WORK_INFO_MAPPER.apply(d…orkStatusPojoForIds(ids))");
|
|
return apply;
|
|
}
|
|
});
|
|
}
|
|
|
|
public static final ListenableFuture forUUID(WorkDatabase workDatabase, TaskExecutor executor, final UUID id) {
|
|
Intrinsics.checkNotNullParameter(workDatabase, "<this>");
|
|
Intrinsics.checkNotNullParameter(executor, "executor");
|
|
Intrinsics.checkNotNullParameter(id, "id");
|
|
return loadStatusFuture(workDatabase, executor, new Function1() { // from class: androidx.work.impl.utils.StatusRunnable$forUUID$1
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
{
|
|
super(1);
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function1
|
|
public final WorkInfo invoke(WorkDatabase db) {
|
|
Intrinsics.checkNotNullParameter(db, "db");
|
|
WorkSpecDao workSpecDao = db.workSpecDao();
|
|
String uuid = id.toString();
|
|
Intrinsics.checkNotNullExpressionValue(uuid, "id.toString()");
|
|
WorkSpec.WorkInfoPojo workStatusPojoForId = workSpecDao.getWorkStatusPojoForId(uuid);
|
|
if (workStatusPojoForId != null) {
|
|
return workStatusPojoForId.toWorkInfo();
|
|
}
|
|
return null;
|
|
}
|
|
});
|
|
}
|
|
|
|
public static final ListenableFuture forTag(WorkDatabase workDatabase, TaskExecutor executor, final String tag) {
|
|
Intrinsics.checkNotNullParameter(workDatabase, "<this>");
|
|
Intrinsics.checkNotNullParameter(executor, "executor");
|
|
Intrinsics.checkNotNullParameter(tag, "tag");
|
|
return loadStatusFuture(workDatabase, executor, new Function1() { // from class: androidx.work.impl.utils.StatusRunnable$forTag$1
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
{
|
|
super(1);
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function1
|
|
public final List<WorkInfo> invoke(WorkDatabase db) {
|
|
Intrinsics.checkNotNullParameter(db, "db");
|
|
List<WorkInfo> apply = WorkSpec.WORK_INFO_MAPPER.apply(db.workSpecDao().getWorkStatusPojoForTag(tag));
|
|
Intrinsics.checkNotNullExpressionValue(apply, "WORK_INFO_MAPPER.apply(d…orkStatusPojoForTag(tag))");
|
|
return apply;
|
|
}
|
|
});
|
|
}
|
|
|
|
public static final ListenableFuture forUniqueWork(WorkDatabase workDatabase, TaskExecutor executor, final String name) {
|
|
Intrinsics.checkNotNullParameter(workDatabase, "<this>");
|
|
Intrinsics.checkNotNullParameter(executor, "executor");
|
|
Intrinsics.checkNotNullParameter(name, "name");
|
|
return loadStatusFuture(workDatabase, executor, new Function1() { // from class: androidx.work.impl.utils.StatusRunnable$forUniqueWork$1
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
{
|
|
super(1);
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function1
|
|
public final List<WorkInfo> invoke(WorkDatabase db) {
|
|
Intrinsics.checkNotNullParameter(db, "db");
|
|
List<WorkInfo> apply = WorkSpec.WORK_INFO_MAPPER.apply(db.workSpecDao().getWorkStatusPojoForName(name));
|
|
Intrinsics.checkNotNullExpressionValue(apply, "WORK_INFO_MAPPER.apply(d…kStatusPojoForName(name))");
|
|
return apply;
|
|
}
|
|
});
|
|
}
|
|
|
|
public static final ListenableFuture forWorkQuerySpec(WorkDatabase workDatabase, TaskExecutor executor, final WorkQuery querySpec) {
|
|
Intrinsics.checkNotNullParameter(workDatabase, "<this>");
|
|
Intrinsics.checkNotNullParameter(executor, "executor");
|
|
Intrinsics.checkNotNullParameter(querySpec, "querySpec");
|
|
return loadStatusFuture(workDatabase, executor, new Function1() { // from class: androidx.work.impl.utils.StatusRunnable$forWorkQuerySpec$1
|
|
{
|
|
super(1);
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function1
|
|
public final List<WorkInfo> invoke(WorkDatabase db) {
|
|
Intrinsics.checkNotNullParameter(db, "db");
|
|
List<WorkInfo> apply = WorkSpec.WORK_INFO_MAPPER.apply(db.rawWorkInfoDao().getWorkInfoPojos(RawQueries.toRawQuery(WorkQuery.this)));
|
|
Intrinsics.checkNotNullExpressionValue(apply, "WORK_INFO_MAPPER.apply(d…(querySpec.toRawQuery()))");
|
|
return apply;
|
|
}
|
|
});
|
|
}
|
|
|
|
private static final <T> ListenableFuture loadStatusFuture(final WorkDatabase workDatabase, TaskExecutor taskExecutor, final Function1 function1) {
|
|
SerialExecutor serialTaskExecutor = taskExecutor.getSerialTaskExecutor();
|
|
Intrinsics.checkNotNullExpressionValue(serialTaskExecutor, "executor.serialTaskExecutor");
|
|
return ListenableFutureKt.executeAsync(serialTaskExecutor, "loadStatusFuture", new Function0() { // from class: androidx.work.impl.utils.StatusRunnable$loadStatusFuture$1
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
{
|
|
super(0);
|
|
}
|
|
|
|
/* JADX WARN: Type inference failed for: r0v1, types: [T, java.lang.Object] */
|
|
@Override // kotlin.jvm.functions.Function0
|
|
public final T invoke() {
|
|
return Function1.this.invoke(workDatabase);
|
|
}
|
|
});
|
|
}
|
|
}
|