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

Commit b109db34 authored by Parth Sane's avatar Parth Sane
Browse files

Libbinder cache: ensure binder thread count is checked when removing static list

Test: atest binderCacheUnitTest
Flag: RELEASE_LIBBINDER_REMOVE_CACHE_STATIC_LIST
Bug: 333854840
Change-Id: I5cec4f596887125ca2f8ca0f7c6388e58e97150a
parent 6dc67007
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -132,6 +132,7 @@ bool BinderCacheWithInvalidation::isClientSideCachingEnabled(const std::string&
              serviceName.c_str());
        return false;
    }
    if (kRemoveStaticList) return true;
    for (const char* name : kStaticCachableList) {
        if (name == serviceName) {
            return true;
@@ -175,7 +176,7 @@ Status BackendUnifiedServiceManager::updateCache(const std::string& serviceName,
                                      "isBinderAlive_false");
    }
    // If we reach here with kRemoveStaticList=true then we know service isn't lazy
    else if (kRemoveStaticList || mCacheForGetService->isClientSideCachingEnabled(serviceName)) {
    else if (mCacheForGetService->isClientSideCachingEnabled(serviceName)) {
        binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL,
                                      "BinderCacheWithInvalidation::updateCache successful");
        return mCacheForGetService->setItem(serviceName, binder);