Fix the race in per display brightness overrides.
RootWindowContainer#performSurfacePlacementNoTrace: 1. Clear the current overrides 2. Set the new overrides 3. Post the overrides on the handler thread With the per-display handling of brightness overrides, we pass an object to the handler thread instead of a primitive integer. It's the same object as the RootWindowContainer field, so it may be cleared during the next performSurfacePlacement call before the handler thread had the chance to send it out. The fix is to simply send a copy of the overrides to the handler thread Technically this is a pre-existing issue but didn't cause any problems because only the tag was lost and not the brightness value (as it was a primitive int and was copied anyway) Fix: 382323783 Test: manual Flag: EXEMPT bugfix (cherry picked from commit 78ad3841) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:cf2c5620ce742c99976f4d60f540c5cd1cbc7804) Merged-In: Ia08a18af9d6921c1421c84d812d21af52a8f6478 Change-Id: Ia08a18af9d6921c1421c84d812d21af52a8f6478
Loading
Please register or sign in to comment