2022-02-22 15:51:43 -05:00
|
|
|
/*
|
2023-01-22 21:41:19 -05:00
|
|
|
* Copyright (C) 2020-2023 The LineageOS Project
|
2022-02-22 15:51:43 -05:00
|
|
|
*
|
2023-01-22 21:41:19 -05:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2022-02-22 15:51:43 -05:00
|
|
|
*/
|
|
|
|
|
2024-07-03 03:26:42 -04:00
|
|
|
#define LOG_TAG "lineage.touch@1.0-service.fogos"
|
2022-02-22 15:51:43 -05:00
|
|
|
|
|
|
|
#include <android-base/logging.h>
|
|
|
|
#include <hidl/HidlTransportSupport.h>
|
|
|
|
|
2022-03-13 10:32:03 -04:00
|
|
|
#include "HighTouchPollingRate.h"
|
2022-02-22 15:51:43 -05:00
|
|
|
|
2022-03-13 10:32:03 -04:00
|
|
|
using ::vendor::lineage::touch::V1_0::IHighTouchPollingRate;
|
|
|
|
using ::vendor::lineage::touch::V1_0::implementation::HighTouchPollingRate;
|
2022-02-22 15:51:43 -05:00
|
|
|
|
|
|
|
int main() {
|
2022-03-13 10:32:03 -04:00
|
|
|
android::sp<IHighTouchPollingRate> highTouchPollingRate = new HighTouchPollingRate();
|
2022-02-22 15:51:43 -05:00
|
|
|
|
|
|
|
android::hardware::configureRpcThreadpool(1, true /*callerWillJoin*/);
|
|
|
|
|
2022-03-13 10:32:03 -04:00
|
|
|
if (highTouchPollingRate->registerAsService() != android::OK) {
|
|
|
|
LOG(ERROR) << "Cannot register touchscreen high polling rate HAL service.";
|
2022-02-22 15:51:43 -05:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
LOG(INFO) << "Touchscreen HAL service ready.";
|
|
|
|
|
|
|
|
android::hardware::joinRpcThreadpool();
|
|
|
|
|
|
|
|
LOG(ERROR) << "Touchscreen HAL service failed to join thread pool.";
|
|
|
|
return 1;
|
|
|
|
}
|