751 Commits

Author SHA1 Message Date
Daniel Zheng
7022279564 Revert^2 "SensorHAL: add moisture detection"
919258a586

Change-Id: I351625927ce9259967218565abaf56035e97674a
2024-12-04 20:56:28 +00:00
Priyanka Advani (xWF)
919258a586 Revert "SensorHAL: add moisture detection"
Revert submission 30509949-waterIntrusion

Reason for revert: Droidmonitor created revert due to b/382268952. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:30509949-waterIntrusion

Change-Id: Iaebccf3bf342eb1e4b60f3ea50178cc0b0a641c3
2024-12-04 17:56:05 +00:00
Daniel Zheng
8127b300da SensorHAL: add moisture detection
Detect water intrusion damage within chassis

Bug: 371291781
Test: th
Change-Id: Ia00588953585483141482de7e660eb69e5a66a76
2024-12-03 11:07:40 -08:00
Treehugger Robot
cb2d8f529d Merge "Add proposed trendy teams for VTS modules" into main am: 788f247231 am: 074d568294
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3304543

Change-Id: I2172f6b56c98807e84c4c4e9de2d2e7a68216e1d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-30 03:50:09 +00:00
Yihan Dong
d76c9ce788 Add proposed trendy teams for VTS modules
Change-Id: I055789437a2b79360929d6357cffda36fc2ff611
Test: build locally
Bug: 368362374
2024-10-21 23:58:30 +00:00
Shih-Cheng Tu
15ec7ca7fa Merge "Skip event count assertion on reporting mode" into android14-tests-dev am: 70be0c430b am: d69acec03e am: b0ce763fd6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3152456

Change-Id: Ifb364a0a87477ecb1238f104f15a5035db45af24
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-01 06:20:17 +00:00
Shih-Cheng Tu
b0ce763fd6 Merge "Skip event count assertion on reporting mode" into android14-tests-dev am: 70be0c430b am: d69acec03e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3152456

Change-Id: If8da18cb480e7f8070cffb6b4f04b7d14193bc3e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-01 06:01:49 +00:00
Shih-Cheng Tu
d69acec03e Merge "Skip event count assertion on reporting mode" into android14-tests-dev am: 70be0c430b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3152456

Change-Id: I0638cc51cdf145a052e7d531423e25450fb35bf2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-01 05:47:48 +00:00
Shih-Cheng Tu
09cf466c2f Skip event count assertion on reporting mode
Sensors with reporting mode "One-shot" and "Special" will not trigger event on "activate", hence the test that expecting the event
count after calling activate() will fail.

Skipping the event count assertion if the device only has sensors with these reporting mode.

Bug: 349268211
Test: run vts -m VtsAidlHalSensorsTargetTest -t Sensors/SensorsAidlTest#CallInitializeTwice/0_android_hardware_sensors_ISensors_default
Change-Id: I656a652fc205961b8e6207942ccf16a71a08dc14
2024-08-01 02:31:08 +00:00
Brian Duddie
825b06e488 Clarify comment for DEVICE_PRIVATE_BASE
Fixes: 353712688
Test: n/a, comment change only
Change-Id: Id61bcee7f6bea5c376d0c650ef17f79cc2789f08
2024-07-17 16:19:36 +00:00
Madhav Iyengar
04b9c2c69d Fixes possible race in example Sensors HAL
Fixes race condition where wake() is invoked on a possibly null
mEventQueueFlag.

Bug: 350489722
Test: presubmit
Change-Id: Ic6f98c099579a4fced30a5fc710f43fad1b8b7b9
2024-07-01 23:33:20 +00:00
lichen yu
49d05decfe Fix VtsHalSensorsV2_0TargetTest am: 3beaf4faca am: d65c459061
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3115968

Change-Id: I0a5674590186e7d3d2a9b1e8166369167fd7a883
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-13 01:58:50 +00:00
lichen yu
3beaf4faca Fix VtsHalSensorsV2_0TargetTest
During VTS testing, when many sensors are quickly enabled, the load on the Sensorhub side will be too heavy, and then continue to send sensor enable instructions and Sensor Flush instructions. These instructions sent by the Kernel driver to the Sensorhub through inter-core communication cannot be responded to in a timely manner. After the Kernel side judges the timeout, it will determine that the enable fails; after the enable fails, it cannot continue to test the flush or return the expected flush data.

ten sensors is tested as a group

