Animate backlight quickly when display state request to change or power mode changed

* mAppliedDimming should be false when power request policy is not dim.
  * mAppliedLowPower should be false when low power mode is disabled.
  * Backlight brightness changes quickly.

Change-Id: I44bf9c216554f8dce5abd0520f198824df5e8dcf
Signed-off-by: mochangming <mochangming@xiaomi.com>
This commit is contained in:
mochangming
2015-12-29 13:55:24 +08:00
parent 60d142c54b
commit f0cb46cd65

View File

@@ -673,6 +673,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
slowChange = false;
}
mAppliedDimming = true;
} else if (mAppliedDimming) {
slowChange = false;
mAppliedDimming = false;
}
// If low power mode is enabled, cut the brightness level by half
@@ -685,6 +688,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
slowChange = false;
}
mAppliedLowPower = true;
} else if (mAppliedLowPower) {
slowChange = false;
mAppliedLowPower = false;
}
// Animate the screen brightness when the screen is on or dozing.