History log of /frameworks/base/services/input/InputReader.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
bcc046af4ef171aa3aa3c6b64efb5cafc1e46cd3 28-Sep-2012 Jeff Brown <jeffbrown@google.com> Bundle correlated switch changes atomically.

This is a prerequisite for headset jack detection on Manta.

Bug: 6548391
Change-Id: I549a194344511c0cee578b00f6a9ab5fdbdfb99c
/frameworks/base/services/input/InputReader.h
83d616a9c7b9505153d258511eb5c16b552e268d 10-Sep-2012 Jeff Brown <jeffbrown@google.com> Make input system aware of multiple displays.

The input system needs to know about the window that has
focus, even if it is on a secondary display. So now we
send it the list of all windows and indicate which display
they are on. We filter the list of windows as necessary
when delivering touch events.

To keep things simple, monitor input channels and input
filters are not supported except on the main display.
We also do not pass the display id to applications; it is
only used inside the input system for now.

Properly scale touch coordinates based on the viewport.
This will be needed to ensure that touch works on external
display as well as when the internal display is being used
to simulate a different resolution.

Change-Id: I1815579a52fcc852c519b5391fc7ab8767c2dc59
/frameworks/base/services/input/InputReader.h
d728bf514f257670fcb9aa22c6eaf97626072c93 09-Sep-2012 Jeff Brown <jeffbrown@google.com> Make display manager tell input system about viewports.

The window manager is no longer responsible for telling the
input system about the display viewport.

Change-Id: I932882bae55decef55f25093bb2a7ebac1620bb1
/frameworks/base/services/input/InputReader.h
037f727f49ddf4f5575f6440799261bd1289eb6e 26-Jun-2012 Jeff Brown <jeffbrown@google.com> Improve handling of size and orientation.

Some touch device drivers report the range of
ABS_MT_ORIENTATION as [0,1]. The Linux multitouch protocol
spec says that the 0 value should always be considered vertical.

Add a new 'box' calibration mode for size to handle the case
where width and height are being provided. The 'diameter'
calibration mode is inadequate because it drops one of these
components.

Change-Id: I7bd744fdff95acd4044d295efe8bd7186dbe8061
/frameworks/base/services/input/InputReader.h
8a90e6e3174083f274538567d851f98478fc83e9 11-May-2012 Jeff Brown <jeffbrown@google.com> Minor refactoring before starting on velocity tracker changes.

Bug: 6413587
Change-Id: I5eba2bb57193bff78cb3740de5f87aca0b31d154
/frameworks/base/services/input/InputReader.h
daa3753a04699724d2cfe824ac1f5a266d643a05 02-May-2012 Jeff Brown <jeffbrown@google.com> Improve handling of built-in keyboard.

The window manager policy made some incorrect assumptions about the
meaning of the Configuration.keyboard field. We need to be more
careful about distinguishing between built-in and external keyboards.

Most of this change is to move the determination of the parts of
the Configuration related to input devices into the WindowManagerService
leveraging new features of the InputManagerService to good effect.

Then we plumb through the flag that indicates whether a device
is internal or external so that we can be more particular about
how the lid switch effects changes to the Configuration.

Bug: 6424373
Change-Id: I36a1c22ade35e578955465a25940a33f227b9763
/frameworks/base/services/input/InputReader.h
5bbd4b4f5fc19302fa017ad6afee6eb2d489d91a 21-Apr-2012 Jeff Brown <jeffbrown@google.com> Get alias for Bluetooth devices.

Bluetooth devices can be renamed by the user. Make the
input system aware of the user-specified name and transparently
pass it down to applications. This enables the keyboard
layout picker Settings UI to use device names that are
consistent with what the user set in the Bluetooth UI.

Bug: 6363157
Change-Id: I8eea26ce2c69c2a3f09c8de02e9e847610e0419c
/frameworks/base/services/input/InputReader.h
00710e906bdafd58386ee7f81fa84addd218122f 20-Apr-2012 Jeff Brown <jeffbrown@google.com> Make InputDevice.SOURCE_STYLUS meaningful.

Bug: 5424551
Change-Id: I415cb1842422e050cc41b17f5a1f13b4fab17a44
/frameworks/base/services/input/InputReader.h
6ec6f79e1ac1714e3b837796e99f07ff88f66601 18-Apr-2012 Jeff Brown <jeffbrown@google.com> Support loading keyboard layout overlays from resources.

Added the concept of a keyboard layout overlay, which is
a key character map file that has "type OVERLAY".

Added support for loading keyboard layout overlays from
resources dynamically. The layouts are reloaded whenever they
are changed in the Settings application or an application
is installed. This is somewhat more aggressive than necessary
so we might want to optimize it later.

Before system-ready, the input system uses just the generic
keyboard layouts that are included on the device system image.
After system-ready, it considers the user's selected keyboard
layout overlay and attempts to load it as necessary. We need to
wait until system-ready before doing this because we need to
be in a state where it is safe to start applications or access
their resources.

