Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,85 @@
package androidx.work.impl.utils;
import androidx.annotation.GuardedBy;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import androidx.work.impl.utils.taskexecutor.SerialExecutor;
import java.util.ArrayDeque;
import java.util.concurrent.Executor;
/* loaded from: classes.dex */
public class SerialExecutorImpl implements SerialExecutor {
@GuardedBy("mLock")
private Runnable mActive;
private final Executor mExecutor;
private final ArrayDeque<Task> mTasks = new ArrayDeque<>();
final Object mLock = new Object();
@NonNull
@VisibleForTesting
public Executor getDelegatedExecutor() {
return this.mExecutor;
}
public SerialExecutorImpl(@NonNull Executor executor) {
this.mExecutor = executor;
}
@Override // java.util.concurrent.Executor
public void execute(@NonNull Runnable runnable) {
synchronized (this.mLock) {
try {
this.mTasks.add(new Task(this, runnable));
if (this.mActive == null) {
scheduleNext();
}
} catch (Throwable th) {
throw th;
}
}
}
@GuardedBy("mLock")
public void scheduleNext() {
Task poll = this.mTasks.poll();
this.mActive = poll;
if (poll != null) {
this.mExecutor.execute(poll);
}
}
@Override // androidx.work.impl.utils.taskexecutor.SerialExecutor
public boolean hasPendingTasks() {
boolean z;
synchronized (this.mLock) {
z = !this.mTasks.isEmpty();
}
return z;
}
public static class Task implements Runnable {
final Runnable mRunnable;
final SerialExecutorImpl mSerialExecutor;
public Task(@NonNull SerialExecutorImpl serialExecutorImpl, @NonNull Runnable runnable) {
this.mSerialExecutor = serialExecutorImpl;
this.mRunnable = runnable;
}
@Override // java.lang.Runnable
public void run() {
try {
this.mRunnable.run();
synchronized (this.mSerialExecutor.mLock) {
this.mSerialExecutor.scheduleNext();
}
} catch (Throwable th) {
synchronized (this.mSerialExecutor.mLock) {
this.mSerialExecutor.scheduleNext();
throw th;
}
}
}
}
}