diff options
| author | 2023-03-07 09:49:29 +0000 | |
|---|---|---|
| committer | 2023-03-07 09:49:29 +0000 | |
| commit | 9384d621e98369863aa9323d08283edde110be5d (patch) | |
| tree | 2a5fad2863436f2c9f74383c9943411ffe832453 | |
| parent | 53541068282af0c2e7a6552ac7b66a31686e62d1 (diff) | |
| parent | 896febc017c6fa5e52d0c65aeeec8d5181fd46c4 (diff) | |
Merge "servicemanager: -= clients log spam" am: 896febc017
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2471754
Change-Id: I578f7e1911b295d630bd31991faae0ee5128f2a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | cmds/servicemanager/ServiceManager.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmds/servicemanager/ServiceManager.cpp b/cmds/servicemanager/ServiceManager.cpp index eadf67821f..bec262e25a 100644 --- a/cmds/servicemanager/ServiceManager.cpp +++ b/cmds/servicemanager/ServiceManager.cpp @@ -223,8 +223,13 @@ static bool meetsDeclarationRequirements(const sp<IBinder>& binder, const std::s #endif // !VENDORSERVICEMANAGER ServiceManager::Service::~Service() { - if (!hasClients) { - // only expected to happen on process death + if (hasClients) { + // only expected to happen on process death, we don't store the service + // name this late (it's in the map that holds this service), but if it + // is happening, we might want to change 'unlinkToDeath' to explicitly + // clear this bit so that we can abort in other cases, where it would + // mean inconsistent logic in servicemanager (unexpected and tested, but + // the original lazy service impl here had that bug). LOG(WARNING) << "a service was removed when there are clients"; } } |