Add wake gesture in Sensor.cpp

Change-Id: Ifb1744acffc2d57da43112fb9966261e8246d6de
This commit is contained in:
Etienne Le Grand 2014-05-07 19:49:05 -07:00
parent c6e0c64632
commit e284a90f50

View File

@ -203,6 +203,10 @@ Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion)
mRequiredPermission = SENSOR_PERMISSION_BODY_SENSORS; mRequiredPermission = SENSOR_PERMISSION_BODY_SENSORS;
mWakeUpSensor = true; mWakeUpSensor = true;
break; break;
case SENSOR_TYPE_WAKE_GESTURE:
mStringType = SENSOR_STRING_TYPE_WAKE_GESTURE;
mWakeUpSensor = true;
break;
default: default:
// Only pipe the stringType, requiredPermission and flags for custom sensors. // Only pipe the stringType, requiredPermission and flags for custom sensors.
if (halVersion >= SENSORS_DEVICE_API_VERSION_1_2 && hwSensor->stringType) { if (halVersion >= SENSORS_DEVICE_API_VERSION_1_2 && hwSensor->stringType) {