From: Kairong Yin Date: Tue, 20 Nov 2012 10:29:26 +0000 (-0800) Subject: Fix N_SE-13547 and N_SE-13516 X-Git-Tag: accepted/tizen_2.1/20130425.022820~31^2~136^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1525776038d60df2e503403ae52d4ca22d9d4e2f;p=apps%2Fcore%2Fpreloaded%2Fsettings.git Fix N_SE-13547 and N_SE-13516 Change-Id: I1be73c447ddcffa77b35a44fbc72153ac3aa9c97 --- diff --git a/src/setting.c b/src/setting.c index 49f09be..c702afb 100755 --- a/src/setting.c +++ b/src/setting.c @@ -422,6 +422,15 @@ static void setting_other_vconf_change_cb(keynode_t *key, void *data) item_to_update->chk_status = !status; //do not need delay for checks elm_check_state_set(item_to_update->eo_check, item_to_update->chk_status); + SETTING_TRACE("item_to_update->chk_status:%d", item_to_update->chk_status); + if (item_to_update->chk_status) //rotation function is not blocked + { + SETTING_TRACE("Rotation function is on, it is necessary to adjust the device orientation"); + int mode = APP_DEVICE_ORIENTATION_0; + mode = app_get_device_orientation(); + elm_win_rotation_with_resize_set(ad->win_main, mode); + } + return; } else if (!safeStrCmp(vconf_name, VCONFKEY_NFC_STATE)) { SETTING_TRACE_DEBUG("%s updated", vconf_name); @@ -840,6 +849,17 @@ static int setting_main_app_reset(service_h service, void *data) SETTING_TRACE_BEGIN; setting_main_appdata *ad = data; + int value = 0; + vconf_get_bool (VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, &value); + SETTING_TRACE("value:%d", value); + if (!value) //rotation function is not blocked + { + SETTING_TRACE("Rotation function is on, it is necessary to adjust the device orientation"); + int mode = APP_DEVICE_ORIENTATION_0; + mode = app_get_device_orientation(); + elm_win_rotation_with_resize_set(ad->win_main, mode); + } + #if SUPPORT_LIVEBOX_DEMO char *ug_name = NULL; if(b != NULL)