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
This commit is contained in:
@ -741,7 +741,12 @@ class ServerThread extends Thread {
|
||||
w.getDefaultDisplay().getMetrics(metrics);
|
||||
context.getResources().updateConfiguration(config, metrics);
|
||||
|
||||
power.systemReady();
|
||||
try {
|
||||
power.systemReady(twilight);
|
||||
} catch (Throwable e) {
|
||||
reportWtf("making Power Manager Service ready", e);
|
||||
}
|
||||
|
||||
try {
|
||||
pm.systemReady();
|
||||
} catch (Throwable e) {
|
||||
|
Reference in New Issue
Block a user