Prevent execute app transition too early when performClearTask
The app transition could be executed in finishIfPossible if one of the
non-top activity in the task is visible but not resumed, which lead the
wrong transition type, normally there should wait for for next resumed
activity be added to opening apps. Use destroyIfPossible to prevent
unnecessary transition.
Bug: 192309923
Test: verify the transition type after SUW call finishAndRemoveTask.
Test: atest AppTransitionControllerTest TaskStackChangedListenerTest
Change-Id: I5c336bc5a8fc52684f5e15d8ff973d0960aa1250
2 files changed