display: Fix dim state timeout value calculation 11/322011/2 accepted/tizen/9.0/unified/20250407.170151
authorYunhee Seo <yuni.seo@samsung.com>
Wed, 2 Apr 2025 06:19:03 +0000 (15:19 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Wed, 2 Apr 2025 07:46:44 +0000 (16:46 +0900)
From consctuctor initialization step,
there was dim timeout value get operation.
However, unit conversion from seconds to milliseconds was omitted.
Proper calculation is added.

Change-Id: I4caaf79d638ea105737de123f1426bc652fa9e23
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/display/setting.c

index 9c087ed83ff40a25f5ea045d6528613f572dde89..a761ad65231dd05704c4ea807bcf8d51aa0e5439 100644 (file)
@@ -422,9 +422,12 @@ int exit_setting(void)
 
 static void __CONSTRUCTOR__ initialize(void)
 {
-       int ret;
+       int ret = 0;
+       int dim_timeout = 0;
 
-       ret = vconf_get_int(VCONFKEY_SETAPPL_TIMEOUT_DIM, &exclusive_dim_timeout);
-       if (ret < 0 || exclusive_dim_timeout < 0)
+       ret = vconf_get_int(VCONFKEY_SETAPPL_TIMEOUT_DIM, &dim_timeout);
+       if (ret < 0)
                exclusive_dim_timeout = EXCLUSIVE_DIM_TIMEOUT_UNSET;
+       else
+               set_exclusive_dim_timeout(dim_timeout);
 }