[sensors] extend functionality of injectSensorData
Extend injectSensorData functionality to also take
SENSOR_TYPE_ADDITIONAL_INFO type for parameter download.
Defined new AINFO constants
AINFO_LOCAL_GEOMAGNETIC_FIELD
AINFO_LOCAL_GRAVITY
AINFO_DOCK_STATE
AINFO_HIGH_PERFORMANCE_MODE
AINFO_MAGNETIC_FIELD_CALIBRATION
Test: manual
Change-Id: I642fa1048ad600cc87c029ec18e73b3411631032
diff --git a/sensors/1.0/ISensors.hal b/sensors/1.0/ISensors.hal
index a60cc10..c929ef8 100644
--- a/sensors/1.0/ISensors.hal
+++ b/sensors/1.0/ISensors.hal
@@ -127,12 +127,26 @@
flush(int32_t sensorHandle) generates (Result result);
/*
- * Inject a single sensor sample to this device.
- * data points to the sensor event to be injected
- * Returns OK on success
- * PERMISSION_DENIED if operation is not allowed
- * INVALID_OPERATION, if this functionality is unsupported
- * BAD_VALUE if sensor event cannot be injected
+ * Inject a single sensor event or push operation environment parameters to
+ * device.
+ *
+ * When device is in NORMAL mode, this function is called to push operation
+ * environment data to device. In this operation, Event is always of
+ * SensorType::AdditionalInfo type. See operation evironment parameters
+ * section in AdditionalInfoType.
+ *
+ * When device is in DATA_INJECTION mode, this function is also used for
+ * injecting sensor events.
+ *
+ * Regardless of OperationMode, injected SensorType::ADDITIONAL_INFO
+ * type events should not be routed back to poll() function.
+ *
+ * @see AdditionalInfoType
+ * @see OperationMode
+ * @param event sensor event to be injected
+ * @return result OK on success; PERMISSION_DENIED if operation is not
+ * allowed; INVALID_OPERATION, if this functionality is
+ * unsupported; BAD_VALUE if sensor event cannot be injected.
*/
injectSensorData(Event event) generates (Result result);