diff options
| author | 2019-11-01 21:09:52 +0000 | |
|---|---|---|
| committer | 2019-11-01 21:09:52 +0000 | |
| commit | e13f284c643b156b4be541dfdbf9dca876d7618a (patch) | |
| tree | 08175a2f9e81929c4d5a61af66decd7a4671130c | |
| parent | 9aebaa1ffb7b59308ac05918a9b8e0a4ad187820 (diff) | |
| parent | c73571f5e1d3bb7e3a257df3904b2448a0b4b36f (diff) | |
Merge "libbinder: waitForVintfService"
| -rw-r--r-- | libs/binder/include/binder/IServiceManager.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/binder/include/binder/IServiceManager.h b/libs/binder/include/binder/IServiceManager.h index 4a44c5a7da..bd77567290 100644 --- a/libs/binder/include/binder/IServiceManager.h +++ b/libs/binder/include/binder/IServiceManager.h @@ -114,6 +114,13 @@ sp<INTERFACE> waitForDeclaredService(const String16& name) { } 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(); |