History log of /frameworks/native/include_sensor/android/sensor.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ffa0ad89141c718d6604ea15b66bc87f7fd496b5 24-Jan-2018 Elliott Hughes <enh@google.com> Merge "Add missing sensor types to <android/sensor.h>." am: ced274e88d am: 4dfd5da62d
am: 25889939b1

Change-Id: Ifca5bd7b646a957977cb0a6ef574155df401e24c
f78be36813c01242e9e02b92cad98cf974996942 24-Jan-2018 Elliott Hughes <enh@google.com> Add missing sensor types to <android/sensor.h>.

This matches Sensor.java
(https://developer.android.com/reference/android/hardware/Sensor.html).

I've included the types for a few of the easy cases, but I've added a
link to the Java documentation for the rest: the Java documentation is
much better and actively maintained. Duplicating it here doesn't seem
worthwhile, and <android/multinetwork.h> already takes this approach.

Bug: https://github.com/android-ndk/ndk/issues/621
Test: builds
Change-Id: Icffd85071e56bd7f45e8f3dc9d300a495859dbcb
/frameworks/native/include/android/sensor.h
070365642aaf6f1c162bfead6ecac9c11298d223 10-Aug-2017 Peng Xu <pengxu@google.com> [sensor] Clarify sequence requirement between setEventRate and enable am: 80df016c64 am: 7f112c444a
am: 9c80a8da27

Change-Id: Ie643cbad2363790443595eaa2d432db2c2019cb8
80df016c6445a6923821cc89ec115b11a5b3da37 06-Aug-2017 Peng Xu <pengxu@google.com> [sensor] Clarify sequence requirement between setEventRate and enable

Clarify sequence requirement between setEventRate and enable.
Also improved the format of doc.

Bug: 31517908
Test: compiles
Change-Id: I31865d0aea579cee3942df43cd22e1622d724d7c
/frameworks/native/include/android/sensor.h
48af4c688182afc9a2890dc629153a43df808841 09-Aug-2017 Peng Xu <pengxu@google.com> Merge "Clarify sensor NDK struct has to be backward compatible"
70b9838aed3ae09eb3b8f47c51c939fea3d9e87d 07-Aug-2017 Peng Xu <pengxu@google.com> Clarify sensor NDK struct has to be backward compatible

Bug: 35842870
Test: compiles
Change-Id: I7ee89f88d09b2204b61cfd090a29c80a064191e9
/frameworks/native/include/android/sensor.h
0cb1c4924379a0cc5da8668743ff6b09d2e1cc1d 03-Aug-2017 Peng Xu <pengxu@google.com> Merge "Add android version guard to ASensorManager_getInstanceForPackage"
am: 18510e1f6f

Change-Id: Ic96f8b7a3c6611f39303294405dd6d6d1ddac63f
77a61e5a2e53f3659504b1bbdba5cba8cd756eae 18-Jul-2017 Peng Xu <pengxu@google.com> Add android version guard to ASensorManager_getInstanceForPackage

This function is added to header file since 2015 but the corresponding
function is not exported through libandroid.map file until O. Thus,
it make sense to gate the usage to ANDROID_O and forward.

ASensorManager_getInstance is deprecated accordingly.

Bug: 63639195
Test: compiles
Change-Id: Ib2fdb635ffca9ec629dd487bd377aaa98afa4359
(cherry picked from commit 477db44043140dc6f4e7497a760061aefe472df2)
/frameworks/native/include/android/sensor.h
477db44043140dc6f4e7497a760061aefe472df2 18-Jul-2017 Peng Xu <pengxu@google.com> Add android version guard to ASensorManager_getInstanceForPackage

This function is added to header file since 2015 but the corresponding
function is not exported through libandroid.map file until O. Thus,
it make sense to gate the usage to ANDROID_O and forward.

ASensorManager_getInstance is deprecated accordingly.

Bug: 63639195
Test: compiles
Change-Id: Ib2fdb635ffca9ec629dd487bd377aaa98afa4359
/frameworks/native/include/android/sensor.h
8afbe27f81d35686e40e4e6d76af0c9118782754 26-Apr-2017 Dan Albert <danalbert@google.com> resolve merge conflicts of 7a78e14ec to oc-dev-plus-aosp

Change-Id: Icdd22fcf328935b7f5647270489539dab0ec4369
43dcd0eaf0d0ce3bbf696cdfb9d4c6b76d882251 25-Apr-2017 Dan Albert <danalbert@google.com> Add missing stdbool.h to sensor.h.

This got hacked into the NDK headers ages ago, but never got
upstreamed to the frameworks.

Test: make checkbuild
Bug: https://github.com/android-ndk/ndk/issues/370
Merged-In: Id38cbc96633c1c61de36996c2dd9e6c2331bd6e7
Change-Id: Id38cbc96633c1c61de36996c2dd9e6c2331bd6e7
/frameworks/native/include/android/sensor.h
8f860fdf256e4a64a0450ba92982ef78aea3416a 25-Apr-2017 Dan Albert <danalbert@google.com> Add missing stdbool.h to sensor.h.

This got hacked into the NDK headers ages ago, but never got
upstreamed to the frameworks.

Test: make checkbuild
Bug: https://github.com/android-ndk/ndk/issues/370
Change-Id: Id38cbc96633c1c61de36996c2dd9e6c2331bd6e7
/frameworks/native/include/android/sensor.h
ec53d023cd2db6f5bfe04ab2ff783bed85c3a56a 07-Apr-2017 Peng Xu <pengxu@google.com> Correct configure direct report function document

Test: comment change, compiles
Change-Id: If9f13996d5cfc55370fefd3fabd2f78abaf2c5fa
/frameworks/native/include/android/sensor.h
37317b63338b68d579cba9c19aac1030e715c704 08-Mar-2017 Peng Xu <pengxu@google.com> Fix enum ordering in sensor NDK

Test: compiles
Change-Id: Ie186270af2f51d723855cdc62f0b09ffe1ab6ecf
/frameworks/native/include/android/sensor.h
da8385cb97ba40ab87e7e9b8d5b7c8f0ba5ba0fd 01-Mar-2017 Peng Xu <pengxu@google.com> Add ASensorEventQueue_registerSensor and default error value

ASensorEventQueue_registerSensor is new function created in 2016 but
is never exported at NDK level. In this CL the function signature is
formalized and the function name is added to NDK function export
table. Internal class SensorEventQueue is also changed to adapt.

Default error values are also defined.

Test: cts-tradefed run cts --module CtsSensorTestCases \
--test android.hardware.cts.SensorNativeTest
Change-Id: I74dc72e50ea4bae6d2d8944ce6d2e191ed2f495e
/frameworks/native/include/android/sensor.h
47cddca3d501f063569837d03247dc034dfaaf60 16-Feb-2017 Peng Xu <pengxu@google.com> Define direct sensor report NDK API

Added following NDK API and corresponding enums.

Sensor direct report
* 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: Id9425734d5a9db8030b4dc1d1fcef9e37fb7a4cc
/frameworks/native/include/android/sensor.h
e96e577172c22e0623b384d7e9221bb22d40a59d 12-Dec-2016 Aniroop Mathur <a.mathur@samsung.com> Sensor: Add more comments for ASensorEventQueue_registerSensor() function

Lets add more comments to clarify that ASensorEventQueue_disableSensor is
to be used same as before for deactivating the sensor with respect to
sensor activation with ASensorEventQueue_registerSensor function.

Test: Check clarification in comments / spell check

Change-Id: Id38c002b57154c1feedf099f45b0ed8ed004ca39
Signed-off-by: Aniroop Mathur <a.mathur@samsung.com>
/frameworks/native/include/android/sensor.h
494ed550f5aea1332984fb9f0f11036fc58bd716 24-Sep-2016 Dan Albert <danalbert@google.com> Migrate libandroid headers to ndk_headers.

Test: make native
Bug: http://b/30465923
Change-Id: I0ef0b3630670241c4efd22515b6ab13eb41a81b3
/frameworks/native/include/android/sensor.h
da94fd86475d1ef417eb5a953806d307f2779489 02-Nov-2015 Aniroop Mathur <a.mathur@samsung.com> Sensor: Add batch support for native applications

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: I2671ba37f48bae63945bf24e9f4ea009d33793f7
Signed-off-by: Aniroop Mathur <a.mathur@samsung.com>
/frameworks/native/include/android/sensor.h
9e72046f399f13dfeb5ed0cb32343ca6697f52f5 27-Jan-2016 Peng Xu <pengxu@google.com> Implementation of sensor additional info report

This implements a mechanism for sensor hardware/HAL to deliver additional information beside sensor
readings to application. It includes internal temperature reading, untracked delay of sample,
location and pose of sensor device placement in phone frame, etc. This is also a very expandable
frame to account for future need.

Change-Id: Ib7780ac765f24d14eaed72b9862cd84b76054d74
/frameworks/native/include/android/sensor.h
2576cb63b3fe1592f54816625036566b9eb0793a 20-Jan-2016 Peng Xu <pengxu@google.com> Dynamic Sensor Discovery implementation

Defined the dynamic sensor meta data type and UUID of sensor.

Implementation in sensorservice and the native SensorManager to
support Dynamic sensor discovery.

Change-Id: I9df2f2ae51d46cd946a9757393f7a60b52cc4fb8
/frameworks/native/include/android/sensor.h
4b69cbd6e95da7a209f839804e0fef7494a15459 01-Sep-2015 Nick Kralevich <nnk@google.com> resolved conflicts for merge of 335e0e08 to mnc-dr-dev-plus-aosp

Change-Id: I77587cf9128b003ed0f77ddfe11e688dcfe37a9c
335e0e08e9d9c0265e0f171dccf8d9a7790e2218 01-Sep-2015 Nick Kralevich <nnk@google.com> resolved conflicts for merge of 3821feac to stage-aosp-master

Change-Id: Icc17d2b7dc26eadf99b2c6967cceaa54ae38e617
7d319fcafba64af72c1960e4d047a39401613096 21-Aug-2015 Johan Euphrosine <proppy@google.com> include/android/sensor: add enum for LINEAR_ACCELERATION

Change-Id: I6e387f905ba87bde810952daf939ba0f529d18b8
/frameworks/native/include/android/sensor.h
a43a0d76a4fc08251c76c9c5cf5f3b9243b624eb 13-May-2015 Kenny Root <kroot@google.com> resolved conflicts for merge of 91e485fa to mnc-dev-plus-aosp

Change-Id: Ibb4a2058e585218bdeaf4c1d568093fbbd8f6478
bf6d5e012cd9b15568c2351831f3349cf564bf18 28-Mar-2015 Johan Euphrosine <proppy@google.com> frameworks/native: document native types and enums

Change-Id: Id94b610f27b87426abb30e13484cbd16990aa995
/frameworks/native/include/android/sensor.h
5fa32d4b08843d0aeca567a173227e8e37322e8e 07-May-2015 Svet Ganov <svetoslavganov@google.com> Fix broken NDK sensor manager API.

Change-Id: I21bb8b0dcfd3f1c812753a9fd77dea792e7155f2
/frameworks/native/include/android/sensor.h
b412f6e203b38f8047f760261a5e3dc6d0722f08 30-Apr-2015 Svetoslav <svetoslavganov@google.com> Add body sensors app op - framework native

Change-Id: I727a2bb1e28ae9158f2df9c74dd0aee977dfd47f
/frameworks/native/include/android/sensor.h
b37ba399c1521c3eba40e126f65d9663532de446 05-Aug-2014 Aravind Akella <aakella@google.com> 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
/frameworks/native/include/android/sensor.h
0e025c5af365e45e02cb75c1d46b46c7f4cd44cb 04-Jun-2014 Aravind Akella <aakella@google.com> Surface reportingMode for Sensors.

Change-Id: Iac8dd3408c90eb7d285a2e8043131fab3a7e58fa
/frameworks/native/include/android/sensor.h
03b1a9db9d8edc2ee15062204b19c0fc340e5b69 27-May-2014 Etienne Le Grand <etn@google.com> am b3a65bb0: am 9dcd38ad: Merge "Add heart rate to ASensorEvent" into klp-modular-dev

* commit 'b3a65bb0c2d2f6e660510efe0d93b3d26b0b2bf9':
Add heart rate to ASensorEvent
9dcd38ad3b8335308b59932718e3f145aa50d318 27-May-2014 Etienne Le Grand <etn@google.com> Merge "Add heart rate to ASensorEvent" into klp-modular-dev
630e31d6ed539f5193fd20dde6c5afa58bd34a73 23-May-2014 Etienne Le Grand <etn@google.com> Add heart rate to ASensorEvent

Change-Id: Ic82838b17a575de93d499e44a454bb382f17678f
/frameworks/native/include/android/sensor.h
72c524dd8cd91b4899e5e180764ffcf410e094da 23-May-2014 Aravind Akella <aakella@google.com> am 040730e8: am 1236710b: Remove getRequiredPermission from NDK.

* commit '040730e8954b2f686390434646f82bc333de7058':
Remove getRequiredPermission from NDK.
1236710bccd8f5870c0281e24a899c3d58f708e6 22-May-2014 Aravind Akella <aakella@google.com> Remove getRequiredPermission from NDK.

Change-Id: Ic967adde89f30261c75fca67c09d14d35bd1cdb3
/frameworks/native/include/android/sensor.h
9a844cf78f09953145200b4074d47589257a408c 12-Feb-2014 Aravind Akella <aakella@google.com> Enable wakeup sensors.

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: If3b5acb99c9cf0cd29012fcfa9d6b04c74133d01
/frameworks/native/include/android/sensor.h
700180487ffec09d9df1657b018a7caadac24b75 08-Apr-2014 Aravind Akella <aakella@google.com> Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors

This reverts commit 4369a4ebd5ae7567e7075bc82830b83178099ed5.

Change-Id: Ifa8619cc6873470a07a987763d818d78d4232610
/frameworks/native/include/android/sensor.h
4369a4ebd5ae7567e7075bc82830b83178099ed5 05-Apr-2014 Etienne Le Grand <etn@google.com> Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"

This reverts commit c57a019e117117c5a76c772970b26cd0f5db8c6a.

Change-Id: I3540565bc3e56a32cf3b176a29216cf68bb763b2
/frameworks/native/include/android/sensor.h
c57a019e117117c5a76c772970b26cd0f5db8c6a 25-Mar-2014 Etienne Le Grand <etn@google.com> Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors

Change-Id: If0f3dbdb5d2e9378e1fed4614baee4e750d0c850
/frameworks/native/include/android/sensor.h
724d91d778e71c8186399f4955de14b54812b3ed 27-Jun-2013 Aravind Akella <aakella@google.com> Sensor batching. Changes to the native code.

Bug: 10109508
Change-Id: I7333f3aac76125a8226a4c99c901fb904588df04
/frameworks/native/include/android/sensor.h
ba02cd2f6cc3f59adf66cb2b9176bfe6c9e382d1 04-Jul-2013 Mathias Agopian <mathias@google.com> improve sensorservice's dumpsys

it now displays the reported trigger mode properly, as well as
the number and type of the last received data

Change-Id: I2ff64b32ab71f1332bc2e09671c8c02bb9550490
/frameworks/native/include/android/sensor.h
7438fd1a0132bc6de101e2a5f75040a119b6f29b 08-Jul-2013 Mathias Agopian <mathias@google.com> simplify some unnecessary complex code

getSensorType() ran in O(n) instead of O(1). fix that.

Change-Id: Idcf29e46fc34db32604a0d8e5a9156486783b74f
/frameworks/native/include/android/sensor.h
e1c61d3cc8458ce9a15d8109f728e60f5248939d 23-Mar-2012 Mathias Agopian <mathias@google.com> move ndk headers to frameworks/native

Change-Id: Ib740333753818ff8f8230ed009211b447e30cbee
/frameworks/native/include/android/sensor.h