summaryrefslogtreecommitdiffstats
path: root/include/android
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2014-08-05 14:53:07 -0700
committerAravind Akella <aakella@google.com>2014-08-05 17:17:51 -0700
commitb37ba399c1521c3eba40e126f65d9663532de446 (patch)
tree8d9328a72191c68af0ee0990362ca45136ef1adc /include/android
parenta02e9484be6894f8a4db7049d432f534a4e0a676 (diff)
downloadframeworks_native-b37ba399c1521c3eba40e126f65d9663532de446.zip
frameworks_native-b37ba399c1521c3eba40e126f65d9663532de446.tar.gz
frameworks_native-b37ba399c1521c3eba40e126f65d9663532de446.tar.bz2
Sensor related changes for NDK.
i) ASensorManager_getDefaultSensor returns a wake-up/non wake-up sensor depending on the type. ii) Add ASensor_isWakeUpSensor and ASensorManager_getDefaultSensorEx methods. Bug : 16399898 Change-Id: I1a86fb8d9de23039fdf41679d1487e1cd761a9d0
Diffstat (limited to 'include/android')
-rw-r--r--include/android/sensor.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/android/sensor.h b/include/android/sensor.h
index 77a5a1c..d58c460 100644
--- a/include/android/sensor.h
+++ b/include/android/sensor.h
@@ -210,11 +210,18 @@ int ASensorManager_getSensorList(ASensorManager* manager, ASensorList* list);
/*
* Returns the default sensor for the given type, or NULL if no sensor
- * of that type exist.
+ * of that type exists.
*/
ASensor const* ASensorManager_getDefaultSensor(ASensorManager* manager, int type);
/*
+ * Returns the default sensor with the given type and wakeUp properties or NULL if no sensor
+ * of this type and wakeUp properties exists.
+ */
+ASensor const* ASensorManager_getDefaultSensorEx(ASensorManager* manager, int type,
+ bool wakeUp);
+
+/*
* Creates a new sensor event queue and associate it with a looper.
*/
ASensorEventQueue* ASensorManager_createEventQueue(ASensorManager* manager,
@@ -321,6 +328,11 @@ const char* ASensor_getStringType(ASensor const* sensor);
*/
int ASensor_getReportingMode(ASensor const* sensor);
+/*
+ * Returns true if this is a wake up sensor, false otherwise.
+ */
+bool ASensor_isWakeUpSensor(ASensor const* sensor);
+
#ifdef __cplusplus
};
#endif