am 393e2c1f: Merge "SensorService now always clamps the requested rate" into ics-mr1

* commit '393e2c1f7aad37e7851643df22e4810996c26d1f':
  SensorService now always clamps the requested rate
This commit is contained in:
Mathias Agopian
2011-11-09 14:36:31 +00:00
committed by Android Git Automerger

View File

@@ -478,8 +478,9 @@ status_t SensorService::setEventRate(const sp<SensorEventConnection>& connection
if (ns < 0)
return BAD_VALUE;
if (ns == 0) {
ns = sensor->getSensor().getMinDelayNs();
nsecs_t minDelayNs = sensor->getSensor().getMinDelayNs();
if (ns < minDelayNs) {
ns = minDelayNs;
}
if (ns < MINIMUM_EVENTS_PERIOD)