OSDN Git Service

add powerbtnd to simulate long press of power button. gingerbread-x86
authorChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 12 Jul 2011 06:58:56 +0000 (14:58 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 12 Jul 2011 07:06:24 +0000 (15:06 +0800)
commit36c6e87c8308ac979de7d861bf2f64d26aa1b198
tree92893b09d6286f81c36532b99b1d4a34527d7b09
parent289941695e135c01213e3ffb5be460271f1e9bb9
add powerbtnd to simulate long press of power button.

On x86 PC, power button usually generates key press and release events
simultaneously. However, the android framework expects a long press
of power button to invoke the power off dialog.

The daemon simulates a long press of power button in 2 seconds.

A target needs to add excluded-input-devices.xml to exclude
'Power Button' from processing by EventHub.
Android.mk
power/powerbtnd.c [new file with mode: 0644]