summaryrefslogtreecommitdiff
path: root/libs/binder/IServiceManager.cpp
diff options
context:
space:
mode:
author Alice Wang <aliceywang@google.com> 2025-01-02 11:53:05 +0000
committer Alice Wang <aliceywang@google.com> 2025-01-08 08:58:39 +0000
commit2b61344ddd35ceb216a836157a10769cbfaac0fa (patch)
tree5511a7b748d718e125d1b65c1ed45b2440ac7499 /libs/binder/IServiceManager.cpp
parent1656f6ba8334eeba3823f0669eccd07a464d1654 (diff)
[native] Restore ServiceManager#checkService() to return IBinder
This fixes crashes in 3p libraries. A new API ServiceManager#checkService2() has been introduced to work with the Service enum type. Bug: 387175643 Test: atest servicemanager_test Change-Id: I647f4a11469717c54111afab562a0be2d5260044
Diffstat (limited to 'libs/binder/IServiceManager.cpp')
-rw-r--r--libs/binder/IServiceManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/IServiceManager.cpp b/libs/binder/IServiceManager.cpp
index 5c72ed3197..719e445794 100644
--- a/libs/binder/IServiceManager.cpp
+++ b/libs/binder/IServiceManager.cpp
@@ -624,7 +624,7 @@ sp<IBinder> CppBackendShim::getService(const String16& name) const {
sp<IBinder> CppBackendShim::checkService(const String16& name) const {
Service ret;
- if (!mUnifiedServiceManager->checkService(String8(name).c_str(), &ret).isOk()) {
+ if (!mUnifiedServiceManager->checkService2(String8(name).c_str(), &ret).isOk()) {
return nullptr;
}
return ret.get<Service::Tag::serviceWithMetadata>().service;