summaryrefslogtreecommitdiff
path: root/native/android/sensor.cpp
AgeCommit message (Collapse)Author
2019-01-18Add ASensorEventQueue_requestAdditionalInfoEventsBrian Stack
Implements the ASensorEventQueue_requestAdditionalInfoEvents which allows for a client to request additional information sensor events. Bug: 77276247 Test: Verified additional information events are only delivered to NDK clients that have explicitly requested them through the ASensorEventQueue_requestAdditionalInfoEvents function Change-Id: I304ba73908e5dd3eec61360d26e5321d442c6077
2019-01-11Introduce ASensor_getHandle API to Sensors NDKBrian Stack
Adds the ASensor_getHandle API to the Sensors NDK which returns a sensors internal sensor handle. Bug: 122366555 Test: Builds, verified function returns correct handle Change-Id: I1358528d2e7ee2918d5f5c2195d51adaa2cc3661
2017-04-17Include vndk/hardware_buffer.h for AHardwareBuffer_getNativeHandleJesse Hall
This function is now VNDK-only, and not in the NDK header. Bug: 34050596 Test: build Change-Id: Id0147dbdb65157da9692e7f38b1a068be18be2b9
2017-03-07Parameter checks for sensor NDK APIs, fix map filePeng Xu
* Add parameter check for all sensor NDK APIs. * Added a previously added API (from AOSP contribution) to libandroid.map.txt file. Test: SensorNativeTest pass Change-Id: I6482a684767034f2a31d806a4cba0d6648dcabff
2017-03-06fallout of splitting libsensor out of libguiMathias Agopian
Test: compile & run Bug: treble cleanup Change-Id: Ib696126506cc9df01dcf9e09779ce05ddb69e4b6
2017-02-28Add direct sensor report NDK APIPeng Xu
Added libandroid mapping and implementation of the following API: * ASensorManager_configureDirectReport * ASensorManager_createSharedMemoryDirectChannel * ASensorManager_createHardwareBufferDirectChannel * ASensorManager_destroyDirectChannel * ASensor_getHighestDirectReportRateLevel * ASensor_isDirectChannelTypeSupported Test: cts-tradefed run cts --module CtsSensorTestCases \ --test android.hardware.cts.SensorNativeTest Bug: 30985702 Change-Id: Ic808cc50d1ecbc789944ef77a4b247dc0c83c28a
2016-03-16Sensor: Add batch support for native applicationsAniroop Mathur
Currently, it is not possible for native applications to use the sensor in batch mode. As it is a 'C' header file so function overloading is not possible. Therefore, lets add a new function to enable the sensor, set the delay and batch timeout, all together. Change-Id: I565ec2d945d57f31ae11ed43bf9ba351aebd67a0 Signed-off-by: Aniroop Mathur <a.mathur@samsung.com>
2015-07-30Call getInstanceForPackage instead of creating a new SensorManager instance.Aravind Akella
Bug: 22529981 Change-Id: If077e042a4af940dfb1fc9c4ac8b9d352dd32685
2015-07-29Revert "Call getInstanceForPackage instead of creating a new SensorManager ↵Narayan Kamath
instance." This reverts commit 5967ddbf05f146bdb6744207e3daed1aa76fc637. Change-Id: I6d58129585a30d7c2ef39c8cbe796fd696c93f56
2015-07-27Call getInstanceForPackage instead of creating a new SensorManager instance.Aravind Akella
Bug: 22529981 Change-Id: Id3adfbcf55d1268db1a555c72a06456a5219c086
2015-05-07Fix broke NDK sensor manager APISvet Ganov
Change-Id: I0f4e2a3ce20ce20e0aa5a7d38d1f988497c033c0
2015-05-01Add body sensors app op - framework baseSvet Ganov
Change-Id: Idd5cd573fab3405e5b2a6e51d2d9d115650826e9
2014-08-05Sensor related changes for NDK.Aravind Akella
i) Add ASensor_isWakeUpSensor and ASensorManager_getDefaultSensorEx methods. Bug: 16399898 Change-Id: Icc252aad068fa337bef8b22f20584f98cd5a155d
2014-06-09Add java APIs for Sensor reportingMode.Aravind Akella
Change-Id: Iba6bb11f990d9966b86bf02d70ced7312f3e64a8
2014-05-23am c7153377: am 73da981f: Merge "Remove getRequiredPermission from NDK." ↵Aravind Akella
into klp-modular-dev * commit 'c7153377cf03303e97185397544a13971a089961': Remove getRequiredPermission from NDK.
2014-05-22Remove getRequiredPermission from NDK.Aravind Akella
Change-Id: Ieb1e97e44ef335e6087ba9164058fe3535e9998a
2014-04-23Bug fix for wakeup sensors.Aravind Akella
SensorService should hold a wakelock till the app reads events from a wakeup sensor. Currently drivers hold a wakelock with a timeout while delivering events from a wake up sensor like Significant Motion. This hack can be removed now. Bug: 9774884 Change-Id: I6cab0147c63f57a494a61f4dfe2a64a27dfe1b4e
2014-04-11Add stringType and requiredPermissions to SensorManager.java, as well as a ↵Aravind Akella
permission for the heart rate sensor This reverts commit 819239e5bec90ee3c861ac45fffac4a832a183a1. Change-Id: I4bbb222e5c9dc65aed03aa28fd9e0f00fe335819
2014-04-05Revert "Add stringType and requiredPermissions to SensorManager.java, as ↵Etienne Le Grand
well as a permission for the heart rate sensor" This reverts commit fd53d8352a4617941b0a0449390aa562a01ea1d3. Change-Id: I1c6322d1d992147bb5ef201238374966128c1a61
2014-04-04Add stringType and requiredPermissions to SensorManager.java, as well as a ↵Etienne Le Grand
permission for the heart rate sensor Change-Id: I16e5da68f860494e24cca64075be76fad02617bc
2010-09-14Replace epoll() with poll() and rename PollLoop to Looper.Jeff Brown
As part of this change, consolidated and cleaned up the Looper API so that there are fewer distinctions between the NDK and non-NDK declarations (no need for two callback types, etc.). Removed the dependence on specific constants from sys/poll.h such as POLLIN. Instead looper.h defines events like LOOPER_EVENT_INPUT for the events that it supports. That should help make any future under-the-hood implementation changes easier. Fixed a couple of compiler warnings along the way. Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae
2010-09-07Modify native ALooper to take an explicit ident.Dianne Hackborn
The ALooper API now uses an explicit "identifier" for the integer that is returned rather than implicitly using the fd. This allows the APIs that had the fd to be a little more sane. Change-Id: I8507f535ad484c0bdc4a1bd016d87bb09acd7ff0
2010-07-29Added SensorManager.getMinDelay()Mathias Agopian
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
2010-07-19new SensorServiceMathias Agopian
remove old sensor service and implement SensorManager on top of the new (native) SensorManger API. Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
2010-07-13first step at implementing the native sensor supportMathias Agopian
in this commit: - implemented the C stub - implemented the binder interfaces involved - implemented most of the C++ client side missing: - SensorManager cannot connect to the SensorServer yet (because there is no SensorServer yet) Change-Id: I75010cbeef31c98d6fa62fd5d388dcef87c2636b