summaryrefslogtreecommitdiffstats
path: root/libsensors/ProximitySensor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsensors/ProximitySensor.cpp')
-rw-r--r--libsensors/ProximitySensor.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libsensors/ProximitySensor.cpp b/libsensors/ProximitySensor.cpp
index d06501e..ab7db13 100644
--- a/libsensors/ProximitySensor.cpp
+++ b/libsensors/ProximitySensor.cpp
@@ -22,8 +22,9 @@
#include <dirent.h>
#include <sys/select.h>
#include <stdio.h>
+#include <cstring>
-#include <utils/Log.h>
+#include <cutils/log.h>
#include "ProximitySensor.h"
#include "SensorBase.h"
@@ -48,6 +49,7 @@ ProximitySensor::ProximitySensor()
strcat(input_sysfs_path, input_name);
strcat(input_sysfs_path, "/device/");
input_sysfs_path_len = strlen(input_sysfs_path);
+ enable(0, 1);
}
}
@@ -71,7 +73,7 @@ int ProximitySensor::setDelay(int32_t handle, int64_t ns)
{
int fd;
- strcpy(&input_sysfs_path[input_sysfs_path_len], "prox_poll_delay");
+ strcpy(&input_sysfs_path[input_sysfs_path_len], "poll_delay");
fd = open(input_sysfs_path, O_RDWR);
if (fd >= 0) {
char buf[80];