summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2015-10-14 21:03:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-10-14 21:03:07 +0000
commit2ac7405bda4f621f07cbcc0b562d16f7a9611c7b (patch)
tree1e84f71a43565025c885ad562b73bc6f87500cf1
parent312d7555cb71ce7fb73bc758b9e30653e223b2f3 (diff)
parentf9b7f8548eb95f2c387c4c2331acfaa04b6099b8 (diff)
downloadframeworks_native-2ac7405bda4f621f07cbcc0b562d16f7a9611c7b.zip
frameworks_native-2ac7405bda4f621f07cbcc0b562d16f7a9611c7b.tar.gz
frameworks_native-2ac7405bda4f621f07cbcc0b562d16f7a9611c7b.tar.bz2
Merge "Set DATA_INJECTION mode flag for sensors." into mnc-dr-dev
-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 4b3603e..235cbbd 100644
--- a/libs/gui/Sensor.cpp
+++ b/libs/gui/Sensor.cpp
@@ -245,6 +245,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.