Commit Graph

46 Commits

Author SHA1 Message Date
Adam Lesinski 16b0ae105e Merge "add number constraint for samples per MotionEvent" into mnc-dr-dev 2015-10-12 22:15:50 +00:00
Flanker 552a8a5d8d add number constraint for samples per MotionEvent
Bug:23905002
Change-Id: Ifd24802977c3dcdd1dbc5120a78aac41beae4603

Signed-off-by: Adam Lesinski <adamlesinski@google.com>
2015-10-12 11:22:37 -07:00
Puneet Kumar 2f3c3eb4e4 Merge "Allow defining replacement key events in keymap" into mnc-dr-dev 2015-10-08 08:16:31 +00:00
Andrew de los Reyes de18f6c32a InputResampling: Don't extrapolate for very low frame rates.
In very low framerate situations, extrapolation is generally going to
either cause no benefit or make a mistake. We can safely turn it off
with no user-visible negative impact.

BUG=https://buganizer.corp.google.com/u/0/issues/24550942
TEST=Scrolled very slowly and saw mispredictions on Angler. With change,
saw the log message that the mispredictions were suppressed.

Change-Id: Ic9747d3ff098d7918047ada2ed1c2d21282c65b0
2015-10-01 15:57:25 -07:00
Dmitry Torokhov 115f93eeeb Allow defining replacement key events in keymap
Currently keyboard maps allow to assign character sequences to key
events and allow specifying a so-called "fallback" key events that are
re-injected into input stream if target application indicates that it
was not able to handle the original key event. Unfortunately there is no
way to perform substitution before handing the event to applicationis.

This change adds a new keymap keyword "replace" that allows users query
"replacement" actions for key (if any), with the intent that such
replacement happens early in the event handling process.

Bug: 24504154

Change-Id: I3e6a2476c856524171df00ad22ff56f2018c1278
2015-09-29 13:26:30 -07:00
Michael Wright b03f103fd4 Fix input tests to work with new MotionEvent member
Change-Id: I0dde0f91f693903f26edc116b5dbcbf33bac2b93
2015-05-14 16:29:13 +01:00
Michael Wright 7b159c9a4f Revert "Revert "Add new MotionEvent actions for button press and release.""
This reverts commit 70b41ef580.
2015-05-14 14:48:03 +01:00
Michael Wright 70b41ef580 Revert "Add new MotionEvent actions for button press and release."
This reverts commit 48a8a0e432.
2015-05-14 14:46:17 +01:00
Michael Wright 48a8a0e432 Add new MotionEvent actions for button press and release.
Introduce ACTION_BUTTON_PRESS and ACTION_BUTTON_RELEASE as actions to
signal a button press or release. If these actions happen
simulanteously with a DOWN or UP event then they're explicitly
ordered to happen after the DOWN or preceding the UP in order to send
them to the most recently targeted view.

Also, introduce new stylus button constants that differ from the
constants we use for mouse buttons.

Bug: 20704355
Change-Id: Ib960a5004db5429ad2fc8db020704773e2978327
2015-05-14 13:25:41 +01:00
Tim Kilbourn 063ff53d0b Pass through availability of audio mic for input devices.
Bug: 15374820
Change-Id: Id2ca6da10165e3a887ebfbb18f663a3bf316ac79
2015-04-09 10:02:16 -07:00
Dan Albert 94ba882df2 am 4355c0c9: am e1e3d278: Merge "Clean cruft out of makefiles."
* commit '4355c0c98644c37f0511257403bbfb71b342e2df':
  Clean cruft out of makefiles.
2014-09-12 19:28:17 +00:00
Dan Albert 4355c0c986 am e1e3d278: Merge "Clean cruft out of makefiles."
* commit 'e1e3d278549eb6389eb0b5fa3f13a4ac079a55a2':
  Clean cruft out of makefiles.
2014-09-12 16:22:03 +00:00
Dan Albert b79dfe6721 Clean cruft out of makefiles.
Cleans up manual uses of stlport and bionic (and removes uses of private
bionic headers).

