Loading
Skip snapshot task when finishing activity for shell transition
With shell transition, the snapshot from ActivityRecord#finishIfPossible is always replaced by Transition#onTransactionReady -> TaskSnapshotController#recordSnapshot And because currently SnapshotController#onTransitionReady is a dead code so the task added by addSkipClosingAppSnapshotTasks won't be cleared. So the duplicated snapshot can be skipped that eliminates the only one caller that will add task to mSkipClosingAppSnapshotTasks. Which also makes finishActivity more efficient. Also change mSkipClosingAppSnapshotTasks to store task id. So it won't keep heavy references. Bug: 283177730 Bug: 273198446 Test: TaskSnapshotControllerTest Change-Id: I3d03c34d506d0f3b1c0e070b8702a6a66a4de3c1