Bug: 6110399
Change-Id: Iae0886d3356649b0d2440aa00910a888cedd8323
/frameworks/base/services/input/InputReader.h
a47425a13c19f95057df78b8bb65bb25657e8753 13-Apr-2012 Jeff Brown <jeffbrown@google.com> Add support for input devices that have vibrators.

Added a getVibrator() method to InputDevice which returns a Vibrator
associated with that input device. Its uses the same API as the
system vibrator which makes it easy for applications to be modified
to use one or the other.

Bug: 6334179
Change-Id: Ifc7f13dbcb778670f3f1c07ccc562334e6109d2e
/frameworks/base/services/input/InputReader.h
af9e8d38184c6ba4d2d3eb5bde7014a66dd8a78b 13-Apr-2012 Jeff Brown <jeffbrown@google.com> Notify applications when input devices change.

This change allows the InputManager to keep track of what input
devices are registered with the system and when they change.
It needs to do this so that it can properly clear its cache of
input device properties (especially the key map!) when changes
occur.

Added new API so that applications can register listeners for
input device changes.

Fixed a minor bug in EventHub where it didn't handle EPOLLHUP
properly so it would spam the log about unsupposed epoll events
until inotify noticed that the device was gone and removed it.

Change-Id: I937d8c601f7185d4299038bce6a2934fe4fdd2b3
/frameworks/base/services/input/InputReader.h
49ccac530b5a798e3c4a79b66b51b8546a0deed1 12-Apr-2012 Jeff Brown <jeffbrown@google.com> Refactor key code mapping.

Added handling for EV_MSC / MSC_SCAN which typically reports
the HID usage associated with a key. This will enable key maps
to map keys with HID usages that Linux does not natively recognize.

Removed keyCode and flags fields from EventHub RawEvent since
they don't necessarily make sense in isolation now that we
pay attention to HID usage codes too.

Removed the fallback code for mapping keys and axes. In practice,
an input device should be self-sufficient. We should not ever
need to look at the built-in keyboard's key map. In fact, there
usually isn't a built-in keyboard anyhow. This code was originally
working around a problem where we weren't loading the key map
for touch screens with virtual keys, which has long since been fixed.

Change-Id: I0a319bdec44be9514f795526347397e94d53a127
/frameworks/base/services/input/InputReader.h
e38fdfae9196afd1bdc14c5ec6c12793af1e2550 06-Apr-2012 Jeff Brown <jeffbrown@google.com> Add a unique input device descriptor.

The purpose of the input device descriptor is to make it possible
to associate persistent settings for each input device, such as the
keyboard layout.

The descriptor is a hash of the information we have about the
device, such as its vendor id, product id, unique id, name,
or location.

Bug: 6110399
Change-Id: Idb80f946819b3f0dbf4e661bb0a753dbc2b60981
/frameworks/base/services/input/InputReader.h
b93a03f841d93498bfea6cc92a22faa34bce1337 18-Feb-2012 Mathias Agopian <mathias@google.com> frameworks/base refactoring.

First step. Move libui includes to their new home: androidfw.

Change-Id: Ic042b52fdba72f30edc3cc6339bf30b4c1b99662
/frameworks/base/services/input/InputReader.h
112b5f52c5a4b6743eeb7b26a8896c7636c74455 28-Jan-2012 Jeff Brown <jeffbrown@google.com> Improve watchdog monitor for InputReader and InputDispatcher.

Try harder to test for liveness. There are situations where
the lock might not be held but the input system is stuck in
a callback into the window manager policy that has hung.

Bug: 5094994
Change-Id: Iff88655512a5dc8bbb4615be65f4115e975c020b
/frameworks/base/services/input/InputReader.h
9ee285afe740ff13d176c9d8430979dfd9575a23 31-Aug-2011 Jeff Brown <jeffbrown@google.com> Support composite touch / joystick devices better.

This change enables the joystick input mapper to handle any axes
that are not claimed by the touch input mapper, which makes
auxiliary controls such as wheels / knobs accessible.

Change-Id: I01ee7f342ac91acfcb4ccb6676fd52b3d5bf31a0
/frameworks/base/services/input/InputReader.h
daf4a127ba2af82a3fb477044b872719a0ab1827 27-Aug-2011 Jeff Brown <jeffbrown@google.com> Add a "show touches" option for demos and presentations.
Bug: 4569045

Change-Id: I8726ea292dd7def790a5e40d7d7e58968974f896
/frameworks/base/services/input/InputReader.h
ea6892e02e10a57673a42f0922ad28694595dcaa 24-Aug-2011 Jeff Brown <jeffbrown@google.com> Support BTN_TOOL_*TAP as synonyms for BTN_TOOL_FINGER.
Bug: 5205301

Some drivers report one finger as BTN_TOOL_FINGER, two as
BTN_TOOL_DOUBLETAP, three as BTN_TOOL_TRIPLETAP and four
as BTN_TOOL_QUADTAP. Since we care about the tool type,
we need to handle _DOUBLE/_TRIPLE/_QUAD tap in the same way
we handle _FINGER.

