am b9bb1f13: Merge "Add support for SENSOR_TYPE_WRIST_TILT_GESTURE" into lmp-mr1-modular-dev

* commit 'b9bb1f139bd1cbf3b3faa002b509f3f0a167e20b':
  Add support for SENSOR_TYPE_WRIST_TILT_GESTURE
This commit is contained in:
Nick Vaccaro 2015-02-11 20:04:42 +00:00 committed by Android Git Automerger
commit 26cc3d0b67

View File

@ -204,6 +204,13 @@ Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion)
mFlags |= SENSOR_FLAG_WAKE_UP; mFlags |= SENSOR_FLAG_WAKE_UP;
} }
break; 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: 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_0 && hwSensor->stringType) { if (halVersion > SENSORS_DEVICE_API_VERSION_1_0 && hwSensor->stringType) {