[WRTjs][VD] Add touch_module_support FMS key check for touch feature 38/323138/2
authorYe Chunling <chunling.ye@samsung.com>
Wed, 23 Apr 2025 09:06:59 +0000 (17:06 +0800)
committerBot Blink <blinkbot@samsung.com>
Tue, 29 Apr 2025 10:33:10 +0000 (10:33 +0000)
If "com.samsung/featureconf/touch_module_support" value is true, think
this product support touch.

Change-Id: I9c96e63b623beb94ba7df06dc3df09a8f24165ec
Signed-off-by: Ye Chunling <chunling.ye@samsung.com>
wrt/src/base/platform_info.cc
wrt/src/base/platform_info.h

index e6b544b3e6fb57be28d9b220374b64771aa6c3b6..cc01debd9b46e3068359c6a477df8b8443294471 100644 (file)
@@ -349,12 +349,30 @@ bool IsIRTouchSupported() {  // for Projector
   return is_ir_touch_support.value();
 }
 
+bool IsTouchModuleSupported() {
+  static absl::optional<bool> touch_module_support;
+  if (touch_module_support.has_value())
+    return touch_module_support.value();
+
+  bool is_supported = false;
+  if (SYSTEM_INFO_ERROR_NONE !=
+      system_info_get_custom_bool(
+          "com.samsung/featureconf/touch_module_support", &is_supported)) {
+    LOG(ERROR) << "Fail to get system info: touch_module_support";
+  }
+  LOG(INFO) << "touch_module_support : " << is_supported;
+  touch_module_support = is_supported;
+
+  return touch_module_support.value();
+}
+
 bool IsTouchSupported() {
   static absl::optional<bool> is_touch_support;
   if (is_touch_support.has_value())
     return is_touch_support.value();
 
-  is_touch_support = IsLFDTouchSupported() || IsIRTouchSupported();
+  is_touch_support =
+      IsLFDTouchSupported() || IsIRTouchSupported() || IsTouchModuleSupported();
   return is_touch_support.value();
 }
 
index ade59853c93b38bb47df92f683739b134299645e..8dbbcc4d2afadfb0d265a7d2578314ac2825f6be 100644 (file)
@@ -79,6 +79,7 @@ bool IsDefaultMouseSupport();
 bool HasLimitQuotaPermission();
 bool IsIRTouchSupported();
 bool IsLFDTouchSupported();
+bool IsTouchModuleSupported();
 bool IsTouchSupported();
 bool IsVisualControllerSupported();
 bool IsMouseCursorSupportedModel();