msm8974-common: sensors: Update multihal with P changes
Change-Id: Iee33e9043e5f4eb9b5ff8af562800e0392c041b5
This commit is contained in:
parent
2bd8da39b5
commit
d6c5ae5030
@ -3,7 +3,7 @@ cc_library_static {
|
||||
vendor: true,
|
||||
srcs: [
|
||||
"multihal.cpp",
|
||||
"SensorEventQueue.cpp"
|
||||
"SensorEventQueue.cpp",
|
||||
],
|
||||
header_libs: [
|
||||
"libhardware_headers",
|
||||
@ -12,7 +12,11 @@ cc_library_static {
|
||||
"liblog",
|
||||
"libcutils",
|
||||
"libutils",
|
||||
"libdl"
|
||||
"libdl",
|
||||
],
|
||||
export_include_dirs: ["."],
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
],
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ LOCAL_MODULE := sensors.$(TARGET_BOARD_PLATFORM)
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
LOCAL_CFLAGS := -DLOG_TAG=\"MultiHal\"
|
||||
LOCAL_CFLAGS := -Wall -Werror -DLOG_TAG=\"MultiHal\"
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
multihal.cpp \
|
||||
|
@ -515,6 +515,7 @@ static int device__close(struct hw_device_t *dev) {
|
||||
if (ctx != NULL) {
|
||||
int retval = ctx->close();
|
||||
delete ctx;
|
||||
return retval;
|
||||
}
|
||||
|
||||
if (sub_hw_modules != nullptr) {
|
||||
@ -592,15 +593,6 @@ static int device__config_direct_report(struct sensors_poll_device_1 *dev,
|
||||
static int open_sensors(const struct hw_module_t* module, const char* name,
|
||||
struct hw_device_t** device);
|
||||
|
||||
static bool starts_with(const char* s, const char* prefix) {
|
||||
if (s == NULL || prefix == NULL) {
|
||||
return false;
|
||||
}
|
||||
size_t s_size = strlen(s);
|
||||
size_t prefix_size = strlen(prefix);
|
||||
return s_size >= prefix_size && strncmp(s, prefix, prefix_size) == 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds valid paths from the config file to the vector passed in.
|
||||
* The vector must not be null.
|
||||
|
Loading…
Reference in New Issue
Block a user