diff options
author | 2025-02-07 16:09:25 +0000 | |
---|---|---|
committer | 2025-02-19 15:45:51 +0000 | |
commit | 2a9d5d3cc79f57f77bde7d4dece0fa41e0837c0b (patch) | |
tree | 3fbd3ca19e20ad8a1fec9e376822f3c00b544afb /services/tests/runtests.py | |
parent | 703ee5ae927b4c43a209fc235552a67602283667 (diff) |
Fix VibrationThread handling old HAL callbacks
The VibrationThread does not differentiate between HAL callbacks from
different IVibrator calls, causing older callbacks to affect the
vibration playback. This can be seen when the VibrationThread or
Vibrator HAL are slower to schedule the steps / callbacks execution,
breaking the execution of pattern waveforms that depends on strict
timings.
This fix adds an extra id to the vibrate calls, which will be sent back
by the HAL callback once complete. The VibrationThread can use this to
control which callbacks should be ignored during the vibration playback.
A regression test was introduced where a latency is set to the fake HAL
implementation to check the vibration is executed as expected. This test
replicates the flaky failure caught by a separate test.
Fix: 395005081
Test: VibrationThreadTest
Flag: android.os.vibrator.fix_vibration_thread_callback_handling
Change-Id: I1d2bc2d15698e71127e87c164d9b147135cff1a1
Diffstat (limited to 'services/tests/runtests.py')
0 files changed, 0 insertions, 0 deletions