e_mod_rotation_settings: add log if vconf_notify_key_changed is failed 84/243684/3
authorJunseok, Kim <juns.kim@samsung.com>
Wed, 9 Sep 2020 06:26:18 +0000 (15:26 +0900)
committerJunseok, Kim <juns.kim@samsung.com>
Wed, 9 Sep 2020 06:35:14 +0000 (15:35 +0900)
Change-Id: I30a613c0df978129828af4866a9fb43034a7dbc7
Signed-off-by: Junseok, Kim <juns.kim@samsung.com>
src/rotation/e_mod_rotation_settings.c

index 3cb2798..cc61ae9 100644 (file)
@@ -68,12 +68,19 @@ _e_mod_rot_settings_cb_autorotate(keynode_t *node, void *data)
 EINTERN void
 e_mod_rot_settings_init(void)
 {
+   int res = 0;
    int rot = 0;
    if (vconf_get_bool(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, &rot) == VCONF_OK)
      {
-        vconf_notify_key_changed(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL,
-                                 _e_mod_rot_settings_cb_autorotate,
-                                 NULL);
+        res = vconf_notify_key_changed(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL,
+                                       _e_mod_rot_settings_cb_autorotate,
+                                       NULL);
+        if (res != VCONF_OK)
+          {
+             ELOGF("ROTATION", "Could not register AUTO_ROTATE_SCREEN callback. res: %d",
+                   NULL, res);
+          }
+
         // if vconf auto_rotate is false, rotation is blocked
         if (rot == 0) _e_mod_rot_settings_lock(rot);
      }