Camera: Fix delay in service registration
We have encountered a problem where the registration of another service
that is referencing the CameraService is delayed
when registering it as a service.
Like HIDL case, Changing to checkService can help resolve the delay issue
that occur during the registration of services
Bug: 317153705
Test: manual test with device
Change-Id: Ib04a03f13ce468495c71d616708723cd7cb565f3
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp
index fbb5e1b..bc1a3f1 100644
--- a/services/camera/libcameraservice/common/CameraProviderManager.cpp
+++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
@@ -147,7 +147,7 @@
if (flags::lazy_aidl_wait_for_service()) {
binder = AServiceManager_waitForService(serviceName.c_str());
} else {
- binder = AServiceManager_getService(serviceName.c_str());
+ binder = AServiceManager_checkService(serviceName.c_str());
}
if (binder == nullptr) {