diff options
-rw-r--r-- | sensors/aidl/default/Sensor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sensors/aidl/default/Sensor.cpp b/sensors/aidl/default/Sensor.cpp index 50d8841b2a..62193d6c9b 100644 --- a/sensors/aidl/default/Sensor.cpp +++ b/sensors/aidl/default/Sensor.cpp @@ -52,10 +52,10 @@ const SensorInfo& Sensor::getSensorInfo() const { } void Sensor::batch(int64_t samplingPeriodNs) { - if (samplingPeriodNs < mSensorInfo.minDelayUs * 1000ll) { - samplingPeriodNs = mSensorInfo.minDelayUs * 1000ll; - } else if (samplingPeriodNs > mSensorInfo.maxDelayUs * 1000ll) { - samplingPeriodNs = mSensorInfo.maxDelayUs * 1000ll; + if (samplingPeriodNs < mSensorInfo.minDelayUs * 1000LL) { + samplingPeriodNs = mSensorInfo.minDelayUs * 1000LL; + } else if (samplingPeriodNs > mSensorInfo.maxDelayUs * 1000LL) { + samplingPeriodNs = mSensorInfo.maxDelayUs * 1000LL; } if (mSamplingPeriodNs != samplingPeriodNs) { |