binderThroughputTest: replace getService with waitForService
The getService() method is now deprecated, replace with waitForService()
which waits indefinitely instead of timing out. This should fix the
following compilation warning:
binderThroughputTest.cpp:207:39: warning: 'getService' is deprecated: this polls for 5s, prefer waitForService or checkService [-Wdeprecated-declarations]
workers.push_back(serviceMgr->getService(generateServiceName(i)));
^
frameworks/native/libs/binder/include/binder/IServiceManager.h:70:7: note: 'getService' has been explicitly marked deprecated here
[[deprecated("this polls for 5s, prefer waitForService or checkService")]]
^
1 warning generated.
Change-Id: Ib6721b355a5fe7e79d9b8c6949b54e3eb49f237f
Signed-off-by: Carlos Llamas <cmllamas@google.com>
[ Alice: Fix conflict with commit bb07b9837531 ("Fix or silence binder
build warnings on clang"). ]
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
diff --git a/libs/binder/tests/binderThroughputTest.cpp b/libs/binder/tests/binderThroughputTest.cpp
index f93a19d..1242092 100644
--- a/libs/binder/tests/binderThroughputTest.cpp
+++ b/libs/binder/tests/binderThroughputTest.cpp
@@ -204,10 +204,7 @@
for (int i = 0; i < server_count; i++) {
if (num == i)
continue;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- workers.push_back(serviceMgr->getService(generateServiceName(i)));
-#pragma clang diagnostic pop
+ workers.push_back(serviceMgr->waitForService(generateServiceName(i)));
}
// Run the benchmark if client