Change-Id: I157309d702e59152adfa3450939082248ae4c043
2014-09-11 18:49:47 -07:00
Michael Wright 62fbb16383 Shelve InputFlinger for another release. DO NOT MERGE
Change-Id: I0f034a2b8b1d9192f61f5001799bd3aa4b3964c7
2014-08-18 10:17:18 -07:00
Michael Wright 63ff3a84ae Fixup more potential issues / warnings in string formats
Change-Id: I323e44f950b2e758dc9ff4510b2e13ca870eb849
2014-06-10 13:03:17 -07:00
Michael Wright d0a4a6234f Fix warning in logging string interpolation
Change-Id: I86623083f68664d31ea277958837a4c2985037b4
2014-06-09 19:03:32 -07:00
Narayan Kamath db1972bd8e am 26063a91: am f1dd859b: Merge "x86_64: Align uint64_t/int64_t structure member to 8 bytes"
* commit '26063a9155ddd18d858cea7fac7c1ddf71e1bcb7':
  x86_64: Align uint64_t/int64_t structure member to 8 bytes
2014-06-03 13:58:40 +00:00
Narayan Kamath 26063a9155 am f1dd859b: Merge "x86_64: Align uint64_t/int64_t structure member to 8 bytes"
* commit 'f1dd859baa114995bcbcfb7119e939d0b4f45ed5':
  x86_64: Align uint64_t/int64_t structure member to 8 bytes
2014-06-03 13:29:00 +00:00
Fengwei Yin 83e0e425c6 x86_64: Align uint64_t/int64_t structure member to 8 bytes
To make sure the stature which pass between 32/64bit process have
same memory layout for 32/64bit.

Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Co-Authored-by: Narayan Kamath <narayan@google.com> (Unit test only.)
Change-Id: I1bc2d12cce41ec0bc484adcaf968f274bec75c12
2014-05-30 14:13:29 +01:00
Narayan Kamath f8c66b4bee am cfba3bf1: am c9fcaf37: Merge "Change InputMessage.motion.pointerSize to a uint32_t."
* commit 'cfba3bf1606dfdb1daf1be1c19176180660ae19d':
  Change InputMessage.motion.pointerSize to a uint32_t.
2014-05-16 12:10:21 +00:00
Narayan Kamath ed5fd384b7 Change InputMessage.motion.pointerSize to a uint32_t.
This ensures it's the same size in both 32 and 64 bit
processes and also brings it in line with struct
MotionEntry.

(cherry-picked from bc6001b026)

Change-Id: I28e87050478920a54132efbbb8138076ebad1409
2014-05-16 12:53:16 +01:00
Narayan Kamath b8290c2642 Fix InputEvent_test.
Axis 0 sets the MSB and Axis 63 sets the LSB, and not
the other way round like the test expects.

This was broken by commit 38dcdff308 which moved this
code over to using BitSet.

Change-Id: I63a72abe7ce14720b0bf26e5f6d651bb42452f79
2014-05-06 11:42:16 +01:00
Narayan Kamath bc6001b026 Change InputMessage.motion.pointerSize to a uint32_t.
This ensures it's the same size in both 32 and 64 bit
processes and also brings it in line with struct
MotionEntry.

Change-Id: I66bb8b8d8664763e7dcbd489686051f563d5e1dc
2014-05-02 17:58:43 +01:00
Michael Wright 872db4f11e Move key attribute information out of native.
Native doesn't ever actually care about the attributes of keys, so
move all of it up into the managed layer and move all of the key
names down so they're defined once.

Change-Id: Ic8ded13ce050b2b98744735ff50d11e8d882d7d5
2014-04-22 16:55:36 -07:00
Michael Wright d0bd391146 Generate ACTION_CANCEL on joystick disconnect. DO NOT MERGE
Bug: 11480300
Change-Id: I5a4096970c9e588d134f05dd0eb3a9c91c836b2f
2014-03-24 17:26:52 -07:00
Michael Wright 38dcdff308 Generate ACTION_CANCEL on joystick disconnect.
Bug: 11480300
Change-Id: I46706838eec0711c6bf345301e7b4ccbad83b063
2014-03-20 01:54:00 +00:00
Michael Wright 962a108856 Parse LED mappings in keylayout files. DO NOT MERGE
Change-Id: I2b34939cc0df256e6b872502ea93f2884b4c8334
2014-03-03 13:59:35 -08:00
Jeff Brown f086ddbb97 Add support for injecting events into ActivityContainers.
Enhanced the input system to support concurrent dispatch of touch
events on multiple displays which is required for this to work.

Add method to apply offset to PointerCoords.

