2021-10-02 05:18:02 -04:00
|
|
|
/*
|
|
|
|
* Copyright 2016 The Android Open Source Project
|
|
|
|
*
|
2021-09-12 19:11:43 -04:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2021-10-02 05:18:02 -04:00
|
|
|
*/
|
|
|
|
|
2021-09-12 19:27:22 -04:00
|
|
|
#define LOG_TAG "android.hardware.ir@1.0-service.xiaomi_sdm660"
|
2021-10-02 05:18:02 -04:00
|
|
|
|
2021-09-12 19:16:43 -04:00
|
|
|
#include <android-base/logging.h>
|
|
|
|
#include <hidl/HidlTransportSupport.h>
|
|
|
|
#include "ConsumerIr.h"
|
2021-10-02 05:18:02 -04:00
|
|
|
|
|
|
|
using android::hardware::ir::V1_0::IConsumerIr;
|
2021-09-12 19:16:43 -04:00
|
|
|
using android::hardware::ir::V1_0::implementation::ConsumerIr;
|
|
|
|
using android::hardware::configureRpcThreadpool;
|
|
|
|
using android::hardware::joinRpcThreadpool;
|
2021-10-02 05:18:02 -04:00
|
|
|
|
|
|
|
int main() {
|
2021-09-12 19:16:43 -04:00
|
|
|
android::sp<IConsumerIr> service = new ConsumerIr();
|
|
|
|
|
|
|
|
configureRpcThreadpool(1, true /*callerWillJoin*/);
|
|
|
|
|
|
|
|
android::status_t status = service->registerAsService();
|
|
|
|
if (status != android::OK) {
|
|
|
|
LOG(ERROR) << "Cannot register ConsumerIr service";
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
joinRpcThreadpool();
|
|
|
|
|
|
|
|
return 1; // should never get here
|
2021-10-02 05:18:02 -04:00
|
|
|
}
|