android_device_sony_tama-co.../touch/service.cpp
linckandrea b91f7aae2b tama-common: introduce touchHAL to manage glove mode
* kanged from sake as @3a8f1b3d8f07e9654d7c9633779d1f70a5a399a9
  * gesture & high polling rate support were removed
  * use tama common sys path for touchscreen features

Change-Id: Iff6d8ace406b9f466b272d3632b23b97d6a7fffe
2025-02-14 22:05:04 +01:00

32 lines
849 B
C++

/*
* Copyright (C) 2021 The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/
#define LOG_TAG "vendor.lineage.touch@1.0-service.tama"
#include <android-base/logging.h>
#include <hidl/HidlTransportSupport.h>
#include "GloveMode.h"
using ::vendor::lineage::touch::V1_0::IGloveMode;
using ::vendor::lineage::touch::V1_0::implementation::GloveMode;
int main() {
android::sp<IGloveMode> gloveMode = new GloveMode();
android::hardware::configureRpcThreadpool(1, true /*callerWillJoin*/);
if (gloveMode->registerAsService() != android::OK) {
LOG(ERROR) << "Cannot register touchscreen glove HAL service.";
return 1;
}
LOG(INFO) << "Touchscreen HAL service ready.";
android::hardware::joinRpcThreadpool();
LOG(ERROR) << "Touchscreen HAL service failed to join thread pool.";
return 1;
}