Set DATA_INJECTION mode flag for sensors.

Bug: 24001171
Change-Id: I70133546c68fb478b2c2062f05a4164a36cd9e4b
This commit is contained in:
Aravind Akella 2015-09-10 14:52:31 -07:00
parent d213f5e7a4
commit f9b7f8548e
1 changed files with 5 additions and 0 deletions

View File

@ -241,6 +241,11 @@ Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion)
break;
}
// Set DATA_INJECTION flag here. Defined in HAL 1_4.
if (halVersion >= SENSORS_DEVICE_API_VERSION_1_4) {
mFlags |= (hwSensor->flags & DATA_INJECTION_MASK);
}
// For the newer HALs log errors if reporting mask flags are set incorrectly.
if (halVersion >= SENSORS_DEVICE_API_VERSION_1_3) {
// Wake-up flag is set here.