Merge "Reduce ViewPool sizes for Desktop/GroupedTaskView to save RAM." into main

This commit is contained in:
Treehugger Robot
2025-02-18 08:59:42 -08:00
committed by Android (Google) Code Review
@@ -917,10 +917,12 @@ public abstract class RecentsView<
mTaskViewPool = new ViewPool<>(context, this, R.layout.task, 20 /* max size */,
10 /* initial size */);
int groupedViewPoolInitialSize = enableRefactorTaskThumbnail() ? 2 : 10;
mGroupedTaskViewPool = new ViewPool<>(context, this,
R.layout.task_grouped, 20 /* max size */, 10 /* initial size */);
R.layout.task_grouped, 20 /* max size */, groupedViewPoolInitialSize);
int desktopViewPoolInitialSize = DesktopModeStatus.canEnterDesktopMode(mContext) ? 1 : 0;
mDesktopTaskViewPool = new ViewPool<>(context, this, R.layout.task_desktop,
5 /* max size */, 1 /* initial size */);
5 /* max size */, desktopViewPoolInitialSize);
setOrientationHandler(mOrientationState.getOrientationHandler());
mIsRtl = getPagedOrientationHandler().getRecentsRtlSetting(getResources());