diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-08-18 11:20:58 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2011-08-19 15:02:26 -0700 |
commit | 65fd251c3913fc921468a3dad190810db19eb9df (patch) | |
tree | 7cc9e086b96a4e2c77ec5b77aab6bed5679e89f0 /native | |
parent | c0a2222552f48a2543a64a4cbe913d0b9ffc3cbf (diff) | |
download | frameworks_base-65fd251c3913fc921468a3dad190810db19eb9df.zip frameworks_base-65fd251c3913fc921468a3dad190810db19eb9df.tar.gz frameworks_base-65fd251c3913fc921468a3dad190810db19eb9df.tar.bz2 |
Input system bug fixes, particularly for stylus.
Bug: 5049148
Finished stylus support, including support for indirect stylus
and mouse tools.
Added TILT axis. When stylus tilt X/Y is available, it is transformed
into an orientation and tilt inclination which is a more convenient
representation and a simpler extension to the exiting API.
Touch devices now only report touch data using a single input
source. Previously touch devices in pointer mode would report
both absolute touch pad data and cooked pointer gestures.
Now we just pick one. The touch device switches modes as needed
when the focused application enables/disables pointer gestures.
This change greatly simplifies the code and reduces the load
on the input dispatcher.
Fixed an incorrect assumption that the value of ABS_(MT_)DISTANCE
would be zero whenever the stylus was in direct contact. It appears
that the correct way to determine whether the stylus is in direct
contact (rather than hovering) is by checking for a non-zero
reported pressure.
Added code to read the initial state of tool buttons and axis values
when the input devices are initialized or reset. This fixes
problems where the input mapper state might have the wrong initial
state.
Moved responsibility for cancelling pending inputs (keys down,
touches, etc.) to the InputDispatcher by sending it a device reset
notification. This frees the InputReader from having to synthesize
events during reset, which was cumbersome and somewhat brittle
to begin with.
Consolidated more of the common accumulator logic from
SingleTouchInputMapper and MultiTouchInputMapper into
TouchInputMapper.
Improved the PointerLocation output.
Change-Id: I595d3647f7fd7cb1e3eff8b3c76b85043b5fe2f0
Diffstat (limited to 'native')
-rw-r--r-- | native/include/android/input.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/native/include/android/input.h b/native/include/android/input.h index 7a0dcd3..f2befa9 100644 --- a/native/include/android/input.h +++ b/native/include/android/input.h @@ -373,6 +373,7 @@ enum { AMOTION_EVENT_AXIS_GAS = 22, AMOTION_EVENT_AXIS_BRAKE = 23, AMOTION_EVENT_AXIS_DISTANCE = 24, + AMOTION_EVENT_AXIS_TILT = 25, AMOTION_EVENT_AXIS_GENERIC_1 = 32, AMOTION_EVENT_AXIS_GENERIC_2 = 33, AMOTION_EVENT_AXIS_GENERIC_3 = 34, |