14 Commits

Author SHA1 Message Date
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
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
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
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
Anthony Stange
d73b9e0df0 Merge "Sensor:Add sensor type HINGE_ANGLE to function assertTypeMatchStringType" into android13-tests-dev am: 2550e7a719 am: 0415aad813 am: 70d16e0229
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2486876

Change-Id: Ie9d8018ff839addb8a2bd2df543141a413e60eda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 16:13:10 +00:00
Dezhi Huang
b5425cb909 Sensor:Add sensor type HINGE_ANGLE to function assertTypeMatchStringType
Function assertTypeMatchStringType does not match the sensor type
HINGE_ANGLE that only exists on folding screen phones. When testing the
VtsAidlHalSensorsTargetTest on a folding screen mobile phone,
it will fail.
So we need add CHECK_TYPE_STRING_FOR_SENSOR_TYPE(HINGE_ANGLE) to
the function assertTypeMatchStringType.

Bug: 270831199
Change-Id: Ib82a1168ff90d851eee6ce025464b11bcda7d5ca
2023-03-16 01:55:31 +00:00
Vladimir Komsiyski
08315ccbb6 Define the runtime sensor handle range in ISensors.aidl
Add a test to make sure that there are no sensors with handles within this range in the HAL.

Fix: 259227294
Test: VtsAidlHalSensorsTargetTest

Change-Id: Ib785984a0b43457eacd41031bbf361375f9d21f8
2022-12-07 09:44:40 +01:00
Arthur Ishiguro
e9cb2933a4 Fix AIDL sensors VTS test
- According to the AIDL backends, return values are not propagated
  when the status is !ok(). Update the VTS test, HAL implementation,
  and ISensors definition to remove the requirement that the
  handle is populated to -1 on failure for registerDirectChannel.
- Also update VTS tests for some error code checks to reflect the
  actual expecataions according to the ISensors documentation.

Bug: 228645167
Test: VTS passes
Change-Id: I5d4d4d0af3b033b34a58d8462aa40214d89fa442
2022-04-12 22:30:02 +00:00
Tyler Trephan
12cf91d7f6 Updated VTS to support heading sensors.
Test: atest VtsAidlHalSensorsTargetTest
Bug: 214096235
Change-Id: Id8c589c010ebd66cc33f66e08b6bdee1f7612ba3
2022-01-28 21:09:35 +00:00
Tyler Trephan
38e65b13d6 Updated VTS to support limited axes IMU sensors.
Test: atest VtsAidlHalSensorsTargetTest
Bug: 188012758
Change-Id: If0a2051eb0d39d8afdf7011da1371a48e4b12c44
2022-01-25 23:04:55 +00:00
Greg Kaiser
aae30614d6 VtsAidlHalSensorsTargetTest: Fix assignment
To make this assignment have an impact outside the function, we
need to assign to the dereference of the pointer.

Test: TreeHugger
Bug: 195593357
Change-Id: I3541735574d6ebe2f2620c2bc5fbf5dd7d97cd91
2022-01-14 07:54:49 -08:00
Grace Cheng
629b3a4cf2 Implements AIDL VTS direct channel tests
Bug: 195593357
Test: Compile, run tests

Change-Id: I3e78050fc28c9a0d20cd18788a357bc9b82f2ced
2022-01-12 07:56:27 +00:00
Arthur Ishiguro
c7ac0b2a17 Adds sensors HAL AIDL interface
Bug: 195593357
Test: Compile
Change-Id: I6c63a6ba2dc3fbe5b25f401728d0724df2620bef
2021-12-23 23:46:59 +00:00