Merge "Remove WAKE_UP_* sensor constants." into lmp-dev
This commit is contained in:
commit
330cf47336
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user