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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user