summaryrefslogtreecommitdiffstats
path: root/include/ui
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-02-28 18:27:14 -0800
committerJeff Brown <jeffbrown@google.com>2011-03-31 19:57:00 -0700
commit21bc5c917d4ee2a9b2b8173091e6bba85eaff899 (patch)
treef62d92d00808b53244fd6ae31f5efd58e3f08a02 /include/ui
parent0029c66203ab9ded4342976bf7a17bb63af8c44a (diff)
downloadframeworks_base-21bc5c917d4ee2a9b2b8173091e6bba85eaff899.zip
frameworks_base-21bc5c917d4ee2a9b2b8173091e6bba85eaff899.tar.gz
frameworks_base-21bc5c917d4ee2a9b2b8173091e6bba85eaff899.tar.bz2
Add a little input event consistency verifier.
The idea is to assist with debugging by identifying cases in which the input event stream is corrupted. Change-Id: I0a00e52bbe2716be1b3dfc7c02a754492d8e7f1f
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/Input.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/ui/Input.h b/include/ui/Input.h
index b22986d..0dc29c8 100644
--- a/include/ui/Input.h
+++ b/include/ui/Input.h
@@ -37,10 +37,16 @@ class SkMatrix;
* Additional private constants not defined in ndk/ui/input.h.
*/
enum {
- /*
- * Private control to determine when an app is tracking a key sequence.
- */
- AKEY_EVENT_FLAG_START_TRACKING = 0x40000000
+ /* Private control to determine when an app is tracking a key sequence. */
+ AKEY_EVENT_FLAG_START_TRACKING = 0x40000000,
+
+ /* Key event is inconsistent with previously sent key events. */
+ AKEY_EVENT_FLAG_TAINTED = 0x80000000,
+};
+
+enum {
+ /* Motion event is inconsistent with previously sent motion events. */
+ AMOTION_EVENT_FLAG_TAINTED = 0x80000000,
};
enum {
@@ -328,6 +334,8 @@ public:
inline int32_t getFlags() const { return mFlags; }
+ inline void setFlags(int32_t flags) { mFlags = flags; }
+
inline int32_t getEdgeFlags() const { return mEdgeFlags; }
inline void setEdgeFlags(int32_t edgeFlags) { mEdgeFlags = edgeFlags; }