mirror of
https://github.com/oplus-giulia-dev/android_hardware_oplus
synced 2025-11-04 22:05:34 +08:00
Dummy service named differently from the stock one to avoid conflicts. This can be used on devices that do not include CPU ricing, but still require the service to register for camera and prebuilt audio stack to actually work. Change-Id: I41087aefe9af57e7a1161a3a71ab3b9e849925f2
26 lines
777 B
C++
26 lines
777 B
C++
/*
|
|
* SPDX-FileCopyrightText: 2025 The LineageOS Project
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include "Performance.h"
|
|
|
|
#include <android-base/logging.h>
|
|
#include <android/binder_manager.h>
|
|
#include <android/binder_process.h>
|
|
|
|
using ::aidl::vendor::oplus::hardware::performance::Performance;
|
|
|
|
int main() {
|
|
ABinderProcess_setThreadPoolMaxThreadCount(0);
|
|
std::shared_ptr<Performance> performance = ndk::SharedRefBase::make<Performance>();
|
|
|
|
const std::string instance = std::string() + Performance::descriptor + "/default";
|
|
binder_status_t status =
|
|
AServiceManager_addService(performance->asBinder().get(), instance.c_str());
|
|
CHECK_EQ(status, STATUS_OK);
|
|
|
|
ABinderProcess_joinThreadPool();
|
|
return EXIT_FAILURE; // should not reach
|
|
}
|