Skip adding tasks to the skip list if they won't be processed

Bug: 199523354
Test: atest TaskSnapshotControllerTest
Change-Id: Ibb94dac74da8adbc0fedd3ca8be26b6b027417d1
This commit is contained in:
Winson Chung
2021-09-16 11:31:38 -07:00
parent e05c21bdae
commit 5f2766f30c

View File

@@ -168,6 +168,9 @@ class TaskSnapshotController {
*/
@VisibleForTesting
void addSkipClosingAppSnapshotTasks(ArraySet<Task> tasks) {
if (shouldDisableSnapshots()) {
return;
}
mSkipClosingAppSnapshotTasks.addAll(tasks);
}