OSDN Git Service

Add a mechanism to adjust auto-brightness at night.
authorJeff Brown <jeffbrown@google.com>
Wed, 22 Aug 2012 05:14:26 +0000 (22:14 -0700)
committerJeff Brown <jeffbrown@google.com>
Wed, 22 Aug 2012 07:02:41 +0000 (00:02 -0700)
commitaa202a6dc33d331cbd9e34a1bb5f74db6284dda6
treea20a54dab159c7fb7f91e336cb0530eb85d1d1d4
parent2416e09649eb6ab767eba458796e126196c77a34
Add a mechanism to adjust auto-brightness at night.

Uses the twilight service to determine the hours of
sunrise and sunset.  Shortly after sunset or before sunrise
gradually start to apply a gamma correction factor to the
auto-brightness calculations to make the screen a little
dimmer at night.

The effect is relatively small and is mostly noticeable
in dark rooms.  This is just a first pass at the algorithm,
we can tweak the adjustment later to ensure that it has even less
impact in moderate or bright environments.

Change-Id: Idf89022a5d0bb52975e04779352d53fa63371178
services/java/com/android/server/SystemServer.java
services/java/com/android/server/power/DisplayPowerController.java
services/java/com/android/server/power/PowerManagerService.java