summaryrefslogtreecommitdiffstats
path: root/libsensors/ProximitySensor.cpp
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.org>2016-04-30 20:56:15 +0200
committercodeworkx <codeworkx@cyanogenmod.org>2016-04-30 20:56:15 +0200
commit732bf7a24e16add354c45704e237cb2357d2683c (patch)
treeb25b62ef6c1715638ab3e0b7b40961d13bf32ad1 /libsensors/ProximitySensor.cpp
parent3dd3324a32a32cf6295e56b0bf7ef697d7d58bdd (diff)
parentd41c859a0678da88519a27560e75983c750155c0 (diff)
downloaddevice_samsung_n7100-732bf7a24e16add354c45704e237cb2357d2683c.zip
device_samsung_n7100-732bf7a24e16add354c45704e237cb2357d2683c.tar.gz
device_samsung_n7100-732bf7a24e16add354c45704e237cb2357d2683c.tar.bz2
Merge branch 'cm-13.0' of github.com:tilaksidduram/android_device_samsung_n7100 into HEAD
Change-Id: I492f715515d6cf681a5f6d2bc59f6929f92b7b47
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];