Previously, the vconf key could be set with same value.
Thus the display state callback of the capi-system-device
could be called several times with same state.
Now, the vconf key is updated only if the value is changed.
Thus the callback of the api will be called once
for a certain display state.
Change-Id: I35a89dc6a882b58fb86c21a2b8a8b570231db97c
Signed-off-by: taeyoung <ty317.kim@samsung.com>
int set_setting_pmstate(int val)
{
+ static int old = -1;
+
+ if (old == val)
+ return 0;
+ old = val;
+
display_state_send_system_event(val);
return vconf_set_int(VCONFKEY_PM_STATE, val);
}