| Index: backlight_controller.cc
|
| diff --git a/backlight_controller.cc b/backlight_controller.cc
|
| index fa1507440478601b134bb5e8bb389edb176f3a84..3740cf2b769f3f0f4d36f6824bdef2d7aad94e2b 100644
|
| --- a/backlight_controller.cc
|
| +++ b/backlight_controller.cc
|
| @@ -128,12 +128,17 @@ void BacklightController::DecreaseBrightness() {
|
| }
|
| }
|
|
|
| -
|
| bool BacklightController::SetPowerState(PowerState state) {
|
| if (state == state_ || !is_initialized_)
|
| return false;
|
| CHECK(state != BACKLIGHT_UNINITIALIZED);
|
|
|
| + // If backlight is turned off, do not transition to dim or off states.
|
| + // From ACTIVE_OFF state only transition to ACTIVE_ON and SUSPEND states.
|
| + if (state_ == BACKLIGHT_ACTIVE_OFF && (state == BACKLIGHT_IDLE_OFF ||
|
| + state == BACKLIGHT_DIM))
|
| + return false;
|
| +
|
| LOG(INFO) << PowerStateToString(state_) << " -> "
|
| << PowerStateToString(state);
|
| ReadBrightness();
|
|
|