diff options
| author | 2022-09-29 20:48:44 +0000 | |
|---|---|---|
| committer | 2022-09-29 21:28:56 +0000 | |
| commit | 524ae21e70c9cb9e8e73d3e182051ee522be0afd (patch) | |
| tree | 1cdffcf0452220d7211bac99f7e96f1e406d7bab /libs/androidfw/Util.cpp | |
| parent | df2bdd51358e353bd4a261cc3fb8b260c2f83237 (diff) | |
Fix RegionSamplingHelper race condition
mSamplingRequestBounds was causing a race condition in RegionSamplingHelper because it becomes an empty Rectangle in the main thread when the background thread needs it to be non-empty for CompositionSamplingListener.register().To fix this, a final copy of mSamplingRequestBounds is passed to the background thread, so that it will always be working with a non-empty Rectangle.
Test: atest testCompositionSamplingListener_has_nonEmptyRect
Fixes: 247690841
Change-Id: Ib0139c8be80f828172e1909503dcf57a59673717
Diffstat (limited to 'libs/androidfw/Util.cpp')
0 files changed, 0 insertions, 0 deletions