mirror of
https://github.com/oplus-giulia-dev/android_hardware_oplus
synced 2025-11-04 05:45:34 +08:00
25 lines
709 B
C++
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
|
|
}
|