Files
pjgowtham 41973058e6 Introduce vendor.oplus.hardware.performance-service
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
2026-01-20 14:32:54 +01:00

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
}