From 37d61044958963a4b4ee2fac46679ac2482e62f6 Mon Sep 17 00:00:00 2001 From: "Junseok, Kim" Date: Wed, 9 Sep 2020 15:26:18 +0900 Subject: [PATCH] e_mod_rotation_settings: add log if vconf_notify_key_changed is failed Change-Id: I30a613c0df978129828af4866a9fb43034a7dbc7 Signed-off-by: Junseok, Kim --- src/rotation/e_mod_rotation_settings.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/rotation/e_mod_rotation_settings.c b/src/rotation/e_mod_rotation_settings.c index 3cb2798..cc61ae9 100644 --- a/src/rotation/e_mod_rotation_settings.c +++ b/src/rotation/e_mod_rotation_settings.c @@ -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); } -- 2.7.4