From fd8498c41e8904e3636e47cf81466d439aed46a8 Mon Sep 17 00:00:00 2001 From: Aravind Akella Date: Mon, 28 Jul 2014 18:01:11 -0700 Subject: [PATCH] Remove WAKE_UP_* sensor constants. Change-Id: I3de9d114ce82de4ed841932747d72e1f6f73c24f --- libs/gui/Sensor.cpp | 81 +++------------------------------------------ 1 file changed, 4 insertions(+), 77 deletions(-) diff --git a/libs/gui/Sensor.cpp b/libs/gui/Sensor.cpp index 2103a9523..613b8e215 100644 --- a/libs/gui/Sensor.cpp +++ b/libs/gui/Sensor.cpp @@ -166,83 +166,6 @@ Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion) mStringType = SENSOR_STRING_TYPE_TEMPERATURE; mFlags |= SENSOR_FLAG_ON_CHANGE_MODE; break; - case SENSOR_TYPE_NON_WAKE_UP_PROXIMITY_SENSOR: - mStringType = SENSOR_STRING_TYPE_NON_WAKE_UP_PROXIMITY_SENSOR; - mFlags |= SENSOR_FLAG_ON_CHANGE_MODE; - break; - case SENSOR_TYPE_WAKE_UP_ACCELEROMETER: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_ACCELEROMETER; - mFlags |= (SENSOR_FLAG_CONTINUOUS_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_MAGNETIC_FIELD: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_MAGNETIC_FIELD; - mFlags |= (SENSOR_FLAG_CONTINUOUS_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_ORIENTATION: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_ORIENTATION; - mFlags |= (SENSOR_FLAG_CONTINUOUS_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_GYROSCOPE: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_GYROSCOPE; - mFlags |= (SENSOR_FLAG_CONTINUOUS_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_LIGHT: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_LIGHT; - mFlags |= (SENSOR_FLAG_ON_CHANGE_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_PRESSURE: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_PRESSURE; - mFlags |= (SENSOR_FLAG_CONTINUOUS_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_GRAVITY: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_GRAVITY; - mFlags |= (SENSOR_FLAG_CONTINUOUS_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_LINEAR_ACCELERATION: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_LINEAR_ACCELERATION; - mFlags |= (SENSOR_FLAG_CONTINUOUS_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_ROTATION_VECTOR: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_ROTATION_VECTOR; - mFlags |= (SENSOR_FLAG_CONTINUOUS_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_RELATIVE_HUMIDITY: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_RELATIVE_HUMIDITY; - mFlags |= (SENSOR_FLAG_SPECIAL_REPORTING_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_AMBIENT_TEMPERATURE: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_AMBIENT_TEMPERATURE; - mFlags |= (SENSOR_FLAG_ON_CHANGE_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_MAGNETIC_FIELD_UNCALIBRATED: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_MAGNETIC_FIELD_UNCALIBRATED; - mFlags |= (SENSOR_FLAG_CONTINUOUS_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_GAME_ROTATION_VECTOR: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_GAME_ROTATION_VECTOR; - mFlags |= (SENSOR_FLAG_CONTINUOUS_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_GYROSCOPE_UNCALIBRATED: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_GYROSCOPE_UNCALIBRATED; - mFlags |= (SENSOR_FLAG_CONTINUOUS_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_STEP_DETECTOR: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_STEP_DETECTOR; - mFlags |= (SENSOR_FLAG_SPECIAL_REPORTING_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_STEP_COUNTER: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_STEP_COUNTER; - mFlags |= (SENSOR_FLAG_ON_CHANGE_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_GEOMAGNETIC_ROTATION_VECTOR: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_GEOMAGNETIC_ROTATION_VECTOR; - mFlags |= (SENSOR_FLAG_CONTINUOUS_MODE | SENSOR_FLAG_WAKE_UP); - break; - case SENSOR_TYPE_WAKE_UP_HEART_RATE: - mStringType = SENSOR_STRING_TYPE_WAKE_UP_HEART_RATE; - mRequiredPermission = SENSOR_PERMISSION_BODY_SENSORS; - mFlags |= (SENSOR_FLAG_ON_CHANGE_MODE | SENSOR_FLAG_WAKE_UP); - break; case SENSOR_TYPE_WAKE_UP_TILT_DETECTOR: mStringType = SENSOR_STRING_TYPE_WAKE_UP_TILT_DETECTOR; mFlags |= (SENSOR_FLAG_SPECIAL_REPORTING_MODE | SENSOR_FLAG_WAKE_UP); @@ -255,6 +178,10 @@ Sensor::Sensor(struct sensor_t const* hwSensor, int halVersion) mStringType = SENSOR_STRING_TYPE_GLANCE_GESTURE; mFlags |= (SENSOR_FLAG_ONE_SHOT_MODE | SENSOR_FLAG_WAKE_UP); break; + case SENSOR_TYPE_PICK_UP_GESTURE: + mStringType = SENSOR_STRING_TYPE_PICK_UP_GESTURE; + mFlags |= (SENSOR_FLAG_ONE_SHOT_MODE | SENSOR_FLAG_WAKE_UP); + break; default: // Only pipe the stringType, requiredPermission and flags for custom sensors. if (halVersion >= SENSORS_DEVICE_API_VERSION_1_2 && hwSensor->stringType) {