Add debugDump() to IServiceManager.
Also clean up ServiceManager by adding forEachExistingService()
method.
Bug: 34642756
Bug: 34712252
Test: adb shell lshal
Change-Id: Ie4320083ee836c1fd7cfe56b2e4761c012a7351f
diff --git a/ServiceManager.h b/ServiceManager.h
index 8278696..73dace4 100644
--- a/ServiceManager.h
+++ b/ServiceManager.h
@@ -41,9 +41,13 @@
const hidl_string& name,
const sp<IServiceNotification>& callback) override;
+ Return<void> debugDump(debugDump_cb _cb) override;
+
virtual void serviceDied(uint64_t cookie, const wp<IBase>& who);
private:
bool remove(const wp<IBase>& who);
+ size_t countExistingService() const;
+ void forEachExistingService(std::function<void(const HidlService *)> f) const;
using InstanceMap = std::map<
std::string, // instance name e.x. "manager"