diff options
author | Jeff Brown <jeffbrown@android.com> | 2011-05-31 15:42:08 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-05-31 15:42:08 -0700 |
commit | d854304c2bcadbda37a7f1b24723dbc0030073ca (patch) | |
tree | 6274d09d6629c430ea67db3031c16532a5c117b7 | |
parent | 0119a67e72790fb14b05130e18fa0785b4fa8531 (diff) | |
parent | 4e3f7206eb0af14d3da4c03bdf9918161774e726 (diff) | |
download | frameworks_base-d854304c2bcadbda37a7f1b24723dbc0030073ca.zip frameworks_base-d854304c2bcadbda37a7f1b24723dbc0030073ca.tar.gz frameworks_base-d854304c2bcadbda37a7f1b24723dbc0030073ca.tar.bz2 |
Merge "Button state should reflect actual buttons. (DO NOT MERGE)" into honeycomb-mr2
-rw-r--r-- | services/input/InputReader.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp index cb69008..155fd2d 100644 --- a/services/input/InputReader.cpp +++ b/services/input/InputReader.cpp @@ -3455,8 +3455,6 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, mPointerGesture.currentGestureMode = PointerGesture::NEUTRAL; mPointerGesture.currentGestureIdBits.clear(); - mPointerController->setButtonState(0); - if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) { mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_NEUTRAL; mPointerGesture.spotIdBits.clear(); @@ -3551,8 +3549,6 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, mPointerGesture.currentGestureMode = PointerGesture::QUIET; mPointerGesture.currentGestureIdBits.clear(); - mPointerController->setButtonState(0); - if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) { mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_NEUTRAL; mPointerGesture.spotIdBits.clear(); @@ -3638,8 +3634,6 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_Y, y); mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, 1.0f); - mPointerController->setButtonState(BUTTON_STATE_PRIMARY); - if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) { if (activeTouchId >= 0) { // Collapse all spots into one point at the pointer location. @@ -3698,8 +3692,6 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, mPointerGesture.currentGestureCoords[0].setAxisValue( AMOTION_EVENT_AXIS_PRESSURE, 1.0f); - mPointerController->setButtonState(BUTTON_STATE_PRIMARY); - if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) { mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_TAP; mPointerGesture.spotIdBits.clear(); @@ -3733,8 +3725,6 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, mPointerGesture.currentGestureMode = PointerGesture::NEUTRAL; mPointerGesture.currentGestureIdBits.clear(); - mPointerController->setButtonState(0); - if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) { mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_NEUTRAL; mPointerGesture.spotIdBits.clear(); @@ -3815,8 +3805,6 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, down ? 1.0f : 0.0f); - mPointerController->setButtonState(down ? BUTTON_STATE_PRIMARY : 0); - if (mLastTouch.pointerCount == 0 && mCurrentTouch.pointerCount != 0) { mPointerGesture.resetTap(); mPointerGesture.tapDownTime = when; @@ -4067,8 +4055,6 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, mPointerGesture.referenceGestureY); mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, 1.0f); - mPointerController->setButtonState(BUTTON_STATE_PRIMARY); - if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) { mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_PRESS; } @@ -4091,8 +4077,6 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, mPointerGesture.referenceGestureY); mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, 1.0f); - mPointerController->setButtonState(0); // touch is not actually following the pointer - if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) { mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_SWIPE; } @@ -4194,8 +4178,6 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, #endif } - mPointerController->setButtonState(0); // touch is not actually following the pointer - if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) { mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_FREEFORM; } @@ -4225,6 +4207,8 @@ bool TouchInputMapper::preparePointerGestures(nsecs_t when, } } + mPointerController->setButtonState(mCurrentTouch.buttonState); + #if DEBUG_GESTURES LOGD("Gestures: finishPreviousGesture=%s, cancelPreviousGesture=%s, " "currentGestureMode=%d, currentGestureIdBits=0x%08x, " |