summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2015-10-14 21:08:15 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-14 21:08:15 +0000
commit6427e7190bbd83a29169e6ae4b5e3cff263f6937 (patch)
tree1a26bcab4226d26c54ad2bad041522d8007707d2
parenta518d5ad0c0c6a661471a8cd2c962612943ca667 (diff)
parent2ac7405bda4f621f07cbcc0b562d16f7a9611c7b (diff)
downloadframeworks_native-6427e7190bbd83a29169e6ae4b5e3cff263f6937.zip
frameworks_native-6427e7190bbd83a29169e6ae4b5e3cff263f6937.tar.gz
frameworks_native-6427e7190bbd83a29169e6ae4b5e3cff263f6937.tar.bz2
am 2ac7405b: Merge "Set DATA_INJECTION mode flag for sensors." into mnc-dr-dev
* commit '2ac7405bda4f621f07cbcc0b562d16f7a9611c7b': Set DATA_INJECTION mode flag for sensors.
-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.