hidl: sensors: add hover proximity sensor support

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

Change-Id: I3d5d7de2f6ef7877490fa36968a4c07e0ac1e40e
tirimbino
A2L5E0X1 3 years ago committed by jro1979oliver
parent 03cc89d84c
commit 1a366adc07
  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 = "";
}
if (dst.typeAsString == "com.samsung.sensor.physical_proximity") {
ALOGI("Fixing com.samsung.sensor.physical_proximity");
if (dst.typeAsString == "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.typeAsString = SENSOR_STRING_TYPE_PROXIMITY;
dst.maxRange = 1;

Loading…
Cancel
Save