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

Commit 5af7d3b2 authored by Candice's avatar Candice Committed by Candice Lo
Browse files

Fix the timing of updating ForceInvert state and add corresponding tests

1. Use the mComputedNightMode kept in the UiModeManagerService to
   identify the system mode to avoid extra access to the SystemUi
   context and reflect the actual system theme
2. Update ForceInvert state when the mComputedNightMode is
   updated(content observer to the settings key UI_NIGHT_MODE is not
   sufficient since it will stay in MODE_NIGHT_CUSTOM if user toggle
   DarkTheme when they have a schedule)
3. Add tests to cover the logic for getForceInvertState

Bug: 404722593
Bug: 405366199
Test: atest UiModeManagerServiceTest
Flag: android.view.accessibility.force_invert_color
Change-Id: I6b8048602d26d22adeb42e54bf502fa2ee5f46fa
parent d9a023d1
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