summaryrefslogtreecommitdiffstats
path: root/include/android/sensor.h
diff options
context:
space:
mode:
authorEtienne Le Grand <etn@google.com>2014-03-24 21:28:23 -0700
committerEtienne Le Grand <etn@google.com>2014-04-04 16:31:09 -0700
commitc57a019e117117c5a76c772970b26cd0f5db8c6a (patch)
tree563080645a4a4a0fefeac91229ec46730bd6e1c7 /include/android/sensor.h
parentad98ad0493625578f19c727576d02725b82f927c (diff)
downloadframeworks_native-c57a019e117117c5a76c772970b26cd0f5db8c6a.zip
frameworks_native-c57a019e117117c5a76c772970b26cd0f5db8c6a.tar.gz
frameworks_native-c57a019e117117c5a76c772970b26cd0f5db8c6a.tar.bz2
Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
Change-Id: If0f3dbdb5d2e9378e1fed4614baee4e750d0c850
Diffstat (limited to 'include/android/sensor.h')
-rw-r--r--include/android/sensor.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/android/sensor.h b/include/android/sensor.h
index 129ea3e..b4e7ebe 100644
--- a/include/android/sensor.h
+++ b/include/android/sensor.h
@@ -281,6 +281,28 @@ float ASensor_getResolution(ASensor const* sensor);
*/
int ASensor_getMinDelay(ASensor const* sensor);
+/*
+ * Returns the maximum size of batches for this sensor. Batches will often be
+ * smaller, as the hardware fifo might be used for other sensors.
+ */
+int ASensor_getFifoMaxEventCount(ASensor const* sensor);
+
+/*
+ * Returns the hardware batch fifo size reserved to this sensor.
+ */
+int ASensor_getFifoReservedEventCount(ASensor const* sensor);
+
+/*
+ * Returns this sensor's string type.
+ */
+const char* ASensor_getStringType(ASensor const* sensor);
+
+/*
+ * Returns the permission required to see or access this sensor, or the
+ * empty string if none is required.
+ */
+const char* ASensor_getRequiredPermission(ASensor const* sensor);
+
#ifdef __cplusplus
};