summaryrefslogtreecommitdiffstats
path: root/services/inputflinger/InputReader.cpp
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2015-09-22 21:04:33 +0100
committerMichael Wright <michaelwr@google.com>2015-09-22 22:05:48 +0100
commita16b98c64f5246650aa5b6bc397a2d1fa6539107 (patch)
tree7ed41fab2e4fd9cd50daae47f385700ca1ffc83e /services/inputflinger/InputReader.cpp
parentd693fc4c50873485794d1e0f444547d3253a56d3 (diff)
downloadframeworks_native-a16b98c64f5246650aa5b6bc397a2d1fa6539107.zip
frameworks_native-a16b98c64f5246650aa5b6bc397a2d1fa6539107.tar.gz
frameworks_native-a16b98c64f5246650aa5b6bc397a2d1fa6539107.tar.bz2
DO NOT MERGE Revert "am f37143d8: Merge "Cancel touches as well as pointer gestures." into mnc-dev"
This reverts commit 9b70ab7a3cb260205e81e40ba181a86710d2eb95, reversing changes made to 153008efb5a00ed3c18d588ce15f90d2442a9786. Bug: 24302031 Change-Id: Ia746381b30be3b54cb646ed412b7271962c4b02a
Diffstat (limited to 'services/inputflinger/InputReader.cpp')
-rw-r--r--services/inputflinger/InputReader.cpp34
1 files changed, 5 insertions, 29 deletions
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp
index 36095bf..8a22e3d 100644
--- a/services/inputflinger/InputReader.cpp
+++ b/services/inputflinger/InputReader.cpp
@@ -3860,7 +3860,6 @@ void TouchInputMapper::reset(nsecs_t when) {
mPointerUsage = POINTER_USAGE_NONE;
mSentHoverEnter = false;
mHavePointerIds = false;
- mCurrentMotionAborted = false;
mDownTime = 0;
mCurrentVirtualKey.down = false;
@@ -4088,17 +4087,11 @@ void TouchInputMapper::cookAndDispatch(nsecs_t when) {
mCurrentCookedState.cookedPointerData.touchingIdBits);
}
- if (!mCurrentMotionAborted) {
- dispatchButtonRelease(when, policyFlags);
- dispatchHoverExit(when, policyFlags);
- dispatchTouches(when, policyFlags);
- dispatchHoverEnterAndMove(when, policyFlags);
- dispatchButtonPress(when, policyFlags);
- }
-
- if (mCurrentCookedState.cookedPointerData.pointerCount == 0) {
- mCurrentMotionAborted = false;
- }
+ dispatchButtonRelease(when, policyFlags);
+ dispatchHoverExit(when, policyFlags);
+ dispatchTouches(when, policyFlags);
+ dispatchHoverEnterAndMove(when, policyFlags);
+ dispatchButtonPress(when, policyFlags);
}
// Synthesize key up from raw buttons if needed.
@@ -4323,22 +4316,6 @@ void TouchInputMapper::dispatchVirtualKey(nsecs_t when, uint32_t policyFlags,
getListener()->notifyKey(&args);
}
-void TouchInputMapper::abortTouches(nsecs_t when, uint32_t policyFlags) {
- BitSet32 currentIdBits = mCurrentCookedState.cookedPointerData.touchingIdBits;
- if (!currentIdBits.isEmpty()) {
- int32_t metaState = getContext()->getGlobalMetaState();
- int32_t buttonState = mCurrentCookedState.buttonState;
- dispatchMotion(when, policyFlags, mSource, AMOTION_EVENT_ACTION_CANCEL, 0, 0,
- metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE,
- mCurrentCookedState.cookedPointerData.pointerProperties,
- mCurrentCookedState.cookedPointerData.pointerCoords,
- mCurrentCookedState.cookedPointerData.idToIndex,
- currentIdBits, -1,
- mOrientedXPrecision, mOrientedYPrecision, mDownTime);
- mCurrentMotionAborted = true;
- }
-}
-
void TouchInputMapper::dispatchTouches(nsecs_t when, uint32_t policyFlags) {
BitSet32 currentIdBits = mCurrentCookedState.cookedPointerData.touchingIdBits;
BitSet32 lastIdBits = mLastCookedState.cookedPointerData.touchingIdBits;
@@ -6112,7 +6089,6 @@ void TouchInputMapper::fadePointer() {
void TouchInputMapper::cancelTouch(nsecs_t when) {
abortPointerUsage(when, 0 /*policyFlags*/);
- abortTouches(when, 0 /* policyFlags*/);
}
bool TouchInputMapper::isPointInsideSurface(int32_t x, int32_t y) {