Skip to content

Commit b109db3

Browse files
committed
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
1 parent 6dc6700 commit b109db3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

libs/binder/BackendUnifiedServiceManager.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ bool BinderCacheWithInvalidation::isClientSideCachingEnabled(const std::string&
132132
serviceName.c_str());
133133
return false;
134134
}
135+
if (kRemoveStaticList) return true;
135136
for (const char* name : kStaticCachableList) {
136137
if (name == serviceName) {
137138
return true;
@@ -175,7 +176,7 @@ Status BackendUnifiedServiceManager::updateCache(const std::string& serviceName,
175176
"isBinderAlive_false");
176177
}
177178
// If we reach here with kRemoveStaticList=true then we know service isn't lazy
178-
else if (kRemoveStaticList || mCacheForGetService->isClientSideCachingEnabled(serviceName)) {
179+
else if (mCacheForGetService->isClientSideCachingEnabled(serviceName)) {
179180
binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL,
180181
"BinderCacheWithInvalidation::updateCache successful");
181182
return mCacheForGetService->setItem(serviceName, binder);

0 commit comments

Comments
 (0)