summaryrefslogtreecommitdiffstats
path: root/services/input
Commit message (Collapse)AuthorAgeFilesLines
* Remove unimplemented memory pool.Jeff Brown2011-07-202-310/+239
| | | | | | dlmalloc does such a great job that we don't need a pool anyways. Change-Id: I105b28c4a5c491543959190c7c0a9de75a5b8052
* Add support for orientationAware touch pads.Jeff Brown2011-07-151-50/+38
| | | | | | Bug: 5038388 Change-Id: I9c571b1542299334d2d64c5b33e456ec20ebc0ae
* Remove more edge flag cruft.Jeff Brown2011-07-151-21/+1
| | | | Change-Id: I4f9f4f4cc7c771a918aee82a941a3e86ecfe48fe
* Remove edge slop support.Jeff Brown2011-07-142-67/+6
| | | | | | | | | 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
* Refactor input dispatcher use of window/app handles.Jeff Brown2011-07-146-335/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | This change moves the cached window and application input state into the handle objects themselves. It simplifies the dispatcher somewhat because it no longer needs to fix up references to transient InputWindow objects each time the window list is updated. This change will also make it easier to optimize setInputWindows to avoid doing a lot of redundant data copying. In principle, only the modified fields need to be updated. However, for now we continue to update all fields in unison as before. It turns out that the input dispatcher was inappropriately retaining pointers to InputWindow objects within the mWindows InputWindow vector. This vector is copy-on-write so it is possible and the item pointers to change if an editing operation is performed on the vector when it does not exclusively own the underlying SharedBuffer. This bug was uncovered by a previous change that replaced calls to clear() and appendVector() with a simple use of operator= which caused the buffer to be shared. Consequently after editItemAt was called (which it shouldn't have, actually) the buffer was copied and the cached InputWindow pointers became invalid. Oops. This change fixes the problem. Change-Id: I0a259339a6015fcf9113dc4081a6875e047fd425
* Merge "Revert "fix a weird use of Vector::appendVector()""Jeff Brown2011-07-131-2/+5
|\
| * Revert "fix a weird use of Vector::appendVector()"Jeff Brown2011-07-131-2/+5
| | | | | | | | | | | | This reverts commit 198fd888add624cf9e53ce31b776568a5d069916 This change seems to have exposed some other bugs. Bug: 5026631
* | Merge "Remove the simulator target from all makefiles. Bug: 5010576"Jeff Brown2011-07-122-8/+0
|\ \ | |/ |/|
| * Remove the simulator target from all makefiles.Jeff Brown2011-07-112-8/+0
| | | | | | | | | | | | Bug: 5010576 Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
* | fix a weird use of Vector::appendVector()Mathias Agopian2011-07-111-5/+2
|/ | | | | | operator= is way more efficient. Change-Id: I61c9adb1413bed230801a77151b8f7000fd11471
* Drop obsolete touch screen hacks.Jeff Brown2011-07-013-457/+2
| | | | Change-Id: I47354c37ee2cc2b36340eb709bb5043b3ba78ed9
* Workaround apps that make assumptions about pointer ids.Jeff Brown2011-07-013-40/+51
| | | | | | | | | | 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
* Query input device for initial slot index.Jeff Brown2011-07-015-5/+76
| | | | | | | | | | | This fixes a problem where touches can get stuck because the driver and the framework have different ideas of what the initial slot index is. The framework assumed it was slot 0 but it could in principle be any slot, such as slot 1. When that happened, the framework would start tracking the first touch as slot 0, but it might never receive an "up" for that slot. Change-Id: Idaffc4534b275d66b9d4360987b28dc2d0f63218
* Merge "Fix joystick and trackpad regression."Jeff Brown2011-06-292-1/+7
|\
| * Fix joystick and trackpad regression.Jeff Brown2011-06-292-1/+7
| | | | | | | | Change-Id: I33b6756f95a6b0725ffa210f341da3c98426491b
* | SF transactions are now O(1) wrt IPC instead of O(N).Mathias Agopian2011-06-291-9/+2
|/ | | | Change-Id: I57669852cbf6aabae244ea86940a08a5a27ffc43
* Add some logging code to track down touch issues.Jeff Brown2011-06-281-1/+11
| | | | Change-Id: I9bd7af6b93f82a83c6863986d21e7a222d97e4ae
* Improve input event consistency invariants.Jeff Brown2011-06-283-168/+335
| | | | | | | | | | | | | Fixed some issues where inconsistent streams of events could be generated by the dispatcher, particularly when switching from hovering with one device to hovering with another. Fixed a bug where the touch pad would fail to generate a new HOVER_MOVE following a tap event. As a result, the hover event stream would not resume until the user touched the touch pad again. Change-Id: I444dce84641fb12e56a0af84c931520771d6c493
* Hover and stylus API cleanup.Jeff Brown2011-06-271-4/+4
| | | | | | | Added missing setOnHoverListener method. Removed BUTTON_STATE_ERASER. Change-Id: I5d820d0a8e47fe5fd2d88e9fd9fc3fc6ce0dea0d
* Add support for disabling pointer gestures.Jeff Brown2011-06-145-227/+298
| | | | | | | | | | | | 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
* EventHub code cleanup.Jeff Brown2011-06-144-315/+348
| | | | | | | | | Use epoll_wait() instead of poll(). Dropped all support for non-Linux platforms. Added a wake-up protocol so that the InputReader can wake up the event loop immediately as needed. Change-Id: Ibf84337bcceb3c2df068c5c637de42a319786d66
* Allow touches to slide out of the navigation bar.Jeff Brown2011-06-133-7/+97
| | | | Change-Id: I73cabba3d62f47829bf6217700ace56a27c42b1d
* Take advantage of updated linux/input.h kernel headers.Jeff Brown2011-06-134-38/+10
| | | | Change-Id: I72d2ef82de5c504d46b0cdb57aa43bbd0d769174
* No position information for outside touchesKenny Root2011-06-102-4/+38
| | | | | | | | | | | | | | When a window registers to listen for outside touches, it doesn't need the position information for touches that land outside of its activity for normal use cases. This patch uses the foreground window's UID as a filter to determine whether to pass the position information. This will allow applications to continue to rely on touch information for inputs that were directed at one of its other windows. Bug: 4541250 Change-Id: If16eb1ec8404b797d991859eef55ac0a20a355a3
* am 92110af2: am 5f0b1721: am 25bd8abc: Merge "Fix swipe gesture cosine ↵Jeff Brown2011-06-092-2/+6
|\ | | | | | | | | | | | | calculation. Bug: 4124987" into honeycomb-mr2 * commit '92110af24a9a93b73264560b57f55f45ec65dab5': Fix swipe gesture cosine calculation. Bug: 4124987
| * Fix swipe gesture cosine calculation.Jeff Brown2011-06-072-2/+6
| | | | | | | | | | | | | | | | | | | | 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
* | am e046555b: am fd324486: am 5cb05eea: Merge "Fix build." into honeycomb-mr2Jeff Brown2011-06-071-2/+2
|\ \ | |/ | | | | | | * commit 'e046555b4d92179327d12d888be967fff5c027ca': Fix build.
| * Fix build.Jeff Brown2011-06-061-2/+2
| | | | | | | | Change-Id: I9ea07637058e2aa74d20d881bc21fea305cc869e
* | am 55cc25c1: am 797dc698: am b92dcf9c: Merge "Simplify spot tracking logic. ↵Jeff Brown2011-06-074-188/+19
|\ \ | |/ | | | | | | | | | | Bug: 4124987" into honeycomb-mr2 * commit '55cc25c12c45e8ffb65d2275cc0b6941b68db9df': Simplify spot tracking logic. Bug: 4124987
| * Simplify spot tracking logic.Jeff Brown2011-06-064-188/+19
| | | | | | | | | | | | | | | | | | 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
* | resolved conflicts for merge of 8b2c0014 to masterJeff Brown2011-06-072-162/+179
|\ \ | |/ | | | | Change-Id: I33a5a2949dc6c2d09e8196ba8c7128caa7ac2361
| * Touch pad improvements.Jeff Brown2011-06-062-162/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Use pointer mode instead of spots for SEMI_MT touch pads.Jeff Brown2011-06-031-3/+5
| | | | | | | | | | | | | | | | | | | | The spot-based presentation relies on being able to accurately locate and distinguish two or more fingers on the touch pad. We can still do gesture recognition without distinct multitouch but it doesn't make sense to show spots because we can't be sure that the spots will appear in the right places. Change-Id: Ia282d77000bf3b50d395273a1f0ac0bbe55b3c6f
* | resolved conflicts for merge of ca2b552d to masterJeff Brown2011-06-035-33/+87
|\ \ | |/ | | | | Change-Id: I2f3693a59042ac5aa2d7bcdc3a504c78dc99a18b
| * Add a preference panel for mouse speed.Jeff Brown2011-06-025-33/+87
| | | | | | | | | | Bug: 4124987 Change-Id: I3ce175d268a1d043cf5878481261b1049a15a149
* | am 56503b8d: am 8186a5f0: am 10c3f367: Merge "Implement pointer ↵Jeff Brown2011-06-032-67/+129
|\ \ | |/ | | | | | | | | | | acceleration." into honeycomb-mr2 * commit '56503b8ddfe5c82407da32e18061e725f668432d': Implement pointer acceleration.
| * Implement pointer acceleration.Jeff Brown2011-06-022-67/+129
| | | | | | | | | | Bug: 4124987 Change-Id: I1f31a28f1594c55302ccabe13fe3ca6d2ff71d50
* | resolved conflicts for merge of 7e193916 to masterDianne Hackborn2011-06-036-171/+267
|\ \ | |/ | | | | Change-Id: If06892419319c3a2d4ab6b03dd3ceb99b83803b5
| * Use ViewConfiguration to seed input system configuration.Jeff Brown2011-05-316-173/+267
| | | | | | | | | | | | | | | | | | 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
| * Button state should reflect actual buttons. (DO NOT MERGE)Jeff Brown2011-05-311-18/+2
| | | | | | | | | | Bug: 4124987 Change-Id: If0585bd1432c8c61ed0c9a6a4f6de4a62e3f6e53
* | Merge "Fix ABS_MT_SLOT handling."Jeff Brown2011-06-022-7/+13
|\ \
| * | Fix ABS_MT_SLOT handling.Jeff Brown2011-06-022-7/+13
| | | | | | | | | | | | | | | | | | Shouldn't reset the current slot index to 0 after each SYN_REPORT. Change-Id: I370e4770f8ae0ce598369ecbaf64772c13e02d46
* | | am 3f5b95b0: am a4e74744: am fa574c0e: Merge "Touch pad UX improvements." ↵Jeff Brown2011-05-315-52/+158
|\ \ \ | |/ / |/| / | |/ | | | | | | into honeycomb-mr2 * commit '3f5b95b05efcf7ab2e8f193649b841dc1786f2ef': Touch pad UX improvements.
| * Touch pad UX improvements.Jeff Brown2011-05-255-52/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix deadlock in dispatcher. (DO NOT MERGE)Jeff Brown2011-05-251-1/+0
| | | | | | | | | | | | This regression was caused due to a bad cherry-pick / merge. Change-Id: I79e84285bbfd4cd4b66681461543fb185b60d3ba
| * Fix bug reporting presence of orientation axis. (DO NOT MERGE)Jeff Brown2011-05-251-0/+2
| | | | | | | | Change-Id: I20aecca392d2843601e6e0ec4ac913c8ccdbbf89
| * Add tap/drag touchpad gesture. (DO NOT MERGE)Jeff Brown2011-05-253-68/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Initial checkin of spot presentation for touchpad gestures. (DO NOT MERGE)Jeff Brown2011-05-2510-614/+1190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Add a sprite controller. (DO NOT MERGE)Jeff Brown2011-05-259-213/+876
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Coalesce input events that arrive faster than 333Hz. (DO NOT MERGE)Jeff Brown2011-05-253-21/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some drivers report individual finger updates one at a time instead of all at once. When 10 fingers are down, this can cause the framework to have to handle 10 times as many events each with 10 times as much data. Applications like PointerLocation would get significantly bogged down by all of the redundant samples. This change coalesces samples that are closely spaced in time, before they are dispatched, as part of the motion event batching protocol. Increased the size of the InputChannel shared memory buffer so that applications can catch up faster if they accumulate a backlog of samples. Change-Id: Ibc6abf8af027d9003011ac75caa12941080caba3