diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-03-02 19:59:07 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-03-02 19:59:07 -0800 |
commit | 55acdf7dcd0cf5b9aacfe48808e98056c7d60e5b (patch) | |
tree | 813264191a49825a580873daa5fea758910400f1 /libs | |
parent | 9433fec4c5a1f41b2651059cc1b6a8c219b3b4a5 (diff) | |
parent | 56194ebec6212e229f4ccdaa4b187166d20013ef (diff) | |
download | frameworks_base-55acdf7dcd0cf5b9aacfe48808e98056c7d60e5b.zip frameworks_base-55acdf7dcd0cf5b9aacfe48808e98056c7d60e5b.tar.gz frameworks_base-55acdf7dcd0cf5b9aacfe48808e98056c7d60e5b.tar.bz2 |
Merge "Wake screen from external HID peripherals."
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ui/Input.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libs/ui/Input.cpp b/libs/ui/Input.cpp index a80320e..0ed0866 100644 --- a/libs/ui/Input.cpp +++ b/libs/ui/Input.cpp @@ -616,6 +616,23 @@ status_t MotionEvent::writeToParcel(Parcel* parcel) const { } #endif +bool MotionEvent::isTouchEvent(int32_t source, int32_t action) { + if (source & AINPUT_SOURCE_CLASS_POINTER) { + // Specifically excludes HOVER_MOVE and SCROLL. + switch (action & AMOTION_EVENT_ACTION_MASK) { + case AMOTION_EVENT_ACTION_DOWN: + case AMOTION_EVENT_ACTION_MOVE: + case AMOTION_EVENT_ACTION_UP: + case AMOTION_EVENT_ACTION_POINTER_DOWN: + case AMOTION_EVENT_ACTION_POINTER_UP: + case AMOTION_EVENT_ACTION_CANCEL: + case AMOTION_EVENT_ACTION_OUTSIDE: + return true; + } + } + return false; +} + // --- InputDeviceInfo --- |