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

Commit 6528410d authored by Jim Kaye's avatar Jim Kaye Committed by android-build-merger
Browse files

Fix enforcement of sensor's slowest rate

am: 663720b2

Change-Id: I31ff9da171baa83318bc794553c7057b18be2dec
parents 063a517c 663720b2
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1250,7 +1250,7 @@ status_t SensorService::enable(const sp<SensorEventConnection>& connection,
    }

    // Check maximum delay for the sensor.
    nsecs_t maxDelayNs = sensor->getSensor().getMaxDelay() * 1000;
    nsecs_t maxDelayNs = sensor->getSensor().getMaxDelay() * 1000LL;
    if (maxDelayNs > 0 && (samplingPeriodNs > maxDelayNs)) {
        samplingPeriodNs = maxDelayNs;
    }
@@ -1511,4 +1511,3 @@ bool SensorService::isOperationRestricted(const String16& opPackageName) {
}

}; // namespace android