Merge "libbinder: waitForVintfService" am: e13f284c64
am: d42b0eb73f
Change-Id: Ied89364df05a82d254e4d7c47b15f6db81584a55
diff --git a/libs/binder/include/binder/IServiceManager.h b/libs/binder/include/binder/IServiceManager.h
index 4a44c5a..bd77567 100644
--- a/libs/binder/include/binder/IServiceManager.h
+++ b/libs/binder/include/binder/IServiceManager.h
@@ -114,6 +114,13 @@
}
template<typename INTERFACE>
+sp<INTERFACE> waitForVintfService(
+ const String16& instance = String16("default")) {
+ return waitForDeclaredService<INTERFACE>(
+ INTERFACE::descriptor + String16("/") + instance);
+}
+
+template<typename INTERFACE>
status_t getService(const String16& name, sp<INTERFACE>* outService)
{
const sp<IServiceManager> sm = defaultServiceManager();