7

How does Android OS listen for Power Button key short presses?

view full story
linux-howto

http://stackoverflow.com – I'm looking for the implementation in the Android source on how the power button is mapped to turning the screen off. I am working on a custom ROM and am trying to find the relationship between the two events (short key press and screen turning off). I am finding that the screen state changes in frameworks/base/services/java/com/android/server/PowerManagerService.java, but I don't see anything related to the power button itself. Thank you for your help. (HowTos)