Try to detect and handle delayed quickswitch task launch failure
- The main issue arises when a task is successfully launched from
overview, but the activity later finishes (ie. during resume) which
prevents the usual logic of resetting Launcher to a good state
(ie. it can get stuck in overview with a blank or empty snapshot)
In this case, the Launch will "succeed" so that onTaskLaunchFailed
is not called, but then also silently fail (launched task finishes
and Launcher is again resumed) before Launcher stops, which does the
usual resetting of the state back to normal state after quickswitching.
This change checks for this case by listening for the activity and
transition state, and in the case where Launcher has not been stopped
or is resumed again after the transition finishes, returns the
user to the default home state.
This primarily only affects quickswitch for now, as other launch
failures leave the user in a valid state (ie. overview) while this
issue will leave the user in background state while quickswitching.
Bug: 268448123
Test: Quickswitch to an activity that finishes when resumed
Change-Id: I7d554f8fd521f7bc480dc06930ad91eeef0f1a1a
9 files changed