Change-Id: I8eb83d2a2bada9ac32d07619c7eea84e924316b8
/frameworks/base/services/input/InputReader.h
65fd251c3913fc921468a3dad190810db19eb9df 18-Aug-2011 Jeff Brown <jeffbrown@google.com> 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
/frameworks/base/services/input/InputReader.h
8bcbbefa3b4e149099b2057547543ea95a7be400 12-Aug-2011 Jeff Brown <jeffbrown@google.com> Exorcise notification panel ghosts.
Bug: 5105599

Don't clear slot data when slot is no longer in use.

The kernel will not resend absolute slot values if they are
unchanged, even if the slot was previously marked unused.

Because the protocol is stateful, this could cause problems if
evdev drops events (marked by SYN_DROPPED) since we cannot
query the initial values of the slots, but there's nothing
we can do.

Change-Id: Ie13e68097fb8ed2542c2f60338b499082cf9e77f
/frameworks/base/services/input/InputReader.h
a1f89ceec076392da409e9f389b33e62e1d92da6 11-Aug-2011 Jeff Brown <jeffbrown@google.com> Improve touch device configuration.
Bug: 5064702

This change improves compatibility with standard touch device
drivers. All existing touch device IDC files will need to
be updated because the input system now assumes that the
touch device drivers implement the multitouch input
protocol correctly and use the appropriate axes.

Change-Id: I93aad0e011efea74fbc7fa3da31f7967aff8136c
/frameworks/base/services/input/InputReader.h
89ef0720ee8e0ac6ae1758faa917e4d6c9606fb4 11-Aug-2011 Jeff Brown <jeffbrown@google.com> Add input system to Watchdog.
Bug: 5094994

Change-Id: I153866958efc64ac19bda8b997c1c9f6ad425ec4
/frameworks/base/services/input/InputReader.h
d87c6d5fd5e620ecb1a7a401d2b31c6cf2e1a851 10-Aug-2011 Jeff Brown <jeffbrown@google.com> Use BTN_TOUCH or BTN_TOOL_* to determine if touch active.
Bug: 5064702

Should not include stylus buttons in the condition.

Change-Id: If4d78a875b77da8bd59672d6fdbf5353004d0023
/frameworks/base/services/input/InputReader.h
be1aa8250cee7819c49741e819e81659d1d03823 28-Jul-2011 Jeff Brown <jeffbrown@google.com> Refactor input reader to add stylus support.
Bug: 5064702

Introduced the concept of an InputListener to further decouple
the InputReader from the InputDispatcher. The InputListener
exposes just the minimum interface that the InputReader needs
to communicate with the outside world. The InputReader
passes arguments to the InputListener by reference, which makes
it easy to queue them up.

Consolidated all of the InputReader locks into one simple global
Mutex. The reason this wasn't done before was due to potential
re-entrance in outbound calls to the InputDispatcher. To fix this,
the InputReader now queues up all of the events it wants to send
using a QueuedInputListener, then flushes them outside of the
critical section after all of the event processing is finished.
Removing all of the InputMapper locks greatly simplifies the
implementation.

Added tests for new stylus features such as buttons, tool types,
and hovering.

Added some helpers to BitSet32 to handle common code patterns
like finding the first marked bit and clearing it.

Fixed a bug in VelocityTracker where the wrong pointer trace
could get cleared when handling ACTION_POINTER_DOWN. Oops.

Changed PointerCoords so it no longer stores useless zero
axis values. Removed editAxisValue because it is not very
useful when all zero value axes are absent and therefore
cannot be edited in place.

Added dispatch of stylus hover events.

Added support for distance and tool types.

Change-Id: I4cf14d134fcb1db7d10be5f2af7b37deef8f8468
/frameworks/base/services/input/InputReader.h
bc68a59c024bdb745dac8e2ec7408a9f30595f1a 25-Jul-2011 Jeff Brown <jeffbrown@google.com> Report the external display size to the input reader.

The input reader needs this information so that it knows how to
interpolate touches on an external touch screen.

Changed Display so that it asks the WindowManager what the real
display size is (as opposed to the raw display size). This means
it now takes into the forced display size set by
adb shell am display-size.

Replaced all calls to getRealWidth() / getRealHeight() /
getRealMetrics() in the WindowManager and replaced them with direct
usages of the mCurDisplayWidth / mCurDisplayHeight so that the WM
doesn't end up making a reentrant Binder call into itself.

Fixed the table status bar HeightReceiver so that it updates the
height on all configuration changes since it is possible that the
display size changed independently of an external HDMI display
being plugged / unplugged.

Improved the Display class documentation to make the distinctions
betweeen the various sizes clearer.

Change-Id: I3f75de559d3ebffed532ab46c4ae52c5e7f1da2b
/frameworks/base/services/input/InputReader.h
49754db5a304d995c1cc108ff6f19e4ba4265572 02-Jul-2011 Jeff Brown <jeffbrown@google.com> Handle stylus buttons and tool types.

Added TOOL_TYPE_ERASER.

Refactored the InputReader to share more code between the
various input mappers that handle button states and to
simplify the accumulator implementations by having each
one only handle a single type of input.

