Pre-inflate BubbleTextViews into Launcher/TaskBar All Apps RV

This CL ensures no inflation of BubbleTextView happens while binding applications, and reduces jank on slow device.

1. Let active/inactive all apps RVs share the same AllAppsRecyclerViewPool
2. Use worker thread to pre-inflate BubbleTextViews and add them to shared view pool on main thread

Bug: 287523421
Test: See before/after screenshot/video/trace attached in bug
Change-Id: I00213407be2c7c2d329997552785d0aa56c4d057
This commit is contained in:
Fengjiang Li
2023-06-15 12:28:42 -07:00
parent 1acda93e26
commit 1519c168da
6 changed files with 141 additions and 5 deletions

View File

@@ -401,6 +401,12 @@ public final class FeatureFlags {
"ENABLE_RESPONSIVE_WORKSPACE", DISABLED,
"Enables new workspace grid calculations method.");
// TODO(Block 33): Clean up flags
public static final BooleanFlag ENABLE_ALL_APPS_RV_PREINFLATION = getDebugFlag(288161355,
"ENABLE_ALL_APPS_RV_PREINFLATION", DISABLED,
"Enables preinflating all apps icons to avoid scrolling jank.");
public static class BooleanFlag {
private final boolean mCurrentValue;