Allow wallpaper color updates if screen off
Originally, we planned to only allow one color update per boot cycle,
preventing jank from wallpapers that may too eagerly send update events
at runtime.
To better accommodate live wallpapers, while continuing to avoid jank
at runtime, we will allow color updates once the screen is off.
Also, any color updates received when the screen is on are cached, and
when the screen is turned off, they will be processed.
Test: added tests to ThemeOverlayControllerTest, one confirms
colors are not processed when the screen is on, and once the screen is
off, they are processed. Another test confirms this behavior does not
conflict with the expected behavior during setup wizard: _no_ color
updates are processed until the device is fully setup, avoiding janky
Activity restarts.
Bug: 183792317
Change-Id: Ie48558d7724572271d7d8262835b5eba48174fd3
2 files changed