• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

READMED23-Mar-20241.1 KiB2016

Sensor.cppD23-Mar-202411.9 KiB350284

Sensor.hD23-Mar-20244.1 KiB158110

SensorsSubHal.cppD23-Mar-20248.1 KiB241190

SensorsSubHal.hD23-Mar-20245.3 KiB16690

README

1This directory contains a modified version of the default implementation
2provided for sensors HAL 2.0 to support multi-HAL 2.0. It should be used as a
3means to verify the multi-HAL 2.0 implementation can successfully load and
4interact with sub-HALs.
5
6This sub-HAL implementation has two macros that can be used to configure support
7for different sets of sensors. One "SUPPORT_CONTINUOUS_SENSORS", enables
8support for continuous sensors like accel, and gyro whereas the other
9"SUPPORT_ON_CHANGE_SENSORS" enables support for on change sensors like the
10light and proximity sensor. A build target is defined for each of these macros,
11but more targets could be added to support both in one sub-HAL or none at all,
12if necessary.
13
14When built, the library will be written to
15out/target/product/<device>/vendor/lib64/android.hardware.sensors@2.0-fakesubhal.so
16
17Take this .so and place it where the multi-HAL config will cause the HalProxy to
18look and then restart the system server with adb shell stop / adb shell start
19to cause the multi-HAL to restart and attempt to load in the sub-HAL.
20