Loading include/input/InputDevice.h +5 −5 Original line number Diff line number Diff line Loading @@ -111,12 +111,12 @@ enum class InputDeviceSensorType : int32_t { }; enum class InputDeviceSensorAccuracy : int32_t { ACCURACY_NONE = 0, ACCURACY_LOW = 1, ACCURACY_MEDIUM = 2, ACCURACY_HIGH = 3, NONE = 0, LOW = 1, MEDIUM = 2, HIGH = 3, ftl_last = ACCURACY_HIGH, ftl_last = HIGH, }; enum class InputDeviceSensorReportingMode : int32_t { Loading services/inputflinger/reader/mapper/SensorInputMapper.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ SensorInputMapper::Sensor SensorInputMapper::createSensor(InputDeviceSensorType // One input device can only have 1 sensor for each sensor Type. InputDeviceSensorInfo sensorInfo(identifier.name, std::to_string(identifier.vendor), identifier.version, sensorType, InputDeviceSensorAccuracy::ACCURACY_HIGH, InputDeviceSensorAccuracy::HIGH, /*maxRange=*/axis.max, /*resolution=*/axis.scale, /*power=*/config.getFloat(prefix + ".power").value_or(0.0f), /*minDelay=*/config.getInt(prefix + ".minDelay").value_or(0), Loading services/inputflinger/reader/mapper/SensorInputMapper.h +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ private: std::array<int32_t, SENSOR_VEC_LEN> dataVec; void resetValue() { this->enabled = false; this->accuracy = InputDeviceSensorAccuracy::ACCURACY_NONE; this->accuracy = InputDeviceSensorAccuracy::NONE; this->samplingPeriod = std::chrono::nanoseconds(0); this->maxBatchReportLatency = std::chrono::nanoseconds(0); this->lastSampleTimeNs = std::nullopt; Loading services/inputflinger/tests/SensorInputMapper_test.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ TEST_F(SensorInputMapperTest, ProcessAccelerometerSensor) { ASSERT_EQ(arg.source, AINPUT_SOURCE_SENSOR); ASSERT_EQ(arg.deviceId, DEVICE_ID); ASSERT_EQ(arg.sensorType, InputDeviceSensorType::ACCELEROMETER); ASSERT_EQ(arg.accuracy, InputDeviceSensorAccuracy::ACCURACY_HIGH); ASSERT_EQ(arg.accuracy, InputDeviceSensorAccuracy::HIGH); ASSERT_EQ(arg.hwTimestamp, ARBITRARY_TIME); ASSERT_EQ(arg.values, values); mMapper->flushSensor(InputDeviceSensorType::ACCELEROMETER); Loading Loading @@ -170,7 +170,7 @@ TEST_F(SensorInputMapperTest, ProcessGyroscopeSensor) { ASSERT_EQ(arg.source, AINPUT_SOURCE_SENSOR); ASSERT_EQ(arg.deviceId, DEVICE_ID); ASSERT_EQ(arg.sensorType, InputDeviceSensorType::GYROSCOPE); ASSERT_EQ(arg.accuracy, InputDeviceSensorAccuracy::ACCURACY_HIGH); ASSERT_EQ(arg.accuracy, InputDeviceSensorAccuracy::HIGH); ASSERT_EQ(arg.hwTimestamp, ARBITRARY_TIME); ASSERT_EQ(arg.values, values); mMapper->flushSensor(InputDeviceSensorType::GYROSCOPE); Loading Loading
include/input/InputDevice.h +5 −5 Original line number Diff line number Diff line Loading @@ -111,12 +111,12 @@ enum class InputDeviceSensorType : int32_t { }; enum class InputDeviceSensorAccuracy : int32_t { ACCURACY_NONE = 0, ACCURACY_LOW = 1, ACCURACY_MEDIUM = 2, ACCURACY_HIGH = 3, NONE = 0, LOW = 1, MEDIUM = 2, HIGH = 3, ftl_last = ACCURACY_HIGH, ftl_last = HIGH, }; enum class InputDeviceSensorReportingMode : int32_t { Loading
services/inputflinger/reader/mapper/SensorInputMapper.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ SensorInputMapper::Sensor SensorInputMapper::createSensor(InputDeviceSensorType // One input device can only have 1 sensor for each sensor Type. InputDeviceSensorInfo sensorInfo(identifier.name, std::to_string(identifier.vendor), identifier.version, sensorType, InputDeviceSensorAccuracy::ACCURACY_HIGH, InputDeviceSensorAccuracy::HIGH, /*maxRange=*/axis.max, /*resolution=*/axis.scale, /*power=*/config.getFloat(prefix + ".power").value_or(0.0f), /*minDelay=*/config.getInt(prefix + ".minDelay").value_or(0), Loading
services/inputflinger/reader/mapper/SensorInputMapper.h +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ private: std::array<int32_t, SENSOR_VEC_LEN> dataVec; void resetValue() { this->enabled = false; this->accuracy = InputDeviceSensorAccuracy::ACCURACY_NONE; this->accuracy = InputDeviceSensorAccuracy::NONE; this->samplingPeriod = std::chrono::nanoseconds(0); this->maxBatchReportLatency = std::chrono::nanoseconds(0); this->lastSampleTimeNs = std::nullopt; Loading
services/inputflinger/tests/SensorInputMapper_test.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ TEST_F(SensorInputMapperTest, ProcessAccelerometerSensor) { ASSERT_EQ(arg.source, AINPUT_SOURCE_SENSOR); ASSERT_EQ(arg.deviceId, DEVICE_ID); ASSERT_EQ(arg.sensorType, InputDeviceSensorType::ACCELEROMETER); ASSERT_EQ(arg.accuracy, InputDeviceSensorAccuracy::ACCURACY_HIGH); ASSERT_EQ(arg.accuracy, InputDeviceSensorAccuracy::HIGH); ASSERT_EQ(arg.hwTimestamp, ARBITRARY_TIME); ASSERT_EQ(arg.values, values); mMapper->flushSensor(InputDeviceSensorType::ACCELEROMETER); Loading Loading @@ -170,7 +170,7 @@ TEST_F(SensorInputMapperTest, ProcessGyroscopeSensor) { ASSERT_EQ(arg.source, AINPUT_SOURCE_SENSOR); ASSERT_EQ(arg.deviceId, DEVICE_ID); ASSERT_EQ(arg.sensorType, InputDeviceSensorType::GYROSCOPE); ASSERT_EQ(arg.accuracy, InputDeviceSensorAccuracy::ACCURACY_HIGH); ASSERT_EQ(arg.accuracy, InputDeviceSensorAccuracy::HIGH); ASSERT_EQ(arg.hwTimestamp, ARBITRARY_TIME); ASSERT_EQ(arg.values, values); mMapper->flushSensor(InputDeviceSensorType::GYROSCOPE); Loading