summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2014-05-12 17:14:56 -0700
committerAravind Akella <aakella@google.com>2014-05-12 17:15:59 -0700
commitd35e3af04d4b7e850a3b87b2211d1a3993f9b76f (patch)
tree51c11cfc394f04c96186d3509a3aa8a1964efc9a
parentb66019615da8750588f1233a77b9c686b0a248c3 (diff)
downloadframeworks_native-d35e3af04d4b7e850a3b87b2211d1a3993f9b76f.zip
frameworks_native-d35e3af04d4b7e850a3b87b2211d1a3993f9b76f.tar.gz
frameworks_native-d35e3af04d4b7e850a3b87b2211d1a3993f9b76f.tar.bz2
Set default values for FifoMaxEventCount and ReservedEventCount.
Change-Id: I4f610c2912ffe1697d1ffb99c556d1c88578466e
-rw-r--r--libs/gui/Sensor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/gui/Sensor.cpp b/libs/gui/Sensor.cpp
index 6f1a3f2..8f63870 100644
--- a/libs/gui/Sensor.cpp
+++ b/libs/gui/Sensor.cpp
@@ -54,6 +54,9 @@ Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion)
if (halVersion >= SENSORS_DEVICE_API_VERSION_1_1) {
mFifoReservedEventCount = hwSensor->fifoReservedEventCount;
mFifoMaxEventCount = hwSensor->fifoMaxEventCount;
+ } else {
+ mFifoReservedEventCount = 0;
+ mFifoMaxEventCount = 0;
}
// Ensure existing sensors have correct string type and required