a71-common: touch: Fix access node for gestures support check

Change-Id: Idfed98d2c0d940abeb15f98dea65bad1b0bcafb6
This commit is contained in:
Bruno Martins
2025-06-08 01:17:28 +01:00
parent e9bf8e5728
commit e1653be797

View File

@@ -14,8 +14,6 @@ namespace touch {
namespace V1_0 {
namespace samsung {
static constexpr const char* kTspPath = TSP_CMD_NODE;
const std::map<int32_t, TouchscreenGesture::GestureInfo> TouchscreenGesture::kGestureInfoMap = {
// clang-format off
{0, {0x1c7, "Single Tap"}},
@@ -23,7 +21,7 @@ const std::map<int32_t, TouchscreenGesture::GestureInfo> TouchscreenGesture::kGe
};
bool TouchscreenGesture::isSupported() {
std::ifstream file(kTspPath);
std::ifstream file(TSP_CMD_LIST_NODE);
if (file.is_open()) {
std::string line;
while (getline(file, line)) {
@@ -48,7 +46,7 @@ Return<void> TouchscreenGesture::getSupportedGestures(getSupportedGestures_cb re
Return<bool> TouchscreenGesture::setGestureEnabled(
const ::vendor::lineage::touch::V1_0::Gesture&, bool enabled) {
std::fstream file(kTspPath);
std::ofstream file(TSP_CMD_NODE);
file << "singletap_enable," << (enabled ? "1" : "0");