Add definition for IServiceManager 1.2
Adding a new version of IServiceManager to introduce the
following features:
- Better notifications (onRegistration will contain the interface)
- Remove service (for b/64678982, lazy HALs)
- Callbacks to support lazy hal shutdown when there are no clients (b/79983843)
- Method to list interfaces in the manifest (for b/76108617, since if they are
lazy, they will no longer show up in listByInterface)
- Broadcast to all HALs for systrace w/o root (b/78136428)
- Register w/o it having to call interface chain (b/36424585)
This CL intentionally does not introduce a method called
getPassthroughServiceManager1_2 since the passthrough manager
didn't even support 1.1 IServiceManager features. This may
be added in the future if we want some of the above features
in passthrough mode.
Test: (sanity) boot and check for fatal logs
Test: check for @1.2::IServiceManager in lshal
Test: hidl_test
Change-Id: Ife5a439a12e0e016c31187ac0bb62f9e4111113e
diff --git a/transport/include/hidl/ServiceManagement.h b/transport/include/hidl/ServiceManagement.h
index 968c385..a26a282 100644
--- a/transport/include/hidl/ServiceManagement.h
+++ b/transport/include/hidl/ServiceManagement.h
@@ -28,12 +28,15 @@
namespace manager {
namespace V1_0 {
struct IServiceManager;
-}; // namespace V1_0
+}; // namespace V1_0
namespace V1_1 {
- struct IServiceManager;
-}; // namespace V1_0
-}; // namespace manager
-}; // namespace hidl
+struct IServiceManager;
+}; // namespace V1_1
+namespace V1_2 {
+struct IServiceManager;
+}; // namespace V1_2
+}; // namespace manager
+}; // namespace hidl
namespace hardware {
@@ -64,6 +67,7 @@
// of an interface, the best way to do this is by calling IFoo::getService()
sp<::android::hidl::manager::V1_0::IServiceManager> defaultServiceManager();
sp<::android::hidl::manager::V1_1::IServiceManager> defaultServiceManager1_1();
+sp<::android::hidl::manager::V1_2::IServiceManager> defaultServiceManager1_2();
sp<::android::hidl::manager::V1_0::IServiceManager> getPassthroughServiceManager();
sp<::android::hidl::manager::V1_1::IServiceManager> getPassthroughServiceManager1_1();