From 5c1ed84a2dec7efe914d0d1abb6834f8543fb9f1 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Wed, 14 Jul 2010 18:48:53 -0700 Subject: Add support for new input sources. Added several new coordinate values to MotionEvents to capture touch major/minor area, tool major/minor area and orientation. Renamed NDK input constants per convention. Added InputDevice class in Java which will eventually provide useful information about available input devices. Added APIs for manufacturing new MotionEvent objects with multiple pointers and all necessary coordinate data. Fixed a bug in the input dispatcher where it could get stuck with a pointer down forever. Fixed a bug in the WindowManager where the input window list could end up containing stale removed windows. Fixed a bug in the WindowManager where the input channel was being removed only after the final animation transition had taken place which caused spurious WINDOW DIED log messages to be printed. Change-Id: Ie55084da319b20aad29b28a0499b8dd98bb5da68 --- libs/ui/Input.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libs/ui/Input.cpp') diff --git a/libs/ui/Input.cpp b/libs/ui/Input.cpp index 1f19c2cd02..e5f014f421 100644 --- a/libs/ui/Input.cpp +++ b/libs/ui/Input.cpp @@ -13,9 +13,9 @@ namespace android { // class InputEvent -void InputEvent::initialize(int32_t deviceId, int32_t nature) { +void InputEvent::initialize(int32_t deviceId, int32_t source) { mDeviceId = deviceId; - mNature = nature; + mSource = source; } // class KeyEvent @@ -86,7 +86,7 @@ bool KeyEvent::isSystemKey() const { void KeyEvent::initialize( int32_t deviceId, - int32_t nature, + int32_t source, int32_t action, int32_t flags, int32_t keyCode, @@ -95,7 +95,7 @@ void KeyEvent::initialize( int32_t repeatCount, nsecs_t downTime, nsecs_t eventTime) { - InputEvent::initialize(deviceId, nature); + InputEvent::initialize(deviceId, source); mAction = action; mFlags = flags; mKeyCode = keyCode; @@ -110,7 +110,7 @@ void KeyEvent::initialize( void MotionEvent::initialize( int32_t deviceId, - int32_t nature, + int32_t source, int32_t action, int32_t edgeFlags, int32_t metaState, @@ -123,7 +123,7 @@ void MotionEvent::initialize( size_t pointerCount, const int32_t* pointerIds, const PointerCoords* pointerCoords) { - InputEvent::initialize(deviceId, nature); + InputEvent::initialize(deviceId, source); mAction = action; mEdgeFlags = edgeFlags; mMetaState = metaState; -- cgit v1.2.3-59-g8ed1b