blob: d21afa6612cc5330ee12e68054543692e5b917c8 [file] [log] [blame]
Steven Moreland08484f82016-10-14 12:27:48 -07001#define LOG_TAG "android.hardware.light@2.0-service"
Steven Morelandbd0db472016-11-03 08:32:56 -07002
Steven Moreland08484f82016-10-14 12:27:48 -07003#include <utils/Log.h>
4
Steven Moreland08484f82016-10-14 12:27:48 -07005#include "Light.h"
6
7using android::sp;
8
9// libhwbinder:
10using android::hardware::IPCThreadState;
11using android::hardware::ProcessState;
12
13// Generated HIDL files
14using android::hardware::light::V2_0::ILight;
15
16int main() {
17 const char instance[] = "light";
18
19 android::sp<ILight> service = new Light();
20
21 service->registerAsService(instance);
22
23 ProcessState::self()->setThreadPoolMaxThreadCount(0);
24 ProcessState::self()->startThreadPool();
25 IPCThreadState::self()->joinThreadPool();
26}