Return immediately from isHardwareDetected
If the service is not available at the time of the call, do not call
ServiceManager.waitForDeclaredService(halFqn) as this call will wait
indefinitely for the HAL to start if the HAL is declared.
This is important because isHardwareDetected is used in SystemUI
(Keyguard) to determine whether certain UI elements should be available.
If the HAL crashes and cannot restart, this can cause a SystemUI ANR.
Bug: 189275305
Test: on device with a declared HAL that never registers itself.
Change-Id: Ia768bf5b1bc124fd789cbe8e5fe523e1fa2becca
2 files changed