Lines Matching refs:sm
79 sp<ServiceManager> sm = sp<NiceMock<MockServiceManager>>::make(std::move(access)); in getPermissiveServiceManager() local
80 return sm; in getPermissiveServiceManager()
91 auto sm = getPermissiveServiceManager(); in TEST() local
92 EXPECT_TRUE(sm->addService("foo", getBinder(), false /*allowIsolated*/, in TEST()
97 auto sm = getPermissiveServiceManager(); in TEST() local
98 EXPECT_FALSE(sm->addService("", getBinder(), false /*allowIsolated*/, in TEST()
103 auto sm = getPermissiveServiceManager(); in TEST() local
104 EXPECT_TRUE(sm->addService(std::string(127, 'a'), getBinder(), false /*allowIsolated*/, in TEST()
109 auto sm = getPermissiveServiceManager(); in TEST() local
110 EXPECT_FALSE(sm->addService(std::string(128, 'a'), getBinder(), false /*allowIsolated*/, in TEST()
115 auto sm = getPermissiveServiceManager(); in TEST() local
116 EXPECT_FALSE(sm->addService("happy$foo$foo", getBinder(), false /*allowIsolated*/, in TEST()
121 auto sm = getPermissiveServiceManager(); in TEST() local
122 EXPECT_FALSE(sm->addService("foo", nullptr, false /*allowIsolated*/, in TEST()
134 sp<ServiceManager> sm = sp<NiceMock<MockServiceManager>>::make(std::move(access)); in TEST() local
136 EXPECT_FALSE(sm->addService("foo", getBinder(), false /*allowIsolated*/, in TEST()
143 auto sm = getPermissiveServiceManager(); in TEST() local
144 EXPECT_TRUE(sm->addService("foo", getBinder(), false /*allowIsolated*/, in TEST()
146 EXPECT_TRUE(sm->addService("foo", getBinder(), false /*allowIsolated*/, in TEST()
151 auto sm = getPermissiveServiceManager(); in TEST() local
153 EXPECT_TRUE(sm->addService("foo", serviceA, false /*allowIsolated*/, in TEST()
157 EXPECT_TRUE(sm->getService("foo", &outA).isOk()); in TEST()
162 EXPECT_TRUE(sm->addService("foo", serviceB, false /*allowIsolated*/, in TEST()
166 EXPECT_TRUE(sm->getService("foo", &outB).isOk()); in TEST()
176 sp<ServiceManager> sm = sp<NiceMock<MockServiceManager>>::make(std::move(access)); in TEST() local
178 EXPECT_FALSE(sm->addService("foo", getBinder(), false /*allowIsolated*/, in TEST()
183 auto sm = getPermissiveServiceManager(); in TEST() local
186 EXPECT_TRUE(sm->addService("foo", service, false /*allowIsolated*/, in TEST()
190 EXPECT_TRUE(sm->getService("foo", &out).isOk()); in TEST()
195 auto sm = getPermissiveServiceManager(); in TEST() local
198 EXPECT_TRUE(sm->getService("foo", &out).isOk()); in TEST()
209 sp<ServiceManager> sm = sp<NiceMock<MockServiceManager>>::make(std::move(access)); in TEST() local
211 EXPECT_TRUE(sm->addService("foo", getBinder(), false /*allowIsolated*/, in TEST()
216 EXPECT_TRUE(sm->getService("foo", &out).isOk()); in TEST()
233 sp<ServiceManager> sm = sp<NiceMock<MockServiceManager>>::make(std::move(access)); in TEST() local
236 EXPECT_TRUE(sm->addService("foo", service, true /*allowIsolated*/, in TEST()
240 EXPECT_TRUE(sm->getService("foo", &out).isOk()); in TEST()
259 sp<ServiceManager> sm = sp<NiceMock<MockServiceManager>>::make(std::move(access)); in TEST() local
261 EXPECT_TRUE(sm->addService("foo", getBinder(), false /*allowIsolated*/, in TEST()
266 EXPECT_TRUE(sm->getService("foo", &out).isOk()); in TEST()
276 sp<ServiceManager> sm = sp<NiceMock<MockServiceManager>>::make(std::move(access)); in TEST() local
279 EXPECT_FALSE(sm->listServices(IServiceManager::DUMP_FLAG_PRIORITY_ALL, &out).isOk()); in TEST()
284 auto sm = getPermissiveServiceManager(); in TEST() local
286 EXPECT_TRUE(sm->addService("sd", getBinder(), false /*allowIsolated*/, in TEST()
288 EXPECT_TRUE(sm->addService("sc", getBinder(), false /*allowIsolated*/, in TEST()
290 EXPECT_TRUE(sm->addService("sb", getBinder(), false /*allowIsolated*/, in TEST()
292 EXPECT_TRUE(sm->addService("sa", getBinder(), false /*allowIsolated*/, in TEST()
296 EXPECT_TRUE(sm->listServices(IServiceManager::DUMP_FLAG_PRIORITY_ALL, &out).isOk()); in TEST()
303 auto sm = getPermissiveServiceManager(); in TEST() local
305 EXPECT_TRUE(sm->addService("sd", getBinder(), false /*allowIsolated*/, in TEST()
307 EXPECT_TRUE(sm->addService("sc", getBinder(), false /*allowIsolated*/, in TEST()
309 EXPECT_TRUE(sm->addService("sb", getBinder(), false /*allowIsolated*/, in TEST()
311 EXPECT_TRUE(sm->addService("sa", getBinder(), false /*allowIsolated*/, in TEST()
315 EXPECT_TRUE(sm->listServices(IServiceManager::DUMP_FLAG_PRIORITY_CRITICAL, &out).isOk()); in TEST()
324 auto sm = getPermissiveServiceManager(); in TEST() local
326 EXPECT_TRUE(sm->updatableViaApex("android.hardware.camera.provider.ICameraProvider/internal/0", in TEST()
336 auto sm = getPermissiveServiceManager(); in TEST() local
338 EXPECT_TRUE(sm->updatableViaApex("android.hardware.camera.provider.ICameraProvider", in TEST()
347 auto sm = getPermissiveServiceManager(); in TEST() local
349 EXPECT_TRUE(sm->getUpdatableNames("com.google.emulated.camera.provider.hal", &names).isOk()); in TEST()
358 auto sm = getPermissiveServiceManager(); in TEST() local
360 EXPECT_TRUE(sm->getUpdatableNames("non.existing.apex.name", &names).isOk()); in TEST()
367 auto sm = getPermissiveServiceManager(); in TEST() local
369 EXPECT_TRUE(sm->isDeclared("mapper/minigbm", &declared).isOk()); in TEST()
376 auto sm = getPermissiveServiceManager(); in TEST() local
378 EXPECT_TRUE(sm->getDeclaredInstances("mapper", &instances).isOk()); in TEST()
405 sp<ServiceManager> sm = sp<ServiceManager>::make(std::move(access)); in TEST() local
409 EXPECT_EQ(sm->registerForNotifications("foofoo", cb).exceptionCode(), Status::EX_SECURITY); in TEST()
421 sp<ServiceManager> sm = sp<ServiceManager>::make(std::move(access)); in TEST() local
425 EXPECT_EQ(sm->registerForNotifications("foofoo", cb).exceptionCode(), in TEST()
435 sp<ServiceManager> sm = sp<ServiceManager>::make(std::move(access)); in TEST() local
440 EXPECT_EQ(sm->unregisterForNotifications("foofoo", cb).exceptionCode(), in TEST()
445 auto sm = getPermissiveServiceManager(); in TEST() local
449 EXPECT_EQ(sm->registerForNotifications("foo@foo", cb).exceptionCode(), in TEST()
454 auto sm = getPermissiveServiceManager(); in TEST() local
456 EXPECT_EQ(sm->registerForNotifications("foofoo", nullptr).exceptionCode(), in TEST()
461 auto sm = getPermissiveServiceManager(); in TEST() local
465 EXPECT_TRUE(sm->registerForNotifications("foofoo", cb).isOk()); in TEST()
466 EXPECT_EQ(sm->unregisterForNotifications("foofoo", cb).exceptionCode(), 0); in TEST()
470 auto sm = getPermissiveServiceManager(); in TEST() local
474 EXPECT_EQ(sm->unregisterForNotifications("foofoo", cb).exceptionCode(), in TEST()
479 auto sm = getPermissiveServiceManager(); in TEST() local
483 EXPECT_TRUE(sm->registerForNotifications("foofoo", cb).isOk()); in TEST()
484 EXPECT_TRUE(sm->addService("otherservice", getBinder(), in TEST()
492 auto sm = getPermissiveServiceManager(); in TEST() local
498 EXPECT_TRUE(sm->registerForNotifications("asdfasdf", cb).isOk()); in TEST()
499 EXPECT_TRUE(sm->addService("asdfasdf", service, in TEST()
507 auto sm = getPermissiveServiceManager(); in TEST() local
513 EXPECT_TRUE(sm->addService("asdfasdf", service, in TEST()
516 EXPECT_TRUE(sm->registerForNotifications("asdfasdf", cb).isOk()); in TEST()
523 auto sm = getPermissiveServiceManager(); in TEST() local
530 EXPECT_TRUE(sm->registerForNotifications("asdfasdf", cb).isOk()); in TEST()
531 EXPECT_TRUE(sm->addService("asdfasdf", binder1, in TEST()
533 EXPECT_TRUE(sm->addService("asdfasdf", binder2, in TEST()