summaryrefslogtreecommitdiff
path: root/modules/sensors/dynamic_sensor/ConnectionDetector.h
AgeCommit message (Collapse)Author
2021-09-24dynamic_sensor: Add sensor manager init to sub-HAL 2.1.Erik Staats
Bug: 195964858 Test: Verified dynamic sensor manager is present in sensor list and that no SELinux violations occur on sc-v2-dev and master. $ make -j28 && \ vendor/google/tools/flashall -w -s 14281FDEE000A5 --disable_verity && \ sleep 90 && adb root . . . $ adb shell sensor_test list | grep "sensor_test\|Type\|Dynamic" sensor_test version 74 Type Subtype Name 32 0 Dynamic Sensor Manager $ adb logcat -d | grep avc | grep sensor $ Change-Id: Ib3da287e4f4118ad6b19498248e263f8c1662b3a
2017-04-27Correct inotify usage and fix strong count accounting errorPeng Xu
Fix an error in polling of inotify fd to avoid 100% CPU usage. Refactored code to use android Looper. Fix a string count accounting error that causes unpaired decStrong crashing sensor hidl service. Bug: 37719320 Bug: 37714835 Test: no longer have 100% CPU usage. Test: tested connection of a few mouse/keyboard/usb disk/gnubby no crash observed. Test: cts still working properly after fix. Change-Id: Ibaa026151e5e4919d8dd134c16f5865d5e30ef8a
2017-04-07Dynamic sensor manager -- implementation of basic sensor daemonPeng Xu
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