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

Don't update brightness settings when throttling brightness

Currently, when brightness throttling is active it forces updating of
brightness settings. In some use cases, this causes settings to be
updated with values that are irrelevant to user settings (e.g., a
screen_brightness value of 1 when display is off).

To fix this, avoid updating settings as part of brightness throttling.
Instead, rely on the manual and auto brightness paths to trigger
settings updates when necessary.

Note that,
1. Brightness requested by manual and auto brightness is still
   throttled.
2. The throttled maximum brightness value and the final (throttled)
   display brightness are still broadcast accurately through values
   captured in BrightnessInfo.

Bug: 228286897
Test: atest BrightnessThrottlerTest AutomaticBrightnessControllerTest
Test: Manual:
    1. Disable auto brightness and set brightness to a high value
    2. Turn off the display
    3. Force thermal throttling (throttled brightness is >min)
    4. Turn on the display
    5. Verify that brightness is throttled and >min
Change-Id: I89bdcc2f77b6bf3b4b9b2fd7c1aa7b029dc9c174
parent 02e7e439
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