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

Skip to content
Commit 87546f50 authored by Daniel Solomon's avatar Daniel Solomon
Browse files

Add display brightness throttler

This change adds BrightnessThrottler, which is responsible for limiting
the usable range of display brightness based on skin temperature thermal
throttling (extensible to account for other events/conditions in the
future). Brightness constraints calculated by BrightnessThrottling are
applied by DisplayPowerController as a brightness transform similarly to
dimming and low power states.

This change also adds a field to BrightnessInfo in order to capture the
reason for an unusual max brightness (currently only accounts for a
thermal reason).

Finally, change HighBrightnessModeController (HBMC) so that HBM thermal
throttling is still reported correctly to FrameworkStatsLog when
brightness throttling is performed in DisplayPowerController (through
BrightnessThrottler) rather than through HBMC's own thermal throttling
mechanism. HBMC's own thermal throttling mechanism will be deprecated in
a future change.

Bug: 206857086
Bug: 212634465
Test: atest BrightnessThrottlerTest DisplayModeDirectorTest
    BrightnessLevelPreferenceControllerTest
    HighBrightnessModeControllerTest
Test: Manually trigger and clear thermal throttling, and verify
    transitions,
    1. While in manual brightness mode
    2. While in automatic Brightness mode
    3. While high brightness mode is enabled for HDR
    3. Across display suspend/resume events
Change-Id: I4c10f037a0a616e84fc109cc755bf3a5eaa3d111
parent 221ed8b5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment