getService: re-request HALs after timeout
Lazy HALs are started by hwservicemanager, but there is a possible
race condition:
- HAL is requested to be started and starts
- client queries HAL
- HAL executes query and exits (but init doesn't know this yet)
- client queries HAL
- HAL is requested to be started, but init thinks it is already
running, so it isn't started again
- init reaps HAL process
- client is waiting for HAL indefinitely
This will only happen in a case where a lazy HAL exits right when it is
requesting.
Fixes: 79427800
Test: $ANDROID_BUILD_TOP/system/tools/hidl/test/run_all_device_tests.sh
Change-Id: I723a182a709f2291debad69fc4141ba9a064645e
2 files changed