Bug: 339763843
Test: run vts -m VtsHalSensorsV2_0TargetTest
(cherry picked from https://android-review.googlesource.com/q/commit:09952885e441bcf0d8f0bf0834ff46608b07e0d0)
Change-Id: I6f6d36d1e3c98b85b412189c3f97163c0945a7ab
2024-06-13 00:01:10 +00:00
lichen yu
8659a96281 Fix VtsHalSensorsV2_0TargetTest
During VTS testing, when many sensors are quickly enabled, the load on the Sensorhub side will be too heavy, and then continue to send sensor enable instructions and Sensor Flush instructions. These instructions sent by the Kernel driver to the Sensorhub through inter-core communication cannot be responded to in a timely manner. After the Kernel side judges the timeout, it will determine that the enable fails; after the enable fails, it cannot continue to test the flush or return the expected flush data.

ten sensors is tested as a group

Bug: 339763843
Test: run vts -m VtsHalSensorsV2_0TargetTest
(cherry picked from https://android-review.googlesource.com/q/commit:09952885e441bcf0d8f0bf0834ff46608b07e0d0)
Merged-In: I6f6d36d1e3c98b85b412189c3f97163c0945a7ab
Change-Id: I6f6d36d1e3c98b85b412189c3f97163c0945a7ab
2024-06-12 23:39:23 +00:00
Brian Duddie
b3cefe3a51 Prevent event flag use after delete in example HAL
Fixes: 323085916
Test: presubmit
Change-Id: Ia455d7f83ff2b0056593eabf9f91359b97f9fc0b
2024-05-01 22:01:04 +00:00
Anthony Stange
ac0eaa9004 Update owners for sensor interfaces
Change-Id: Id471dad8fde48c6ac515693ceb0471673145e13e
2024-03-13 23:13:10 +00:00
Treehugger Robot
74dc4cc5d7 Merge "[DON'T BLOCK] Test ownership migration rules" into main am: 27e97308c4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2950589

Change-Id: Ie4f36b193820490e606e7f5100ca29200f832fa2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-07 01:45:21 +00:00
Aditya Choudhary
ad2ba1b851 [DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
go/new-android-ownership-model

Bug: 304529413
Test: N/A
Change-Id: Ic8c4bd6ac246e7efa98bbdaf822d12ae8e1230a5
2024-02-05 15:45:22 +00:00
Aditya Choudhary
85d604d0db [DON'T BLOCK] Test ownership migration rules am: c5c6c62995
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2939799

Change-Id: I1046113ffdcd09649fa65e023aae0969262772e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 17:06:10 +00:00
Aditya Choudhary
c5c6c62995 [DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
<add g3 doc link>

Bug: 304529413
Test: N/A
Change-Id: I3322344f595f974f730dc824af0110388076d838
2024-01-31 11:06:17 +00:00
Xin Li
763c473c3d Merge Android 24Q1 Release (ab/11220357)
Bug: 319669529
Merged-In: I976f80006aeb88bde2ae34ca4f9be72cea727d9e
Change-Id: Id94b25af52bd2e2847b6858697ab21cc6ce27aa3
2024-01-30 10:36:50 -08:00
Treehugger Robot
a9860a2192 Merge "sensors: Do not limit aidl-multihal visibility" into main 2023-12-18 20:37:09 +00:00
Jooyung Han
7549431359 Remove features from sensors APEX
Just found that each device wants to install a different set of sensors
via LOCAL_SENSOR_FILE_OVERRIDES. Instead of providing a default list in
the apex, which would make things difficult to configure, let's not
hard-code the list in the apex.

Bug: 315089092
Test: cvd start && dumpsys sensorservice
Change-Id: Ie7ddbe6657d5afc06ca009ac37e3a54a5b26ad7d
2023-12-14 10:22:11 +09:00
Jooyung Han
c145f84487 Merge "Clean up sensors hal apex" into main am: 2ffe33ea43 am: 2fc564e962 am: 3c5f173521
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2867915

Change-Id: I6b4a8c771311c9a69c06e6a977b566d1cffc776f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-12 03:45:29 +00:00
ralph950412
5a856698db sensors: Do not limit aidl-multihal visibility
Allowing custom sensor implementations for vendors

Change-Id: I9e2b6e8f312ddc85074504a17087d121835a1ca3
2023-12-11 16:43:52 +08:00
Jooyung Han
621461b26e Clean up sensors hal apex
- move apex definition near to the binary
- make the binary use static linking (for smaller size of apex)
- remove unused keys

Bug: n/a
Test: cvd start
Test: dumpsys sensorservice # available sensors
Change-Id: I07734c5a5b1ade542c669155dd96176f912629ac
2023-12-11 14:07:14 +09:00
Treehugger Robot
4b4639935d Merge "lnitialize payload of additionallnfo for VTS InjectSensorEventData test" into android14-tests-dev am: 01d47260a1 am: 253353540d am: 23390a0e80 am: 59f95b0ea5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2795667

Change-Id: I829118b01963ac30aabe12a0f1fced65a22d33ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-03 22:22:53 +00:00
Treehugger Robot
253353540d Merge "lnitialize payload of additionallnfo for VTS InjectSensorEventData test" into android14-tests-dev am: 01d47260a1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2795667

Change-Id: I2e6f7921aeea6e3e0d5a2d5c9ceacdd1a60b5403
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-03 20:32:27 +00:00
fan.lv
765937cfac lnitialize payload of additionallnfo for VTS InjectSensorEventData test
If the payload of additionalInfo event isn't initialized, system will
crash when execute to the function of convertToHidlEvent in
HalProxyAidl::injectSensorData. Because there is an operation to get
the payload in the function of convertToHidlEvent.

Bug:306109770
Test:VtsAidlHalSensorsTargetTest.Sensors/SensorsAidlTest #InjectSensorEventData
Change-Id:I649de10451914ddfdb9d735ca1359521bf810bca
2023-10-26 10:45:13 +08:00
Devin Moore
9d67c77d35 Migrate sensors VTS to use libui
There is a new graphics.mapper HAL and instead of adding yet another
combination of mapper/allocator, use libui that handles all of that for
us.

Test: VtsAidlHalSensorsTargetTest
Bug: 304843606

Change-Id: Icf4a218de6afe0ae77a4520a6f78a4f7da9bedd4
2023-10-13 16:32:45 +00:00
Jooyung Han
d201678835 Merge "Cleanup: use shared apex_key" into main am: 6693205f17 am: 70338b35b9 am: 8ac3c1c801 am: 3e3b89fd74 am: be711c3a9b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2780311

Change-Id: I0f3067abbf86d0528d9fc2c712d918e8591ee35e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-11 07:09:07 +00:00
Jooyung Han
9aaa45eb6b Cleanup: use shared apex_key
plus, moved VINTF fragments into VAPEX

Bug: 296524155
Test: m
Change-Id: I8adac4c00a98d1fd7c71aa92851567a35d9dabf3
2023-10-10 13:53:36 +09:00
Xin Li
879960bdce Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: I7b6fffac2ada0e039f79bad8cc9b4d954e9c3460
Change-Id: I9466127d8d0fa38df36ca99f704853b2db871e67
2023-08-25 13:29:30 -07:00
Treehugger Robot
4613dd5efd Merge "Initialize mStopThread in Sensor constructor" into main am: 014b456a11 am: 9f52ca0fd2 am: b3114df058 am: 2dcf4ebe43 am: faa0f059af
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2717101

Change-Id: Ie793198f18545015e9c2531390bc66f79bf4b9b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 22:49:04 +00:00
Treehugger Robot
b3114df058 Merge "Initialize mStopThread in Sensor constructor" into main am: 014b456a11 am: 9f52ca0fd2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2717101

Change-Id: I4fa80cb034c1fb573d4d679804b87299057cb976
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 20:49:38 +00:00
Aditya Chitnis
5d346fb79c Initialize mStopThread in Sensor constructor
Bug: 294653181
Bug: 294500012
Test: Presubmit
Change-Id: I9c9a9119eb75e364d3969ae77248370937f1f3c5
2023-08-24 18:41:36 +00:00
Arthur Ishiguro
6311a3cebd Add CPU_WRITE_RARELY flag am: 802c53da89 am: cefade7fa9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2700498

Change-Id: I8ed2bd16e6180d368c3fa87bec1dd0a604933924
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-09 21:35:22 +00:00
Arthur Ishiguro
802c53da89 Add CPU_WRITE_RARELY flag
Without this flag, the test may fail with SEGV_ACCERR.

Bug: 293475360
Test: Run test
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8c5976f06a9c9b0cb92735c3eeba7f7485f4e7ca)
Merged-In: I2d7cfba94145239afde196567400c966a2769419
Change-Id: I2d7cfba94145239afde196567400c966a2769419
2023-08-09 18:17:23 +00:00
Arthur Ishiguro
8c5976f06a Add CPU_WRITE_RARELY flag
Without this flag, the test may fail with SEGV_ACCERR.

Bug: 293475360
Test: Run test
Change-Id: I2d7cfba94145239afde196567400c966a2769419
2023-08-09 17:19:37 +00:00
Treehugger Robot
496e17d535 Merge "Enable Gyroscope sensor injection by AIDL flag" into main am: bfa8a13317 am: 9943d4fee0 am: fe4f1eea8c am: 7f08099725 am: b50c633e9e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2671395

Change-Id: I1a70404e6a6a0fdcfb0f52ef61217888ff166344
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 21:33:13 +00:00
Treehugger Robot
9d10404e2d Merge "Enable Magnetometer sensor injection by AIDL flag" into main am: 9e9c6feffa am: 38ed98a535 am: 21d85c5254 am: efa4c6401f am: 4ec1e4ce79
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2657662

Change-Id: I8a7d4a3d86475f4ddb6aa973543ecdeb4d195b65
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 21:28:34 +00:00
Treehugger Robot
fe4f1eea8c Merge "Enable Gyroscope sensor injection by AIDL flag" into main am: bfa8a13317 am: 9943d4fee0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2671395

Change-Id: I468cd82a993b1ebc1db2fe0509e37230d58f385b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 19:15:11 +00:00
Treehugger Robot
21d85c5254 Merge "Enable Magnetometer sensor injection by AIDL flag" into main am: 9e9c6feffa am: 38ed98a535
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2657662

Change-Id: Ic155dcea6a3a137a0718e6b5751de150ef18ecf9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 19:13:26 +00:00
Treehugger Robot
bfa8a13317 Merge "Enable Gyroscope sensor injection by AIDL flag" into main 2023-07-26 17:22:28 +00:00
Matthew Sedam
04cadfcdd6 Fix a segmentation fault in NoStaleEvents tests
This CL fixes an issue where a sensor may not generate any events
and the processing code calls .front() on an empty std::vector.

Bug: 291779133
Test: Presubmits
Change-Id: Ibb118f239ce9ea42fc25d1d05ba6bd46a60231f0
2023-07-24 17:00:57 +00:00
Menna Awadallah
d840c2d5a1 Enable Gyroscope sensor injection by AIDL flag
Enable the flag to be used by cuttlefish.
Test: Manual.
Bug: 292206288

Change-Id: I34abe7c5bbec8a336c71775f9db0bd783cf34bc4
2023-07-21 10:57:43 +00:00
Menna Awadallah
e48d39e54d Enable Magnetometer sensor injection by AIDL flag
Enable the flag to be used by cuttlefish.
Test: Manual.
Bug: 291566976

Change-Id: I2dffc862742b86453e1ffda7954e2b73e1e74c52
2023-07-17 14:08:23 +00:00
André Draszik
65e4f77e74 VtsHalSensorsV2_1TargetTest: change test file push location
Upload files to /data/local/tests/unrestricted instead to improve data
collection in the event of a crash.

Bug: 284307085
Bug: 258819618
Bug: 199904562
Test: atest :kernel-presubmit
Change-Id: I14b8bdeec300e94c7796e8dfe644b644b4d96ba3
Signed-off-by: André Draszik <draszik@google.com>
2023-06-30 09:13:20 +01:00
André Draszik
ddac81ced0 VtsAidlHalSensorsTargetTest: change test file push location
Upload files to /data/local/tests/unrestricted instead to improve data
collection in the event of a crash.

Bug: 284307085
Bug: 258819618
Bug: 199904562
Test: atest :kernel-presubmit
Change-Id: Id4f73972910525dc4de6c19755d19a38092ae03b
Signed-off-by: André Draszik <draszik@google.com>
2023-06-30 09:13:15 +01:00
André Draszik
405a4c2247 TEST_MAPPING: enable vts hal sensors tests in kernel-presubmit
Enable the following tests:
  * VtsAidlHalSensorsTargetTest
  * VtsHalSensorsV2_1TargetTest

Bug: 284307085
Bug: 258819618
Test: atest :kernel-presubmit
Change-Id: Ie07fee7d40e7d6c388a4a92ae60981d87280e656
Signed-off-by: André Draszik <draszik@google.com>
2023-06-30 09:12:50 +01:00