[Nexus S Android Development] lightpriest:
** Edited: Instructions at the bottom **

I have the Nexus S, and when I upgraded to ICS I found that opening the recent app dialog could take a while.

I wanted the ability to quickly switch to recent apps, so I thought the power and volume up/down buttons combination could be used to do this.

Quickly tapping on the power and volume up/down buttons together brings the previous/next recent app to the front

I prepared a short video to demonstrate (sorry for the lack of interesting audio in the video):

http://youtube.com/watch?v=ndGd2y9ro14

I created this and tested it for about a week.

It works fine, but still needs a bit tweaking and maybe some configuration through the settings screen (enable/disable completely, tapping time, cycle/don't cycle apps).

One major issue is that I believe it is only comfortable when the power and volume keys are located on opposite sides, like on the Nexus S.

This is a small modification to CM9, so I have a few questions maybe you could help:

Is there a way to include features per devices? I saw that the code checks for devices with or without the search button. Is there a way to know which device has the power button on the right? Or do I need to map it before-hand? Which brings me to..

Do you think this is this something worth uploading to CMGerrit for review to be included in CM, maybe enabled as an advanced feature in the settings section?

Do you know any ROM maintainer that would want this feature?

Any suggestions to improve (or drop) this are appreciated, maybe adding an indication of the app switching.

** INSTRUCTION **

Please follow one of the next instructions to get it (whatever suits you):

Install using a flashable zip

Download the attached flashable zip file (quick-switch-0.01-signed.zip), and flash it from recovery.

This is compiled from CM9 RC1. While it may work with later nightlies or other similar ROMs, I cannot guarantee that it does.

To revert, flash your ROM over it.

Install the jar file manually

I've also attached the JAR file so that you could install it manually.

The JAR should replace /system/framework/android.policy.jar

Backup the current one, copy the one from this post over it, clear the dalvik cache, and reboot.

You'll probably need to remount the /system folder so you could write over it (adb remount).

Note: You cannot do this from recovery because recovery doesn't mount /system automatically. To mount /system from recovery just type "mount /system" from "adb shell".

To revert, just copy the JAR from the backup and clear the dalvik cache.

Get the source (Advanced)

I forked the relevant project (android_frameworks_base) on github.

The commit is: https://github.com/lightpriest/andr...mmit/28e2caa1459d9be287d5e0b68b6ca04fee45970d, and it is present both on ics and ics-release branches.

An important note

While this is a nice thing to play around with, I've noticed that the power button started to wear on my device. I'm not 100% sure it's related, but I'll take a "wild" guess that it does. Not to say that the power button doesn't work at all, but I noticed that now sometimes it's enough to just slide a finger on it to actually press it. So, you've been warned :)

I'll probably make another build for JB, once it gets stable.

Attached files checksum:

quick-switch-0.01-signed.zip - 474e5d53cff57a163f9c24ec8301b2a7

android.policy.jar - eba03024571866fc0161e19484dc200a