Removed the concept of direct/indirect tool types from the API.
If we add it back, it should be done in a manner that is orthogonal
to the tool type itself, perhaps as a flags field on the pointer.
The device source may well provide sufficient information anyhow.

Change-Id: I811c22d95e8304269b6ee4f6d11a6b04f3cfc1b2
/frameworks/base/services/input/InputReader.h
a6111377e1edbc5d63fc2a7205d58b2d9c21d978 15-Jul-2011 Jeff Brown <jeffbrown@google.com> Remove edge slop support.

The edge slop feature was added a long time ago for a specific
device that had severe non-linear touch response issues near
the edges of its touch screen. The feature is not useful on
modern hardware that is property calibrated.

Change-Id: I26716cbc7411c31883ddb4bb4ddd981027790d0f
/frameworks/base/services/input/InputReader.h
a4d1bc517207d7ca8d56f0004cd04f0f1dd4567d 02-Jul-2011 Jeff Brown <jeffbrown@google.com> Drop obsolete touch screen hacks.

Change-Id: I47354c37ee2cc2b36340eb709bb5043b3ba78ed9
/frameworks/base/services/input/InputReader.h
6894a2947eb1f9d499fd7f1a1ec4e7098e07d25d 02-Jul-2011 Jeff Brown <jeffbrown@google.com> Workaround apps that make assumptions about pointer ids.

Modified the touch input mapper to assign pointer ids sequentially
starting from 0 instead of using the tracking id or slot index
supplied by the driver. Applications should not depend on this
ordering but some do. (sigh)

Bug: 4980884
Change-Id: I0dfeb3ac27c57a7102a13c960c760e2a02eb7669
/frameworks/base/services/input/InputReader.h
474dcb5c3ddff737c4ac9fc44a1f7be569605e5f 15-Jun-2011 Jeff Brown <jeffbrown@google.com> Add support for disabling pointer gestures.

Made it possible for individual windows to disable pointer gestures
while the window has focus using a private API.

Cleaned up the InputReader configuration code to enable in-place
reconfiguration of input devices without having to reopen them all.
This change makes changing the pointer speed somewhat nicer since the
pointer doesn't jump back to the origin after each change.

Change-Id: I9727419c2f4cb39e16acb4b15fd7fd84526b1239
/frameworks/base/services/input/InputReader.h
9429e6ebe427e1bde01391d53f323ec33d540a14 09-Jun-2011 Jeff Brown <jeffbrown@android.com> am 92110af2: am 5f0b1721: am 25bd8abc: Merge "Fix swipe gesture cosine calculation. Bug: 4124987" into honeycomb-mr2

* commit '92110af24a9a93b73264560b57f55f45ec65dab5':
Fix swipe gesture cosine calculation. Bug: 4124987
051e8f2bfa3ada8ee64d8a4f4d69ad9286209516 08-Jun-2011 Jeff Brown <jeffbrown@android.com> am 55cc25c1: am 797dc698: am b92dcf9c: Merge "Simplify spot tracking logic. Bug: 4124987" into honeycomb-mr2

* commit '55cc25c12c45e8ffb65d2275cc0b6941b68db9df':
Simplify spot tracking logic. Bug: 4124987
774ed9d9537c15482e8baca2f2890c5d2f4ffe75 08-Jun-2011 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of 8b2c0014 to master

Change-Id: I33a5a2949dc6c2d09e8196ba8c7128caa7ac2361
6674d9bf0a53387df0cf8482458cf5f9ab274ec0 08-Jun-2011 Jeff Brown <jeffbrown@android.com> Fix swipe gesture cosine calculation.
Bug: 4124987

Recent changes introduced a multiplication factor into the
distance calculation which ended up being absent from the
dot product calculation.

Change-Id: Ia367912b9ac09b6285d5a498a0c271563c9e9e39
/frameworks/base/services/input/InputReader.h
cb5ffcf0e41d2597401208221c61589547a00f3d 07-Jun-2011 Jeff Brown <jeffbrown@android.com> Simplify spot tracking logic.
Bug: 4124987

Since spots are now one-to-one with the touch gesture points,
we can eliminate a lot of redundant logic that assumed they weren't.

Change-Id: Ic60d8d0898c285317f480bc8fb17fb9797770e69
/frameworks/base/services/input/InputReader.h
bb3fcba0caf697f1d238a2cbefdf1efe06eded99 07-Jun-2011 Jeff Brown <jeffbrown@android.com> Touch pad improvements.
Bug: 4124987

Only show one spot per touch point instead of one spot per
finger for multitouch gestures.

Tweaked the pointer acceleration curves.

Dissociated the hover/tap timeouts from the "tap" timeout
since they mean very different things.

Change-Id: I7c2cbd30feeb65ebc12f6c7e33a67dc9a9f59d4c
/frameworks/base/services/input/InputReader.h
7218d830e27d81141588cd6e37f206d141a18f62 04-Jun-2011 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of ca2b552d to master

