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

Commit 84f7378a authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libbinder: sess getMaxThreads->getRemoteMaxThreads" am: 0ac025b8

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1704011

Change-Id: I9f80f77e5f05b43281b9aa53c253248ea7506420
parents 24eb9449 0ac025b8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ sp<IBinder> RpcSession::getRootObject() {
    return state()->getRootObject(connection.fd(), sp<RpcSession>::fromExisting(this));
}

status_t RpcSession::getMaxThreads(size_t* maxThreads) {
status_t RpcSession::getRemoteMaxThreads(size_t* maxThreads) {
    ExclusiveConnection connection(sp<RpcSession>::fromExisting(this), ConnectionUse::CLIENT);
    return state()->getMaxThreads(connection.fd(), sp<RpcSession>::fromExisting(this), maxThreads);
}
@@ -201,7 +201,7 @@ bool RpcSession::setupSocketClient(const RpcSocketAddress& addr) {
    // instead of all at once.
    // TODO(b/186470974): first risk of blocking
    size_t numThreadsAvailable;
    if (status_t status = getMaxThreads(&numThreadsAvailable); status != OK) {
    if (status_t status = getRemoteMaxThreads(&numThreadsAvailable); status != OK) {
        ALOGE("Could not get max threads after initial session to %s: %s", addr.toString().c_str(),
              statusToString(status).c_str());
        return false;
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ public:
     * Query the other side of the session for the maximum number of threads
     * it supports (maximum number of concurrent non-nested synchronous transactions)
     */
    status_t getMaxThreads(size_t* maxThreads);
    status_t getRemoteMaxThreads(size_t* maxThreads);

    [[nodiscard]] status_t transact(const RpcAddress& address, uint32_t code, const Parcel& data,
                                    Parcel* reply, uint32_t flags);