From 050b56244ff46d43e4886018d7cd20f0b1dc02b9 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 29 Jul 2010 16:51:38 -0700 Subject: Added SensorManager.getMinDelay() Exposed the new "min delay" sensor property through native and java sensor apis. This allows the caller to know what is the maximum rate at which a sensor can return events, or, if a sensor works in "update" mode (events returned only when the value changes). Also augmented SensorManager.regusterSensorEvent() so that it can accept a value in microsecond in addition to the 4 constants already defined. Change-Id: If425e9979892666df8c989d7de3c362230fa19e0 --- native/android/sensor.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'native/android') diff --git a/native/android/sensor.cpp b/native/android/sensor.cpp index e1fc4e7..db534e0 100644 --- a/native/android/sensor.cpp +++ b/native/android/sensor.cpp @@ -149,3 +149,7 @@ float ASensor_getResolution(ASensor const* sensor) return static_cast(sensor)->getResolution(); } +int ASensor_getMinDelay(ASensor const* sensor) +{ + return static_cast(sensor)->getMinDelay(); +} -- cgit v1.1