Lines Matching refs:instance

33 binder_exception_t AServiceManager_addService(AIBinder* binder, const char* instance) {  in AServiceManager_addService()  argument
34 if (binder == nullptr || instance == nullptr) { in AServiceManager_addService()
39 status_t exception = sm->addService(String16(instance), binder->getBinder()); in AServiceManager_addService()
43 binder_exception_t AServiceManager_addServiceWithFlags(AIBinder* binder, const char* instance, in AServiceManager_addServiceWithFlags() argument
45 if (binder == nullptr || instance == nullptr) { in AServiceManager_addServiceWithFlags()
69 sm->addService(String16(instance), binder->getBinder(), allowIsolated, dumpFlags); in AServiceManager_addServiceWithFlags()
74 AIBinder* AServiceManager_checkService(const char* instance) { in AServiceManager_checkService() argument
75 if (instance == nullptr) { in AServiceManager_checkService()
80 sp<IBinder> binder = sm->checkService(String16(instance)); in AServiceManager_checkService()
86 AIBinder* AServiceManager_getService(const char* instance) { in AServiceManager_getService() argument
87 if (instance == nullptr) { in AServiceManager_getService()
92 sp<IBinder> binder = sm->getService(String16(instance)); in AServiceManager_getService()
98 binder_status_t AServiceManager_registerLazyService(AIBinder* binder, const char* instance) { in AServiceManager_registerLazyService() argument
99 if (binder == nullptr || instance == nullptr) { in AServiceManager_registerLazyService()
104 status_t status = serviceRegistrar.registerService(binder->getBinder(), instance); in AServiceManager_registerLazyService()
108 AIBinder* AServiceManager_waitForService(const char* instance) { in AServiceManager_waitForService() argument
109 if (instance == nullptr) { in AServiceManager_waitForService()
114 sp<IBinder> binder = sm->waitForService(String16(instance)); in AServiceManager_waitForService()
120 typedef void (*AServiceManager_onRegister)(const char* instance, AIBinder* registered,
126 const char* instance = nullptr; member
134 LOG_ALWAYS_FATAL_IF(String8(smInstance) != instance, "onServiceRegistration: %s != %s", in onServiceRegistration()
135 String8(smInstance).c_str(), instance); in onServiceRegistration()
140 onRegister(instance, ret.get(), cookie); in onServiceRegistration()
145 instance = nullptr; in clear()
152 AServiceManager_registerForServiceNotifications(const char* instance, in AServiceManager_registerForServiceNotifications() argument
155 LOG_ALWAYS_FATAL_IF(instance == nullptr, "instance == nullptr"); in AServiceManager_registerForServiceNotifications()
156 LOG_ALWAYS_FATAL_IF(onRegister == nullptr, "onRegister == nullptr for %s", instance); in AServiceManager_registerForServiceNotifications()
160 cb->instance = instance; in AServiceManager_registerForServiceNotifications()
165 if (status_t res = sm->registerForNotifications(String16(instance), cb); res != STATUS_OK) { in AServiceManager_registerForServiceNotifications()
166 ALOGE("Failed to register for service notifications for %s: %s", instance, in AServiceManager_registerForServiceNotifications()
182 bool AServiceManager_isDeclared(const char* instance) { in AServiceManager_isDeclared() argument
183 if (instance == nullptr) { in AServiceManager_isDeclared()
188 return sm->isDeclared(String16(instance)); in AServiceManager_isDeclared()
197 for (const String16& instance : sm->getDeclaredInstances(String16(interface))) { in AServiceManager_forEachDeclaredInstance() local
198 callback(String8(instance).c_str(), context); in AServiceManager_forEachDeclaredInstance()
201 bool AServiceManager_isUpdatableViaApex(const char* instance) { in AServiceManager_isUpdatableViaApex() argument
202 if (instance == nullptr) { in AServiceManager_isUpdatableViaApex()
207 return sm->updatableViaApex(String16(instance)) != std::nullopt; in AServiceManager_isUpdatableViaApex()
209 void AServiceManager_getUpdatableApexName(const char* instance, void* context, in AServiceManager_getUpdatableApexName() argument
211 LOG_ALWAYS_FATAL_IF(instance == nullptr, "instance == nullptr"); in AServiceManager_getUpdatableApexName()
216 std::optional<String16> updatableViaApex = sm->updatableViaApex(String16(instance)); in AServiceManager_getUpdatableApexName()
221 void* AServiceManager_openDeclaredPassthroughHal(const char* interface, const char* instance, in AServiceManager_openDeclaredPassthroughHal() argument
224 LOG_ALWAYS_FATAL_IF(instance == nullptr, "instance == nullptr"); in AServiceManager_openDeclaredPassthroughHal()
226 return openDeclaredPassthroughHal(String16(interface), String16(instance), flag); in AServiceManager_openDeclaredPassthroughHal()