Add the new configuration to set a minimum restart interval 72/308172/1
authorInhong Han <inhong1.han@samsung.com>
Tue, 19 Mar 2024 04:15:39 +0000 (13:15 +0900)
committerInhong Han <inhong1.han@samsung.com>
Tue, 19 Mar 2024 04:47:06 +0000 (13:47 +0900)
Change-Id: Ia6fd76d02e34a37517f5681068e299633277c68e

ism/src/isf_info_manager.cpp
ism/src/scim_config_path.h

index 6ed4afb..17a1c8c 100644 (file)
@@ -3032,10 +3032,11 @@ public:
                     static clock_t  clock_tiks = sysconf (_SC_CLK_TCK);
                     clock_t curr_tiks = times (&tiks_buf);
                     clock_t  secs = (curr_tiks - start_tiks) / clock_tiks;
-                    //LOGE ("time second:%f", secs);
+                    double min_restart_interval = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_MINIMUM_RESTART_INTERVAL), (double)MIN_REPEAT_TIME);
                     static String  restart_uuid;
 
-                    if (restart_uuid != uuid || secs > MIN_REPEAT_TIME) {
+                    LOGW("time second: %ld, restart inverval : %f", secs, min_restart_interval);
+                    if (restart_uuid != uuid || secs > min_restart_interval) {
                         scim_usleep (100000);
 
                         int    client;
index 56271e2..beac6bf 100644 (file)
@@ -97,6 +97,7 @@ namespace scim {
 #define SCIM_GLOBAL_CONFIG_LAUNCH_WEB_SERVER                        "/LaunchWebServer"
 #define SCIM_GLOBAL_CONFIG_QUICK_PANEL_ICON_PATH                    "/QuickpanelIconPath"
 #define SCIM_GLOBAL_CONFIG_ENABLE_AUTO_RESTART_ISE                  "/EnableAutoRestartIse"
+#define SCIM_GLOBAL_CONFIG_MINIMUM_RESTART_INTERVAL                 "/MinimumRestartInterval"
 
 #define ISF_CONFIG_HARDWARE_KEYBOARD_DETECT                         "/isf/hw_keyboard_detect"