Change-Id: I55fe4a9a8785ae5a2d3341d214fa3c5107f3963a
2014-02-11 14:51:24 -08:00
Jeff Brown ed4d28dd70 Add method to apply offset to PointerCoords. (DO NOT MERGE)
Change-Id: I3dc2ba22b026e5b8e1c3d90f7366ec09a59ce6b6
2014-02-11 14:43:19 -08:00
Michael Wright 2130192c78 am 47f0b989: am 3223217a: Only consume touches up until the frame time
* commit '47f0b9894b78a76a1257e0f3299cbe5446035c09':
  Only consume touches up until the frame time
2013-10-21 17:30:25 -07:00
Michael Wright 3223217aed Only consume touches up until the frame time
When resampling is disabled, it's currently possible to consume
touches after the current frame time. This breaks some guarantees and
could cause unexpected behaviors.

Change-Id: I99908a2cac2df9f795dd4a07188b4451213cf3e4
2013-10-21 23:57:17 +00:00
Michael Wright 74bdd2e7ce Parse LED mappings in keylayout files
Change-Id: I6bc3760341868015f054d9866e2616a312da94e0
2013-10-18 12:39:31 -07:00
Dave Burke 218566c303 am 06c964d9: am 9c0dfa09: Merge "Eliminate latency when resampling is disabled" into klp-dev
* commit '06c964d9b31ac81d3521f97427cdab77ee7d1cff':
  Eliminate latency when resampling is disabled
2013-10-10 19:41:28 -07:00
Michael Wright ad526f8505 Eliminate latency when resampling is disabled
Since the latency was introduced to avoid egregious errors during
resampling, remove it when we aren't resampling.

Change-Id: Ia8e9a9afb1e16212fec81a8c9c661c598e1b0ebf
2013-10-10 18:54:12 -07:00
Jeff Brown 464febc449 Remove input flinger stubs. (DO NOT MERGE)
Bug: 10446930
Change-Id: I4dd46f539cd2a2e324dfc83b45ba2787f7404a4a
2013-08-22 18:40:07 -07:00
Michael Wright 0415d63b1a Add controller numbers for gamepads / joysticks
Change-Id: I5294aabbadb836a6a4c7ce76a670abcf50c1f885
2013-07-22 16:37:28 -07:00
Michael Wright e5bb2a45e0 Merge "Add input device property for buttons under touchpads" 2013-07-19 22:45:38 +00:00
Jeff Brown 7556c37b1c Merge "Completely remove skia dependency from libinput." 2013-07-16 01:49:55 +00:00
Jeff Brown 313eff7bb7 Completely remove skia dependency from libinput.
Including the tests...

Change-Id: I6ec8f1a5ae7e7514831d7e3b430b3b37b0841b92
2013-07-15 18:49:00 -07:00
michaelwr 174c26045c Merge "Add a keycode to switch audio tracks (2/2)" 2013-07-16 01:38:36 +00:00
Jeff Brown 5a2f68e5a5 Fix PDK build.
Quick hack to remove Skia dependency from libinput.

Change-Id: Ibaf2e312236f5e3f7251fa903ce381456a77467c
2013-07-15 17:31:13 -07:00
Jeff Brown 40c9e0a398 Add skeleton of input flinger.
Change-Id: I7f25080e446d4d3d9de9b18fe432a09bc751e0d9
2013-07-15 16:03:14 -07:00
Jaekyun Seok 8d06dcf9c6 Add a keycode to switch audio tracks (2/2)
A key to switch audio tracks is general on media devices like blu-ray.

Bug: 9728155
Change-Id: I13ebbc64321f3cf10370f9a605f3d94ea0d16d6d
2013-07-12 17:23:45 +09:00
Michael Wright 931fd6dee7 Add input device property for buttons under touchpads
Bug: 8990644
Change-Id: I6df5fb9e11199173d62523928082db428af55394
2013-07-11 15:24:09 -07:00
keunyoung 80b5cf9934 do not build libinput in PDK
- skia is not available in PDK, and it causes build break.

bug: 9528927
Change-Id: I89663e4a4bd52858506e3b52fbf8ca85d9992363
2013-07-02 10:45:21 -07:00
Jeff Brown 5912f95d26 Move input library code from frameworks/base.
Change-Id: I4983db61b53e28479fc90d9211fafff68f7f49a6
2013-07-01 20:11:26 -07:00