Skip to content
Commit f0f64c1b authored by Charles Chen's avatar Charles Chen
Browse files

Try to fix IndexOutBoundsException in Task#removeChild

When calling Task#removeChild in a Task with finishing task overlay
activities, it calls ActivityStackSupervisor#removeTask, and goes to
performClearTaskAtIndexLocked and calls removeChild() recursively,
which leads to iterating over mChildren twice.
This CL introduces a flag mInRemoveTask to prevent the double
invocation of removeTask, and also refactors
performClearTaskAtIndesLocked a bit to align with the current behavior.

Test: atest WmTests:TaskTests
Bug: 157663342

Change-Id: I9e3bb6947bca9adc87497d16947de644f3227ee4
parent 612d9e85
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment