From 9bb99b1570a1715cce1d02a776c06f1596d61ecd Mon Sep 17 00:00:00 2001 From: Nick Vaccaro Date: Wed, 21 Jan 2015 15:27:23 -0800 Subject: [PATCH] Add support for SENSOR_TYPE_WRIST_TILT_GESTURE Change-Id: I7e5516de805618df41de0f9b06805002e32708c3 --- libs/gui/Sensor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/gui/Sensor.cpp b/libs/gui/Sensor.cpp index b4291bb7c..41a45fcc1 100644 --- a/libs/gui/Sensor.cpp +++ b/libs/gui/Sensor.cpp @@ -204,6 +204,13 @@ Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion) mFlags |= SENSOR_FLAG_WAKE_UP; } break; + case SENSOR_TYPE_WRIST_TILT_GESTURE: + mStringType = SENSOR_STRING_TYPE_WRIST_TILT_GESTURE; + mFlags |= SENSOR_FLAG_SPECIAL_REPORTING_MODE; + if (halVersion < SENSORS_DEVICE_API_VERSION_1_3) { + mFlags |= SENSOR_FLAG_WAKE_UP; + } + break; default: // Only pipe the stringType, requiredPermission and flags for custom sensors. if (halVersion > SENSORS_DEVICE_API_VERSION_1_0 && hwSensor->stringType) {