Change-Id: I2f3693a59042ac5aa2d7bcdc3a504c78dc99a18b
a742f854901b8306d3696c9e9b7881c207130a01 04-Jun-2011 Jeff Brown <jeffbrown@android.com> am 56503b8d: am 8186a5f0: am 10c3f367: Merge "Implement pointer acceleration." into honeycomb-mr2

* commit '56503b8ddfe5c82407da32e18061e725f668432d':
Implement pointer acceleration.
f3b57def9345d6d3cac3604d6a970f6d48f345ec 03-Jun-2011 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of 7e193916 to master

Change-Id: If06892419319c3a2d4ab6b03dd3ceb99b83803b5
60a126a4c8f3bd1a36feb567ddd02a01ab298d54 03-Jun-2011 Jeff Brown <jeffbrown@google.com> Merge "Fix ABS_MT_SLOT handling."
441a9c28f5831974905a3aee238d741461138ed5 03-Jun-2011 Jeff Brown <jeffbrown@google.com> Fix ABS_MT_SLOT handling.

Shouldn't reset the current slot index to 0 after each SYN_REPORT.

Change-Id: I370e4770f8ae0ce598369ecbaf64772c13e02d46
/frameworks/base/services/input/InputReader.h
1a84fd1fb7a51f3fe4f8865e1cdd09f3490f696c 02-Jun-2011 Jeff Brown <jeffbrown@android.com> Add a preference panel for mouse speed.

Bug: 4124987
Change-Id: I3ce175d268a1d043cf5878481261b1049a15a149
/frameworks/base/services/input/InputReader.h
19c97d46fb57f87ff45d9e6ea7122b4eb21ede8c 01-Jun-2011 Jeff Brown <jeffbrown@android.com> Implement pointer acceleration.

Bug: 4124987
Change-Id: I1f31a28f1594c55302ccabe13fe3ca6d2ff71d50
/frameworks/base/services/input/InputReader.h
b530abcff5ae8e5ebb75ec6aa42b7c7c190e98a5 01-Jun-2011 Jeff Brown <jeffbrown@android.com> am 3f5b95b0: am a4e74744: am fa574c0e: Merge "Touch pad UX improvements." into honeycomb-mr2

* commit '3f5b95b05efcf7ab2e8f193649b841dc1786f2ef':
Touch pad UX improvements.
214eaf48878bba00cbd5831871bcbd82632b6e34 27-May-2011 Jeff Brown <jeffbrown@android.com> Use ViewConfiguration to seed input system configuration.

Fix bug where the pointer presentation would be updated on
any input reader timeout rather than only when a pointer gesture
is in progress.

Bug: 4124987
Change-Id: Ie9bba4a0b3228d55e45e65fa2ede5cd6ba887a08
/frameworks/base/services/input/InputReader.h
538881e18323a0c983bd8809f8c3b1cdeeeab8a6 26-May-2011 Jeff Brown <jeffbrown@android.com> Touch pad UX improvements.

Fade the pointer spot when swiping or performing a freeform
gesture.

Support configuring the gesture mode in the device IDC file.

Added workaround for devices that report individual finger
movements one at a time instead of all at once.

Bug: 4124987
Change-Id: I44628b00382ad59306e4ec5c4717d69cc6fbebb8
/frameworks/base/services/input/InputReader.h
325bd07b311f8ba68079000e9fe8afbcc076d7b6 20-Apr-2011 Jeff Brown <jeffbrown@google.com> Add tap/drag touchpad gesture. (DO NOT MERGE)

The mapper sends a DOWN when the finger is released then starts
a short timer. If the finger is not pressed again before the timer
elapses, then the mapper sends an UP to complete the tap. If the
finger is pressed again then the mapper starts sending MOVEs
as part of a drag.

Double/triple taps work as intended because we also start watching
for a new tap when the finger is pressed again. If a new tap
occurs the old tap is also finished. So each individual finger
short press/release cycle constitutes a distinct tap.

Change-Id: Id0a6ee10dd27e723f6cb04e56b43939abe9e940c
/frameworks/base/services/input/InputReader.h
86ea1f5f521981d075aef56f11693e4f3bc32fdb 13-Apr-2011 Jeff Brown <jeffbrown@google.com> Initial checkin of spot presentation for touchpad gestures. (DO NOT MERGE)

Added a new PointerIcon API (hidden for now) for loading
pointer icons.

Fixed a starvation problem in the native Looper's sendMessage
implementation which caused new messages to be posted ahead
of old messages sent with sendMessageDelayed.

Redesigned the touch pad gestures to be defined in terms of
more fluid finger / spot movements. The objective is to reinforce
the natural mapping between fingers and spots which means there
must not be any discontinuities in spot motion relative to
the fingers.

Removed the SpotController stub and folded its responsibilities
into PointerController.

Change-Id: Ib647dbd7a57a7f30dd9c6e2c260df51d7bbdd18e
/frameworks/base/services/input/InputReader.h
a6dbfdd3a858aac52cc87f80f91e8eef7d613605 11-Apr-2011 Jeff Brown <jeffbrown@google.com> Add a sprite controller. (DO NOT MERGE)

