How to prevent volume keys and camera key from waking up phone in Android?
I have an activity that I want to show up when the phone goes to sleep. However, the phone wakes 开发者_开发问答up when I press the volume buttons or the camera button.
I tried using the dispatchKeyEvent(KeyEvent event) method, but it doesn't prevent the phone from waking up.
How else can I disable that functionality?
Thanks,
I heard that waking behaviour is defined on framework level - in policy.jar or somewhere else. So your issue will require modifying system itself. Check also http://forum.samdroid.net/f42/disable-every-button-wake-up-2124/
精彩评论