Merge "Convert LazyServiceRegistrar usage to singleton" am: f71728f04b am: 0c7812c7f5 am: 4ddbdbca8b am: 81dcae16ca

am: b50eb85710

Change-Id: Ib683c063184299c4d6dfab564324da867ac2fd46
This commit is contained in:
Peter Kalauskas
2019-08-16 12:31:03 -07:00
committed by android-build-merger
2 changed files with 3 additions and 3 deletions

View File

@@ -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();
}

View File

@@ -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) {