From bd4cdc6a9a80b3f71d17f58788d3d611574cedbd Mon Sep 17 00:00:00 2001 From: Emilian Peev Date: Wed, 30 Aug 2023 19:03:09 +0000 Subject: [PATCH] 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 --- camera/provider/aidl/vts/camera_aidl_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camera/provider/aidl/vts/camera_aidl_test.cpp b/camera/provider/aidl/vts/camera_aidl_test.cpp index 08ad0bbaa0..5f9d605ef3 100644 --- a/camera/provider/aidl/vts/camera_aidl_test.cpp +++ b/camera/provider/aidl/vts/camera_aidl_test.cpp @@ -120,7 +120,7 @@ void CameraAidlTest::SetUp() { ABinderProcess_startThreadPool(); SpAIBinder cameraProviderBinder = - SpAIBinder(AServiceManager_getService(serviceDescriptor.c_str())); + SpAIBinder(AServiceManager_waitForService(serviceDescriptor.c_str())); ASSERT_NE(cameraProviderBinder.get(), nullptr); std::shared_ptr cameraProvider =