diff options
author | 2024-12-04 17:38:40 +0000 | |
---|---|---|
committer | 2024-12-04 17:38:40 +0000 | |
commit | 6dc67007e25bf45f9a318771ca24e68abe0afd24 (patch) | |
tree | e00b6c8d9951ad87fd6b4eb64143547b170ea285 /libs/binder/IServiceManager.cpp | |
parent | f9a71079fb7fb614907b8a034a0a3b8d36d12bba (diff) | |
parent | 5e1b7e1b0a23a47ab76ed022284fd40b67ebe503 (diff) |
Merge "Remove static list in libbinder for caching" into main
Diffstat (limited to 'libs/binder/IServiceManager.cpp')
-rw-r--r-- | libs/binder/IServiceManager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/binder/IServiceManager.cpp b/libs/binder/IServiceManager.cpp index 61866d70d3..53435c357b 100644 --- a/libs/binder/IServiceManager.cpp +++ b/libs/binder/IServiceManager.cpp @@ -152,7 +152,8 @@ protected: virtual Status realGetService(const std::string& name, sp<IBinder>* _aidl_return) { Service service; Status status = mUnifiedServiceManager->getService2(name, &service); - *_aidl_return = service.get<Service::Tag::binder>(); + auto serviceWithMetadata = service.get<Service::Tag::serviceWithMetadata>(); + *_aidl_return = serviceWithMetadata.service; return status; } }; @@ -607,7 +608,7 @@ sp<IBinder> CppBackendShim::checkService(const String16& name) const { if (!mUnifiedServiceManager->checkService(String8(name).c_str(), &ret).isOk()) { return nullptr; } - return ret.get<Service::Tag::binder>(); + return ret.get<Service::Tag::serviceWithMetadata>().service; } status_t CppBackendShim::addService(const String16& name, const sp<IBinder>& service, |