Loading libs/binder/include/binder/IServiceManager.h +14 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,13 @@ sp<INTERFACE> waitForDeclaredService(const String16& name) { return interface_cast<INTERFACE>(sm->waitForService(name)); } template <typename INTERFACE> sp<INTERFACE> checkDeclaredService(const String16& name) { const sp<IServiceManager> sm = defaultServiceManager(); if (!sm->isDeclared(name)) return nullptr; return interface_cast<INTERFACE>(sm->checkService(name)); } template<typename INTERFACE> sp<INTERFACE> waitForVintfService( const String16& instance = String16("default")) { Loading @@ -120,6 +127,13 @@ sp<INTERFACE> waitForVintfService( INTERFACE::descriptor + String16("/") + instance); } template<typename INTERFACE> sp<INTERFACE> checkVintfService( const String16& instance = String16("default")) { return checkDeclaredService<INTERFACE>( INTERFACE::descriptor + String16("/") + instance); } template<typename INTERFACE> status_t getService(const String16& name, sp<INTERFACE>* outService) { Loading Loading
libs/binder/include/binder/IServiceManager.h +14 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,13 @@ sp<INTERFACE> waitForDeclaredService(const String16& name) { return interface_cast<INTERFACE>(sm->waitForService(name)); } template <typename INTERFACE> sp<INTERFACE> checkDeclaredService(const String16& name) { const sp<IServiceManager> sm = defaultServiceManager(); if (!sm->isDeclared(name)) return nullptr; return interface_cast<INTERFACE>(sm->checkService(name)); } template<typename INTERFACE> sp<INTERFACE> waitForVintfService( const String16& instance = String16("default")) { Loading @@ -120,6 +127,13 @@ sp<INTERFACE> waitForVintfService( INTERFACE::descriptor + String16("/") + instance); } template<typename INTERFACE> sp<INTERFACE> checkVintfService( const String16& instance = String16("default")) { return checkDeclaredService<INTERFACE>( INTERFACE::descriptor + String16("/") + instance); } template<typename INTERFACE> status_t getService(const String16& name, sp<INTERFACE>* outService) { Loading