#define MAX_DEVICE_NAME_LEN 24
#define EMPTY_LIMITATION_STR "The Name cannot be empty or composited by spaces"//"IDS_ST_BODY_THE_NAME_FIELD_CANNOT_BE_EMPTY"
-#define SOFTWARE_UPDATE_STR "IDS_ST_MBODY_SOFTWARE_UPDATE"
-
static int setting_about_main_create(void *cb);
static int setting_about_main_destroy(void *cb);
ELM_GENLIST_ITEM_NONE, NULL, NULL);
elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-#ifdef SUPPORT_DIAG_USAGE
- // [UI] Diagnostics and Usage
- if (!is_emul_bin) {
- setting_create_Gendial_field_def(scroller, &(ad->itc_1text),
- setting_about_main_mouse_up_Gendial_list_cb,
- ad, SWALLOW_Type_INVALID, NULL, NULL,
- 0, SOFTWARE_UPDATE_STR,
- NULL, NULL);
- }
-#endif
// [UI] Certificates
// implementation is in progress.
setting_create_Gendial_field_def(scroller, &(ad->itc_1text),
__setting_about_main_certificates_clicked(data);
} else if (!safeStrCmp(SETTING_ABOUT_DEVICE_NAME_STR, list_item->keyStr)) {
__setting_about_main_device_name_clicked(data, list_item->eo_check);
- } else if (!safeStrCmp(SOFTWARE_UPDATE_STR, list_item->keyStr)) {
- //__setting_about_main_diagnostics_usage_clicked(data, list_item->eo_check);
}
}
#define KeyStr_Font "IDS_COM_BODY_FONT"
-#define KeyStr_Motions "IDS_ST_BODY_MOTION"
#define KeyStr_Powersaving "IDS_ST_BODY_POWER_SAVING_MODE"
#define KeyStr_Display "IDS_ST_BODY_DISPLAY"
#define KeyStr_Reset "IDS_COM_BODY_RESET"
#define KeyStr_AboutPhone "IDS_ST_BODY_ABOUT_PHONE"
#define KeyStr_MenuWidgets "IDS_ST_BODY_MENU_AND_WIDGETS"
-/*#define KeyStr_Accessibility "IDS_ST_BODY_ACCESSIBILITY_SETTINGS"*/
-#define KeyStr_Accessibility "IDS_ST_BODY_ACCESSIBILITY"
#define KeyStr_Screen_reader "IDS_ST_MBODY_SCREEN_READER_HTTS"
/* applications keyStr*/
#define IMG_UsePacketData SETTING_ICON_PATH_CFG"Data-32.png"
#define IMG_USBconnection SETTING_ICON_PATH_CFG"A01-1_icon_USB_Connection.png"
#define IMG_TVout SETTING_ICON_PATH_CFG"TVout.png"
+#define IMG_MobileAP SETTING_ICON_PATH_CFG"A01-1_icon_mobileAP.png"
/* system IMG*/
#define IMG_Menuscreen SETTING_ICON_PATH_CFG"A01-1_icon_Menu.png"
#define IMG_KeyboradLanguage SETTING_ICON_PATH_CFG"A01-1_icon_keyboard.png"
#define IMG_Gestures SETTING_ICON_PATH_CFG"Gesture.png"
#define IMG_Touch SETTING_ICON_PATH_CFG"Touch.png"
-#define IMG_Motion SETTING_ICON_PATH_CFG"A01-1_icon_Motion.png"
#define IMG_License SETTING_ICON_PATH_CFG"A01-1_icon_License.png"
#define IMG_Security SETTING_ICON_PATH_CFG"A01-1_icon_Security.png"
#define IMG_Memory SETTING_ICON_PATH_CFG"A01-1_icon_Memory.png"
#define IMG_Reset SETTING_ICON_PATH_CFG"A01-1_icon_Reset.png"
#define IMG_AboutPhone SETTING_ICON_PATH_CFG"A01-1_icon_About_phone.png"
#define IMG_Theme SETTING_ICON_PATH_CFG"A01-1_icon_USB_Theme.png"
-#define IMG_Accessibility SETTING_ICON_PATH_CFG"Accessibility.png"
#define IMG_StorageIcon SETTING_ICON_PATH_CFG"storage.png"
__create_an_item(KeyStr_FlightMode, IMG_FlightMode, NULL, Cfg_Item_Pos_Level0, Cfg_Item_unResetable);
__create_an_item(KeyStr_WiFi, IMG_WiFi, "wifi-efl-UG", Cfg_Item_Pos_Level0, Cfg_Item_Resetable);
- //__create_an_item(KeyStr_MobileAP, IMG_MobileAP, "setting-mobile-ap-ug", Cfg_Item_Pos_Level0, Cfg_Item_Resetable);
+ __create_an_item(KeyStr_MobileAP, IMG_MobileAP, "setting-mobile-ap-ug", Cfg_Item_Pos_Level0, Cfg_Item_Resetable);
__create_an_item(KeyStr_Location, IMG_Location, "setting-location-efl", Cfg_Item_Pos_Level0, Cfg_Item_Resetable);
__create_an_item(KeyStr_Network, IMG_Network, "setting-network-efl", Cfg_Item_Pos_Level0, Cfg_Item_Resetable);
__create_an_item(KeyStr_Bluetooth, IMG_Bluetooth, "setting-bluetooth-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable);
__create_an_item(KeyStr_Powersaving, IMG_Powersaving, "setting-powersaving-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable);
#endif
-#if SUPPORT_MOTIONS
- __create_an_item(KeyStr_Motions, IMG_Motion, "setting-motion-efl|viewtype:motions", Cfg_Item_Pos_Level0, Cfg_Item_unResetable);
-#endif
-
-#if SUPPORT_ACCESSIBILITY
- __create_an_item(KeyStr_Accessibility, IMG_Accessibility, "setting-accessibility-efl", Cfg_Item_Pos_Level0, Cfg_Item_unResetable);
-#endif
-
#if SUPPORT_FONT
__create_an_item(KeyStr_Font, IMG_Font, "setting-font-efl", Cfg_Item_Pos_Level1, Cfg_Item_Resetable);
#endif
#include <setting-connectivity-usb.h>
#include <app_manager.h>
-
-#define GROUP_MAX 30
-#define USB_BTN_NO 0
-#define SETTING_USB_MDM_RESTRICTED 10
-#define DIAGNOSTICS_USAGE_STR "IDS_ST_BODY_CRASH_VIEWER"
-
-#define SETTING_CPU_USAGE_PKG_NAME "com.samsung.dispcpuinfo"
#define DEBUG_MODE_POPUP_TEXT \
"USB debugging is intended for development purposes only. " \
"It can be used to copy data between your computer and your " \
"device, install application on your device without " \
"notification, and read log data"
-static char* bgprocess_list[] = {
- "IDS_ST_HEADER_STANDARD_LIMIT_ABB",
- "IDS_ST_HEADER_NO_BACKGROUND_PROCESSES_ABB",
- "IDS_ST_HEADER_1_PROCESS_AT_MOST_ABB",
- "IDS_ST_HEADER_2_PROCESSES_AT_MOST_ABB",
- "IDS_ST_HEADER_3_PROCESSES_AT_MOST_ABB",
- "IDS_ST_HEADER_4_PROCESSES_AT_MOST_ABB",
-};
-
static int setting_connectivity_usb_create(void *cb);
static int setting_connectivity_usb_destroy(void *cb);
static int setting_connectivity_usb_update(void *cb);
.cleanup = setting_connectivity_usb_cleanup,
};
-static void
-__setting_devoptions_main_exp_cb(void *data, Evas_Object * obj, void *event_info)
-{
- ret_if(NULL == data || NULL == event_info);
- SETTING_TRACE_BEGIN;
- SettingConnectivityUG *ad = (SettingConnectivityUG *) data;
-
- Elm_Object_Item *parentItem = event_info; //parent item
- Setting_GenGroupItem_Data *data_parentItem = elm_object_item_data_get(parentItem); //parent data
- Evas_Object *scroller = elm_object_item_widget_get(parentItem);
-
- // WARNING
- // setting_create_simple_popup(NULL, ad->win_get, NULL, "NOT IMPLMENTED YET");
-
- // add each items
- Evas_Object *rgd;
- if (data_parentItem == ad->bg_processes /* <- name */) {
- rgd = elm_radio_add(scroller);
- elm_radio_value_set(rgd, -1);
-
- setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, SWALLOW_Type_1RADIO, rgd, 0, _(bgprocess_list[0]), NULL);
- setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, SWALLOW_Type_1RADIO, rgd, 1, _(bgprocess_list[1]), NULL);
- setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, SWALLOW_Type_1RADIO, rgd, 2, _(bgprocess_list[2]), NULL);
- setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, SWALLOW_Type_1RADIO, rgd, 3, _(bgprocess_list[3]), NULL);
- setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, SWALLOW_Type_1RADIO, rgd, 4, _(bgprocess_list[4]), NULL);
- setting_create_Gendial_exp_sub_field(scroller, &(ad->itc_1icon_1text_sub), NULL, NULL, parentItem, SWALLOW_Type_1RADIO, rgd, 5, _(bgprocess_list[5]), NULL);
-
- setting_update_chk_status(rgd, data_parentItem->int_slp_setting_binded);
- }
-}
-
static int setting_connectivity_change_debug_mode_toggle(SettingConnectivityUG *ad)
{
SETTING_TRACE_BEGIN;
SETTING_TRACE_END;
}
-static void setting_connectivity_main_chk_btn_cb(void *data, Evas_Object * obj, void *event_info)
-{
- SETTING_TRACE_BEGIN;
- //error check
- retm_if(data == NULL, "Data parameter is NULL");
- SettingConnectivityUG *ad = NULL;
-
- Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) data;
- ad = list_item->userdata;
- list_item->chk_status = elm_check_state_get(obj); // for genlist update status
-
- int opposite = (list_item->chk_status == 1) ? SETTING_ON_OFF_BTN_ON : SETTING_ON_OFF_BTN_OFF;
-
- SETTING_TRACE("list_item->keyStr = %s", list_item->keyStr);
- if (!safeStrCmp("IDS_ST_BODY_FORCE_GPU_RENDERING_ABB", list_item->keyStr)) {
- // DO NOTHING NOW
- if (opposite) { // ON
- elm_config_engine_set("opengl_x11");
- elm_config_save();
- } else { // OFF
- elm_config_engine_set("software_x11");
- elm_config_save();
- }
- } else if (!safeStrCmp("IDS_ST_MBODY_SHOW_CPU_USAGE", list_item->keyStr)) {
- if (opposite) {
- app_launcher(SETTING_CPU_USAGE_PKG_NAME);
- } else {
- bool running_flag = FALSE;
- int ret = app_manager_is_running(SETTING_CPU_USAGE_PKG_NAME, &running_flag);
- setting_retm_if(ret != 0, "fail to call app_manager_is_running");
- if (running_flag) {
- app_context_h context = NULL;
- ret = app_manager_get_app_context(SETTING_CPU_USAGE_PKG_NAME, &context);
- setting_retm_if(ret != 0, "fail to call app_manager_get_app_context");
- int ret = app_manager_terminate_app(context);
- if (ret == 0) {
- SETTING_TRACE("===== app_manager_terminate_app successed.");
- } else {
- SETTING_TRACE_ERROR("===== app_manager_terminate_app fail.");
- }
- }
- }
- } else {
- /* do nothing */
- }
- //app_launcher("com.samsung.dispcpuinfo");
-}
-
-static void setting_connectivity_usb_mouse_up_Gendial_CPU_usage_cb(void* data, Evas_Object* obj, void* event_info)
-{
- SETTING_TRACE_BEGIN;
-
- /* error check */
- retm_if(event_info == NULL, "Invalid argument: event info is NULL");
- Elm_Object_Item *item = (Elm_Object_Item *) event_info;
- elm_genlist_item_selected_set(item, 0);
- Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item);
-
- setting_retm_if(data == NULL, "Data parameter is NULL");
- //SettingConnectivityUG *ad = (SettingConnectivityUG *) data;
-
- list_item->chk_status = !list_item->chk_status;
- elm_check_state_set(list_item->eo_check, list_item->chk_status);
-
- if (list_item->chk_status) {
- app_launcher(SETTING_CPU_USAGE_PKG_NAME);
- } else {
- bool running_flag = FALSE;
- int ret = app_manager_is_running(SETTING_CPU_USAGE_PKG_NAME, &running_flag);
- setting_retm_if(ret != 0, "fail to call app_manager_is_running");
- if (running_flag) {
- app_context_h context = NULL;
- ret = app_manager_get_app_context(SETTING_CPU_USAGE_PKG_NAME, &context);
- setting_retm_if(ret != 0, "fail to call app_manager_get_app_context");
- int ret = app_manager_terminate_app(context);
- if (ret == 0) {
- SETTING_TRACE("===== app_manager_terminate_app successed.");
- } else {
- SETTING_TRACE_ERROR("===== app_manager_terminate_app fail.");
- }
- }
- }
- //setting_create_simple_popup(NULL, ad->win_get, NULL, "NOT IMPLMENTED YET");
- //app_launcher("com.samsung.dispcpuinfo");
- SETTING_TRACE_END;
-}
-
-static void setting_connectivity_usb_mouse_up_Gendial_GPU_rendering_cb(void* data, Evas_Object* obj, void* event_info)
-{
- SETTING_TRACE_BEGIN;
-
- /* error check */
- retm_if(event_info == NULL, "Invalid argument: event info is NULL");
- Elm_Object_Item *item = (Elm_Object_Item *) event_info;
- elm_genlist_item_selected_set(item, 0);
- Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item);
-
- setting_retm_if(data == NULL, "Data parameter is NULL");
- //SettingConnectivityUG *ad = (SettingConnectivityUG *) data;
-
- list_item->chk_status = !list_item->chk_status;
- elm_check_state_set(list_item->eo_check, list_item->chk_status);
-
- if (list_item->chk_status)
- {
- // ON
- elm_config_engine_set("opengl_x11");
- elm_config_save();
- } else {
- // OFF
- elm_config_engine_set("software_x11");
- elm_config_save();
- }
-
- SETTING_TRACE_END;
-}
-
-static void __setting_connectivity_usb_dia_usage_mouse_up_cb(void *data, Evas_Object *obj, void *event_info)
-{
- SETTING_TRACE_BEGIN;
- /* error check */
- setting_retm_if(data == NULL, "Data parameter is NULL");
-
- retm_if(event_info == NULL, "Invalid argument: event info is NULL");
- Elm_Object_Item *item = (Elm_Object_Item *) event_info;
- elm_genlist_item_selected_set(item, 0);
- Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item);
-
- /* SettingAboutUG *ad = (SettingAboutUG *) data; */
-
- SETTING_TRACE("clicking item[%s]", _(list_item->keyStr));
- app_launcher("com.samsung.crash-viewer");
-}
-
-char* get_bg_processes()
-{
- int value;
- int err;
- int ret = setting_get_int_slp_key(INT_SLP_SETTING_DEVOPTION_BGPROCESS, &value, &err);
- if (ret != 0) {
- SETTING_TRACE_ERROR("get vconf failed");
- }
-
- if (value >=0 && value <= sizeof(bgprocess_list)/sizeof(bgprocess_list[0]) )
- return _(bgprocess_list[value]);
- else
- {
- return _(bgprocess_list[0]); /* error proc */
- }
-}
-
/**
* To create the usb main view
*
SETTING_TRACE("Second item of Second group is set\n");
-
- if (!isEmulBin()) {
- // [UI] Show CPU Usage
- bool running_flag = FALSE;
- int ret = app_manager_is_running(SETTING_CPU_USAGE_PKG_NAME, &running_flag);
- setting_retvm_if(ret != 0, SETTING_RETURN_FAIL, "fail to call app_manager_is_running");
- if (running_flag) {
- vconf_val = 1;
- } else {
- vconf_val = 0;
- }
-
- ad->cpu_usage =
- setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon_gen),
- setting_connectivity_usb_mouse_up_Gendial_CPU_usage_cb,
- ad, SWALLOW_Type_1TOGGLE, NULL,
- NULL, vconf_val, "IDS_ST_MBODY_SHOW_CPU_USAGE",
- NULL, setting_connectivity_main_chk_btn_cb);
- if (ad->cpu_usage) {
- ad->cpu_usage->userdata = ad;
- //setting_disable_genlist_item(ad->cpu_usage->item);
- } else {
- SETTING_TRACE_ERROR("ad->cpu_usage is NULL");
- return SETTING_RETURN_FAIL;
- }
-
- // [UI] help text
- setting_create_Gendial_field_def(scroller, &(ad->itc_help_style), NULL,
- ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X,
- NULL, NULL, 0, _("IDS_ST_BODY_SCREEN_OVERLAY_SHOWING_CURRENT_CPU_USAGE_ABB"), NULL,
- NULL);
- elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL),
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-
- // Get GPU Rendering state
- //SETTING_TRACE(" config_engine_get : %s", elm_config_engine_get());
- const char* engine_str = NULL;
- engine_str = elm_config_engine_get();
- int gpu_toggle = -1;
- if (engine_str)
- {
- if ( 0 == strcmp(engine_str, "opengl_x11"))
- {
- gpu_toggle = 1;
- SETTING_TRACE(">>> opengl_11 selected -- ON ");
- } else if ( 0 == strcmp(engine_str, "software_x11")) {
- gpu_toggle = 0;
- SETTING_TRACE(">>> software_11 selected -- OFF ");
- } else {
- engine_str = "software_x11";
- gpu_toggle = 0;
- }
- } else {
- // abort();
- }
-
- // [UI] Force GPU rendering
- ad->gpu_render =
- setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon_gen),
- setting_connectivity_usb_mouse_up_Gendial_GPU_rendering_cb,
- ad, SWALLOW_Type_1TOGGLE, NULL,
- NULL, gpu_toggle, "IDS_ST_BODY_FORCE_GPU_RENDERING_ABB",
- NULL, setting_connectivity_main_chk_btn_cb);
- if (ad->gpu_render ) {
- ad->gpu_render->userdata = ad;
- //setting_disable_genlist_item(ad->gpu_render->item);
- } else {
- SETTING_TRACE_ERROR("ad->gpu_render is NULL");
- return SETTING_RETURN_FAIL;
- }
-
- // [UI] help text
- setting_create_Gendial_field_def(scroller, &(ad->itc_help_style), NULL,
- ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X,
- NULL, NULL, 0, _("IDS_ST_BODY_USE_2D_HARDWARE_ACCELERATION_IN_APPLICATIONS_ABB"), NULL,
- NULL);
- elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL),
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-
- // NEWCODE:
- setting_enable_expandable_genlist(scroller, ad, __setting_devoptions_main_exp_cb, NULL);
-
-
- // [UI] expandble list - Automatic answering
- char *bgproc = get_bg_processes();
- ad->bg_processes =
- setting_create_Gendial_exp_parent_field(scroller,
- &(ad->itc_2text_3_parent),
- NULL, NULL,
- SWALLOW_Type_INVALID,
- "IDS_ST_BODY_LIMIT_BACKGROUND_PROCESSES",
- bgproc);
-
- // [UI] Limit background processes
- if (ad->bg_processes) {
- ad->bg_processes->userdata = ad;
- ad->bg_processes->int_slp_setting_binded = INT_SLP_SETTING_DEVOPTION_BGPROCESS;
- } else {
- SETTING_TRACE_ERROR("ad->bg_processes is NULL");
- return SETTING_RETURN_FAIL;
- }
-
- item = elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-
- // [UI] Diagnostics and Usage
- setting_create_Gendial_field_def(scroller, &(ad->itc_1text),
- __setting_connectivity_usb_dia_usage_mouse_up_cb,
- ad, SWALLOW_Type_INVALID, NULL, NULL,
- 0, DIAGNOSTICS_USAGE_STR,
- NULL, NULL);
- }
-
- item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-
//----------------------------------------------------------------------------------------------
/* Registering callback function for VCONFKEY_SETAPPL_USB_MODE_INT */
vconf_ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL,
ELM_GENLIST_ITEM_NONE, NULL, NULL);
elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- char *curmode = vconf_get_str(VCONFKEY_SETAPPL_SCREENMODE_SELNAME);
- SETTING_TRACE(">>> CUR SCREEN MODE : %s ", curmode);
-
- int i = 0;
- for (; i < sizeof(str_in_arr)/sizeof(str_in_arr[0]); i++) {
- if (0 == safeStrCmp(str_in_arr[i], curmode)) {
- ad->data_screen_mode = setting_create_Gendial_field_def(scroller, &(itc_2text_3),
- setting_display_main_mouse_up_Gendial_list_cb,
- ad, SWALLOW_Type_INVALID, NULL,
- NULL, 0, Keystr_ScreenMode,
- _(str_out_arr[i]), NULL);
- if (ad->data_screen_mode) {
- ad->data_screen_mode->userdata = ad;
- } else {
- SETTING_TRACE_ERROR("ad->data_screen_mode is NULL");
- }
- break;
- }
- }
+ int value = 0;
+ int ret = 0;
- item =
- elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ if (!isEmulBin()) {
+ char *curmode = vconf_get_str(VCONFKEY_SETAPPL_SCREENMODE_SELNAME);
+ SETTING_TRACE(">>> CUR SCREEN MODE : %s ", curmode);
- #if !SUPPOR_SEPARATE_BRIGHTNESS
- /* BRIGHTNESS */
- ad->data_br =
- setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2),
+ int i = 0;
+ for (; i < sizeof(str_in_arr)/sizeof(str_in_arr[0]); i++) {
+ if (0 == safeStrCmp(str_in_arr[i], curmode)) {
+ ad->data_screen_mode = setting_create_Gendial_field_def(scroller, &(itc_2text_3),
setting_display_main_mouse_up_Gendial_list_cb,
ad, SWALLOW_Type_INVALID, NULL,
- NULL, 0, "IDS_COM_OPT_BRIGHTNESS",
- get_brightness_mode_str(), NULL);
- if (ad->data_br) {
- ad->data_br->userdata = ad;
- } else {
- SETTING_TRACE_ERROR("ad->data_br is NULL");
- }
- #endif
+ NULL, 0, Keystr_ScreenMode,
+ _(str_out_arr[i]), NULL);
+ if (ad->data_screen_mode) {
+ ad->data_screen_mode->userdata = ad;
+ } else {
+ SETTING_TRACE_ERROR("ad->data_screen_mode is NULL");
+ }
+ break;
+ }
+ }
- int value = 0;
- int ret = vconf_get_bool(VCONFKEY_SETAPPL_BOOL_AUTO_ADJUST_SCREEN_TONE, &value);
- ad->data_auto_adjust_scrn_tone =
- setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon),
- setting_display_main_mouse_up_Gendial_list_cb,
- ad, SWALLOW_Type_1TOGGLE, NULL,
- NULL, value, KeyStr_AdjustScreenTone,
- NULL,
- setting_display_main_auto_adjust_chk_btn_cb);
- if (ad->data_auto_adjust_scrn_tone) {
- ad->data_auto_adjust_scrn_tone->userdata = ad;
- } else {
- SETTING_TRACE_ERROR("ad->data_battery is NULL");
- }
+ item =
+ elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL,
+ ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+
+ #if !SUPPOR_SEPARATE_BRIGHTNESS
+ /* BRIGHTNESS */
+ ad->data_br =
+ setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2),
+ setting_display_main_mouse_up_Gendial_list_cb,
+ ad, SWALLOW_Type_INVALID, NULL,
+ NULL, 0, "IDS_COM_OPT_BRIGHTNESS",
+ get_brightness_mode_str(), NULL);
+ if (ad->data_br) {
+ ad->data_br->userdata = ad;
+ } else {
+ SETTING_TRACE_ERROR("ad->data_br is NULL");
+ }
+ #endif
+
+ ret = vconf_get_bool(VCONFKEY_SETAPPL_BOOL_AUTO_ADJUST_SCREEN_TONE, &value);
+ ad->data_auto_adjust_scrn_tone =
+ setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon),
+ setting_display_main_mouse_up_Gendial_list_cb,
+ ad, SWALLOW_Type_1TOGGLE, NULL,
+ NULL, value, KeyStr_AdjustScreenTone,
+ NULL,
+ setting_display_main_auto_adjust_chk_btn_cb);
+ if (ad->data_auto_adjust_scrn_tone) {
+ ad->data_auto_adjust_scrn_tone->userdata = ad;
+ } else {
+ SETTING_TRACE_ERROR("ad->data_battery is NULL");
+ }
- setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL,
- ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X,
- NULL, NULL, 0, KeyStr_AdjustScreenTone_Dsc, NULL, NULL);
-
- elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL),
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL,
+ ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X,
+ NULL, NULL, 0, KeyStr_AdjustScreenTone_Dsc, NULL, NULL);
+ elm_genlist_item_select_mode_set(elm_genlist_item_append(scroller, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL),
+ ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ }
/* BACKLIGHTTIME */
char* pa_backlight_time = get_pa_backlight_time_str();
static void setting_reset_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, void *event_info);
#endif
-
-
-#if SUPPORT_FACTORY_RESET
-static bool is_factory_reset_installed()
-{
- char *file_name = "/usr/bin/factory-reset";
-
- struct stat st;
- if(stat(file_name, &st) == 0)
- {
- return true;
- }
- else
- {
- SETTING_TRACE_ERROR(" %s is *NOT* present\n", file_name);
- return false;
- }
-}
-#endif
-
-
-
/* ***************************************************
*
*basic func
#endif
#endif
-#if SUPPORT_FACTORY_RESET
- /* 3. Factory reset */
- setting_create_Gendial_field_def(scroller, &itc_1text,
- setting_reset_main_mouse_up_Gendial_list_cb,ad,
- SWALLOW_Type_INVALID,
- NULL, NULL,
- 0,FACTORY_RESET_STR, NULL, NULL);
-#endif
#if DISABLED_CODE
/* Description */
setting_create_Gendial_field_def(scroller, &itc_multiline_text, NULL,
return SETTING_RETURN_SUCCESS;
}
-
-/*
- execute /usr/bin/factory-reset after creating a process with fork()
- */
-
-static void
-setting_reset_main_result_password_ug_cb(ui_gadget_h ug, service_h result,
- void *priv)
-{
- SETTING_TRACE_BEGIN;
- /* error check */
- retm_if(priv == NULL, "Data parameter is NULL");
-
- SettingResetUG *ad = (SettingResetUG *) priv;
-
- char *ret_str = NULL;
- service_get_extra_data(result, "result", &ret_str);
- SETTING_TRACE("result:%s", ret_str);
-
- retm_if(ret_str == NULL, "result paremeter is NULL");
-
- if (ret_str) {
- if (0 == safeStrCmp("Cancel", ret_str)) {
- /* Do not reset */
- }
- else if (0 == safeStrCmp("SETTING_PW_TYPE_RESET", ret_str)) {
- ug_destroy(ad->ug_loading);
- ad->ug_loading = NULL;
- /* do factory reset here. */
- int pid = -1;
- pid = fork();
- setting_retm_if(pid < 0, "failed to fork");
-
- if (pid == 0) {
- char *environ[] = { NULL };
- char *argv[] = {"factory-reset"};
- execve("/usr/bin/factory-reset", argv, environ);
- exit(0);
- }
- }
- }
-}
-
-static void
-setting_reset_main_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode,
- void *priv)
-{
- SettingResetUG *ad = (SettingResetUG *) priv;
- Evas_Object *base;
-
- if (!ug || !priv)
- return;
- SETTING_TRACE_BEGIN;
-
- base = (Evas_Object *) ug_get_layout(ug);
- if (!base)
- return;
-
- switch (mode) {
- case UG_MODE_FULLVIEW:
- evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- elm_win_resize_object_add(ad->win_get, base);
- evas_object_show(base);
- break;
- default:
- break;
- }
- SETTING_TRACE_END;
-}
-
-static void setting_reset_main_destroy_password_ug_cb(ui_gadget_h ug,
- void *priv)
-{
- SETTING_TRACE_BEGIN;
- /* if(ug) ug_destroy(ug); */
- ret_if(!priv);
- SettingResetUG *ad = (SettingResetUG *) priv;
- if (ug) {
- ug_destroy(ug);
- ad->ug_loading = NULL;
- }
-
-}
-
-static bool setting_reset_main_create_password_sg(void *data)
-{
- SETTING_TRACE_BEGIN;
- /* error check */
- retv_if(data == NULL, FALSE);
-
- SettingResetUG *ad = (SettingResetUG *) data;
-
- struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs));
- if (!cbs)
- return FALSE;
- cbs->layout_cb = setting_reset_main_layout_ug_cb;
- cbs->result_cb = setting_reset_main_result_password_ug_cb;
- cbs->destroy_cb = setting_reset_main_destroy_password_ug_cb;
- cbs->priv = (void *)ad;
- service_h svc;
- if (service_create(&svc)) {
- FREE(cbs);
- return FALSE;
- }
- service_add_extra_data(svc, "viewtype", "SETTING_PW_TYPE_RESET");
-
- ad->ug_loading =
- ug_create(ad->ug, "setting-password-efl", UG_MODE_FULLVIEW, svc, cbs);
- if (NULL == ad->ug_loading) { /* error handling */
- }
-
- service_destroy(svc);
- FREE(cbs);
-
- return TRUE;
-}
-
-static void __ask_create_factory_reset_resp_cb(void *data, Evas_Object *obj,
- void *event_info)
-{
- SETTING_TRACE_BEGIN;
-
- SettingResetUG *ad = (SettingResetUG *) data;
- ret_if(NULL == data);
-
- int response_type = btn_type(obj);
- int screen_lock_type = 0;
-
- if (POPUP_RESPONSE_OK == response_type) {
- SETTING_TRACE("OK");
- vconf_get_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, &screen_lock_type);
- if(screen_lock_type == SETTING_SCREEN_LOCK_TYPE_PASSWORD
- || screen_lock_type == SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD)
- {
- setting_reset_main_create_password_sg(ad);
- }
- else
- {
- /* do factory reset here. */
- int pid = -1;
- pid = fork();
- setting_retm_if(pid < 0, "failed to fork");
-
- if (pid == 0) {
- char *environ[] = { NULL };
- char *argv[] = {"factory-reset"};
- execve("/usr/bin/factory-reset", argv, environ);
- exit(0);
- }
- }
- } else if (POPUP_RESPONSE_CANCEL == response_type) {
- SETTING_TRACE("NO");
- // do nothing
- }
-
- evas_object_del(ad->pop_factory_reset);
- ad->pop_factory_reset = NULL;
-}
-
static void setting_reset_reboot_resp_cb(void *data, Evas_Object *obj,
void *event_info)
{
_("IDS_COM_SK_CANCEL"));
#endif
}
-#endif
-#if SUPPORT_FACTORY_RESET
- else if (!safeStrCmp(FACTORY_RESET_STR, list_item->keyStr))
- {
- /* TBD */
- SETTING_TRACE("FACTORY RESET");
-
- if(is_factory_reset_installed())
- {
- //setting_create_simple_popup(NULL, ad->win_get, NULL, "NOT IMPLMENTED YET");
- ad->pop_factory_reset = setting_create_popup_with_btn(ad,
- ad->win_get,
- NULL, _("Reset all settings and delete all data. This cannot be stopped once started"),
- __ask_create_factory_reset_resp_cb,
- 0, 2, _("IDS_COM_SK_YES"),_("IDS_COM_SK_NO"));
- } else {
- setting_create_simple_popup(NULL, ad->win_get, NULL, "NOT SUPPORTED");
- }
- }
#endif
/* to do : */
}
continue; /* hide Bluetooth in Emulator*/
} else if (!safeStrCmp(KeyStr_Security, item_name)) {
continue; /* hide Security in Emulator*/
- } else if (!safeStrCmp(KeyStr_Motions, item_name)) {
- continue; /* hide Motion in Emulator*/
- } else if (!safeStrCmp(KeyStr_Accessibility, item_name)) {
- continue; /* hide Accessibility in Emulator*/
} else if (!safeStrCmp(KeyStr_Memory, item_name)) {
continue; /* hide Memory in Emulator*/
} else if (!safeStrCmp(KeyStr_Powersaving, item_name)) {
SETTING_TRACE("clicking item[%s]", _(list_item->keyStr));
- if (!safeStrCmp("IDS_ST_BODY_APPLICATIONS", list_item->keyStr)) {
- __setting_storage_main_launch_manage_app_ug(ad);
- } else if (!safeStrCmp(SETTING_STORAGE_DEFAULT_STORAGE_STR, list_item->keyStr)) {
- setting_view_change(&setting_view_storage_main,
- &setting_view_storage_default_storage, ad);
- } else if (!safeStrCmp(SETTING_STORAGE_PICS_STR, list_item->keyStr)) {
- __setting_storage_main_app_launch("com.samsung.gallery");
- } else if (!safeStrCmp(SETTING_STORAGE_DOWNS_STR, list_item->keyStr)) {
- __setting_storage_main_app_launch("com.samsung.download-manager");
- } else if (!safeStrCmp(SETTING_STORAGE_AUDIO_STR, list_item->keyStr)) {
- __setting_storage_main_app_launch("com.samsung.music-player");
- } else if (!safeStrCmp(SETTING_STORAGE_MISCES_STR, list_item->keyStr)) {
- setting_view_change(&setting_view_storage_main,
- &setting_view_storage_miscellaneous_files, ad);
+ if (isEmulBin()) {
+ if (!safeStrCmp(SETTING_STORAGE_DEFAULT_STORAGE_STR, list_item->keyStr)) {
+ setting_view_change(&setting_view_storage_main,
+ &setting_view_storage_default_storage, ad);
+ } else if (!safeStrCmp(SETTING_STORAGE_MISCES_STR, list_item->keyStr)) {
+ setting_view_change(&setting_view_storage_main,
+ &setting_view_storage_miscellaneous_files, ad);
+ } else {
+ // do nothing now
+ }
} else {
- // do nothing now
+ if (!safeStrCmp("IDS_ST_BODY_APPLICATIONS", list_item->keyStr)) {
+ __setting_storage_main_launch_manage_app_ug(ad);
+ } else if (!safeStrCmp(SETTING_STORAGE_DEFAULT_STORAGE_STR, list_item->keyStr)) {
+ setting_view_change(&setting_view_storage_main,
+ &setting_view_storage_default_storage, ad);
+ } else if (!safeStrCmp(SETTING_STORAGE_PICS_STR, list_item->keyStr)) {
+ __setting_storage_main_app_launch("org.tizen.gallery");
+ } else if (!safeStrCmp(SETTING_STORAGE_DOWNS_STR, list_item->keyStr)) {
+ __setting_storage_main_app_launch("org.tizen.download-manager");
+ } else if (!safeStrCmp(SETTING_STORAGE_AUDIO_STR, list_item->keyStr)) {
+ __setting_storage_main_app_launch("org.tizen.music-player");
+ } else if (!safeStrCmp(SETTING_STORAGE_MISCES_STR, list_item->keyStr)) {
+ setting_view_change(&setting_view_storage_main,
+ &setting_view_storage_miscellaneous_files, ad);
+ } else {
+ // do nothing now
+ }
}
}
Elm_Object_Item *item = NULL;
- if (!isEmulBin()) {
+ bool is_emulator = isEmulBin();
+
+ if (!is_emulator) {
item = elm_genlist_item_append(ad->genlist, &itc_seperator, NULL, NULL,
ELM_GENLIST_ITEM_NONE, NULL, NULL);
elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
_("IDS_ST_HEADER_PLEASE_WAIT"), NULL);
if (ad->apps) {
ad->apps->userdata = ad;
+ if (is_emulator) {
+ elm_genlist_item_select_mode_set(ad->apps->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ }
} else {
SETTING_TRACE_ERROR("ad->apps is NULL");
return SETTING_RETURN_FAIL;
_("IDS_ST_HEADER_PLEASE_WAIT"), NULL);
if (ad->pics_videos) {
ad->pics_videos->userdata = ad;
+ if (is_emulator) {
+ elm_genlist_item_select_mode_set(ad->pics_videos->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ }
} else {
SETTING_TRACE_ERROR("ad->pics_videos is NULL");
return SETTING_RETURN_FAIL;
_("IDS_ST_HEADER_PLEASE_WAIT"), NULL);
if (ad->downloads) {
ad->downloads->userdata = ad;
+ if (is_emulator) {
+ elm_genlist_item_select_mode_set(ad->downloads->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ }
} else {
SETTING_TRACE_ERROR("ad->downloads is NULL");
return SETTING_RETURN_FAIL;
_("IDS_ST_HEADER_PLEASE_WAIT"), NULL);
if (ad->audio) {
ad->audio->userdata = ad;
+
+ if (is_emulator) {
+ elm_genlist_item_select_mode_set(ad->audio->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ }
} else {
SETTING_TRACE_ERROR("ad->audio is NULL");
return SETTING_RETURN_FAIL;
return SETTING_RETURN_FAIL;
}
- if (!isEmulBin()) {
+ if (!is_emulator) {
#if DISABLED_CODE
/* Format USB storage */
setting_create_Gendial_field_def(ad->genlist, &(ad->itc_1text), NULL,
continue; /* hide Flight Mode in Emulator*/
} else if (!safeStrCmp(KeyStr_WiFi, keyStr)) {
continue; /* hide WIFI in Emulator*/
- } else if (!safeStrCmp(KeyStr_NFC, keyStr)) {
- continue; /* hide NFC in Emulator*/
} else if (!safeStrCmp(KeyStr_WiFiDirect, keyStr)) {
continue; /* hide WiFiDirect in Emulator*/
} else if (!safeStrCmp(KeyStr_Network, keyStr)) {
continue; /* hide Network in Emulator*/
} else if (!safeStrCmp(KeyStr_Bluetooth, keyStr)) {
continue; /* hide Bluetooth in Emulator*/
+ } else if (!safeStrCmp(KeyStr_MobileAP, keyStr)) {
+ continue; /* hide Tethering in Emulator*/
} else {
/* do nothing */
}
if (is_emulator) {
if (!safeStrCmp(KeyStr_Security, keyStr)) {
continue; /* hide Security in Emulator*/
- } else if (!safeStrCmp(KeyStr_Motions, keyStr)) {
- continue; /* hide Motion in Emulator*/
- } else if (!safeStrCmp(KeyStr_Accessibility, keyStr)) {
- continue; /* hide Accessibility in Emulator*/
} else if (!safeStrCmp(KeyStr_Memory, keyStr)) {
continue; /* hide Memory in Emulator*/
} else if (!safeStrCmp(KeyStr_Powersaving, keyStr)) {