@@ -50,8 +50,8 @@ public class RecyclerBinderConfiguration {
50
50
private final boolean mEnableItemPrefetch ;
51
51
private final int mItemViewCacheSize ;
52
52
private final boolean mRequestMountForPrefetchedItems ;
53
- private LayoutThreadPoolConfiguration mThreadPoolConfiguration =
54
- ComponentsConfiguration . threadPoolConfiguration ;
53
+
54
+ @ Nullable private final LayoutThreadPoolConfiguration mThreadPoolConfiguration ;
55
55
@ Nullable private RunnableHandler mChangeSetThreadHandler ;
56
56
private final boolean mIsReconciliationEnabled ;
57
57
private final boolean mIsIncrementalMountEnabled ;
@@ -213,13 +213,11 @@ public int getEstimatedViewportCount() {
213
213
}
214
214
215
215
public static class Builder {
216
- public static final LayoutThreadPoolConfiguration DEFAULT_THREAD_POOL_CONFIG =
217
- ComponentsConfiguration .threadPoolConfiguration ;
218
216
static final float DEFAULT_RANGE = RecyclerBinder .Builder .DEFAULT_RANGE_RATIO ;
219
217
public static final int UNSET = -1 ;
220
218
221
219
@ Nullable private LayoutHandlerFactory mLayoutHandlerFactory ;
222
- private LayoutThreadPoolConfiguration mThreadPoolConfiguration = DEFAULT_THREAD_POOL_CONFIG ;
220
+ private @ Nullable LayoutThreadPoolConfiguration mThreadPoolConfiguration ;
223
221
private @ Nullable ComponentsConfiguration mComponentsConfiguration ;
224
222
private float mRangeRatio = DEFAULT_RANGE ;
225
223
private boolean mCircular = false ;
@@ -282,14 +280,12 @@ public Builder idleExecutor(@Nullable LayoutHandlerFactory idleExecutor) {
282
280
return this ;
283
281
}
284
282
285
- /** Null value will fall back to the non-null default one. */
286
- public Builder threadPoolConfiguration (
287
- @ Nullable LayoutThreadPoolConfiguration threadPoolConfiguration ) {
288
- if (threadPoolConfiguration != null ) {
289
- mThreadPoolConfiguration = threadPoolConfiguration ;
290
- } else {
291
- mThreadPoolConfiguration = DEFAULT_THREAD_POOL_CONFIG ;
292
- }
283
+ /**
284
+ * Set the {@link LayoutThreadPoolConfiguration} to use in the {@link
285
+ * RecyclerBinderConfiguration}
286
+ */
287
+ public Builder threadPoolConfiguration (LayoutThreadPoolConfiguration threadPoolConfiguration ) {
288
+ mThreadPoolConfiguration = threadPoolConfiguration ;
293
289
return this ;
294
290
}
295
291
0 commit comments