278 Commits

Author SHA1 Message Date
Michael Wright
eeadb32488 Bound touch and tool axes lengths below at 0
Change-Id: I75ca196312201773cfabb74ee5b28a7d80f6ba60
2013-08-14 17:33:27 -07:00
Jeff Brown
6876f32107 Dump information about recent input events.
To help track down ANRs, include more information about recent
events in the input dispatcher dumps.

Bug: 9774124
Change-Id: I94732f173d3518c2f4780668d2eb3ee9ae9fcb10
2013-08-07 16:48:06 -07:00
Michael Wright
ac6c78b6ee Add controller numbers for gamepads / joysticks
Change-Id: I30ac9add6a2473a5ebd83a022c571545e61d1136
2013-07-23 13:50:10 -07:00
Michael Wright
7caaeeb6a8 Merge "Add input device property for buttons under touchpads" 2013-07-19 22:45:51 +00:00
Michael Wright
c5236deeb0 Merge "Properly set the tap down time when entering non-tap modes" 2013-07-19 22:44:57 +00:00
Michael Wright
7ddd11035b Add input device property for buttons under touchpads
Bug: 8990644
Change-Id: I2cc10457595a861b707c0394bd435d60efa8405b
2013-07-17 16:19:25 -07:00
Satoshi Kataoka
713412fd54 am 7e0fad1d: am 8b95d259: am b7925f22: Merge "Revert "Stop marking gamepads as keyboards"" into jb-mr2-dev
* commit '7e0fad1d442428b9a2ba5d88ce7f8a59869acb0e':
  Revert "Stop marking gamepads as keyboards"
2013-07-11 08:08:18 -07:00
Satoshi Kataoka
7e0fad1d44 am 8b95d259: am b7925f22: Merge "Revert "Stop marking gamepads as keyboards"" into jb-mr2-dev
* commit '8b95d259b9f66342ba5ae6e8f4ea262dcb1de05b':
  Revert "Stop marking gamepads as keyboards"
2013-07-09 10:25:02 -07:00
Satoshi Kataoka
b7925f2219 Merge "Revert "Stop marking gamepads as keyboards"" into jb-mr2-dev 2013-07-09 17:20:39 +00:00
Ken Wakasa
02a44f7d47 Revert "Stop marking gamepads as keyboards"
This reverts commit 74c8fb601ef75d8e12df5221489c41c125e3b846.

Change-Id: If8ca4d09b4d52f11d48dabebf2dff2984760cdc0
bug: 8896129
2013-07-05 04:08:36 +00:00
Michael Wright
398d309c61 Properly set the tap down time when entering non-tap modes
This prevents us from erroneously generating tap gestures on things like quick
button presses.

Change-Id: I708e7df9341df589927fd2c0e15c202ccb30ba9b
2013-07-02 17:35:00 -07:00
Jeff Brown
9d3b1a424c Move input library code to frameworks/native.
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-07-01 20:11:42 -07:00
Jeff Brown
e33243ff18 am ef0c3e26: am c8c82009: resolved conflicts for merge of 7573e594 to stage-aosp-master
* commit 'ef0c3e269f15200a3a1111ce9f80516b2d38590a':
  Properly rotate full [-pi, +pi] orientation range if available
2013-05-28 15:48:47 -07:00
Jeff Brown
c8c82009dc resolved conflicts for merge of 7573e594 to stage-aosp-master
Change-Id: Ic19294c82ec023707e23b5848901426433b22e9f
2013-05-28 15:43:16 -07:00
Michael Wright
5e025eb1dc Pipe through bounding box information (DO NOT MERGE)
Bug: 9110236
Change-Id: I7aefe6589fbaf92e5c71a0ba5425623578bafe95
2013-05-23 15:06:47 -07:00
Michael Wright
a66c789f61 Merge "Pipe through bounding box information" 2013-05-21 20:03:49 +00:00
Brett Chabot
2251059ee1 Merge "Build native libinput tests using BUILD_NATIVE_TESTS" 2013-05-21 05:00:30 +00:00
Michael Wright
86172f6252 Pipe through bounding box information
Change-Id: Ic09f2f8f18e21f9582e4ed10aad3b7ec1cc41ddc
2013-05-20 16:25:14 -07:00
Michael Wright
4361e1f46e Remove assist swipe from TOUCH_NAVIGATION devices
Bug: 9019927
Change-Id: I0a67ee00038b6fba7818f64ba02515767e34fe06
(cherry picked from commit 681a3d710402b80a8375a05172b1fb6f720295be)
2013-05-17 21:30:02 +00:00
Brett Chabot
1bff36f954 Build native libinput tests using BUILD_NATIVE_TESTS
Change-Id: Ic50c828e1e8879e70aa85de63303ead11886d498
2013-05-16 23:07:47 -07:00
Michael Wright
2b08c611c8 Mirror LTRIGGER / RTRIGGER as BRAKE / GAS for compatibility
Bug: 8590913
Change-Id: If2918a67ecdd946ed850acc002ca021e150ec39d
2013-04-24 20:08:40 -07:00
Michael Wright
f710413692 Merge "Stop marking gamepads as keyboards" into jb-mr2-dev 2013-04-10 21:14:27 +00:00
Jeff Brown
4dac901f01 Rewrite touch navigation dpad synthesis.
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-10 03:51:18 -07:00
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Michael Wright
74c8fb601e Stop marking gamepads as keyboards
Change-Id: I0ba49aa3235b2e0a50405cf6d68632e268fe4183
2013-04-08 20:05:32 -07:00
Michael Wright
c6091c64c9 Pipe through device resolution information
Bug: 8424494
Change-Id: Iafeeee0d5cd29342c1cdc86b9616222aaa5d1b94
2013-04-04 18:10:37 -07:00
Michael Wright
40f8f0d136 Deliver key repeats for artificial dpad events
Bug: 8425219
Change-Id: Ib41b06ed40d43f2e30ce2a647871a76cea80177b
2013-03-26 14:34:14 -07:00
Michael Wright
75ebb37faf Add APP_SWITCH to app switch input dispatching optimization
Change-Id: I8a95fbf311ebd62bcdaaeecfacaea7996ddaec74
2013-03-21 20:45:03 -07:00
Jason Gerecke
70bca4cc8a Properly rotate full [-pi, +pi] orientation range if available
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-15 17:19:09 -07:00
Michael Wright
e7a9ae8ba0 Add touch navigation input source
Bug: 8276741
Change-Id: I674b9804bf9ae76d694ae7073b54a7d43474a43c
2013-03-11 17:58:22 -07:00
Michael Wright
c50536b85a Merge "Disable kernel keyrepeat" 2013-02-23 06:33:08 +00:00
Michael Wright
a0a72850c2 Disable kernel keyrepeat
Bug: 6332980
Change-Id: Ife69167285aad24ed3e4fa5b65abf59d8dfa4f0a
2013-02-22 14:46:49 -08:00
Mathias Agopian
76f56dd598 am ceec31b7: Merge changes I5a218ca1,I853a76d9
* commit 'ceec31b7dab6a23e443d5dcbcfac4a23b720cfde':
  Refactoring: Rename SurfaceTextureClient to Surface
  clean-up following Surface split
