Commit graph

9 commits

Author SHA1 Message Date
Michael Wright
fdd4d81ca1 Only log when actually receiving actual switch events.
Also, turn off debug logging in a couple other classes and fix an
incorrect format specifier.

Bug: 25497538
Change-Id: I72af9492415fa6910af90caf03a7884c6cb1a0b1
2015-11-25 16:51:44 +00:00
Tim Kilbourn
864984c3b1 MouseInputMapper
Maps relative movements of a mouse or scroll wheel and mouse button
presses. All other logic from CursorInputMapper will be handled in the
host.

Change-Id: I00a966a6194d4810b7b6ac5cc815287ecf7dfb84
2015-07-28 13:21:10 -07:00
Tim Kilbourn
dbc8c16841 Code layout cleanup
- Fwd declare where possible
- List .h first in the .cpp to verify proper includes
- Remove hacky -internal.h file and move testBitInRange to a new component

Change-Id: I442248c4b32738c6c2af250f45d4c8822c862e08
2015-06-09 11:16:04 -07:00
Tim Kilbourn
4f3145d75f Initial InputMappers for evdev input HAL.
The previous design of the InputHost wrapper classes made it very
painful to do testing, so this change also reverts to a more classical
C++ pattern for non-copyable objects. The InputHost classes still simply
call through to the input_host_t and callbacks as before.

Updated unittests to use gmock for mocking the InputHost interactions.

Change-Id: I4b70df2c89ed48af77446b8f5b87a4bde94510bf
2015-06-09 11:16:04 -07:00
Tim Kilbourn
3186e7bf48 Configure device classes for evdev devices.
Change-Id: Ia75b71253771d9d558c59411e27f8a51e352fb8b
2015-06-01 14:33:47 -07:00
Tim Kilbourn
c929d25095 Clarify usage of smart pointers
- Members should be smart (shared or unique)
- Prefer function args to be bare, unless the arg is intended to be
  stored by the callee
- Function args that are smart should be const refs to avoid an extra
  copy

Change-Id: I8052fa432bcffbabff9d67a8d568640cac64d4ad
2015-04-29 15:33:25 -07:00
Tim Kilbourn
6fa82480ae Add input HAL methods for getting device properties.
A property map holds the collection of the properties for a given
device identifier. HAL modules allocate and release these property maps
to control the lifetime of the data. The host will typically open and
read the corresponding idc file on allocation, and release these
resources when it is freed.

Change-Id: Ia13ec7b7abf1a79eeed87dc744c174a37f1fb8a9
2015-04-16 13:21:39 -07:00
Tim Kilbourn
73475a4eb2 Input event hub for evdev input HAL module.
InputHub monitors paths for device changes and input events.
InputDeviceManager creates InputDevices and routes input events to
them. InputDevices currently just log these events during development.
InputHost represents a wrapper around the HAL interface.

Change-Id: Ic47d574498eb07bcdcd17812a648539fdf1c69d6
2015-03-30 17:21:29 -07:00
Michael Wright
5113aff7e2 Add input HAL header.
Change-Id: Ia959dd1d1adf024459d2423fc9d59a811466e53c
2015-02-23 10:45:55 -08:00