I am not a framework guy...so can't think about any hack on framework
for this purpose.

But in driver level, I can produce the same.

You can make a driver registered as Input device and set the keybit on
KEY_END. When you want to shutdown, give a call to driver which will
in turn report key press event on that.

Android eventhub will automatically listen to this event and framework
will create power off menu on this.

regards,
Tirtha



On Apr 23, 5:34 pm, Christian Erpelding
<christian.erpeld...@googlemail.com> wrote:
> Hello,
>
> I'm trying to port Android to the 
> OpenFrame/Joggler.http://www.openpeak.com/OpenFrame.php
>
> The problem is that this device is touch-only, i.e. it has no hardware
> buttons at all. Not even a power button.
>
> I'd like to be able to shutdown Android in a safe way to avoid data
> loss. :-)
>
> Android-x86.org offers a touch-only feature that can be
> started/stopped by tapping the right corner of the StatusBar.
> It can simulate HOME/MENU/BACK, implemented in
> frameworks/base/services/java/com/android/server/status/TouchFeature.java
>
> I'd like to implement a function to show the Power Off dialog that's
> normally invoked by pressing the Power button on the PC (or
> longpressing the ENDCALL key on the phone).
>
> After 
> readinghttp://groups.google.com/group/android-porting/browse_thread/thread/e...
> I think a call to
> new GlobalActions().showDialog(...)
> should be the way to go.
>
> My problem is that GlobalActions is part of
> com.android.internal.policy.impl
>
> That means I cannot call it from com.android.server.status because of
> the private API.
>
> Could you please give me a hint what I need to change in the Android
> source to be able to access GlobalActions?
>
> Thanks a lot,
> Christian
>
>  application_pgp-signature_part
> < 1KViewDownload

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

Reply via email to