Refactored PointerController to extract the surface management
code to a new component called a SpriteController so that it can
be used to move finger tracking spots around the screen as well.
The SpriteController is designed to fully decouple the client from
any latency introduced by surface transactions and drawing.
All sprite updates are performed asynchronously on the Looper using
a copy of the sprite state.

Added a stub SpotController implementation for touch pad UX.
It will be implemented in a subsequent patch.

Fixed a little bug in pointer orientation changes when entering
DISPLAY_ORIENTATION_90 the x offset was clobbered.

Change-Id: I6d59d80df9af61e93af50290e7776337d10c9d5a
/frameworks/base/services/input/InputReader.h
dbf8d27f4c32e20e132e90ad713c6ebaf71d7756 19-Mar-2011 Jeff Brown <jeffbrown@google.com> Optimize EventHub to process events in big chunks. (DO NOT MERGE)

When 10 fingers are down, reduces the CPU time spent by the InputReader
thread from ~30% to ~5% on Stingray.

Change-Id: I42ee5c67b8521af715cbab43e763a4af4eb1f914
/frameworks/base/services/input/InputReader.h
80fd47ce75253dcdc2cfa85d7a3f42634b923a47 24-May-2011 Jeff Brown <jeffbrown@google.com> Input device protocol enhancements.

Added support for Linux multitouch protocol B (slots).

Added support for using the device's input properties as a hint
to determine the intended usage of a touch device.

Added support for the ABS_MT_DISTANCE axis.

Fixed a bug reporting the presence of the orientation axis.

Change-Id: Icf7b5a5a0f1a9cdf6ad2b35be8ea0c1a35815d48
/frameworks/base/services/input/InputReader.h
68d6075b4ad2205c10064c78cde552e3210cca91 17-Mar-2011 Jeff Brown <jeffbrown@google.com> Refactor how timeouts are calculated. (DO NOT MERGE)

Added a timeout mechanism to EventHub and InputReader so that
InputMappers can request timeouts to perform delayed processing of
input when needed.

Change-Id: I89c1171c9326c6e413042e3ee13aa9f7f1fc0454
/frameworks/base/services/input/InputReader.h
96ad3979f328a1aa098917ca1c35575e85345526 10-Mar-2011 Jeff Brown <jeffbrown@google.com> Use touch pad gestures to manipulate the pointer. (DO NOT MERGE)

1. Single finger tap performs a click.
2. Single finger movement moves the pointer (hovers).
3. Button press plus movement performs click or drag.
While dragging, the pointer follows the finger that is moving
fastest. This is important if there are additional fingers
down on the touch pad for the purpose of applying force
to an integrated button underneath.
4. Two fingers near each other moving in the same direction
are coalesced as a swipe gesture under the pointer.
5. Two or more fingers moving in arbitrary directions are
transformed into touches in the vicinity of the pointer.
This makes scale/zoom and rotate gestures possible.

Added a native VelocityTracker implementation to enable intelligent
switching of the active pointer during drags.

Change-Id: I7b7ddacc724fb1306e1590dbaebb740d3130d7cd
/frameworks/base/services/input/InputReader.h
fe9f8ab03a63b1037f07dd85799fbea80ec6adaa 07-May-2011 Jeff Brown <jeffbrown@google.com> Add initial API for stylus and mouse buttons.

Added the concept of pointer properties in a MotionEvent.
This is currently used to track the pointer tool type to enable
applications to distinguish finger touches from a stylus.

Button states are also reported to application as part of touch events.

There are no new actions for detecting changes in button states.
The application should instead query the button state from the
MotionEvent and take appropriate action as needed.

A good time to check the button state is on ACTION_DOWN.

As a side-effect, applications that do not support multiple buttons
will treat primary, secondary and tertiary buttons identically
for all touch events.

The back button on the mouse is mapped to KEYCODE_BACK
and the forward button is mapped to KEYCODE_FORWARD.

Added basic plumbing for the secondary mouse button to invoke
the context menu, particularly in lists.

Added clamp and split methods on MotionEvent to take care of
common filtering operations so we don't have them scattered
in multiple places across the framework.

Bug: 4260011
Change-Id: Ie992b4d4e00c8f2e76b961da0a902145b27f6d83
/frameworks/base/services/input/InputReader.h
79ac969d7a84b7198f9ed814cc0b2f0b7e11a662 20-Apr-2011 Jeff Brown <jeffbrown@google.com> Add tap/drag touchpad gesture.

The mapper sends a DOWN when the finger is released then starts
a short timer. If the finger is not pressed again before the timer
elapses, then the mapper sends an UP to complete the tap. If the
finger is pressed again then the mapper starts sending MOVEs
as part of a drag.

Double/triple taps work as intended because we also start watching
for a new tap when the finger is pressed again. If a new tap
occurs the old tap is also finished. So each individual finger
short press/release cycle constitutes a distinct tap.

Change-Id: Iaa51182edee4378162a66adfd746088e93af2a30
/frameworks/base/services/input/InputReader.h
2352b978a3c94cd88f41d0d908f961333fdac1e9 13-Apr-2011 Jeff Brown <jeffbrown@google.com> Initial checkin of spot presentation for touchpad gestures.

