summaryrefslogtreecommitdiff
path: root/cmds/servicemanager/ServiceManager.h
diff options
context:
space:
mode:
author Alice Wang <aliceywang@google.com> 2024-07-25 12:03:22 +0000
committer Alice Wang <aliceywang@google.com> 2024-07-26 08:13:54 +0000
commit11da150351b13f5d216793176b41d0edfa2cf29e (patch)
tree1c520d90b92fbe074182a20d7380b27068c2ac11 /cmds/servicemanager/ServiceManager.h
parent725f82805c174911e1cfbb2d1bea0001335af20c (diff)
[native] Restore ServiceManager#getService() to return IBinder
This fixes a crash in 3p libraries. A new API ServiceManager#getService2() has been introduced to work with the Service enum type. Bug: 354674329 Bug: 355187769 Test: atest servicemanager_test Test: atest vm_accessor_test Test: Run the demo app in b/354674329 and check it works Change-Id: If1e0e9bee6dcd3cfceea69bea58ed5fbe431e81d
Diffstat (limited to 'cmds/servicemanager/ServiceManager.h')
-rw-r--r--cmds/servicemanager/ServiceManager.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmds/servicemanager/ServiceManager.h b/cmds/servicemanager/ServiceManager.h
index 18bae68332..0d666c6bce 100644
--- a/cmds/servicemanager/ServiceManager.h
+++ b/cmds/servicemanager/ServiceManager.h
@@ -44,7 +44,8 @@ public:
~ServiceManager();
// getService will try to start any services it cannot find
- binder::Status getService(const std::string& name, os::Service* outService) override;
+ binder::Status getService(const std::string& name, sp<IBinder>* outBinder) override;
+ binder::Status getService2(const std::string& name, os::Service* outService) override;
binder::Status checkService(const std::string& name, os::Service* outService) override;
binder::Status addService(const std::string& name, const sp<IBinder>& binder,
bool allowIsolated, int32_t dumpPriority) override;