Also cancel TaskView collection Jobs when Overview is not on screen.

This prevents old scopes still being active when new TaskView state emissions are being sent to main. They were previously cancelled in time but still result in empty continuations occuring on main.

Bug: 395294954
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Manual - checking perfetto traces
Change-Id: I539a6fde8c9315ceeac74c9bf622d1e2dca1403a
This commit is contained in:
Uwais Ashraf
2025-03-24 16:51:38 +00:00
parent f5956e01b2
commit deefa3db71
2 changed files with 15 additions and 10 deletions
@@ -2771,6 +2771,7 @@ public abstract class RecentsView<
}
if (enableRefactorTaskThumbnail()) {
mRecentsViewModel.onReset();
getTaskViews().forEach(TaskView::cancelJobs);
}
}