Invoke Power Menu - Miscellaneous Android Development

I have a tablet (PiPo M9) on which if I long-press the power/lock button it shows me the shutdown confirmation dialog box (screenshot attached) instead of the power menu with multiple options to Shutdown, Reboot, etc.
From the logcat I was able to figure out that the tablet invokes the shutdown function in services.jar. I was able to mod the services.jar (ShutdownThread.smali) file and figured out where I can suppress the shutdown dialog box. But now instead of returning void, would it be possible to invoke the Power Menu with shutdown and reboot options.
Any pointers would be of great help.

Related

[Q] PIN + Power button screen lock issue with 2.2

Precursors to behaviour:
-Pin security is set (required by exhange email policy)
-an ap in full screen (such as google clock) stays open past the security timeout
When I close that ap and return to the homescreen and subsequently fast press the power button to lock the screen the following happens:
-Screen goes blank (as it should) BUT...
-Fast press the power button fails to wake the phone
-Long press of the power button does not power off the phone
-Touch buttons light but the phone is otherwise blank/black and unresponsive
Ultimately, a battery pull is required to reboot the phone.
This has happened with both cognition and di11igaf's rom (the one I am currently using) and seems to be 2.2 related as rogers 2.1 only required the pin when powering up and used the slider for sleep.
Any ideas on how to resolve this?
Cheers!
I should also add that using SGS Info to change the "Power" button action in your phone will fix this, but only because it removes the lock screen entirely, negating any security you might want to implement (including the plain swipe option)
Wrong forum category perhaps?

[Q] Silent mode oddity

I've tried this on three stock Nexus 5's running 4.4.2.
1. Long press the power button and get the resulting menu to appear.
2. Press the silent button. Verify you are in silent mode by the icon in the bar.
3. Enter the settings menu.
Does your volume turn back on upon entering the settings menu? Sometimes mine even goes into vibrate mode.

Long press recent button to menu

In the usr folder then key layout file what do I need to change to achieve changing the long press recent button to perform the menu action? I guess ideally I would like long press home to be recent apps and short press recent to be menu. But which ever is possible. I just need to get a functioning menu button again.

Trouble with APP-SWITCH & MENU key

Hello,
First post I have rooted my Oneplus one yesterday, after that my MENU key and recent app (APP-SWITCH) has been set back to default
Long Press - APP-SWITCH & Short press - Menu
I wanted to interchange both keys Long press - MENU & Short press - APP-SWITCH
Then I followed http://forum.xda-developers.com/showthread.php?t=2733811 for switching keys
I have replaced
(key 139 MENU) with (key 580 APP-SWITCH)
Now my APP-SWITCH key is working but MENU is not working please help me sort it out as its my first root ever so noob with these.
If someone want to help you can get Generic.kl here- - > http://pasted.co/3a9b34ca
I think it's because key 580 is long press of MENU not long press of key 139. So whichever button you set to MENU, when you long press it, it will use key 580's value. In this case, your left button just turned to Recents (APP_SWITCH) key, not MENU key anymore, so when you long press it, key 580's value won't be used.
So i think changing left button short press to Recents (APP_SWITCH) key is as far as you can go, nothing more you can do about the long press without custom ROM or xposed. (Or does CyanogenOS have the Buttons section in the settings, i don't remember)

A feature that Long Pressing the Status Bar would open the Power Menu?

Are there any Xposed Modules or Apps that its feature is capable of acting as a Power Button by Long Pressing the Status Bar? Basically, Long Pressing the Status Bar acts just like what the Power Button would do when you Long Press the Power Button (The Power Menu would show up when long pressed). A "Very Long" Press on the Status Bar would restart the Device.
I need this kind of feature to my ROM and Device because the Power Button in my Tablet is not responding properly as of late and I have decided to use it only in the case of emergencies, so that I won't worsen its already bad condition.
I am well aware of apps like Quick Boot and there may be apps that are already capable of doing this but I would want this feature to be noticed and made possible so that this feature would be added in Custom ROMs just like the "Double Tap the Status Bar to Sleep" feature of CyanogenMod. I'm also hoping that this kind of feature would also be included in the Lineage OS ROM.

Categories

Resources