gd: Add module started query method
Bug: 182544206
Test: gd/cert/run
Tag: #refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
Change-Id: I7d2dedd4aaa20fd6811166c86d1b9931e6dda536
diff --git a/system/gd/stack_manager.h b/system/gd/stack_manager.h
index 5a9fa28..985bd0b 100644
--- a/system/gd/stack_manager.h
+++ b/system/gd/stack_manager.h
@@ -32,6 +32,11 @@
return static_cast<T*>(registry_.Get(&T::Factory));
}
+ template <class T>
+ bool IsStarted() const {
+ return registry_.IsStarted(&T::Factory);
+ }
+
private:
os::Thread* management_thread_ = nullptr;
os::Handler* handler_ = nullptr;