Skip to content
Commit a493c9a4 authored by chaviw's avatar chaviw
Browse files

Ensure detached children aren't parented to new SurfaceControl

The previous CL called preserveSurfaces when detachChildren were called
to ensure a new SurfaceControl would get created. However, the check for
when reparenting old children to the new surface was incorrect so
children from the destroying surface would become children of the new
surface.

This was because mChildrenDetached was set to false when the new surface
was created. The children were reparented after the new surface was
created so mChildrenDetached would always be false.

Instead, add a flag to the WindowSurfaceController when children are
detached. This way we know which WindowSurfaceController has detached
children and shouldn't reparent its children to the new surface.

Test: Close and open apps with SV quickly. Child surfaces are cleaned up
Fixes: 155694905
Bug: 157439199
Change-Id: I5f20f159bdc86c90e972400cd356df771d926fcc
parent 3917b729
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