hidl: sensors: add hover proximity sensor support

* used by Exynos 850 devices
* requires a kernel patch in touchscreen driver to invert reported proximity values,
  see d7ab9befc3

Change-Id: I3d5d7de2f6ef7877490fa36968a4c07e0ac1e40e
urubino
A2L5E0X1 3 years ago committed by Jan Altensen
parent 0bd3ded67f
commit 047453e7cb
  1. 5
      hidl/sensors/2.1/HalProxy.cpp

@ -123,8 +123,9 @@ Return<void> HalProxy::getSensorsList_2_1(ISensorsV2_1::getSensorsList_2_1_cb _h
dst.requiredPermission = ""; dst.requiredPermission = "";
} }
if (dst.typeAsString == "com.samsung.sensor.physical_proximity") { if (dst.typeAsString == "com.samsung.sensor.physical_proximity" ||
ALOGI("Fixing com.samsung.sensor.physical_proximity"); dst.typeAsString == "com.samsung.sensor.hover_proximity") {
ALOGI("Fixing %s", dst.typeAsString.c_str());
dst.type = V2_1::SensorType::PROXIMITY; dst.type = V2_1::SensorType::PROXIMITY;
dst.typeAsString = SENSOR_STRING_TYPE_PROXIMITY; dst.typeAsString = SENSOR_STRING_TYPE_PROXIMITY;
dst.maxRange = 1; dst.maxRange = 1;

Loading…
Cancel
Save