Add missing LOW_LATENCY_OFFBODY_DETECT handling
Bug: 36580454
Test: unlock watch with LLOB sensor and verify no SensorService crash
Change-Id: Ib1d086efd80e829bb844521fa39325f095b1c2c9
Signed-off-by: Ben Fennema <fennema@google.com>
diff --git a/sensors/1.0/default/convert.cpp b/sensors/1.0/default/convert.cpp
index 306d3a3..3d859ec 100644
--- a/sensors/1.0/default/convert.cpp
+++ b/sensors/1.0/default/convert.cpp
@@ -137,6 +137,7 @@
case SensorType::STATIONARY_DETECT:
case SensorType::MOTION_DETECT:
case SensorType::HEART_BEAT:
+ case SensorType::LOW_LATENCY_OFFBODY_DETECT:
{
dst->u.scalar = src.data[0];
break;
@@ -280,6 +281,7 @@
case SensorType::STATIONARY_DETECT:
case SensorType::MOTION_DETECT:
case SensorType::HEART_BEAT:
+ case SensorType::LOW_LATENCY_OFFBODY_DETECT:
{
dst->data[0] = src.u.scalar;
break;
diff --git a/sensors/1.0/types.hal b/sensors/1.0/types.hal
index c0d8c5d..efb18c6 100644
--- a/sensors/1.0/types.hal
+++ b/sensors/1.0/types.hal
@@ -1148,7 +1148,8 @@
* SensorType::TILT_DETECTOR, SensorType::WAKE_GESTURE,
* SensorType::GLANCE_GESTURE, SensorType::PICK_UP_GESTURE,
* SensorType::WRIST_TILT_GESTURE, SensorType::STATIONARY_DETECT,
- * SensorType::MOTION_DETECT, SensorType::HEART_BEAT
+ * SensorType::MOTION_DETECT, SensorType::HEART_BEAT,
+ * SensorType::LOW_LATENCY_OFFBODY_DETECT
*/
float scalar;
diff --git a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
index d21b512..a65c7b8 100644
--- a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
+++ b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
@@ -722,6 +722,7 @@
case SensorType::DEVICE_ORIENTATION:
case SensorType::MOTION_DETECT:
case SensorType::STEP_COUNTER:
+ case SensorType::LOW_LATENCY_OFFBODY_DETECT:
return SensorFlagBits::ON_CHANGE_MODE;
case SensorType::SIGNIFICANT_MOTION: