OSDN Git Service

Add unit tests for native input and fix bugs identified.
authorJeff Brown <jeffbrown@google.com>
Wed, 20 Oct 2010 22:33:38 +0000 (15:33 -0700)
committerJeff Brown <jeffbrown@google.com>
Sat, 23 Oct 2010 10:52:57 +0000 (03:52 -0700)
commit3c3cc62e243a7796f5c1e88773d34e2054cc26c6
tree48004ee9a8dcdcbb625d8fcc0ac3d2c45973d806
parent48a862ef5f1a9fe9f646f0862d676170fd8dc51d
Add unit tests for native input and fix bugs identified.

Fixed a bug where we would lose the first touch point when swiping out of
the virtual key area.

Fixed a bug where we would not send an ACTION_MOVE event in cases where
individual pointers went down/up and the remaining pointers actually moved.
This is important since many applications do not handle pointer movements
during ACTION_POINTER_DOWN or ACTION_POINTER_UP.  In the case of
ACTION_POINTER_UP the movement was completely lost since all pointers were
dispatched using their old location rather than the new location.

Improved motion event validation to check for duplicate pointer ids.

Added an input source constant that was missing from the NDK api but
defined in the framework api.

Added a timestamp when reporting added/removed devices in EventHub.

Bug: 3070082
Change-Id: I3206a030f43b7616e2f48006e5a9d522c4d92e56
include/ui/InputReader.h
libs/ui/EventHub.cpp
libs/ui/InputDispatcher.cpp
libs/ui/InputReader.cpp
libs/ui/tests/Android.mk
libs/ui/tests/InputDispatcher_test.cpp
libs/ui/tests/InputReader_test.cpp [new file with mode: 0644]