Fix missing lock in power manager.
The display wake lock and other internal state could become
out of sync if we happened to execute the power manager's update
function concurrently due to the missing lock.
This bug can be trigged due to display state changes or proximity
sensor updated. Although it would be extremely rare, we have
some evidence of this happening on at least a few devices resulting
in rapid power drain with the screen off or a crash.
(cherry picked from commit d91e417b06388694db213257b4df6b4dd78e0d49)
1 file changed