Camera VTS: Wait for camera provider to become active
Use "AServiceManager_waitForService" instead of
"AServiceManager_getService" to wait for any camera
providers that might be using the lazy mechanism and
are not running all the time.
Bug: 297965980
Test: atest VtsAidlHalCameraProvider_TargetTest
Change-Id: I6374dc768cd1068885668f927f902dcee44a7a42
diff --git a/camera/provider/aidl/vts/camera_aidl_test.cpp b/camera/provider/aidl/vts/camera_aidl_test.cpp
index 08ad0bb..5f9d605 100644
--- a/camera/provider/aidl/vts/camera_aidl_test.cpp
+++ b/camera/provider/aidl/vts/camera_aidl_test.cpp
@@ -120,7 +120,7 @@
ABinderProcess_startThreadPool();
SpAIBinder cameraProviderBinder =
- SpAIBinder(AServiceManager_getService(serviceDescriptor.c_str()));
+ SpAIBinder(AServiceManager_waitForService(serviceDescriptor.c_str()));
ASSERT_NE(cameraProviderBinder.get(), nullptr);
std::shared_ptr<ICameraProvider> cameraProvider =