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

Skip to content
Commit 8a6e0bfb authored by Yifei Zhang's avatar Yifei Zhang Committed by Rupesh Bansal
Browse files

Doze brightness for non-offloaded watchfaces

Enable auto-brightness in doze so that we can support top-of-minute updates.

Disable auto-brightness in doze temporarily if the offload session doesn't allow it - we don't want to use auto-brightness while the offload session is in control of the display.

Update the auto-brightness value in AutomaticBrightnessController when switching modes. This can be done in the same thread and there's no need to notify the listeners if the mode is switched from updatePowerState().

Use the display state and not the policy when setting auto-brightness state - this is reverting to the code we had before and in ag/26495348 we decided to rely on the state consistently.

Don't use the initial doze brightness based on last observed lux because of b/328714026.

Don't use the default doze brightness when auto-brightness enabled in doze - sometimes AutomaticBrightnessController might not provide a brightness value (when the lux isn't ready yet or the sensor is temporarily disabled). We don't want to cause unexpected brightness changes in those situations with the default doze brightness.

Test: adb logcat | grep -i "brightnessEvent"
Test: atest AutomaticBrightnessControllerTest
Test: atest AutomaticBrightnessStrategyTest
Test: atest BrightnessReasonTest
Test: atest DisplayPowerControllerTest
Test: atest DisplayOffloadSessionImplTest
Test: atest LocalDisplayAdapterTest
Bug: 327392714
Bug: 328714026
Change-Id: Ie3ae27e69d3edad41d27cc1f871295e8a73c09cb
parent 3d7c06c1
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