From: Chih-Wei Huang Date: Fri, 29 Jul 2016 07:10:51 +0000 (+0800) Subject: libsensors: workaround sensors never detected X-Git-Tag: android-x86-6.0-r1 X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fhardware-intel-libsensors.git;a=commitdiff_plain;h=refs%2Fheads%2Fmarshmallow-x86 libsensors: workaround sensors never detected Sometimes the iio:devices may not be ready at booting. Assume it's always present. If you want to detect it at runtime, set persist.sys.sensors.iio.present=0. --- diff --git a/hsb/BoardConfig.cpp b/hsb/BoardConfig.cpp index 57b4bde..f39e5d3 100644 --- a/hsb/BoardConfig.cpp +++ b/hsb/BoardConfig.cpp @@ -54,7 +54,7 @@ int BoardConfig::sensorListSize() const char *key = "persist.sys.sensors.iio.present"; char value[PROPERTY_VALUE_MAX]; - if (property_get(key, value, "")) { + if (property_get(key, value, "1")) { if (strncmp(value, "1", 1) == 0) { ALOGI("IIO sensor hub detected previously; assuming it is still attached."); return ARRAY_SIZE(sSensorList);