2e37ec4475
The multihal framework is a HAL interface for the sensors framework that allows multiple vendors to package their HAL implementation into a subHAL dynamic library that will be loaded and used to pass on method calls to the appropriate subHAL. The HalProxy object, that will act as the main proxy sensors wrapper for the multiHAL handles writing sensor events to the event FMQ and wakelock acquisition and releasing via a callback object it passes to the subHALs. In order to turn your HAL 2.0 executable into a subHAL to be used by the multiHAL, implement the Return<Result> initialize(sp<HalProxyCallback>& callback) method of the ISensorsSubHal derived class. Implement the ISensorsSubHal* sensorsHalGetSubHal(uint32_t* version)method and have it return a pointer to your subHAL object. Build this into a dynamic library and list its filename under /vendor/etc/sensors/hals.conf. Squashed commits:07b442e96
(refs/published/mh2_2) MH2 | Write processedEvents instead of original events.b38f2e251
Merge "MH2 | Check that subhal index is in range"d38f99474
Merge "MH2 | Implement debug method of HalProxy"bf46132fe
(refs/published/mh2_4, mh2_4) MH2 | Implement debug method of HalProxy1de5bb334
MH2 | Fix wakelock namee07215347
(refs/published/mh2_3, mh2_3) MH2 | Check that subhal index is in range336c1c71e
MH2 | Add restart logic in HalProxy::initialize method.731d7125b
MH2 | Change rc file to more appropriate settingsf09465d11
MH2 | Add makeFMQ helpers to HalProxy_test75cc7bf2f
MH2 | Implement wakelock processing threade93fdf9a4
MH2 | Implement dynamic sensors callbacks on HalProxy82b84148c
Remove libhwbinder/libhidltransport depsd45e49b4b
Merge "MH2 | Implement pending writes thread"597142692
MH2 | Implement pending writes threaddb23aa825
MH2 | Implement direct channel and direct report methods83e4370ae
MH2 | Implement injectSensorData method of HalProxyd0cd57d4c
MH2 | Implement ScopeWakelock ctor and dtor537c0274b
MH2 | Add rough proxy callback postEvents methodf97a3f357
Multihal 2.0 - Small tweaks to sensorHandle handling7a7235461
MultiHal 2.0 - setOperationMode and init direct channel flagsdc7a8e789
MultiHal 2.0 - Get sensors list from subhals4b4c7b744
MultiHal 2.0 - activate, batch, flush methods of HalProxy1638531df
MultiHal 2.0 - proxying api calls helper methodsaacbf9485
Set up shell to use for unit tests2879067dd
Multihal 2.0 - Implement SubHal discoveryc34e6683b
Add a sub-HAL implementation for testing multi-HALa689f8a65
Add skeleton for multihal 2.0 Bug: 136511617 Test: atest android.hardware.sensors@2.0-halproxy-unit-tests && vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalSensorsV2_0Target Change-Id: Ibe92d40c92b70848526b0e941bbcffbaf81ffaf2
7 lines
261 B
Text
7 lines
261 B
Text
service vendor.sensors-hal-2-0-multihal /vendor/bin/hw/android.hardware.sensors@2.0-service.multihal
|
|
class hal
|
|
user system
|
|
group system wakelock
|
|
writepid /dev/cpuset/system-background/tasks
|
|
capabilities BLOCK_SUSPEND
|
|
rlimit rtprio 10 10
|