summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInhong Han <inhong1.han@samsung.com>2024-03-19 13:15:39 +0900
committerInhong Han <inhong1.han@samsung.com>2024-03-19 13:47:06 +0900
commitef452e86764b024fd665c41fb4eec51484750c8b (patch)
tree2ab4500b797ee598f54ff475466d44dc8bd6afc2
parent28d0835eddc71bfc0e1201351f7f424ca99c46b4 (diff)
downloadisf-ef452e86764b024fd665c41fb4eec51484750c8b.tar.gz
isf-ef452e86764b024fd665c41fb4eec51484750c8b.tar.bz2
isf-ef452e86764b024fd665c41fb4eec51484750c8b.zip
Add the new configuration to set a minimum restart interval
Change-Id: Ia6fd76d02e34a37517f5681068e299633277c68e
-rw-r--r--ism/src/isf_info_manager.cpp5
-rw-r--r--ism/src/scim_config_path.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/ism/src/isf_info_manager.cpp b/ism/src/isf_info_manager.cpp
index 6ed4afbc..17a1c8ce 100644
--- a/ism/src/isf_info_manager.cpp
+++ b/ism/src/isf_info_manager.cpp
@@ -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;
diff --git a/ism/src/scim_config_path.h b/ism/src/scim_config_path.h
index 56271e2c..beac6bf8 100644
--- a/ism/src/scim_config_path.h
+++ b/ism/src/scim_config_path.h
@@ -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"