summaryrefslogtreecommitdiffstats
path: root/include/android
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2015-05-07 10:50:59 -0700
committerSvetoslav <svetoslavganov@google.com>2015-05-07 12:50:27 -0700
commit5fa32d4b08843d0aeca567a173227e8e37322e8e (patch)
tree6110a5e82d8de8b2324ac3d6ee20a30193327d6b /include/android
parentcbe13ef59b25b6df226c09b9351f0f615bc68dda (diff)
downloadframeworks_native-5fa32d4b08843d0aeca567a173227e8e37322e8e.zip
frameworks_native-5fa32d4b08843d0aeca567a173227e8e37322e8e.tar.gz
frameworks_native-5fa32d4b08843d0aeca567a173227e8e37322e8e.tar.bz2
Fix broken NDK sensor manager API.
Change-Id: I21bb8b0dcfd3f1c812753a9fd77dea792e7155f2
Diffstat (limited to 'include/android')
-rw-r--r--include/android/sensor.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/android/sensor.h b/include/android/sensor.h
index 969677f..1be6232 100644
--- a/include/android/sensor.h
+++ b/include/android/sensor.h
@@ -193,6 +193,30 @@ typedef ASensorRef const* ASensorList;
/*****************************************************************************/
/*
+ * Get a reference to the sensor manager. ASensorManager is a singleton
+ * per package as different packages may have access to different sensors.
+ *
+ * Deprecated: Use ASensorManager_getInstanceForPackage(const char*) instead.
+ *
+ * Example:
+ *
+ * ASensorManager* sensorManager = ASensorManager_getInstance();
+ *
+ */
+__attribute__ ((deprecated)) ASensorManager* ASensorManager_getInstance();
+
+/*
+ * Get a reference to the sensor manager. ASensorManager is a singleton
+ * per package as different packages may have access to different sensors.
+ *
+ * Example:
+ *
+ * ASensorManager* sensorManager = ASensorManager_getInstanceForPackage("foo.bar.baz");
+ *
+ */
+ASensorManager* ASensorManager_getInstanceForPackage(const char* packageName);
+
+/*
* Returns the list of available sensors.
*/
int ASensorManager_getSensorList(ASensorManager* manager, ASensorList* list);