Files
hardware_interfaces/example/extension/light/2.0/default/service.cpp
Steven Moreland bd0db47974 Delete commented out includes in light extension.
Test: pass
Change-Id: I2cb01b54fb96cb574b8cbd6f94fbbddb157c1f93
2016-11-03 08:33:50 -07:00

27 lines
579 B
C++

#define LOG_TAG "android.hardware.light@2.0-service"
#include <utils/Log.h>
#include "Light.h"
using android::sp;
// libhwbinder:
using android::hardware::IPCThreadState;
using android::hardware::ProcessState;
// Generated HIDL files
using android::hardware::light::V2_0::ILight;
int main() {
const char instance[] = "light";
android::sp<ILight> service = new Light();
service->registerAsService(instance);
ProcessState::self()->setThreadPoolMaxThreadCount(0);
ProcessState::self()->startThreadPool();
IPCThreadState::self()->joinThreadPool();
}