Merge "SensorService now always clamps the requested rate" into ics-mr1
This commit is contained in:
committed by
Android (Google) Code Review
commit
393e2c1f7a
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user