Wait for keystore from the test binary
Test: atest MicrodroidHostTestCases
Bug: 193389556
Change-Id: I48582cb0b78563230c4d5c67782b0e5c92d94d2d
diff --git a/tests/testapk/src/native/testbinary.cpp b/tests/testapk/src/native/testbinary.cpp
index ed9503a..1572021 100644
--- a/tests/testapk/src/native/testbinary.cpp
+++ b/tests/testapk/src/native/testbinary.cpp
@@ -45,7 +45,7 @@
Result<void> test_keystore() {
// Connect to Keystore.
ndk::SpAIBinder binder(
- AServiceManager_getService("android.system.keystore2.IKeystoreService/default"));
+ AServiceManager_waitForService("android.system.keystore2.IKeystoreService/default"));
auto service = IKeystoreService::fromBinder(binder);
if (service == nullptr) {
return Error() << "Failed to find Keystore";