OSDN Git Service
(root)
/
android-x86
/
frameworks-native.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d213f5e
)
Set DATA_INJECTION mode flag for sensors.
author
Aravind Akella
<aakella@google.com>
Thu, 10 Sep 2015 21:52:31 +0000
(14:52 -0700)
committer
Aravind Akella
<aakella@google.com>
Fri, 11 Sep 2015 18:33:49 +0000
(11:33 -0700)
Bug:
24001171
Change-Id: I70133546c68fb478b2c2062f05a4164a36cd9e4b
libs/gui/Sensor.cpp
patch
|
blob
|
history
diff --git
a/libs/gui/Sensor.cpp
b/libs/gui/Sensor.cpp
index
2545eec
..
1b8d06e
100644
(file)
--- 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.