Change getService (deprecated) to waitForService
The `getService` method is now deprecated. This changes the
getService calls to waitForService.
The only potential difference in functionality is that getService
times out after 10 seconds, while waitForService waits indefinitely.
Test: flash to device and reboot,
`adb logcat | egrep -i "twoshay|flinger"`
shows nothing suspiciously different before/after the change.
Bug: 265069414
Change-Id: I84c5f860c869a4e11be6e5490268920dae1e29cc
diff --git a/services/surfaceflinger/tests/IPC_test.cpp b/services/surfaceflinger/tests/IPC_test.cpp
index 40a5d57..18bd3b9 100644
--- a/services/surfaceflinger/tests/IPC_test.cpp
+++ b/services/surfaceflinger/tests/IPC_test.cpp
@@ -289,7 +289,7 @@
IPCThreadState::self()->joinThreadPool();
[&]() { exit(0); }();
}
- sp<IBinder> binder = defaultServiceManager()->getService(serviceName);
+ sp<IBinder> binder = defaultServiceManager()->waitForService(serviceName);
remote = interface_cast<IIPCTest>(binder);
remote->setDeathToken(mDeathRecipient);
}