Reduce ViewPool sizes for Desktop/GroupedTaskView to save RAM.
Bug: 395287683 Flag: com.android.launcher3.enable_refactor_task_thumbnail Test: Manual - split tasks displaying correctly Change-Id: Ib4496ee1859cc5245ec4ef76f0723de8fbd55b7c
This commit is contained in:
@@ -916,10 +916,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());
|
||||
|
||||
Reference in New Issue
Block a user