Fix crash when setting no_animation flag on a not collected activity
The transferStartingWindowToNextRunningIfNeeded() method is called when the top activity becomes invisible, at which point it tries to transfer the starting window to the next activity. Due to this timing, the next activity may not have been collected yet. This led to a crash when the system attempted to set no_animation flag on the activity that is not ask to resuming it yet. The fix is to proactively collect the next top running activity, ensuring it is in a valid state and preventing the exception. Flag: com.android.window.flags.transfer_starting_window_to_next_when_invisible Bug: 442085795 Test: atest ActivityRecordTests Change-Id: I394b8a48cbd1aa3f8e6b9e0de3e03a5ef33c402d
Loading
Please register or sign in to comment