diff options
| author | 2023-02-01 20:45:30 +0000 | |
|---|---|---|
| committer | 2023-02-01 20:45:30 +0000 | |
| commit | e622f3bd6e352cb77d74be0f013cdbadb996cb79 (patch) | |
| tree | b6bafff3e2e67ad0878eadd799966442426fae30 /cmds/servicemanager/ServiceManager.h | |
| parent | 8c967d54097930b9d85d1771a9b829452bb04991 (diff) | |
| parent | b9fa27e706e38a7b5f6484c1bb218c10a444ca9f (diff) | |
Merge "servicemanager: fix lazy service issues" am: 355cafc805 am: b9fa27e706
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2404738
Change-Id: Ib8c58408026c0cf26bd7d060c7eae6656b8bb0e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'cmds/servicemanager/ServiceManager.h')
| -rw-r--r-- | cmds/servicemanager/ServiceManager.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmds/servicemanager/ServiceManager.h b/cmds/servicemanager/ServiceManager.h index f9d4f8fd90..3aa6731eb3 100644 --- a/cmds/servicemanager/ServiceManager.h +++ b/cmds/servicemanager/ServiceManager.h @@ -80,6 +80,8 @@ private: // the number of clients of the service, including servicemanager itself ssize_t getNodeStrongRefCount(); + + ~Service(); }; using ServiceCallbackMap = std::map<std::string, std::vector<sp<IServiceCallback>>>; @@ -91,7 +93,9 @@ private: void removeRegistrationCallback(const wp<IBinder>& who, ServiceCallbackMap::iterator* it, bool* found); - ssize_t handleServiceClientCallback(const std::string& serviceName, bool isCalledOnInterval); + // returns whether there are known clients in addition to the count provided + bool handleServiceClientCallback(size_t knownClients, const std::string& serviceName, + bool isCalledOnInterval); // Also updates mHasClients (of what the last callback was) void sendClientCallbackNotifications(const std::string& serviceName, bool hasClients, const char* context); |