Files
android_hardware_oplus/aidl/urcc/service.cpp
LuK1337 690071580e Introduce vendor.oplus.hardware.urcc-service
Change-Id: I7fe1a4e9b590d077f43bbaac03e483724d3198e0
2025-09-26 00:37:26 +05:30

25 lines
709 B
C++

/*
* SPDX-FileCopyrightText: 2025 The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/
#include "Urcc.h"
#include <android-base/logging.h>
#include <android/binder_manager.h>
#include <android/binder_process.h>
using ::aidl::vendor::oplus::hardware::urcc::Urcc;
int main() {
ABinderProcess_setThreadPoolMaxThreadCount(0);
std::shared_ptr<Urcc> urcc = ndk::SharedRefBase::make<Urcc>();
const std::string instance = std::string() + Urcc::descriptor + "/default";
binder_status_t status = AServiceManager_addService(urcc->asBinder().get(), instance.c_str());
CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reach
}