Fix HDR for app-override brightness.
- HBMController no longer listens to changes on the brightness setting
directly, and instead gets brightness updates from DPC. This was
necessary since some of the brightness-sources (such as app-override)
are not reflected in the actual setting.
- Clamp override and temporary brightness sources so that they cannot
push brightness beyond the bounds set by HbmController.
- Always save away the actual brightness setting in BrightnessInfo
cache, ignoring any temporary or override brightness values. This ensures
that Display.getBrightnessInfo() reflects the user setting, and not some
temporary brightness state.
Bug: 193392737
Test: manually test HDR with app-override
Test: atest HighBrightnessModeControllerTest
Change-Id: Iffe777a22d058ddb779dc6fc22c2382f6bbac1ab
3 files changed