summaryrefslogtreecommitdiff
path: root/libs/binder/IServiceManager.cpp
diff options
context:
space:
mode:
author Parth Sane <parthsane@google.com> 2024-11-14 11:49:08 +0000
committer Parth Sane <parthsane@google.com> 2024-11-29 17:13:56 +0000
commitdc207544897a30fe412ffcc0deab07dd974358d1 (patch)
treecfc962fbcfb3c604aabc6b26fa23ce0b45300b77 /libs/binder/IServiceManager.cpp
parentbd28005fead6cea70a6213d37071ee7313f1839f (diff)
Add binder to libbinder cache after addService
This will prevent system_server and other applications from calling servicemanager for local binders. Flag: RELEASE_LIBBINDER_CLIENT_CACHE Bug: 333854840 Test: atest binderCacheUnitTest Change-Id: I2693f21a3f5b7a5770481e5ac79719444284524d
Diffstat (limited to 'libs/binder/IServiceManager.cpp')
-rw-r--r--libs/binder/IServiceManager.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/binder/IServiceManager.cpp b/libs/binder/IServiceManager.cpp
index 39d8c2446e..61866d70d3 100644
--- a/libs/binder/IServiceManager.cpp
+++ b/libs/binder/IServiceManager.cpp
@@ -127,6 +127,8 @@ public:
}
IBinder* onAsBinder() override { return IInterface::asBinder(mUnifiedServiceManager).get(); }
+ void enableAddServiceCache(bool value) { mUnifiedServiceManager->enableAddServiceCache(value); }
+
protected:
sp<BackendUnifiedServiceManager> mUnifiedServiceManager;
// AidlRegistrationCallback -> services that its been registered for