Added a new PointerIcon API (hidden for now) for loading
pointer icons.

Fixed a starvation problem in the native Looper's sendMessage
implementation which caused new messages to be posted ahead
of old messages sent with sendMessageDelayed.

Redesigned the touch pad gestures to be defined in terms of
more fluid finger / spot movements. The objective is to reinforce
the natural mapping between fingers and spots which means there
must not be any discontinuities in spot motion relative to
the fingers.

Removed the SpotController stub and folded its responsibilities
into PointerController.

Change-Id: I5126b1e69d95252fda7f2a684c9287e239a57163
/frameworks/base/services/input/InputReader.h
5541de9ea3513a12d1ac2ad07e7e04a3aa7741a0 11-Apr-2011 Jeff Brown <jeffbrown@google.com> Add a sprite controller.

Refactored PointerController to extract the surface management
code to a new component called a SpriteController so that it can
be used to move finger tracking spots around the screen as well.
The SpriteController is designed to fully decouple the client from
any latency introduced by surface transactions and drawing.
All sprite updates are performed asynchronously on the Looper using
a copy of the sprite state.

Added a stub SpotController implementation for touch pad UX.
It will be implemented in a subsequent patch.

Fixed a little bug in pointer orientation changes when entering
DISPLAY_ORIENTATION_90 the x offset was clobbered.

Change-Id: Ib25d162d577c9b354cb74d5d761c3c9f9f438d42
/frameworks/base/services/input/InputReader.h
b7198743ab3976b30d4655c1e065ca33e372b6af 19-Mar-2011 Jeff Brown <jeffbrown@google.com> Optimize EventHub to process events in big chunks.

When 10 fingers are down, reduces the CPU time spent by the InputReader
thread from ~30% to ~5% on Stingray.

Change-Id: Icdf7c91cd5d9039ac3beb38ba9021a05e7fabc80
/frameworks/base/services/input/InputReader.h
aa3855d5836d2a2d83baafdf6e40caf90d3dad1c 17-Mar-2011 Jeff Brown <jeffbrown@google.com> Refactor how timeouts are calculated.

Added a timeout mechanism to EventHub and InputReader so that
InputMappers can request timeouts to perform delayed processing of
input when needed.

Change-Id: Iec2045baaf4e67690b15eef3c09a58d5cac76897
/frameworks/base/services/input/InputReader.h
ace13b17866dc9136aeecf6dfaf7077f37434469 10-Mar-2011 Jeff Brown <jeffbrown@google.com> Use touch pad gestures to manipulate the pointer.

1. Single finger tap performs a click.
2. Single finger movement moves the pointer (hovers).
3. Button press plus movement performs click or drag.
While dragging, the pointer follows the finger that is moving
fastest. This is important if there are additional fingers
down on the touch pad for the purpose of applying force
to an integrated button underneath.
4. Two fingers near each other moving in the same direction
are coalesced as a swipe gesture under the pointer.
5. Two or more fingers moving in arbitrary directions are
transformed into touches in the vicinity of the pointer.
This makes scale/zoom and rotate gestures possible.

Added a native VelocityTracker implementation to enable intelligent
switching of the active pointer during drags.

Change-Id: I5ada57e7f2bdb9b0a791843eb354a8c706b365dc
/frameworks/base/services/input/InputReader.h
efd3266b719eed5f1b217021c0a9e76e4b274b06 09-Mar-2011 Jeff Brown <jeffbrown@google.com> Input improvements and bug fixes.

Associate each motion axis with the source from which it comes.
It is possible for multiple sources of the same device to define
the same axis. This fixes new API that was introduced in MR1.
(Bug: 4066146)

Fixed a bug that might cause a segfault when using a trackball.

Only fade out the mouse pointer when touching the touch screen,
ignore other touch pads.

Changed the plural "sources" to "source" in several places in
the InputReader where we intend to refer to a particular source
rather than to a combination of sources.

Improved the batching code to support batching events from different
sources of the same device in parallel. (Bug: 3391564)

Change-Id: I0189e18e464338f126f7bf94370b928e1b1695f2
/frameworks/base/services/input/InputReader.h
9626b14a283ef82d16636cf5fb5ba8bb4d30381e 03-Mar-2011 Jeff Brown <jeffbrown@google.com> Fix off by one errors in touch motion ranges. (DO NOT MERGE)

Report inclusive minimum and maximum ranges for all
axes including X and Y.

Set mouse pointer bounds to 0..width-1, 0..height-1.

Rotate touch and mouse positions more carefully, paying attention
to the maximum bounds when calculating the complement of an axis.

Simplified the InputReader somewhat and removed support for a
couple of poorly defined input device configuration parameters.
We now assume that the touch device provides useful absolute axis
ranges for the X and Y axes since the alternative does not actually
make sense.

Bug: 3413541
Change-Id: I121d28a125c4f9618cb283dc460d33ff1a907023
/frameworks/base/services/input/InputReader.h
8529745b27877d98a0c76692295a3fcac238b1e6 04-Mar-2011 Jeff Brown <jeffbrown@google.com> Joystick tweaks. (DO NOT MERGE)

