Skip to content
Commit cfeff743 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix starting window leak when adding/removing quickly

The following race condition may happen when transferring starting
windows:
- Add thread (android.anim) calls Snapshot.create
- Remove thread (android.display!) checks that yes there is a
starting window, but no surface yet. Thus, it nulls out everything.
- Add thread returns from Snapshot.create: container.startingData
is null but startingWindow is also null. Thus, we never set
abort=true and we never set the starting window properly or remove
it properly.

Test: Some basic starting window sanity testing. Otherwise, pray
to the race condition gods.
Test: AppWindowContainerControllerTests#testAddRemoveRace
Fixes: 37888853

Change-Id: Ia287bfa52f708b36ff93ef7cd45a0d080bd4dd9c
parent 23cc9aa5
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