An HID utility library for constructing HID based dynamic sensor.
Primary functionality is in HidParser.h, which parses HID
descriptor into useful data structures. Supporting classes and
structures can be used individually as well.
Test: run tests in HidUtils/test
Bug: 37482274
Change-Id: Icfb59414bb6a1e7b6cdd1078a1a83820e70bbef8
Library to handle dynamic sensor connection. There are two way to use
this: as hal extension or standalone hal module.
In hal extension mode: add libdynamic_sensor_ext in dependency of hal,
instantiate DynamicSensorManager with appropriate parameters. Then
for all sensor requests, if the handle is owned by dynamic sensor
manager, forward the request.
In standalone mode, add sensor.dynamic_sensor_hal into device make
file. Usually, this also means multihal is necessary. Add
sensor.dynamic_sensor_hal into multihal configuration file.
A dummy sensor module is included for testing.
Test: tested with cts dynamics sensor related test and demo app.
also verified sensor basic operation with sensor logger.
Change-Id: I16612935fc21b06c173aca875401ece37c6bde01
There's a problem with enabling the transient trigger in the HAL, that is
the trigger function exports tree properties - activate, state, and
duration which require to be chown'd to system:system during the init
process. Hence, the trigger will be now enabled in the init process and
the HAL will use the "activate" property to determine if the device has
vibrator support via ledtrig-transient.
Test: device vibrates with the driver supports ledtrig-transient
Change-Id: Ieb195ddc199c6372f5dcf3ca1b2be4fd59724717
Signed-off-by: David Lin <dtwlin@google.com>
Library to handle dynamic sensor connection. There are two way to use
this: as hal extension or standalone hal module.
In hal extension mode: add libdynamic_sensor_ext in dependency of hal,
instantiate DynamicSensorManager with appropriate parameters. Then
for all sensor requests, if the handle is owned by dynamic sensor
manager, forward the request.
In standalone mode, add sensor.dynamic_sensor_hal into device make
file. Usually, this also means multihal is necessary. Add
sensor.dynamic_sensor_hal into multihal configuration file.
This CL implements the dynamic sensor manager framework. Sensor daemon
will be added in follow up CL.
Test: test compile (functionality test done in a follow up CL)
Change-Id: I3b96ee135d8dbe3e199af01bed4b61637358803e
Libraries under /hardware/libhardware/modules should go to /vendor/.
These are conventionl HALs for default implementations, most of them
are not used.
Camera and thermal are already moved in other CLs.
Bug: 35907904
Test: Compiled and checked install path. Verified on Sailfish with
$ lsof | grep default.
Change-Id: Ibde574001c01cbfea014a20a0fbbb3265e6cdc8a
In order to build generic system image that is agnostic to SoC or
device, HALs should be moved from system partition to vendor
partition.
Bug: 34826389, 35743509
Test: build & run and check whether the HAL is loaded from
/vendor/lib[64]/hw.
$ su; lsof | grep thermal.
Change-Id: Ia2bb060590f31688528de4a3b9b9ab8fbd376b6c
Dropping support for Sensor HAL version 1.0.
Sensor HALs version 1.1 and 1.2 are already depracated.
This makes version 1.3 as the earliest supported version.
Test: Sensors CTS tests still pass.
Change-Id: I806ce1d0d9277cbb312d9f90749975420cef2109
Add get_multi_hal_module_info() to support using multi-hal
functionality within the HIDL sensor implementation.
Move externally relevant constants and prototypes to new multihal.h
file.
Add new Android.bp for Treble to build multi-hal into a static
library that is now included by the HIDL sensor implementation.
Bug: 32022308
Change-Id: I2b3afa9ff1e0a2e5a098e643dde99ec86bb88206
This fixes a potential NULL-pointer reference crash in case
cpu_file == NULL and pass NULL to fclose().
Test: mm -j 8
Change-Id: Ib3267676bea910533bd85ac2935efe02d361fc6b