summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-08-17 20:38:35 -0700
committerJeff Brown <jeffbrown@google.com>2010-08-18 13:37:45 -0700
commit2dfd7a7cbfa565e3aca584a9e5b6f681692b5781 (patch)
tree13d01c0fda0f5a5e3b6c298b5b3607f8c0e0147a /include
parent3922484d7458a4ab72fc1ca8952a0776dd1c7d20 (diff)
downloadframeworks_base-2dfd7a7cbfa565e3aca584a9e5b6f681692b5781.zip
frameworks_base-2dfd7a7cbfa565e3aca584a9e5b6f681692b5781.tar.gz
frameworks_base-2dfd7a7cbfa565e3aca584a9e5b6f681692b5781.tar.bz2
Fix some input device mapping bugs with certain drivers.
On single-touch devices, pointer up/down is signalled by a BTN_TOUCH key event. Previously we handled BTN_TOUCH immediately but some drivers may produce the sequence BTN_TOUCH, ABS_X, ABS_Y, SYN_REPORT on pointer down which caused us to emit a bad initial pointer down location. Now we wait for SYN_REPORT before reporting the up or down. On multi-touch devices, pointer up can be signalled by as little as the sequence SYN_MT_REPORT, SYN_REPORT. This change ensures that we handle this case. Added support for reading ABS_MT_PRESSURE when available. Corrected mapping of touchMajor/touchMinor on single touch devices. Minor code cleanup. Change-Id: Ic7ec4811241ed85a06e59b8a839ca05180d491d4
Diffstat (limited to 'include')
-rw-r--r--include/ui/InputReader.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/include/ui/InputReader.h b/include/ui/InputReader.h
index 71c6c51..56d2765 100644
--- a/include/ui/InputReader.h
+++ b/include/ui/InputReader.h
@@ -480,10 +480,6 @@ private:
inline void clear() {
fields = 0;
}
-
- inline bool isDirty() {
- return fields != 0;
- }
} mAccumulator;
float mXScale;
@@ -702,7 +698,7 @@ private:
} historyData[AVERAGING_HISTORY_SIZE];
} mAveragingTouchFilter;
- struct JumpTouchFilterState {
+ struct JumpyTouchFilterState {
uint32_t jumpyPointsDropped;
} mJumpyTouchFilter;
@@ -765,10 +761,6 @@ private:
inline void clear() {
fields = 0;
}
-
- inline bool isDirty() {
- return fields != 0;
- }
} mAccumulator;
bool mDown;
@@ -804,7 +796,8 @@ private:
FIELD_ABS_MT_WIDTH_MAJOR = 16,
FIELD_ABS_MT_WIDTH_MINOR = 32,
FIELD_ABS_MT_ORIENTATION = 64,
- FIELD_ABS_MT_TRACKING_ID = 128
+ FIELD_ABS_MT_TRACKING_ID = 128,
+ FIELD_ABS_MT_PRESSURE = 256,
};
uint32_t pointerCount;
@@ -819,6 +812,7 @@ private:
int32_t absMTWidthMinor;
int32_t absMTOrientation;
int32_t absMTTrackingId;
+ int32_t absMTPressure;
inline void clear() {
fields = 0;
@@ -829,10 +823,6 @@ private:
pointerCount = 0;
pointers[0].clear();
}
-
- inline bool isDirty() {
- return pointerCount != 0;
- }
} mAccumulator;
void initialize();