[sensors] SENSOR_TYPE_DYNAMIC_SENSOR_META should be wake up
Sensor of type SENSOR_TYPE_DYNAMIC_SENSOR_META should be
wake up sensor to allow system to correctly track dynamic sensor
connectiona nd disconnection. Otherwise, connection or disconnection
event may get discarded.
Test: m cts-verifier
Test: Run "Dynamic Sensor Discovery Test" with a sensor HAL that
support dynamic sensor discovery (e.g. contexthub + ag/1189124)
Bug: 31068976
Change-Id: Ia3d860a03977318c55f7f3b751ca327b5ff1528c
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h
index 1d73c31..e83f694 100644
--- a/include/hardware/sensors.h
+++ b/include/hardware/sensors.h
@@ -798,6 +798,7 @@
/**
* SENSOR_TYPE_DYNAMIC_SENSOR_META
* trigger-mode: special
+ * wake-up sensor: yes
*
* A sensor event of this type is received when a dynamic sensor is added to or removed from the
* system. At most one sensor of this type can be present in one sensor HAL implementation and
@@ -829,6 +830,8 @@
* sensor_t, but the UUID should be unique and persistent for each individual unit. An all zero UUID
* indicates it is not possible to differentiate individual sensor unit.
*
+ * It is recommended to implement this type as wake up sensor.
+ *
*/
#define SENSOR_TYPE_DYNAMIC_SENSOR_META (32)
#define SENSOR_STRING_TYPE_DYNAMIC_SENSOR_META "android.sensor.dynamic_sensor_meta"