Loading sensors/1.0/default/Android.bp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -44,6 +44,12 @@ cc_library_static { "libhidlbase", "libhidlbase", "android.hardware.sensors@1.0", "android.hardware.sensors@1.0", ], ], whole_static_libs: [ "sensors_common_convert", ], export_static_lib_headers: [ "sensors_common_convert", ], local_include_dirs: ["include/sensors"], local_include_dirs: ["include/sensors"], export_shared_lib_headers: [ export_shared_lib_headers: [ "libhardware", "libhardware", Loading sensors/1.0/default/convert.cpp +5 −0 Original line number Original line Diff line number Diff line Loading @@ -196,6 +196,11 @@ void convertFromSensorEvent(const sensors_event_t &src, Event *dst) { } } } } void convertFromASensorEvent(const ASensorEvent& src, Event* dst) { convertFromSensorEvent( android::hardware::sensors::implementation::common::convertASensorEvent(src), dst); } void convertToSensorEvent(const Event &src, sensors_event_t *dst) { void convertToSensorEvent(const Event &src, sensors_event_t *dst) { *dst = {.version = sizeof(sensors_event_t), *dst = {.version = sizeof(sensors_event_t), .sensor = src.sensorHandle, .sensor = src.sensorHandle, Loading sensors/1.0/default/include/sensors/convert.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <android/hardware/sensors/1.0/ISensors.h> #include <android/hardware/sensors/1.0/ISensors.h> #include <hardware/sensors.h> #include <hardware/sensors.h> #include <sensors/common_convert.h> namespace android { namespace android { namespace hardware { namespace hardware { Loading @@ -31,6 +32,7 @@ void convertFromSensor(const sensor_t &src, SensorInfo *dst); void convertToSensor(const SensorInfo &src, sensor_t *dst); void convertToSensor(const SensorInfo &src, sensor_t *dst); void convertFromSensorEvent(const sensors_event_t &src, Event *dst); void convertFromSensorEvent(const sensors_event_t &src, Event *dst); void convertFromASensorEvent(const ASensorEvent& src, Event* dst); void convertToSensorEvent(const Event &src, sensors_event_t *dst); void convertToSensorEvent(const Event &src, sensors_event_t *dst); bool convertFromSharedMemInfo(const SharedMemInfo& memIn, sensors_direct_mem_t *memOut); bool convertFromSharedMemInfo(const SharedMemInfo& memIn, sensors_direct_mem_t *memOut); Loading sensors/aidl/convert/Android.bp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -37,6 +37,12 @@ cc_library_static { "libutils", "libutils", "android.hardware.sensors-V1-ndk", "android.hardware.sensors-V1-ndk", ], ], whole_static_libs: [ "sensors_common_convert", ], export_static_lib_headers: [ "sensors_common_convert", ], local_include_dirs: ["include/aidl/sensors"], local_include_dirs: ["include/aidl/sensors"], export_shared_lib_headers: [ export_shared_lib_headers: [ "libhardware", "libhardware", Loading sensors/aidl/convert/convert.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -490,6 +490,10 @@ void convertFromSensorEvent(const sensors_event_t& src, Event* dst) { } } } } void convertFromASensorEvent(const ASensorEvent& src, Event* dst) { convertFromSensorEvent(common::convertASensorEvent(src), dst); } } // namespace implementation } // namespace implementation } // namespace sensors } // namespace sensors } // namespace hardware } // namespace hardware Loading Loading
sensors/1.0/default/Android.bp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -44,6 +44,12 @@ cc_library_static { "libhidlbase", "libhidlbase", "android.hardware.sensors@1.0", "android.hardware.sensors@1.0", ], ], whole_static_libs: [ "sensors_common_convert", ], export_static_lib_headers: [ "sensors_common_convert", ], local_include_dirs: ["include/sensors"], local_include_dirs: ["include/sensors"], export_shared_lib_headers: [ export_shared_lib_headers: [ "libhardware", "libhardware", Loading
sensors/1.0/default/convert.cpp +5 −0 Original line number Original line Diff line number Diff line Loading @@ -196,6 +196,11 @@ void convertFromSensorEvent(const sensors_event_t &src, Event *dst) { } } } } void convertFromASensorEvent(const ASensorEvent& src, Event* dst) { convertFromSensorEvent( android::hardware::sensors::implementation::common::convertASensorEvent(src), dst); } void convertToSensorEvent(const Event &src, sensors_event_t *dst) { void convertToSensorEvent(const Event &src, sensors_event_t *dst) { *dst = {.version = sizeof(sensors_event_t), *dst = {.version = sizeof(sensors_event_t), .sensor = src.sensorHandle, .sensor = src.sensorHandle, Loading
sensors/1.0/default/include/sensors/convert.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <android/hardware/sensors/1.0/ISensors.h> #include <android/hardware/sensors/1.0/ISensors.h> #include <hardware/sensors.h> #include <hardware/sensors.h> #include <sensors/common_convert.h> namespace android { namespace android { namespace hardware { namespace hardware { Loading @@ -31,6 +32,7 @@ void convertFromSensor(const sensor_t &src, SensorInfo *dst); void convertToSensor(const SensorInfo &src, sensor_t *dst); void convertToSensor(const SensorInfo &src, sensor_t *dst); void convertFromSensorEvent(const sensors_event_t &src, Event *dst); void convertFromSensorEvent(const sensors_event_t &src, Event *dst); void convertFromASensorEvent(const ASensorEvent& src, Event* dst); void convertToSensorEvent(const Event &src, sensors_event_t *dst); void convertToSensorEvent(const Event &src, sensors_event_t *dst); bool convertFromSharedMemInfo(const SharedMemInfo& memIn, sensors_direct_mem_t *memOut); bool convertFromSharedMemInfo(const SharedMemInfo& memIn, sensors_direct_mem_t *memOut); Loading
sensors/aidl/convert/Android.bp +6 −0 Original line number Original line Diff line number Diff line Loading @@ -37,6 +37,12 @@ cc_library_static { "libutils", "libutils", "android.hardware.sensors-V1-ndk", "android.hardware.sensors-V1-ndk", ], ], whole_static_libs: [ "sensors_common_convert", ], export_static_lib_headers: [ "sensors_common_convert", ], local_include_dirs: ["include/aidl/sensors"], local_include_dirs: ["include/aidl/sensors"], export_shared_lib_headers: [ export_shared_lib_headers: [ "libhardware", "libhardware", Loading
sensors/aidl/convert/convert.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -490,6 +490,10 @@ void convertFromSensorEvent(const sensors_event_t& src, Event* dst) { } } } } void convertFromASensorEvent(const ASensorEvent& src, Event* dst) { convertFromSensorEvent(common::convertASensorEvent(src), dst); } } // namespace implementation } // namespace implementation } // namespace sensors } // namespace sensors } // namespace hardware } // namespace hardware Loading