blob: 55121d9f627f30a39f3c419a5cd9e20f19f52d09 [file] [log] [blame]
Steven Moreland08484f82016-10-14 12:27:48 -07001#define LOG_TAG "android.hardware.light@2.0-service"
2#include <utils/Log.h>
3
4// #include <iostream>
5// #include <unistd.h>
6
7// #include <hidl/IServiceManager.h>
8// #include <hwbinder/IPCThreadState.h>
9// #include <hwbinder/ProcessState.h>
10// #include <utils/Errors.h>
11// #include <utils/StrongPointer.h>
12
13#include "Light.h"
14
15using android::sp;
16
17// libhwbinder:
18using android::hardware::IPCThreadState;
19using android::hardware::ProcessState;
20
21// Generated HIDL files
22using android::hardware::light::V2_0::ILight;
23
24int main() {
25 const char instance[] = "light";
26
27 android::sp<ILight> service = new Light();
28
29 service->registerAsService(instance);
30
31 ProcessState::self()->setThreadPoolMaxThreadCount(0);
32 ProcessState::self()->startThreadPool();
33 IPCThreadState::self()->joinThreadPool();
34}