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
Loading
Please register or sign in to comment