Skip to content
Commit d83c3e57 authored by Piotr Wilczyński's avatar Piotr Wilczyński
Browse files

Fix auto-brightness state sent to HBMController

This bug was introduced in ag/20980705 which changed the code due to a special case - if auto-brightness is enabled and this is a follower display, the AutomaticBrightnessController should be disabled and the HBMController should be enabled.

In this CL, the autoBrightnessEnabled variable will be true for the follower display and will be used to decide on the state value to sent to the HBMController. The autoBrightnessState variable, however, will be set to false if this is a follower display.

Moreover, the brightnessState condition is replaced with a simplification - turn auto-brightness off if we're using the override strategy. That's because brightnessState will not be NaN if this is a follower display in DPC2 and so the condition would not allow us to set different values based on whether we're using the follower strategy.

Bug: 286818379
Test: atest DisplayPowerControllerTest
Test: atest DisplayPowerController2Test
Test: AutoBrightnessStrategyTest
Change-Id: I7c9b79805f45c655905c8938903c7bc801d2cb02
parent 81891aad
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