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

Skip to content
Commit 2befed8b 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: Iccf13bdc98b4012168910305568f5dd4bbedbf54
Merged-In: I55e2c1b8fba32b3a19603e6ad4743f07576abd48
(cherry picked from commit 0bf3dc98)
parent 1d769550
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