blob: 74cbc69cd1fe741eeb29835bfdcd5f42ef0c726c [file] [log] [blame]
Alessandro Astone2c75f472021-01-30 01:33:12 +01001/*
2 * SPDX-FileCopyrightText: 2025 The LineageOS Project
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6#define LOG_TAG "vendor.lineage.touch-service.pixel"
7
8#include "GloveMode.h"
9
10#include <android-base/logging.h>
11#include <android/binder_manager.h>
12#include <android/binder_process.h>
13
14using aidl::vendor::lineage::touch::GloveMode;
15
16int main() {
17 ABinderProcess_setThreadPoolMaxThreadCount(0);
18 std::shared_ptr<GloveMode> glovemode = ndk::SharedRefBase::make<GloveMode>();
19
20 const std::string instance = std::string(GloveMode::descriptor) + "/default";
21 binder_status_t status =
22 AServiceManager_addService(glovemode->asBinder().get(), instance.c_str());
23 CHECK_EQ(status, STATUS_OK) << "Failed to add service " << instance << " " << status;
24
25 ABinderProcess_joinThreadPool();
26 return EXIT_FAILURE; // should not reach
27}