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
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
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
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
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
- 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
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