2013-02-15 14:28:22 -08:00
Mathias Agopian
5280061794 Refactoring: Rename SurfaceTextureClient to Surface
Change-Id: I5a218ca11abeeec05e3a4c3cfc581bcc788814ea
2013-02-15 12:47:40 -08:00
Chris Craik
7c1a49f5f5 Revert "Merge remote-tracking branch 'goog/master-chromium' into '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-02-13 10:50:20 -08:00
Derek Sollenberger
fc615a0f64 Remove calls to SkCanvas::setBitmapDevice()
Change-Id: Ib0aa2f65b77802b105c0e8a9d7cdde2e863d3673
2013-01-08 10:00:54 -05:00
Jeff Brown
074b8b7cf1 Eliminate potential reentrance from unregisterInputChannel.
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-31 19:01:31 -07:00
Jeff Brown
f33b2b2b24 Recover from bad input event timestamps from the kernel.
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-05 19:33:28 -07:00
Jeff Brown
1e3b98d47d New internal API to eliminate poke locks.
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-10-01 14:27:34 -07:00
Jeff Brown
bcc046af4e Bundle correlated switch changes atomically.
This is a prerequisite for headset jack detection on Manta.

Bug: 6548391
Change-Id: I549a194344511c0cee578b00f6a9ab5fdbdfb99c
2012-09-27 21:42:57 -07:00
Jeff Brown
83d616a9c7 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
2012-09-10 15:48:47 -07:00
Jeff Brown
d728bf514f 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
2012-09-08 18:12:57 -07:00
Jeff Brown
4fd42e5a90 Remove unused "layer" argument from show().
Change-Id: I795edb8889bbacdf20fc54d755034040295f281a
2012-08-27 14:34:55 -07:00
Jeff Brown
64a55af0ac Add plumbing for new surface flinger display API.
Cleaned up the implementation of Surface and SurfaceSession
to use more consistent naming and structure.

Added JNI for all of the new surface flinger display API calls.

Enforced the requirement that all Surfaces created by
the window manager be named.

Updated the display manager service to use the new methods.

Change-Id: I2a658f1bfd0437e1c6f9d22df8d4ffcce7284ca2
2012-08-27 14:34:54 -07:00
Jeff Brown
0b722fe9ce Use new surface flinger API.
Change-Id: Ic888577408a59a36481a48010e19c5e77c24e211
2012-08-27 14:34:53 -07:00
Jeff Brown
b696de5c10 Move and rename user activity event type constants.
Change-Id: Ie565808796773b6896e71ddfac6aaaf8031de846
2012-07-27 18:14:56 -07:00
Jeff Brown
037f727f49 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
2012-06-25 17:35:13 -07:00
Jeff Brown
22aa512026 Capture input dispatcher's last ANR state in bug report.
Some ANR bugs are very difficult to localize because by the time
the bug report has been captured, the relevant information is
gone.  Work around this by capturing a log of the input dispatcher's
state at the exact time of the ANR before anything has changed
and include this information in the bug report.

Also fixed a nit related to some format strings that had
improper field widths specified.

Bug: 6680398
Change-Id: I5323bf18ec5e47a767cd053209753cc46852bf4c
2012-06-17 15:51:30 -07:00
Jeff Brown
265f1ccc51 Improve ANR diagnostics.
When an ANR occurs, log the associated reason.

When an event takes too long to process (currently more than 2 seconds)
log basic information about the event including how long it actually
took.

Dump the contents of the inbound, outbound and wait queues as part
of dumpsys input.

Bug: 6574842
Change-Id: I9ab754c320f609cb86fe266c469a61e7032dfed6
2012-06-11 18:05:31 -07:00
Jeff Brown
8249fc6183 Don't ANR on hover, scroll or if a window goes away.
Prevents ANR on hover or scroll events.

Prevents ANR in the case where one finger touches a window which
is subsequently removed then a second finger comes along and tries
to touch something.

Change-Id: I985ccb70cd86659992328f14f8a705f3f05ea2e5
2012-05-24 19:34:39 -07:00