Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b50eb857 authored by Peter Kalauskas's avatar Peter Kalauskas Committed by android-build-merger
Browse files

Merge "Convert LazyServiceRegistrar usage to singleton" am: f71728f0 am:...

Merge "Convert LazyServiceRegistrar usage to singleton" am: f71728f0 am: 0c7812c7 am: 4ddbdbca
am: 81dcae16

Change-Id: If8fcb23a4166972d0a6c7e7fba6addf92d05e01e
parents 9e20bd4d 81dcae16
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -46,8 +46,8 @@ int main() {
    android::sp<IMediaCasService> service = new MediaCasService();
    android::sp<IMediaCasService> service = new MediaCasService();
    android::status_t status;
    android::status_t status;
    if (kLazyService) {
    if (kLazyService) {
        auto serviceRegistrar = std::make_shared<LazyServiceRegistrar>();
        auto serviceRegistrar = LazyServiceRegistrar::getInstance();
        status = serviceRegistrar->registerService(service);
        status = serviceRegistrar.registerService(service);
    } else {
    } else {
        status = service->registerAsService();
        status = service->registerAsService();
    }
    }
+1 −1
Original line number Original line Diff line number Diff line
@@ -32,7 +32,7 @@ int main() {
    configureRpcThreadpool(1, true);
    configureRpcThreadpool(1, true);


    sp<IStorage> service = new Storage();
    sp<IStorage> service = new Storage();
    LazyServiceRegistrar registrar;
    auto registrar = LazyServiceRegistrar::getInstance();
    status_t result = registrar.registerService(service);
    status_t result = registrar.registerService(service);


    if (result != OK) {
    if (result != OK) {