diff options
| author | Julian Veit <claymore1298@gmail.com> | 2025-10-04 14:12:30 +0000 |
|---|---|---|
| committer | Julian Veit <claymore1298@gmail.com> | 2025-10-04 14:12:30 +0000 |
| commit | 04a7d455fb216fcf62513091a751fb7934ed89f8 (patch) | |
| tree | 2a4176d698e93e6cb94e010cb1d14b83aaafff18 /aidl/performance/service.cpp | |
| parent | 0054d0f22d5950641625022e8f271b0e46a68354 (diff) | |
| parent | 34f36e2f7f0a8d70603bf8087d4afbd6d81be591 (diff) | |
Merge branch 'lineage-22.2' of https://github.com/LineageOS/android_hardware_oplus into HEADv15.0
Change-Id: Ic1a8d5c970cdbeab75c3a68cffdc36f0acaa5518
Diffstat (limited to 'aidl/performance/service.cpp')
| -rw-r--r-- | aidl/performance/service.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/aidl/performance/service.cpp b/aidl/performance/service.cpp new file mode 100644 index 0000000..18cda4f --- /dev/null +++ b/aidl/performance/service.cpp @@ -0,0 +1,25 @@ +/* + * 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 +} |
