summaryrefslogtreecommitdiff
path: root/libs/sensor/SensorManager.cpp
AgeCommit message (Collapse)Author
2023-03-28Add removeInstanceForPackageMethod to SensorManagerAnthony Stange
In order to ensure that clients don't leak their sensor manager instance that we currently store in a static map, they need to be able to remove their instance. Otherwise, this instance is never removed from the list and will hang around until our SensorManage instance is destroyed. Bug: 269014004 Test: Run ./libsensorserviceaidl_fuzzer (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9532f7c682fdd4b1e6e553cd6f61fc0cf2555902) Merged-In: I52185f74ae8d28b379440235ca6f03c5089081f5 Change-Id: I52185f74ae8d28b379440235ca6f03c5089081f5
2023-03-28Remove some new memory leaks from SensorManagerDevin Moore
After catching an error in Sensor::unflatten, there are memory leaks caught by the fuzzer in the same test case. Test: libsensorserviceaidl_fuzzer with testcase from bug Bug: 269014004 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c95fa0f0e7c7b73746ff850b85a79fc5f92b784e) Merged-In: I509cceb41f56ca117d9475f6f6674244560fe582 Change-Id: I509cceb41f56ca117d9475f6f6674244560fe582
2022-02-08Add ASensorManager_getDynamicSensorList.Erik Staats
Bug: 217890463 Test: Used uhid-sample to add a dynamic sensor and verified it can be used with sensor_test. Change-Id: Ida2ce53c3d94ed530ba4981d299fa4855c35e337
2021-02-19Plumb attribution tag to Sensor ServiceArthur Ishiguro
Also updates noteOp() to use the attribution tag. Bug: 171922082 Test: Flash, verify through logs that attribution tags are propagated Change-Id: I4601f6f8696e8cf1517d2401f8ddfffae4a29d04
2020-01-22Add hinge angle sensor type to sensor NDKAnthony Stange
Bug: 144139857 Test: N/A Change-Id: Id809a8f65b31143759978702d18e6ac944d62ac3
2019-09-20Fix format-pedantiic warningYi Kong
C++ spec requires %p format specifier to correspond to a void pointer. Test: presubmit Change-Id: I98c72f94b6ea73607e84f32ddcc2149331e39978
2019-07-01Fix race between SensorManager ctor and callbackBrian Duddie
Avoids potential invalid memory access if system server crashes during initialization. Bug: 132927376 Test: confirm sensors initialize Change-Id: If7421c452b5893ab2567323d265503a1ce304482
2018-07-17[sensor] Modernize codebase by replacing NULL with nullptrYi Kong
Fixes -Wzero-as-null-pointer-constant warning. Test: m Bug: 68236239 Change-Id: I82e6ef0f074571a9537fa2eeedf56975363ca601
2018-04-17Hide some headers from libbinder to vendorsJiyong Park
The headers that are related to system services are now hidden to vendors. Note that this does not break anything because vendors have already been disallowed to talk to system services via sepolicy. Their use of binder is strictly limited within themselves (via /dev/vndbinder). The hidden headers are now guarded with __ANDROID_VNDK__ and including them from vendors (or vendor variants of other VNDK libraries) will trigger a build-time error. Bug: 78113963 Test: m -j Test: devices boots to the UI Change-Id: I19be5ca024fc4081b7861d908d75758c1d956a83
2017-05-24sensors: pass sensor handle along with injected eventAlexey Polyudov
Change-Id: Ifa5825b08d5b809865f9066c7a763202cebb987f
2017-04-04Set sensor operation parameter implementationPeng Xu
Set operation parameter to sensor HAL. Possible paramters include local geomagnetic field, local gravity acceleration, device dock state, whether device should run in high performance mode, and if a magnetic field calibration guide is in progress. Bug: 30958130 Test: Tested with marlin. Modified hal implementation can get local geomagnetic field. Change-Id: Idaedd9e616d01383ba244cc64cf3e319ce02191f
2017-03-17Avoid locking global map during waiting for servicePeng Xu
Wait for service before attempting to get a SensorManager object. Bug: 36389997 Bug: 36404344 Test: system boots, sensors working with sensorlogger test Change-Id: Ib5d41bc58edb8f6be56f803324a79a99a50da45e
2017-03-07Sensor direct report with HardwareBuffer channelPeng Xu
Implement creation of sensor direct channel in sensor service for sensor direct report feature. Bug: 30985702 Test: cts-tradefed run cts --module CtsSensorTestCases --test android.hardware.cts.SensorDirectReportTest Test: cts-tradefed run cts --module CtsSensorTestCases --test android.hardware.cts.SensorNativeTest Change-Id: I52350811df538986cea7f5e1fb336fad53234c86
2017-03-07split libsensor our of libgui Mathias Agopian
Test: compile & run Bug: treble cleanup Change-Id: I5b2c2a14f7d3b364d25695cf0901c5b08cfb0fc9