Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 39b2dab1 authored by Lais Andrade's avatar Lais Andrade
Browse files

Change VibratorInfo reload logic in VibratorManagerService

The VibratorController.getInfo method is reloading the VibratorInfo on
every call when at least one of the read calls to the vibrator HAL has
failed. This can force a device to enter a request loop when the HAL has
a broken getter implementation, and also has no control on how
frequently it requests HAL data.

This update will reload the VibratorInfo only once from
VibratorManagerService.systemReady, to give the controller a chance to
fetch the HAL data before the service becomes available to the system.
After this point that info (including defaults for failed fields) will
be considered the device vibrator profile and can be cached by client
calls and apps.

This is also adding more logs on failing to load primitive durations, to
help finding the root cause for the failed cts.

Bug: 195595741
Test: VibratorControllerTest and VibratorManagerServiceTest
Change-Id: Idd9457300c49d7e240f4d9a6326fdbe995e7089b
parent 21223c9b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment