android_device_sony_tama-co.../touch/service.cpp
Danny Trunk 63cfbf969e tama-common: Move to touch AIDL
Change-Id: Ic31d3c29a31ece625de67db57de2b8a246b4c7a1
Signed-off-by: Sorayukii <sorayukii69@gmail.com>
2026-05-25 14:18:17 +00:00

27 lines
854 B
C++

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