You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
766 B
27 lines
766 B
/*
|
|
* Copyright (C) 2021 The LineageOS Project
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#define LOG_TAG "android.hardware.light-service.sm7125"
|
|
|
|
#include "Lights.h"
|
|
|
|
#include <android/binder_manager.h>
|
|
#include <android/binder_process.h>
|
|
#include <android-base/logging.h>
|
|
|
|
using ::aidl::android::hardware::light::Lights;
|
|
|
|
int main() {
|
|
ABinderProcess_setThreadPoolMaxThreadCount(0);
|
|
std::shared_ptr<Lights> lights = ndk::SharedRefBase::make<Lights>();
|
|
|
|
const std::string instance = std::string() + Lights::descriptor + "/default";
|
|
binder_status_t status = AServiceManager_addService(lights->asBinder().get(), instance.c_str());
|
|
CHECK(status == STATUS_OK);
|
|
|
|
ABinderProcess_joinThreadPool();
|
|
return EXIT_FAILURE; // should not reach
|
|
}
|
|
|