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
This commit is contained in:
Emilian Peev
2023-08-30 19:03:09 +00:00
parent c6cacf6149
commit bd4cdc6a9a

View File

@@ -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<ICameraProvider> cameraProvider =