Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64370354 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

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

* commit '393e2c1f':
  SensorService now always clamps the requested rate
parents 3b2681ba 393e2c1f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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)