Convert LazyServiceRegistrar usage to singleton
Test: lshal Bug: 139376253 Change-Id: Ib1cbfabec23a488868e807a4a9c2b29cd960cc1e
This commit is contained in:
parent
12ca95ccc4
commit
701e7f6616
2 changed files with 3 additions and 3 deletions
|
@ -46,8 +46,8 @@ int main() {
|
|||
android::sp<IMediaCasService> service = new MediaCasService();
|
||||
android::status_t status;
|
||||
if (kLazyService) {
|
||||
auto serviceRegistrar = std::make_shared<LazyServiceRegistrar>();
|
||||
status = serviceRegistrar->registerService(service);
|
||||
auto serviceRegistrar = LazyServiceRegistrar::getInstance();
|
||||
status = serviceRegistrar.registerService(service);
|
||||
} else {
|
||||
status = service->registerAsService();
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ int main() {
|
|||
configureRpcThreadpool(1, true);
|
||||
|
||||
sp<IStorage> service = new Storage();
|
||||
LazyServiceRegistrar registrar;
|
||||
auto registrar = LazyServiceRegistrar::getInstance();
|
||||
status_t result = registrar.registerService(service);
|
||||
|
||||
if (result != OK) {
|
||||
|
|
Loading…
Reference in a new issue