OSDN Git Service

Copy child window list when destroying surface
authorJorim Jaggi <jjaggi@google.com>
Fri, 5 Jan 2018 14:40:32 +0000 (15:40 +0100)
committerJorim Jaggi <jjaggi@google.com>
Fri, 5 Jan 2018 14:40:32 +0000 (15:40 +0100)
commit59f3e926cedfac38288e7008c4b9eca1eb8cbed6
treebab12b65e3653876f8324224b6c41390f72587ad
parent88f620534f9fe2c3a32765b2a34d3092ab889b1a
Copy child window list when destroying surface

When removing a child window, we may trigger a layout pass via:

WindowState.removeImmediately calls
WMS.postWindowRemoveCleanupLocked calls
WindowPlacer.performSurfacePlacement

Then, under certain conditions, we either remove a window from
mService.mForceRemoves or mService.mPendingRemove. If a child
is in any of these two lists, it will lead to a crash.

Test: go/wm-smoke
Change-Id: I4eac6a6ec9092521542590fad1aa9643818b2fe6
Fixes: 71499373
services/core/java/com/android/server/wm/AppWindowToken.java
services/core/java/com/android/server/wm/WindowState.java