Add support for power keys, improve behavior of virtual keys.

The platform now knows how to deal with a platform key, which at this
point is "just like end call, but don't end a call."

Also improve the handling of virtual keys, to allow for canceling when
sliding off into the display and providing haptic feedback.

Finally fixes a bug where the raw x and y in motion event were not
always set which caused the status bar to not work.
This commit is contained in:
Dianne Hackborn
2009-07-23 19:01:31 -07:00
parent 8e4ac7140a
commit ddca3ee3e8
9 changed files with 169 additions and 27 deletions

View File

@@ -213,7 +213,7 @@ public class InputDevice {
// We only consider the first pointer when computing the edge
// flags, since they are global to the event.
if (action != MotionEvent.ACTION_DOWN) {
if (action == MotionEvent.ACTION_DOWN) {
if (scaled[MotionEvent.SAMPLE_X] <= 0) {
edgeFlags |= MotionEvent.EDGE_LEFT;
} else if (scaled[MotionEvent.SAMPLE_X] >= dispW) {