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

Skip to content
Commit 5b6f95c7 authored by Seigo Nonaka's avatar Seigo Nonaka Committed by android-build-team Robot
Browse files

Fix race condition of removing surface.

mContainer.startingSurface can be replaced between posting
mRemoveStartingWindow and actually surface.remove() is called.

1. removeStartingWindow is called, then mRemoveStartingWindow is posted
   to mHandler
2. transferStartingWindow is called, then mContainer.startingWindow is
   replaced with new surface.
3. mHandler pops the callback and surface.remove() is called.

Here the remove is only called for replaced surface and never called for
older surface.

To fix this issue, surely removes the surface when the
removeStartingWindow is called.

Bug: 63156080
Bug: 63784898
Test: Watch /proc/<pid>/fd
Change-Id: I55e2c1b8fba32b3a19603e6ad4743f07576abd48
(cherry picked from commit 82871bdc)
parent 226eadbe
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