Files
rr3-apk/decompiled-community/sources/androidx/recyclerview/widget/AsyncDifferConfig.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- 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
2026-02-18 15:48:36 -08:00

88 lines
2.7 KiB
Java

package androidx.recyclerview.widget;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import androidx.recyclerview.widget.DiffUtil;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
/* loaded from: classes.dex */
public final class AsyncDifferConfig<T> {
@NonNull
private final Executor mBackgroundThreadExecutor;
@NonNull
private final DiffUtil.ItemCallback<T> mDiffCallback;
@Nullable
private final Executor mMainThreadExecutor;
@NonNull
public Executor getBackgroundThreadExecutor() {
return this.mBackgroundThreadExecutor;
}
@NonNull
public DiffUtil.ItemCallback<T> getDiffCallback() {
return this.mDiffCallback;
}
@Nullable
@RestrictTo({RestrictTo.Scope.LIBRARY})
public Executor getMainThreadExecutor() {
return this.mMainThreadExecutor;
}
public AsyncDifferConfig(@Nullable Executor executor, @NonNull Executor executor2, @NonNull DiffUtil.ItemCallback<T> itemCallback) {
this.mMainThreadExecutor = executor;
this.mBackgroundThreadExecutor = executor2;
this.mDiffCallback = itemCallback;
}
public static final class Builder<T> {
private static Executor sDiffExecutor;
private static final Object sExecutorLock = new Object();
private Executor mBackgroundThreadExecutor;
private final DiffUtil.ItemCallback<T> mDiffCallback;
@Nullable
private Executor mMainThreadExecutor;
@NonNull
public Builder<T> setBackgroundThreadExecutor(Executor executor) {
this.mBackgroundThreadExecutor = executor;
return this;
}
@NonNull
@RestrictTo({RestrictTo.Scope.LIBRARY})
public Builder<T> setMainThreadExecutor(Executor executor) {
this.mMainThreadExecutor = executor;
return this;
}
public Builder(@NonNull DiffUtil.ItemCallback<T> itemCallback) {
this.mDiffCallback = itemCallback;
}
@NonNull
public AsyncDifferConfig<T> build() {
if (this.mBackgroundThreadExecutor == null) {
synchronized (sExecutorLock) {
try {
if (sDiffExecutor == null) {
sDiffExecutor = Executors.newFixedThreadPool(2);
}
} catch (Throwable th) {
throw th;
}
}
this.mBackgroundThreadExecutor = sDiffExecutor;
}
return new AsyncDifferConfig<>(this.mMainThreadExecutor, this.mBackgroundThreadExecutor, this.mDiffCallback);
}
}
}