PowerManagerService: fix HW button illumination timeout
Patch eb01128, introducing hardware
button backlight on button keypress only, also introduced a bug:
When touching a button and then performing display activity while
the buttons are still on, the buttons would keep lightened up until
the next user interaction, potentially only switched off at the next
screen off timeout. Also, the buttons were not illuminated on
device wakeup.
This patch fixes it, together with another, long-standing problem:
When touching a hardware button, nextTimeout was set to
now + mButtonTimeout, even if mButtonTimeout is longer than the timeout
determined by the screen off timeout. To wit, if screen timeout is set
to 15 secs, but button timeout to values > 15 secs.
1 file changed