summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2015-09-10 14:52:31 -0700
committerAravind Akella <aakella@google.com>2015-09-11 11:33:49 -0700
commitf9b7f8548eb95f2c387c4c2331acfaa04b6099b8 (patch)
tree8977489d8506e2f86d8fd0d38143cea4c8c54e06 /libs
parentd213f5e7a4bee477c707fc428cb24aa503971ef1 (diff)
downloadframeworks_native-f9b7f8548eb95f2c387c4c2331acfaa04b6099b8.zip
frameworks_native-f9b7f8548eb95f2c387c4c2331acfaa04b6099b8.tar.gz
frameworks_native-f9b7f8548eb95f2c387c4c2331acfaa04b6099b8.tar.bz2
Set DATA_INJECTION mode flag for sensors.
Bug: 24001171 Change-Id: I70133546c68fb478b2c2062f05a4164a36cd9e4b
Diffstat (limited to 'libs')
-rw-r--r--libs/gui/Sensor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/gui/Sensor.cpp b/libs/gui/Sensor.cpp
index 2545eec..1b8d06e 100644
--- a/libs/gui/Sensor.cpp
+++ b/libs/gui/Sensor.cpp
@@ -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.