#include #include #include #include #include #include "LazyTestService.h" using android::BBinder; using android::IBinder; using android::IPCThreadState; using android::OK; using android::sp; using android::binder::LazyServiceRegistrar; using android::binder::LazyTestService; int main() { sp service1 = new LazyTestService(); sp service2 = new LazyTestService(); auto lazyRegistrar = LazyServiceRegistrar::getInstance(); LOG_ALWAYS_FATAL_IF(OK != lazyRegistrar.registerService(service1, "aidl_lazy_test_1"), ""); LOG_ALWAYS_FATAL_IF(OK != lazyRegistrar.registerService(service2, "aidl_lazy_test_2"), ""); IPCThreadState::self()->joinThreadPool(); return 1; }