mirror of
https://github.com/S3NEO/android_device_samsung_msm8226-common.git
synced 2024-11-06 21:55:45 +00:00
msm8226-common: sensors: Update multihal with P changes
Change-Id: Iee33e9043e5f4eb9b5ff8af562800e0392c041b5
This commit is contained in:
parent
39f1b3c1b0
commit
a6b44992f2
3 changed files with 8 additions and 12 deletions
|
@ -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 \
|
||||
|
|
|
@ -406,6 +406,7 @@ static int device__close(struct hw_device_t *dev) {
|
|||
if (ctx != NULL) {
|
||||
int retval = ctx->close();
|
||||
delete ctx;
|
||||
return retval;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -456,15 +457,6 @@ static int device__inject_sensor_data(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 a new issue