diff --git a/services/src/sensor_manager.cpp b/services/src/sensor_manager.cpp index dcfbb3fec0db984a85c7339d2f7d881506ddaa5e..18d7897bb5d76d5bd29f54423f9d670113b6ee5e 100644 --- a/services/src/sensor_manager.cpp +++ b/services/src/sensor_manager.cpp @@ -134,10 +134,6 @@ SensorBasicInfo SensorManager::GetSensorInfo(int32_t sensorId, int64_t samplingP } int64_t curSamplingPeriodNs = (samplingPeriodNs < it->second.GetMinSamplePeriodNs()) ? it->second.GetMinSamplePeriodNs() : samplingPeriodNs; - if (it->second.GetMaxSamplePeriodNs() != 0) { - curSamplingPeriodNs = (samplingPeriodNs > it->second.GetMaxSamplePeriodNs()) ? it->second.GetMaxSamplePeriodNs() - : curSamplingPeriodNs; - } int32_t maxEventCount = it->second.GetFifoMaxEventCount(); if ((samplingPeriodNs == 0) || (maxEventCount > (INT64_MAX / samplingPeriodNs))) { SEN_HILOGE("Failed, samplingPeriodNs overflow");