apache/incubator-cordova-android — pull request #20 by 13leaf (2012-05-15 01:57:47+00:00)
Title: Fixed the issue for override backbutton(other system button) can not intercept native rightly in some platform.

...ton(like back) as wish.

before onKeyUp,onKeyDown may handle back button.See http://developer.android.com/reference/android/app/Activity.html#onKeyDown(int, android.view.KeyEvent).
Although it says onKeyDown only perform onBackPressed() immediately when the targetSdk version is lower than 5.
I make DroidGap override onBackPressed(),and breakpoint for that.
I see onKeyDown will always handle onBackPressed(),even my emulator's sdk version is 2.2.
After that,I test it in Sumsung P1000(2.2),the result is same.
So I change cordova's onKeyUp to onKeyDown.I think that can help for intercept system key quickly and right.