Loading sensors/1.0/default/Android.bp +1 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ cc_library_shared { "libhardware", "libhwbinder", "libbase", "libcutils", "libutils", "libhidlbase", "libhidltransport", Loading @@ -16,6 +15,7 @@ cc_library_shared { ], static_libs: [ "android.hardware.sensors@1.0-convert", "multihal", ], local_include_dirs: ["include/sensors"], } Loading @@ -30,7 +30,6 @@ cc_library_static { "libhardware", "libhwbinder", "libbase", "libcutils", "libutils", "libhidlbase", "libhidltransport", Loading sensors/1.0/default/Sensors.cpp +19 −3 Original line number Diff line number Diff line Loading @@ -15,17 +15,29 @@ */ #include "Sensors.h" #include "convert.h" #include "multihal.h" #include <android-base/logging.h> #include <sys/stat.h> namespace android { namespace hardware { namespace sensors { namespace V1_0 { namespace implementation { /* * If a multi-hal configuration file exists in the proper location, * return true indicating we need to use multi-hal functionality. */ static bool UseMultiHal() { const std::string& name = MULTI_HAL_CONFIG_FILE_PATH; struct stat buffer; return (stat (name.c_str(), &buffer) == 0); } static Result ResultFromStatus(status_t err) { switch (err) { case OK: Loading @@ -43,10 +55,14 @@ Sensors::Sensors() : mInitCheck(NO_INIT), mSensorModule(nullptr), mSensorDevice(nullptr) { status_t err = hw_get_module( status_t err = OK; if (UseMultiHal()) { mSensorModule = ::get_multi_hal_module_info(); } else { err = hw_get_module( SENSORS_HARDWARE_MODULE_ID, (hw_module_t const **)&mSensorModule); } if (mSensorModule == NULL) { err = UNKNOWN_ERROR; } Loading sensors/1.0/default/Android.mk +12 −12 File changed.Contains only whitespace changes. Show changes Loading
sensors/1.0/default/Android.bp +1 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ cc_library_shared { "libhardware", "libhwbinder", "libbase", "libcutils", "libutils", "libhidlbase", "libhidltransport", Loading @@ -16,6 +15,7 @@ cc_library_shared { ], static_libs: [ "android.hardware.sensors@1.0-convert", "multihal", ], local_include_dirs: ["include/sensors"], } Loading @@ -30,7 +30,6 @@ cc_library_static { "libhardware", "libhwbinder", "libbase", "libcutils", "libutils", "libhidlbase", "libhidltransport", Loading
sensors/1.0/default/Sensors.cpp +19 −3 Original line number Diff line number Diff line Loading @@ -15,17 +15,29 @@ */ #include "Sensors.h" #include "convert.h" #include "multihal.h" #include <android-base/logging.h> #include <sys/stat.h> namespace android { namespace hardware { namespace sensors { namespace V1_0 { namespace implementation { /* * If a multi-hal configuration file exists in the proper location, * return true indicating we need to use multi-hal functionality. */ static bool UseMultiHal() { const std::string& name = MULTI_HAL_CONFIG_FILE_PATH; struct stat buffer; return (stat (name.c_str(), &buffer) == 0); } static Result ResultFromStatus(status_t err) { switch (err) { case OK: Loading @@ -43,10 +55,14 @@ Sensors::Sensors() : mInitCheck(NO_INIT), mSensorModule(nullptr), mSensorDevice(nullptr) { status_t err = hw_get_module( status_t err = OK; if (UseMultiHal()) { mSensorModule = ::get_multi_hal_module_info(); } else { err = hw_get_module( SENSORS_HARDWARE_MODULE_ID, (hw_module_t const **)&mSensorModule); } if (mSensorModule == NULL) { err = UNKNOWN_ERROR; } Loading