diff options
Diffstat (limited to 'GrallocHAL/service/aidl/service.cpp')
-rw-r--r-- | GrallocHAL/service/aidl/service.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/GrallocHAL/service/aidl/service.cpp b/GrallocHAL/service/aidl/service.cpp deleted file mode 100644 index 26cf77e..0000000 --- a/GrallocHAL/service/aidl/service.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#define LOG_TAG "gralloc-V1-service" - -#include <android/binder_ibinder_platform.h> -#include <android/binder_manager.h> -#include <android/binder_process.h> -#include <android/binder_status.h> -#include <log/log.h> - -#include "aidl/GrallocAllocator.h" - -using namespace android; - -using pixel::allocator::GrallocAllocator; - -int main() { - auto service = ndk::SharedRefBase::make<GrallocAllocator>(); - auto binder = service->asBinder(); - - AIBinder_setMinSchedulerPolicy(binder.get(), SCHED_NORMAL, -20); - - const auto instance = std::string() + GrallocAllocator::descriptor + "/default"; - auto status = AServiceManager_addService(binder.get(), instance.c_str()); - if (status != STATUS_OK) { - ALOGE("Failed to start AIDL gralloc allocator service"); - return -EINVAL; - } - - ABinderProcess_setThreadPoolMaxThreadCount(4); - ABinderProcess_startThreadPool(); - ABinderProcess_joinThreadPool(); - - return EXIT_FAILURE; // Unreachable -} |