summaryrefslogtreecommitdiff
path: root/services/input
AgeCommit message (Collapse)Author
2013-12-19Move some system services to separate directories Amith Yamasani
Refactored the directory structure so that services can be optionally excluded. This is step 1. Will be followed by another change that makes it possible to remove services from the build. Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
2013-11-12am 22108007: am 01e42c0b: Merge "Fix libinput to build with uapi headers." Elliott Hughes
* commit '221080078a36f4b30fe6edc8c91f339a5b84ed83': Fix libinput to build with uapi headers.
2013-11-12Fix libinput to build with uapi headers. Elliott Hughes
Bug: 11559337 Change-Id: I00ca91162de7cd42e03df23bbe4208e169b2ebfe
2013-10-29Always initialize local boolean variables when possible Michael Wright
It's currently possible to reference deviceModeChanged in InputReader while it's in an unknown state. Change the style of initialization here and a few other places to better prevent this type of error. (cherry-pick of f583d0dcc6e5c1968c472c844f6c8fbbe036ad78.) Bug: 11433748 Change-Id: Ic450ca4afe50987b022db9d20bb1cb18ccf060cc
2013-10-29Always initialize local boolean variables when possible Michael Wright
It's currently possible to reference deviceModeChanged in InputReader while it's in an unknown state. Change the style of initialization here and a few other places to better prevent this type of error. Bug: 11433748 Change-Id: Ib332406aefb7cdb16b6a21e00dceaeca34679853
2013-10-17Fix issues catching up to touch events after a short pause. Jeff Brown
When the app spends more than half a second responding to a touch event, the input dispatch eventually decides to stop sending it events until it catches up. (This is when the ANR clock starts.) However, due to a bug in the timing logic, if the app eventually does respond again we would resume delivery but only send one event at a time until the queue was completely drained again. This meant it could take a long time to catch up and process all events. The problem is that we were comparing the current time with the waiting event time. So when events became older than half a second, we would simply stop streaming and end up serialized. This change fixes the timing logic such that the streaming timeout is based on the delivery time of the waiting event rather than the event time itself. Now we only stop streaming when it has been over half a second since the waiting event was delivered so we resume streaming immediately as soon as some waiting events are handled. Bug: 11278743 Change-Id: Ic8c68ee372a07f7caa4168eefcabf9b8a8ad5d87
2013-10-02Private flags are masked in correct variable Adam Lesinski
Newly added private flags were being masked in the public flag variable as opposed to the correct privateFlags variable. bug:11033280 bug:11043194 Change-Id: Idda3a70a083457f3f1b7d4b46d231f4a7e704cf0
2013-09-10Propagate input ANR reason to activity manager log. Jeff Brown
Make it a little easier to diagnose input dispatch timeouts by providing the detailed reason as the ANR annotation in the log. Bug: 10689184 Change-Id: Ie18fd9ad066b0673d1f57c030e027ad0085f4650
2013-08-22Drop touch events when no window was touched. Jeff Brown
Prevent spurious ANRs in the case where an input event is simply undeliverable because there is no window at the touched location. Previously, we would assume that we were just waiting for an application to start and become available to handle the event but this assumption is no longer valid. Monkeys in particular have a tendency to inject events outside of the boundaries of the display which results in spurious ANRs. So we should just reject them. Bug: 9774124 Change-Id: I5c40ce4c942f0557593a229dc5253a0e0bdb8466
2013-08-14Bound touch and tool axes lengths below at 0 Michael Wright
Change-Id: I75ca196312201773cfabb74ee5b28a7d80f6ba60
2013-08-07Dump information about recent input events. Jeff Brown
To help track down ANRs, include more information about recent events in the input dispatcher dumps. Bug: 9774124 Change-Id: I94732f173d3518c2f4780668d2eb3ee9ae9fcb10
2013-07-23Add controller numbers for gamepads / joysticks Michael Wright
Change-Id: I30ac9add6a2473a5ebd83a022c571545e61d1136
2013-07-19Merge "Add input device property for buttons under touchpads" Michael Wright
2013-07-19Merge "Properly set the tap down time when entering non-tap modes" Michael Wright
2013-07-17Add input device property for buttons under touchpads Michael Wright
Bug: 8990644 Change-Id: I2cc10457595a861b707c0394bd435d60efa8405b
2013-07-11am 7e0fad1d: am 8b95d259: am b7925f22: Merge "Revert "Stop marking gamepads ↵ Satoshi Kataoka
as keyboards"" into jb-mr2-dev * commit '7e0fad1d442428b9a2ba5d88ce7f8a59869acb0e': Revert "Stop marking gamepads as keyboards"
2013-07-09am 8b95d259: am b7925f22: Merge "Revert "Stop marking gamepads as ↵ Satoshi Kataoka
keyboards"" into jb-mr2-dev * commit '8b95d259b9f66342ba5ae6e8f4ea262dcb1de05b': Revert "Stop marking gamepads as keyboards"
2013-07-09Merge "Revert "Stop marking gamepads as keyboards"" into jb-mr2-dev Satoshi Kataoka
2013-07-05Revert "Stop marking gamepads as keyboards" Ken Wakasa
This reverts commit 74c8fb601ef75d8e12df5221489c41c125e3b846. Change-Id: If8ca4d09b4d52f11d48dabebf2dff2984760cdc0 bug: 8896129
2013-07-02Properly set the tap down time when entering non-tap modes Michael Wright
This prevents us from erroneously generating tap gestures on things like quick button presses. Change-Id: I708e7df9341df589927fd2c0e15c202ccb30ba9b
2013-07-01Move input library code to frameworks/native. Jeff Brown
No longer compile libandroidfw as a static library on the device since it already exists as a shared library. Keeping the static library would force us to provide a static library version of libinput for the device as well which doesn't make sense. Change-Id: I3517881b87b47dcc209d80dbd0ac6b5cf29a766f
2013-05-28am ef0c3e26: am c8c82009: resolved conflicts for merge of 7573e594 to ↵ Jeff Brown
stage-aosp-master * commit 'ef0c3e269f15200a3a1111ce9f80516b2d38590a': Properly rotate full [-pi, +pi] orientation range if available
2013-05-28resolved conflicts for merge of 7573e594 to stage-aosp-master Jeff Brown
Change-Id: Ic19294c82ec023707e23b5848901426433b22e9f
2013-05-23Pipe through bounding box information (DO NOT MERGE) Michael Wright
Bug: 9110236 Change-Id: I7aefe6589fbaf92e5c71a0ba5425623578bafe95
2013-05-21Merge "Pipe through bounding box information" Michael Wright
2013-05-21Merge "Build native libinput tests using BUILD_NATIVE_TESTS" Brett Chabot
2013-05-20Pipe through bounding box information Michael Wright
Change-Id: Ic09f2f8f18e21f9582e4ed10aad3b7ec1cc41ddc
2013-05-17Remove assist swipe from TOUCH_NAVIGATION devices Michael Wright
Bug: 9019927 Change-Id: I0a67ee00038b6fba7818f64ba02515767e34fe06 (cherry picked from commit 681a3d710402b80a8375a05172b1fb6f720295be)
2013-05-16Build native libinput tests using BUILD_NATIVE_TESTS Brett Chabot
Change-Id: Ic50c828e1e8879e70aa85de63303ead11886d498
2013-04-24Mirror LTRIGGER / RTRIGGER as BRAKE / GAS for compatibility Michael Wright
Bug: 8590913 Change-Id: If2918a67ecdd946ed850acc002ca021e150ec39d
2013-04-10Merge "Stop marking gamepads as keyboards" into jb-mr2-dev Michael Wright
2013-04-10Rewrite touch navigation dpad synthesis. Jeff Brown
The new implementation more accurately tracks the velocity of flings and takes care to avoid obvious discontinuities. The main goal is for a fling to appear to be a linear extension of the movement already in progress. The minimum fling velocity is set to ensure that flings appear to be fairly smooth despite being discretized. Use sequences of repeated key events instead of individual down/up events to represent continuous motions in one direction which can be helpful for stopping flings at boundaries such as when flinging the cursor position within a text view. Compute the movement thresholds based on the physical size of the touch pad, if known. If not known, we assume a nominal size. Support stopping flings with a tap just like we do for normal touch events elsewhere in the framework. Moved the detection of ASSIST swipes into the InputReader where it belongs. These swipes must be detected globally to ensure consistent behavior across the all applications. Added a custom protocol in EventHub to enable input device drivers to override the timestamp of the following events in a packet. This change enables input device drivers that have a better idea of when an input event was actually generated to pass this information to the input system. Particularly useful with uinput. Bug: 8583760 Change-Id: I8ef4e827804786d549cfaa00793a2b9dd0fda465
2013-04-09Add liblog Ying Wang
Bug: 8580410 Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-08Stop marking gamepads as keyboards Michael Wright
Change-Id: I0ba49aa3235b2e0a50405cf6d68632e268fe4183
2013-04-04Pipe through device resolution information Michael Wright
Bug: 8424494 Change-Id: Iafeeee0d5cd29342c1cdc86b9616222aaa5d1b94
2013-03-26Deliver key repeats for artificial dpad events Michael Wright
Bug: 8425219 Change-Id: Ib41b06ed40d43f2e30ce2a647871a76cea80177b
2013-03-21Add APP_SWITCH to app switch input dispatching optimization Michael Wright
Change-Id: I8a95fbf311ebd62bcdaaeecfacaea7996ddaec74
2013-03-15Properly rotate full [-pi, +pi] orientation range if available Jason Gerecke
The code currently in place assumes that orientation has a range of [-pi/2, +pi/2] as may be found with a touch digitizer. However, when used with a digitzer that can report the full [-pi, +pi] range of orientations (e.g. a stylus) the calculations here are incorrect. This patch checks if the post-rotation value is out of range for the axis, and wraps it back around. Change-Id: I03a22f7bf9526a5d995df1a18430d6dd24c6d6ee
2013-03-11Add touch navigation input source Michael Wright
Bug: 8276741 Change-Id: I674b9804bf9ae76d694ae7073b54a7d43474a43c
2013-02-23Merge "Disable kernel keyrepeat" Michael Wright
2013-02-22Disable kernel keyrepeat Michael Wright
Bug: 6332980 Change-Id: Ife69167285aad24ed3e4fa5b65abf59d8dfa4f0a
2013-02-15am ceec31b7: Merge changes I5a218ca1,I853a76d9 Mathias Agopian
* commit 'ceec31b7dab6a23e443d5dcbcfac4a23b720cfde': Refactoring: Rename SurfaceTextureClient to Surface clean-up following Surface split
2013-02-15Refactoring: Rename SurfaceTextureClient to Surface Mathias Agopian
Change-Id: I5a218ca11abeeec05e3a4c3cfc581bcc788814ea
2013-02-13Revert "Merge remote-tracking branch 'goog/master-chromium' into ↵ Chris Craik
'goog/master'" DO NOT MERGE This reverts commit 6c0307dd0aefe9a08794b155fc03ee60ebd14f25, reversing changes made to a2cd828b749c444d55c2c41c7dbb85088ff94b9f. Conflicts: packages/SystemUI/res/values-sv/strings.xml Change-Id: Ia178efe8b14751583d47b2826bfe3d3d5463dd2e
2013-01-08Remove calls to SkCanvas::setBitmapDevice() Derek Sollenberger
Change-Id: Ib0aa2f65b77802b105c0e8a9d7cdde2e863d3673
2012-10-31Eliminate potential reentrance from unregisterInputChannel. Jeff Brown
Ensure that all callbacks into the window manager policy occur on the input dispatcher thread in the right place. This fixes a potential deadlock that may occur if the window manager unregisters an input channel while holding its own lock. The change is simply to defer running asynchronous commands (usually callbacks into the policy) until the next iteration of the dispatch looper thread. Bug: 7382388 Change-Id: I90095580d717fcddb2209ef332df56400f837a34
2012-10-05Recover from bad input event timestamps from the kernel. Jeff Brown
This can happen due to a race when the input device is opened or if the kernel happens to be missing the required Android patches to set the timestamp correctly. Bug: 7291243 Change-Id: If4319440eaff2889147c86296abd39efc5664346
2012-10-01New internal API to eliminate poke locks. Jeff Brown
Added a new WindowManager.LayoutParams inputFeatures flag to disable automatic user activity behavior when an input event is sent to a window. Added a new WindowManager.LayoutParams field userActivityTimeout. Bug: 7165399 Change-Id: I204eafa37ef26aacc2c52a1ba1ecce1eebb0e0d9
2012-09-27Bundle correlated switch changes atomically. Jeff Brown
This is a prerequisite for headset jack detection on Manta. Bug: 6548391 Change-Id: I549a194344511c0cee578b00f6a9ab5fdbdfb99c
2012-09-10Make input system aware of multiple displays. Jeff Brown
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