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

Skip to content
Commit d99084e2 authored by Vladimir Komsiyski's avatar Vladimir Komsiyski Committed by Android Build Coastguard Worker
Browse files

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
parent 00a0e2de
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