Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c513522 authored by Carlos Llamas's avatar Carlos Llamas Committed by Alice Ryhl
Browse files

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: default avatarCarlos Llamas <cmllamas@google.com>
[ Alice: Fix conflict with commit bb07b983 ("Fix or silence binder
  build warnings on clang"). ]
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>
parent 5837d037
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -204,10 +204,7 @@ void worker_fx(int num,
    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