Files
lawnchair/quickstep/tests
Gustav Sennton ffa5c2ad83 Don't trigger getRecentTasks() calls when waiting for an old call
TaskbarRecentAppsController#reloadRecentTasksIfNeeded() triggers a call
to fetch Recents tasks, that call is expensive as it goes through WM
Shell and the system server. If we trigger reloadRecentTasksIfNeeded()
multiple times we're queueing up multiple calls to fetch Recents tasks.

With this CL we avoid queueing up multiple calls, and instead just make
one new call when the old one finishes. That way we can only ever have
one call getRecentTasks() call triggered through
reloadRecentTasksIfNeeded() posted at any one time.

Bug: 415090968
Flag: com.android.window.flags.enable_taskbar_recent_tasks_throttle_bugfix
Test: TaskbarRecentAppsControllerTest
Change-Id: I58b66e4564af4e64837317a9de7be398395d8568
2025-05-15 20:18:21 +00:00
..