Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9fb937e3 authored by wilsonshih's avatar wilsonshih
Browse files

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
parent 2c325801
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment