OSDN Git Service

Improve the screen dim duration calculation.
authorJeff Brown <jeffbrown@google.com>
Wed, 3 Oct 2012 04:18:04 +0000 (21:18 -0700)
committerJeff Brown <jeffbrown@google.com>
Wed, 3 Oct 2012 04:18:04 +0000 (21:18 -0700)
commitff532540f18e3b2181da0550fe55045418a3b84e
tree6b7c771a5838873365e3864ee1069de712b07c77
parentf3fb895269deadcda0cf497d421e4b89e8ee8f8f
Improve the screen dim duration calculation.

Take into account whether the screen off timeout is very short.
If so, we use a shorter dim timeout.  Don't allow the dim
time to be more than 20% of the total screen on time so that
the screen remains bright at least 80% of the time even when
the timeout is short.

Bug: 7273646
Change-Id: Iccea764b90f0d8b1df7009d26160c6bcf6eabe5b
services/java/com/android/server/power/PowerManagerService.java