I guess you intend to power off the device when you hit the power button
right?

First, the keycode as you mentioned should map Android power key. Secondly,
you should
have proper hook in baseport level for pm_power_off() for DEVICE OFF.


-Girish

On Wed, Feb 24, 2010 at 9:16 AM, Ashwin Bihari <abih...@gmail.com> wrote:

> I've got a custom board designed around the OMAP3530 and we have a
> power button the device that we want to use to cause Android to go to
> sleep or wakeup based on it's current state.
>
> I've done a few searches and have figured out the the function
> goToSleep within the PowerManager handles this functionality. For the
> power button handler, I'm sending the KEY_POWER eventcode into
> Android..this is mapped appropriately into Andriod as
> KeyEvent.KEYCODE_POWER. However, pressing the button doesn't cause
> anything to happen with Android..what am I missing in making my
> connections?
>
> Regards
> -- Ashwin
>
> --
> unsubscribe: 
> android-porting+unsubscr...@googlegroups.com<android-porting%2bunsubscr...@googlegroups.com>
> website: http://groups.google.com/group/android-porting
>

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to