summaryrefslogtreecommitdiff
path: root/libs/binder/BackendUnifiedServiceManager.cpp
diff options
context:
space:
mode:
author Parth Sane <parthsane@google.com> 2024-12-05 19:43:40 +0000
committer Parth Sane <parthsane@google.com> 2024-12-05 20:07:38 +0000
commitb109db34556dce51cd1802e20d65a032f439555a (patch)
treeb559ca70f8525515de06c07dcdd316b8e46c9d56 /libs/binder/BackendUnifiedServiceManager.cpp
parent6dc67007e25bf45f9a318771ca24e68abe0afd24 (diff)
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
Diffstat (limited to 'libs/binder/BackendUnifiedServiceManager.cpp')
-rw-r--r--libs/binder/BackendUnifiedServiceManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/binder/BackendUnifiedServiceManager.cpp b/libs/binder/BackendUnifiedServiceManager.cpp
index 03d687a9cc..34d5a09948 100644
--- a/libs/binder/BackendUnifiedServiceManager.cpp
+++ b/libs/binder/BackendUnifiedServiceManager.cpp
@@ -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);