From 7ff9564b20b4a94f91e971694f27d3368d7bb6c5 Mon Sep 17 00:00:00 2001 From: Brian Stack Date: Mon, 1 Oct 2018 16:06:39 -0700 Subject: [PATCH] Require consistent getSensorsList Require that the values returned from getSensorsList do not change before the entire system reboots. The values must be stable even across Sensors HAL restarts. This allows for the framework to automatically re-establish connections if the Sensors HAL crashes. Bug: 111070257 Test: Compiles Change-Id: I0e4b7d6ef8f89f6780c6a14d67465fd3692cd482 --- sensors/2.0/ISensors.hal | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sensors/2.0/ISensors.hal b/sensors/2.0/ISensors.hal index 2a57251103..939bf73715 100644 --- a/sensors/2.0/ISensors.hal +++ b/sensors/2.0/ISensors.hal @@ -27,6 +27,13 @@ import @2.0::ISensorsCallback; interface ISensors { /** * Enumerate all available (static) sensors. + * + * The SensorInfo for each sensor returned by getSensorsList must be stable + * from the initial call to getSensorsList after a device boot until the + * entire system restarts. The SensorInfo for each sensor must not change + * between subsequent calls to getSensorsList, even across restarts of the + * HAL and its dependencies (for example, the sensor handle for a given + * sensor must not change across HAL restarts). */ getSensorsList() generates (vec list);