blob: 7d3d3817a358cafd14a419cd53b09cde66038ae0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/*
* Copyright (C) 2024 The LineageOS Project
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "OsenseAidlHalReporter.h"
#include <android-base/logging.h>
#include <android/binder_manager.h>
#include <android/binder_process.h>
using ::aidl::vendor::oplus::hardware::osense::client::OsenseAidlHalReporter;
int main() {
ABinderProcess_setThreadPoolMaxThreadCount(0);
std::shared_ptr<OsenseAidlHalReporter> reporter =
ndk::SharedRefBase::make<OsenseAidlHalReporter>();
const std::string instance = std::string() + OsenseAidlHalReporter::descriptor + "/default";
binder_status_t status =
AServiceManager_addService(reporter->asBinder().get(), instance.c_str());
CHECK_EQ(status, STATUS_OK);
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reach
}
|