Rtwo/device/motorola/sm8550-common/touch/service.cpp
2025-09-30 19:22:48 -05:00

28 lines
899 B
C++

/*
* SPDX-FileCopyrightText: The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/
#define LOG_TAG "lineage.touch-service.moto_sm8550"
#include "TouchscreenGesture.h"
#include <android-base/logging.h>
#include <android/binder_manager.h>
#include <android/binder_process.h>
using aidl::vendor::lineage::touch::TouchscreenGesture;
int main() {
binder_status_t status = STATUS_OK;
ABinderProcess_setThreadPoolMaxThreadCount(0);
std::shared_ptr<TouchscreenGesture> tg = ndk::SharedRefBase::make<TouchscreenGesture>();
const std::string instanceTg = std::string(TouchscreenGesture::descriptor) + "/default";
status = AServiceManager_addService(tg->asBinder().get(), instanceTg.c_str());
CHECK_EQ(status, STATUS_OK) << "Failed to add service " << instanceTg << " " << status;
ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reach
}