#include <app.h>
#include <appcore-common.h>
-#include <heynoti.h>
#include <Ecore_X.h>
#include <sensor.h>
#include <aul.h>
{
SETTING_TRACE_BEGIN;
setting_main_appdata *ad = data;
- int r;
if (ad == NULL || ad->win_main == NULL)
- return 0;
-
-#if 0
- switch (m) {
- case APPCORE_RM_PORTRAIT_NORMAL:
- r = 0;
- break;
- case APPCORE_RM_PORTRAIT_REVERSE:
- r = 180;
- break;
- case APPCORE_RM_LANDSCAPE_NORMAL:
- r = 270;
- break;
- case APPCORE_RM_LANDSCAPE_REVERSE:
- r = 90;
- break;
- default:
- r = -1;
- break;
- }
-#endif
- if (r >= 0)
- elm_win_rotation_with_resize_set(ad->win_main, r);
+ return;
+
+ elm_win_rotation_with_resize_set(ad->win_main, m);
}
#endif
int status = 0;
vconf_get_bool(VCONFKEY_SETAPPL_FLIGHT_MODE_BOOL, &status);
item_to_update->chk_status = status;
- if (ad->bAppPause || ad->ug) {
- ad->updateItems[GL_ITEM_FLIGHT] = EINA_TRUE;
- } else { // app is not in pause without ug
- elm_check_state_set(item_to_update->eo_check, status);
+ //do not need delay for checks
+ elm_check_state_set(item_to_update->eo_check, item_to_update->chk_status);
+
+ //Flight mode is ON : Network menu dimmed
+ if (ad->data_network)
+ {
+ if (status)
+ {
+ setting_disable_genlist_item(ad->data_network->item);
+ }
+ else
+ {
+ setting_enable_genlist_item(ad->data_network->item);
+ }
}
return;
} else if (!safeStrCmp(vconf_name, VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL)) {
vconf_get_bool(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, &status);
item_to_update->chk_status = !status;
-
- if (ad->bAppPause || ad->ug) {
- ad->updateItems[GL_ITEM_ROTATION] = EINA_TRUE;
- } else { // app is not in pause without ug
- elm_check_state_set(item_to_update->eo_check, item_to_update->chk_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);
elm_object_item_data_set(item_to_update->item, item_to_update);
elm_genlist_item_update(item_to_update->item);
}
+ }
+ else if (!safeStrCmp(vconf_name, VCONFKEY_CALL_STATE)) {
+ //In call situation : Wi-fi / Tethering / Network menu dimmed
+ if (VCONFKEY_CALL_OFF != status)
+ {
+ if (ad->data_network) setting_disable_genlist_item(ad->data_network->item);
+ if (ad->data_wifi) setting_disable_genlist_item(ad->data_wifi->item);
+ //if (ad->data_mobileApp) setting_disable_genlist_item(ad->data_mobileApp->item);
+ }
+ else
+ {
+ if (ad->data_network) setting_enable_genlist_item(ad->data_network->item);
+ if (ad->data_wifi) setting_enable_genlist_item(ad->data_wifi->item);
+ //if (ad->data_mobileApp) setting_enable_genlist_item(ad->data_mobileApp->item);
+ }
+
} else if (!safeStrCmp(vconf_name, VCONFKEY_BT_STATUS)) {
item_to_update = ad->data_bt;
retm_if(!item_to_update, "ad->data_bt is NULL");
/* load config file */
int cfg_operation_ret = setting_cfg_init();
- PLUGIN_INIT;
+ PLUGIN_INIT(ad);
elm_theme_extension_add(NULL, SETTING_THEME_EDJ_NAME);
#if SUPPORT_LCD_TIMEOUT_KEEPING
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)
cb = setting_int_vconf_change_cb;
REGISTER_VCONF_NODE(ad->listened_list, VCONFKEY_BT_STATUS, cb, data);
REGISTER_VCONF_NODE(ad->listened_list, VCONFKEY_WIFI_STATE, cb, ad);
+ REGISTER_VCONF_NODE(ad->listened_list, VCONFKEY_CALL_STATE, cb, ad);
//do need to disable 'Brightness' menu,just disable sub-items in 'Brightness' menu
//REGISTER_VCONF_NODE(ad->listened_list, VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, cb, ad);
REGISTER_VCONF_NODE(ad->listened_list, VCONFKEY_SETAPPL_BRIGHTNESS_AUTOMATIC_INT, cb, data);
ecore_idler_add(setting_on_idle_lazy, ad);
- //fprintf(stderr, "[TIME] 5. app_create -> app_resume (first display) : %d msec\n", appcore_measure_time());
- //SETTING_TRACE("[TIME] 5. app_create -> app_resume (first display) : %d msec", appcore_measure_time());
- //fprintf(stderr, "[TIME] Total. aul_launch -> app_resume (first display) : %d msec\n", appcore_measure_time_from("APP_START_TIME"));
- //SETTING_TRACE("[TIME] Total. aul_launch -> app_resume (first display) : %d msec", appcore_measure_time_from("APP_START_TIME"));
+ int flight_mode = 0;
+ vconf_get_bool(VCONFKEY_SETAPPL_FLIGHT_MODE_BOOL, &flight_mode);
+ if (flight_mode)
+ {
+ if (ad->data_network) setting_disable_genlist_item(ad->data_network->item);
+ }
- //return 0;
+ int call_status = VCONFKEY_CALL_OFF;
+ vconf_get_int(VCONFKEY_CALL_STATE, &call_status);
+ if (VCONFKEY_CALL_OFF != call_status)
+ {
+ if (ad->data_network) setting_disable_genlist_item(ad->data_network->item);
+ if (ad->data_wifi) setting_disable_genlist_item(ad->data_wifi->item);
+ //if (ad->data_mobileApp) setting_disable_genlist_item(ad->data_mobileApp->item);
+ }
}
int main(int argc, char *argv[])