[WRTjs][VD] Support register channel key as mode registed feature from 9.0 02/317102/5
authorliwei90727 <wei90727.li@samsung.com>
Wed, 4 Sep 2024 03:39:26 +0000 (11:39 +0800)
committerBot Blink <blinkbot@samsung.com>
Wed, 4 Sep 2024 11:46:16 +0000 (11:46 +0000)
For TVplus, WRT provide feature that set channelraise key/
channellower key as mode registed, but 'TIZEN_TV_KEYROUTER_
CONFIG_MODE_LONGPRESS_KEY_HANDOVER' is only supported from
9.0, so add tizen platform limitation for it.

Change-Id: I5ca07600063757f4be3fd9c58d52dbf0e8926eaa
Signed-off-by: liwei90727 <wei90727.li@samsung.com>
wrt/src/browser/tv/input_device_manager.cc

index ec4fc7dc049d1ebfb252d575c79e85b794aca046..a874e8bd20b0390ee9afd036ab7bde6f8b23ebb1 100644 (file)
@@ -22,6 +22,7 @@
 #include <unordered_map>
 
 #include "base/logging.h"
+#include "build/tizen_version.h"
 #include "tizen_src/chromium_impl/ui/ozone/platform/efl/efl_event_handler.h"
 
 using namespace std;
@@ -163,6 +164,7 @@ Eina_Bool InputDeviceManager::HandleKeyRouter(void* data) {
 }
 
 void InputDeviceManager::RegisterChannelKeyAsModeRegisted() {
+#if TIZEN_VERSION_AT_LEAST(9, 0, 0) || !BUILDFLAG(IS_RISCV64_TV)
   if (!focus_surface_) {
     LOG(INFO) << "focus_surface_ is null";
     return;
@@ -180,13 +182,12 @@ void InputDeviceManager::RegisterChannelKeyAsModeRegisted() {
   map["XF86RaiseChannel"] = KeyRegisterState::REGISTERED;
   map["XF86LowerChannel"] = KeyRegisterState::REGISTERED;
   KeyRouter_Set_KeyList(self->focus_surface_, &key_list);
-#if !BUILDFLAG(IS_RISCV64_TV)
   KeyRouter_Set_InputConfig(
       self->focus_surface_,
       TIZEN_TV_KEYROUTER_CONFIG_MODE_LONGPRESS_KEY_HANDOVER, NULL);
-#endif
   LOG(INFO) << "XF86RaiseChannel / XF86LowerChannel are registed as "
                "TIZEN_KEYROUTER_MODE_REGISTERED";
+#endif
 }
 
 bool InputDeviceManager::RegisterKey(const std::string& keyname) {