Ensure that the joystick can always reach -1.0, 0.0 and 1.0 positions
even when noise filtering is applied. (Bug: 3514510)

Add support for a few more standard axes.

Add additional mapping modes for axes.
Some axes are inverted from standard interpretation
or are actually intended to be split into two distict axes
such as left/right trigger controls or accelerator/brake.

Add key layout file for a G25 racing wheel and XBox 360 controller
to tweak behavior. They work fine without them but the axis mappings
are not ideal.

Change-Id: I0fddd90309af4dc14d35f34fe99ed6e521c0b7c7
/frameworks/base/services/input/InputReader.h
56194ebec6212e229f4ccdaa4b187166d20013ef 03-Mar-2011 Jeff Brown <jeffbrown@google.com> Wake screen from external HID peripherals.

Added some plumbing to enable the policy to intercept motion
events when the screen is off to handle wakeup if needed.

Added a basic concept of an external device to limit the scope
of the wakeup policy to external devices only. The wakeup policy
for internal devices should be based on explicit rules such as
policy flags in key layout files.

Moved isTouchEvent to native.

Ensure the dispatcher sends the right event type to userActivity
for non-touch pointer events like HOVER_MOVE and SCROLL.

Bug: 3193114
Change-Id: I15dbd48a16810dfaf226ff7ad117d46908ca4f86
/frameworks/base/services/input/InputReader.h
05dc66ada6b61a6bdf806ffaa62617ac5394695d 02-Mar-2011 Jeff Brown <jeffbrown@google.com> Fade out the mouse pointer after inactivity or other events.

Fades out the mouse pointer:
- after 15 seconds of inactivity normally
- after 3 seconds of inactivity in lights out mode
- after a non-modifier key down
- after a touch down

Extended the native Looper to support enqueuing time delayed
messages. This is used by the PointerController to control
pointer fade timing.

Change-Id: I87792fea7dbe2d9376c78cf354fe3189a484d9da
/frameworks/base/services/input/InputReader.h
6f2fba428ca5e77a26d991ad728e346cc47609ee 19-Feb-2011 Jeff Brown <jeffbrown@google.com> Add new axes for joysticks and mouse wheels.

Added API on InputDevice to query the set of axes available.
Added API on KeyEvent and MotionEvent to convert keycodes and axes
to symbolic name strings for diagnostic purposes.
Added API on KeyEvent to query if a given key code is a gamepad button.
Added a new "axis" element to key layout files to specify the
mapping between raw absolute axis values and motion axis ids.
Expanded the axis bitfield to 64bits to allow for future growth.
Modified the Makefile for keyboard prebuilts to run the keymap
validation tool during the build.
Added layouts for two game controllers.
Added default actions for game pad button keys.
Added more tests.
Fixed a bunch of bugs.

Change-Id: I73f9166c3b3c5bcf4970845b58088ad467525525
/frameworks/base/services/input/InputReader.h
7cca7e0b28679cf09ce6b56687c3a9679a6c7296 19-Jan-2011 Jeff Brown <jeffbrown@google.com> am 761a6b7f: am f4368c95: Merge "Filter virtual keys after touches." into honeycomb

* commit '761a6b7fdbe2bcc6db4306af9705dcb22b036068':
Filter virtual keys after touches.
fe50892af3b365806a767298dfd8e86447682581 19-Jan-2011 Jeff Brown <jeffbrown@google.com> Filter virtual keys after touches.

Adds a new virtualKeyQuietTimeMillis configuration resource that sets
the duration for which virtual keys will be dropped after recent touches
on screen. The default value is 0; it is intended to be overridden
per device using a resource overlay.

This change is designed to help in two cases:

1. Swipes from touchscreen into virtual key area.
2. Accidental taps in virtual key area while using on-screen keyboard.

Bug: 3089163
Change-Id: Ib912d4f8a4df9966a39cd537d3ec7c24afab7225
/frameworks/base/services/input/InputReader.h
cb1404e45639d20439d7700b06d57ca1a1aad1fa 16-Jan-2011 Jeff Brown <jeffbrown@google.com> Add joystick support to framework.

Change-Id: I95374436708752e1a9cff3f85c5b9bc3e0987961
/frameworks/base/services/input/InputReader.h
517bb4c859a2bb8d30316204f39bf5b6c89c3e4d 15-Jan-2011 Jeff Brown <jeffbrown@google.com> Add support for detecting finger orientation.

Change-Id: I901fc61f7705fcd7950190dc8782bad616032ee2
/frameworks/base/services/input/InputReader.h
b4ff35df5c04aec71fce7e90a6d6f9ef7180c2ad 03-Jan-2011 Jeff Brown <jeffbrown@google.com> Mouse pointer integration.

Added support for loading the pointer icon from a resource.

Moved the system server related bits of the input manager out
of libui and into libinput since they do not need to be linked into
applications.

Change-Id: Iec11e0725b3add2b905c51f8ea2c3b4b0d1a2d67
/frameworks/base/services/input/InputReader.h