From: nazib.ullah Date: Fri, 21 Oct 2016 10:57:55 +0000 (+0600) Subject: [TBT][tizen_3.0_mobile][module list updated] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bffb059fadd0c74a3744fa6025f13c472539217a;p=test%2Ftct%2Fnative%2Fbehavior.git [TBT][tizen_3.0_mobile][module list updated] Change-Id: I595d091e6a1e43bc4761a79db9d57c1feaa8686f --- diff --git a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk index 27ed983..42d1c9a 100644 Binary files a/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk and b/release/binary-armv7l/org.tizen.tbtcoreapp-1.0.0-arm.tpk differ diff --git a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk index 8e43fe2..6c0a704 100644 Binary files a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk and b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk differ diff --git a/tbtcoreapp/inc/model/tbt-info.h b/tbtcoreapp/inc/model/tbt-info.h index 7a034f1..ea6141a 100644 --- a/tbtcoreapp/inc/model/tbt-info.h +++ b/tbtcoreapp/inc/model/tbt-info.h @@ -158,9 +158,17 @@ typedef enum { TBT_APP_EVENT_VIEW, TBT_APP_FEATURE_SUMMARY, - - TBT_APP_RUNTIME_INFO, + TBT_APP_AUDIO_JACK, + TBT_APP_KEY_VIBRATION, + TBT_APP_BATTERY, + TBT_APP_GPS_STATUS, + TBT_APP_USB_CONNECTED, + TBT_APP_BLUETOOTH_ENABLED, + TBT_APP_AUTO_ROTATION_ENABLED, + TBT_APP_LOCATION_SERVICE_ENABLED, + TBT_APP_WIFI_HOTSPOT_ENABLED, + TBT_APP_SCREEN_MIRROR_SINK, TBT_APP_ATTACH_PANEL, @@ -217,7 +225,16 @@ typedef enum { TBT_APP_CONNECTION, - TBT_APP_SYSTEM_SETTINGS, + TBT_APP_SYSTEM_SETTINGS_FONT, + TBT_APP_SYSTEM_SETTINGS_TIMEFORMAT, + TBT_APP_SYSTEM_SETTINGS_TIMECHANGE, + TBT_APP_SYSTEM_SETTINGS_LOCKSOUND, + TBT_APP_SYSTEM_SETTINGS_SILENT, + TBT_APP_SYSTEM_SETTINGS_TOUCHSOUND, + TBT_APP_SYSTEM_SETTINGS_SCREENROTATION, + TBT_APP_SYSTEM_SETTINGS_MOTION, + TBT_APP_SYSTEM_SETTINGS_FILGHTMODE, + TBT_APP_SYSTEM_SETTINGS_LOCKSTATE, TBT_APP_CONTACTS, diff --git a/tbtcoreapp/inc/utils/app_module_config.h b/tbtcoreapp/inc/utils/app_module_config.h index abd83b8..b51b5c4 100644 --- a/tbtcoreapp/inc/utils/app_module_config.h +++ b/tbtcoreapp/inc/utils/app_module_config.h @@ -166,7 +166,15 @@ #define TBT_MODULE_APP_PUSH_SERVICE #define TBT_MODULE_RUNTIME -#define TBT_MODULE_APP_RUNTIME_INFO +#define TBT_MODULE_APP_AUDIO_JACK +#define TBT_MODULE_APP_KEY_VIBRATION +#define TBT_MODULE_APP_BATTERY +#define TBT_MODULE_APP_GPS_STATUS +#define TBT_MODULE_APP_USB_CONNECTED +#define TBT_MODULE_APP_BLUETOOTH_ENABLED +#define TBT_MODULE_APP_AUTO_ROTATION_ENABLED +#define TBT_MODULE_APP_LOCATION_SERVICE_ENABLED +#define TBT_MODULE_APP_WIFI_HOTSPOT_ENABLED //#define TBT_MODULE_SCREEN_MIRROR //#define TBT_MODULE_APP_SCREEN_MIRROR_SINK @@ -212,7 +220,16 @@ #define TBT_MODULE_APP_CONNECTION #define TBT_MODULE_SYSTEMSETTINGS -#define TBT_MODULE_APP_SYSTEM_SETTINGS +#define TBT_MODULE_APP_SYSTEM_SETTINGS_FONT +#define TBT_MODULE_APP_SYSTEM_SETTINGS_TIMEFORMAT +#define TBT_MODULE_APP_SYSTEM_SETTINGS_TIMECHANGE +#define TBT_MODULE_APP_SYSTEM_SETTINGS_LOCKSOUND +#define TBT_MODULE_APP_SYSTEM_SETTINGS_SILENT +#define TBT_MODULE_APP_SYSTEM_SETTINGS_TOUCHSOUND +#define TBT_MODULE_APP_SYSTEM_SETTINGS_SCREENROTATION +#define TBT_MODULE_APP_SYSTEM_SETTINGS_MOTION +#define TBT_MODULE_APP_SYSTEM_SETTINGS_FILGHTMODE +#define TBT_MODULE_APP_SYSTEM_SETTINGS_LOCKSTATE #define TBT_MODULE_CONTACTS #define TBT_MODULE_APP_CONTACTS diff --git a/tbtcoreapp/src/model/tbt-list.c b/tbtcoreapp/src/model/tbt-list.c index 873f031..d03c5bb 100644 --- a/tbtcoreapp/src/model/tbt-list.c +++ b/tbtcoreapp/src/model/tbt-list.c @@ -454,6 +454,27 @@ static tbt_info tbtapps[] = .features_required = {FEATURE_NETWORK_BLUETOOTH,FEATURE_NETWORK_BLUETOOTH_HID}, }, #endif + #ifdef TBT_MODULE_APP_BT_HID_DEVICE + + // Bluetooh HID connect + { + .name = "HID Device", + .parent = "Bluetooth", + .apptype = TBT_APP_BT_HID_DEVICE, + .icon_name = "dummy", + .info = "1. If Bluetooth is off, turn on manually.
" + "2. Press Discover to see the list of Bluetooth HID devices.
" + "3. Select the desired device from the list and device will be paired.
" + "4. Press Connect HID button.
" + "5. If you are trying to connect a keyboard a pop-up will appear, press the same code on the keyboard and press enter.
" + "6. HID connected will be written on the label, just above the device list
" + "7. Go to Default Messaging Application and try to write message from the HID keyboard.
" + "8. Input from keyboard will be shown.", + .result = 0, + .required_features_count = 2, + .features_required = {FEATURE_NETWORK_BLUETOOTH, FEATURE_NETWORK_BLUETOOTH_HID_DEVICE} + }, + #endif #ifdef TBT_MODULE_APP_BT_AVRCP @@ -761,7 +782,35 @@ static tbt_info tbtapps[] = .features_required = {FEATURE_NETWORK_NFC,FEATURE_NETWORK_NFC_CARD_EMULATION_HCE} }, #endif + #ifdef TBT_MODULE_APP_NFC_ESE + // NFC ESE Test + { + .name = "NFC ESE", + .parent = "NFC", + .apptype = TBT_APP_NFC_ESE, + .icon_name = "dummy", + .info = "Test NFC HCE ESE card emulation", + .result = 0, + .required_features_count = 2, + .features_required = {FEATURE_NETWORK_NFC,FEATURE_NETWORK_NFC_CARD_EMULATION} + }, + #endif #endif +#ifdef TBT_MODULE_SMARTCARD + #ifdef TBT_MODULE_APP_SMARTCARD + { + .name = "Smartcard", + .parent = "Smartcard", + .apptype = TBT_APP_SMARTCARD, + .icon_name = "dummy", + .info = "Smartcard signed
unsigned app check", + .result = 0 + .required_features_count = 2, + .features_required = {FEATURE_NETWORK_NFC,FEATURE_NETWORK_NFC_CARD_EMULATION} + }, + #endif +#endif + #ifdef TBT_MODULE_DISPLAY #ifdef TBT_MODULE_APP_DISPLAY_DISPLAY @@ -1650,7 +1699,7 @@ static tbt_info tbtapps[] = // Shortcut { .name = "Shortcut", - .parent = "EFL/Event", + .parent = "Shortcut", .apptype = TBT_APP_SHORTCUT, .icon_name = "dummy", .info = "1. Press Add Shortcut button.
" @@ -1706,13 +1755,13 @@ static tbt_info tbtapps[] = #endif #ifdef TBT_MODULE_RUNTIME - #ifdef TBT_MODULE_APP_RUNTIME_INFO + #ifdef TBT_MODULE_APP_AUDIO_JACK //Runtime Info { - .name = "Runtime Info", + .name = "Audio Jack Status", .parent = "Runtime Info", - .apptype = TBT_APP_RUNTIME_INFO, + .apptype = TBT_APP_AUDIO_JACK, .icon_name = "dummy", .info = "1. Initially Audio Jack Not Connected message will be shown.
" "2. Insert an only audio out headphone in audio jack.
" @@ -1723,6 +1772,112 @@ static tbt_info tbtapps[] = .result = 0 }, #endif + #ifdef TBT_MODULE_APP_KEY_VIBRATION + + //Runtime Info + { + .name = "Key Vibration Status", + .parent = "Runtime Info", + .apptype = TBT_APP_KEY_VIBRATION, + .icon_name = "dummy", + .info = "View Audio Jack
Insert Info", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_BATTERY + + //Runtime Info + { + .name = "Battery Status", + .parent = "Runtime Info", + .apptype = TBT_APP_BATTERY, + .icon_name = "dummy", + .info = "View Audio Jack
Insert Info", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_GPS_STATUS + + //Runtime Info + { + .name = "Gps Status", + .parent = "Runtime Info", + .apptype = TBT_APP_GPS_STATUS, + .icon_name = "dummy", + .info = "View Audio Jack
Insert Info", + .result = 0, + .required_features_count = 1, + .features_required = {FEATURE_LOCATION_GPS} + }, + #endif + #ifdef TBT_MODULE_APP_USB_CONNECTED + + //Runtime Info + { + .name = "USB Status", + .parent = "Runtime Info", + .apptype = TBT_APP_USB_CONNECTED, + .icon_name = "dummy", + .info = "View Audio Jack
Insert Info", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_BLUETOOTH_ENABLED + + //Runtime Info + { + .name = "Bluetooth Status", + .parent = "Runtime Info", + .apptype = TBT_APP_BLUETOOTH_ENABLED, + .icon_name = "dummy", + .info = "View Audio Jack
Insert Info", + .result = 0, + .required_features_count = 1, + .features_required = {FEATURE_NETWORK_BLUETOOTH} + }, + #endif + #ifdef TBT_MODULE_APP_AUTO_ROTATION_ENABLED + + //Runtime Info + { + .name = "Auto Rotate Status", + .parent = "Runtime Info", + .apptype = TBT_APP_AUTO_ROTATION_ENABLED, + .icon_name = "dummy", + .info = "View Audio Jack
Insert Info", + .result = 0, + .required_features_count = 1, + .features_required = {FEATURE_SCREEN_AUTO_ROTATION} + }, + #endif + #ifdef TBT_MODULE_APP_LOCATION_SERVICE_ENABLED + + //Runtime Info + { + .name = "Location Status", + .parent = "Runtime Info", + .apptype = TBT_APP_LOCATION_SERVICE_ENABLED, + .icon_name = "dummy", + .info = "View Audio Jack
Insert Info", + .result = 0, + .required_features_count = 1, + .features_required = {FEATURE_LOCATION} + }, + #endif + #ifdef TBT_MODULE_APP_WIFI_HOTSPOT_ENABLED + + //Runtime Info + { + .name = "Wifi HotSpot Status", + .parent = "Runtime Info", + .apptype = TBT_APP_WIFI_HOTSPOT_ENABLED, + .icon_name = "dummy", + .info = "View Audio Jack
Insert Info", + .result = 0, + .required_features_count = 1, + .features_required = {FEATURE_NETWORK_WIFI} + }, + #endif #endif #ifdef TBT_MODULE_SCREEN_MIRROR @@ -2021,16 +2176,123 @@ static tbt_info tbtapps[] = #endif #endif #ifdef TBT_MODULE_SYSTEMSETTINGS - #ifdef TBT_MODULE_APP_SYSTEM_SETTINGS + #ifdef TBT_MODULE_APP_SYSTEM_SETTINGS_FONT + + //System Settings + { + .name = "System Settings Font", + .parent = "System Settings", + .apptype = TBT_APP_SYSTEM_SETTINGS_FONT, + .icon_name = "dummy", + .info = "
1.Manually change settings for each item through device Settings.
2. Verify all the items' values.", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_SYSTEM_SETTINGS_TIMEFORMAT + + //System Settings + { + .name = "System Settings Time Format", + .parent = "System Settings", + .apptype = TBT_APP_SYSTEM_SETTINGS_TIMEFORMAT, + .icon_name = "dummy", + .info = "
1.Manually change settings for each item through device Settings.
2. Verify all the items' values.", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_SYSTEM_SETTINGS_TIMECHANGE + + //System Settings + { + .name = "System Settings Time Change", + .parent = "System Settings", + .apptype = TBT_APP_SYSTEM_SETTINGS_TIMECHANGE, + .icon_name = "dummy", + .info = "
1.Manually change settings for each item through device Settings.
2. Verify all the items' values.", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_SYSTEM_SETTINGS_LOCKSOUND + + //System Settings + { + .name = "System Settings Lock Sound", + .parent = "System Settings", + .apptype = TBT_APP_SYSTEM_SETTINGS_LOCKSOUND, + .icon_name = "dummy", + .info = "
1.Manually change settings for each item through device Settings.
2. Verify all the items' values.", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_SYSTEM_SETTINGS_SILENT + + //System Settings + { + .name = "System Settings Silent Mode", + .parent = "System Settings", + .apptype = TBT_APP_SYSTEM_SETTINGS_SILENT, + .icon_name = "dummy", + .info = "
1.Manually change settings for each item through device Settings.
2. Verify all the items' values.", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_SYSTEM_SETTINGS_TOUCHSOUND + + //System Settings + { + .name = "System Settings Touch Sound", + .parent = "System Settings", + .apptype = TBT_APP_SYSTEM_SETTINGS_TOUCHSOUND, + .icon_name = "dummy", + .info = "
1.Manually change settings for each item through device Settings.
2. Verify all the items' values.", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_SYSTEM_SETTINGS_SCREENROTATION + + //System Settings + { + .name = "System Settings Screen Rotation", + .parent = "System Settings", + .apptype = TBT_APP_SYSTEM_SETTINGS_SCREENROTATION, + .icon_name = "dummy", + .info = "
1.Manually change settings for each item through device Settings.
2. Verify all the items' values.", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_SYSTEM_SETTINGS_MOTION + + //System Settings + { + .name = "System Settings Motion", + .parent = "System Settings", + .apptype = TBT_APP_SYSTEM_SETTINGS_MOTION, + .icon_name = "dummy", + .info = "
1.Manually change settings for each item through device Settings.
2. Verify all the items' values.", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_SYSTEM_SETTINGS_FILGHTMODE + + //System Settings + { + .name = "System Settings Flight Mode", + .parent = "System Settings", + .apptype = TBT_APP_SYSTEM_SETTINGS_FILGHTMODE, + .icon_name = "dummy", + .info = "
1.Manually change settings for each item through device Settings.
2. Verify all the items' values.", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_SYSTEM_SETTINGS_LOCKSTATE //System Settings { - .name = "System Settings", + .name = "System Settings Lock State", .parent = "System Settings", - .apptype = TBT_APP_SYSTEM_SETTINGS, + .apptype = TBT_APP_SYSTEM_SETTINGS_LOCKSTATE, .icon_name = "dummy", - .info = "
1.Manually change settings for each item through device Settings.
" - "2. Verify all the items' values.", + .info = "
1.Manually change settings for each item through device Settings.
2. Verify all the items' values.", .result = 0 }, #endif diff --git a/tbtcoreapp/src/view/tbt-genlist-view.c b/tbtcoreapp/src/view/tbt-genlist-view.c index 4d25fef..342316c 100644 --- a/tbtcoreapp/src/view/tbt-genlist-view.c +++ b/tbtcoreapp/src/view/tbt-genlist-view.c @@ -958,7 +958,31 @@ static void _gl_item_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void #endif #ifdef TBT_MODULE_RUNTIME - case TBT_APP_RUNTIME_INFO: + case TBT_APP_AUDIO_JACK: + runtimeinfo_view_add(view->navi, info, it); + break; + case TBT_APP_KEY_VIBRATION: + runtimeinfo_view_add(view->navi, info, it); + break; + case TBT_APP_BATTERY: + runtimeinfo_view_add(view->navi, info, it); + break; + case TBT_APP_GPS_STATUS: + runtimeinfo_view_add(view->navi, info, it); + break; + case TBT_APP_USB_CONNECTED: + runtimeinfo_view_add(view->navi, info, it); + break; + case TBT_APP_BLUETOOTH_ENABLED: + runtimeinfo_view_add(view->navi, info, it); + break; + case TBT_APP_AUTO_ROTATION_ENABLED: + runtimeinfo_view_add(view->navi, info, it); + break; + case TBT_APP_LOCATION_SERVICE_ENABLED: + runtimeinfo_view_add(view->navi, info, it); + break; + case TBT_APP_WIFI_HOTSPOT_ENABLED: runtimeinfo_view_add(view->navi, info, it); break; #endif @@ -1054,7 +1078,34 @@ static void _gl_item_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void break; #endif #ifdef TBT_MODULE_SYSTEMSETTINGS - case TBT_APP_SYSTEM_SETTINGS: + case TBT_APP_SYSTEM_SETTINGS_FONT: + systemsettings_view_add(view->navi, info, it); + break; + case TBT_APP_SYSTEM_SETTINGS_TIMEFORMAT: + systemsettings_view_add(view->navi, info, it); + break; + case TBT_APP_SYSTEM_SETTINGS_TIMECHANGE: + systemsettings_view_add(view->navi, info, it); + break; + case TBT_APP_SYSTEM_SETTINGS_LOCKSOUND: + systemsettings_view_add(view->navi, info, it); + break; + case TBT_APP_SYSTEM_SETTINGS_SILENT: + systemsettings_view_add(view->navi, info, it); + break; + case TBT_APP_SYSTEM_SETTINGS_TOUCHSOUND: + systemsettings_view_add(view->navi, info, it); + break; + case TBT_APP_SYSTEM_SETTINGS_SCREENROTATION: + systemsettings_view_add(view->navi, info, it); + break; + case TBT_APP_SYSTEM_SETTINGS_MOTION: + systemsettings_view_add(view->navi, info, it); + break; + case TBT_APP_SYSTEM_SETTINGS_FILGHTMODE: + systemsettings_view_add(view->navi, info, it); + break; + case TBT_APP_SYSTEM_SETTINGS_LOCKSTATE: systemsettings_view_add(view->navi, info, it); break; #endif diff --git a/tbtcoreapp/src/view/tbt-runtimeinfo-view.c b/tbtcoreapp/src/view/tbt-runtimeinfo-view.c index 98cb774..a4bd899 100644 --- a/tbtcoreapp/src/view/tbt-runtimeinfo-view.c +++ b/tbtcoreapp/src/view/tbt-runtimeinfo-view.c @@ -41,16 +41,10 @@ struct _runtimeinfo_view location_manager_h manager; Evas_Object *info_label; - Evas_Object *vibrate_label; - Evas_Object *battery_label; - Evas_Object *gps_label; - Evas_Object *usb_label; - Evas_Object *bluetooth_label; - Evas_Object *rotate_label; - Evas_Object *location_label; - Evas_Object *wifi_label; }; +static bool is_not_supported = false; + static void _app_destroy_cb(void* this); void _runtime_info_changed_cb(runtime_info_key_e key, void *user_data); static void _vibrate_state_changed_cb(runtime_info_key_e key, void *user_data); @@ -65,16 +59,6 @@ static void _wifi_state_changed_cb(runtime_info_key_e key, void *user_data); static void _position_updated_cb(double latitude, double longitude, double altitude, time_t timestamp, void *data); static void _gps_state_changed_gps_cb(location_service_state_e state, void *data); -static bool is_audiojack_not_supported = false; -static bool is_gps_not_supported = false; -static bool is_bluetooth_not_supported = false; -static bool is_vibrate_not_supported = false; -static bool is_battery_not_supported = false; -static bool is_usb_not_supported = false; -static bool is_autorotate_not_supported = false; -static bool is_location_not_supported = false; -static bool is_wifi_not_supported = false; - /** * @function get_runtime_info_error * @since_tizen 2.3 @@ -133,155 +117,170 @@ runtimeinfo_view *runtimeinfo_view_add(Evas_Object *navi, tbt_info *tbt_info, El { RETVM_IF(NULL == navi, NULL, "navi is null"); int ret, value; - runtimeinfo_view *this = NULL; - this = calloc(1, sizeof(runtimeinfo_view)); - RETVM_IF(!this, NULL, "calloc failed"); + runtimeinfo_view *this = NULL; + this = calloc(1, sizeof(runtimeinfo_view)); + RETVM_IF(!this, NULL, "calloc failed"); + + this->view = calloc(1, sizeof(common_view)); + RETVM_IF(!this->view, NULL, "calloc failed"); - this->view = calloc(1, sizeof(common_view)); - RETVM_IF(!this->view, NULL, "calloc failed"); - tbt_info->layout_group = "runtimeinfo_viewer"; - tbt_info->layout_file = get_edje_path("runtimeinfo_viewer.edj"); + tbt_info->layout_group = "2_part_cnt_btn"; + tbt_info->layout_file = get_edje_path("2_part_cnt3.5_btn.edj"); - common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this); - RETVM_IF(NULL == this->view, NULL, "navi is null"); + common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this); + RETVM_IF(NULL == this->view, NULL, "navi is null"); + + bool bvalue; + if(this->view->tbt_info->apptype == TBT_APP_AUDIO_JACK) + { - ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, _runtime_info_changed_cb, this); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); + ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, _runtime_info_changed_cb, this); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); - this->info_label = ui_utils_label_add(this->view->layout, "Latitude: "); - elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); + this->info_label = ui_utils_label_add(this->view->layout, "Latitude: "); + elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); - if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) - { - is_audiojack_not_supported = true; - ui_utils_label_set_text(this->info_label, "Audio Jack is not supported", "left"); - elm_object_part_content_set(this->view->layout, "info_text", this->info_label); - } - else - { - ret = runtime_info_get_value_int(RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, &value); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - is_audiojack_not_supported = true; - ui_utils_label_set_text(this->info_label, "Audio Jack is not supported", "left"); - elm_object_part_content_set(this->view->layout, "info_text", this->info_label); + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "Audio Jack is not supported"); + RETVM_IF(!this->view, NULL,"Audio Jack is not supported"); } else { - DBG("value: %d", value); - switch(value) + ret = runtime_info_get_value_int(RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, &value); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); + if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - case 0: - ui_utils_label_set_text(this->info_label, "Audio Jack Not connected", "left"); - break; + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "Audio Jack is not supported"); + RETVM_IF(!this->view, NULL,"Audio Jack is not supported"); + } + else + { + DBG("value: %d", value); + switch(value) + { + case 0: + ui_utils_label_set_text(this->info_label, "Audio Jack Not connected", "left"); + break; - case 1: - ui_utils_label_set_text(this->info_label, "Audio Jack Connected with 3 wire earjack", "left"); - break; + case 1: + ui_utils_label_set_text(this->info_label, "Audio Jack Connected with 3 wire earjack", "left"); + break; - case 2: - ui_utils_label_set_text(this->info_label, "Audio Jack Connected with 4 wire earjack", "left"); - break; + case 2: + ui_utils_label_set_text(this->info_label, "Audio Jack Connected with 4 wire earjack", "left"); + break; - default: - ui_utils_label_set_text(this->info_label, "Unknown status", "left"); - break; + default: + ui_utils_label_set_text(this->info_label, "Unknown status", "left"); + break; + } } } + elm_object_part_content_set(this->view->layout, "1cnt", this->info_label); + return this; } + else if (this->view->tbt_info->apptype == TBT_APP_KEY_VIBRATION) + { - bool bvalue; - - ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_VIBRATION_ENABLED, _vibrate_state_changed_cb, this); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); + ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_VIBRATION_ENABLED, _vibrate_state_changed_cb, this); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); - this->vibrate_label = ui_utils_label_add(this->view->layout, "Longitude: "); - elm_label_line_wrap_set(this->vibrate_label, ELM_WRAP_WORD); + this->info_label = ui_utils_label_add(this->view->layout, "Longitude: "); + elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); - if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) - { - is_vibrate_not_supported = true; - ui_utils_label_set_text(this->vibrate_label, "Vibration Mode is not supported", "left"); - elm_object_part_content_set(this->view->layout, "vibrate_text", this->vibrate_label); - } - else - { - ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_VIBRATION_ENABLED, &bvalue); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - is_vibrate_not_supported = true; - ui_utils_label_set_text(this->vibrate_label, "Vibration Mode is not supported", "left"); - elm_object_part_content_set(this->view->layout, "vibrate_text", this->vibrate_label); + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "Vibration Mode is not supported"); + RETVM_IF(!this->view, NULL,"Vibration Mode is not supported"); } else { - DBG("value: %d", bvalue); - - switch(bvalue) + ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_VIBRATION_ENABLED, &bvalue); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); + if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - case 0: - ui_utils_label_set_text(this->vibrate_label, "Vibrate Mode is Not Enabled", "left"); - break; + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "Vibration Mode is not supported"); + RETVM_IF(!this->view, NULL,"Vibration Mode is not supported"); + } + else + { + DBG("value: %d", bvalue); - case 1: - ui_utils_label_set_text(this->vibrate_label, "Vibrate Mode is Enabled", "left"); - break; + switch(bvalue) + { + case 0: + ui_utils_label_set_text(this->info_label, "Vibrate Mode is Not Enabled", "left"); + break; + + case 1: + ui_utils_label_set_text(this->info_label, "Vibrate Mode is Enabled", "left"); + break; + } } } + elm_object_part_content_set(this->view->layout, "1cnt", this->info_label); + return this; } + else if (this->view->tbt_info->apptype == TBT_APP_BATTERY) + { + ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_BATTERY_IS_CHARGING, _battery_state_changed_cb, this); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); - ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_BATTERY_IS_CHARGING, _battery_state_changed_cb, this); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); - - this->battery_label = ui_utils_label_add(this->view->layout, "Percentage: "); - elm_label_line_wrap_set(this->battery_label, ELM_WRAP_WORD); + this->info_label = ui_utils_label_add(this->view->layout, "Percentage: "); + elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); - if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) - { - is_battery_not_supported = true; - ui_utils_label_set_text(this->battery_label, "Battery Charging is not supported", "left"); - elm_object_part_content_set(this->view->layout, "battery_text", this->battery_label); - } - else - { - ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_BATTERY_IS_CHARGING, &bvalue); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - is_battery_not_supported = true; - ui_utils_label_set_text(this->battery_label, "Battery Charging is not supported", "left"); - elm_object_part_content_set(this->view->layout, "battery_text", this->battery_label); + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "Battery Charging is not supported"); + RETVM_IF(!this->view, NULL,"Battery Charging is not supported"); } else { - DBG("value: %d", bvalue); - switch(bvalue) + ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_BATTERY_IS_CHARGING, &bvalue); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); + if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - case 0: - ui_utils_label_set_text(this->battery_label, " Battery Not Charging", "left"); - break; + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "Battery Charging is not supported"); + RETVM_IF(!this->view, NULL,"Battery Charging is not supported"); + } + else + { + DBG("value: %d", bvalue); + switch(bvalue) + { + case 0: + ui_utils_label_set_text(this->info_label, " Battery Not Charging", "left"); + break; - case 1: - ui_utils_label_set_text(this->battery_label, "Battery Charging Started", "left"); - break; + case 1: + ui_utils_label_set_text(this->info_label, "Battery Charging Started", "left"); + break; + } } } + elm_object_part_content_set(this->view->layout, "1cnt", this->info_label); + return this; } - - bool is_gps_supported = does_feature_exist("tizen.org/feature/location.gps"); - if(is_gps_supported == false) - { - is_gps_not_supported = true; - ui_utils_label_set_text(this->gps_label, "Feature:location.gps is not supported", "left"); - elm_object_part_content_set(this->view->layout, "gps_text", this->gps_label); - } - else + else if (this->view->tbt_info->apptype == TBT_APP_GPS_STATUS) { + this->info_label = ui_utils_label_add(this->view->layout, "GPS: "); + elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); ret = location_manager_create(LOCATIONS_METHOD_GPS, &this->manager); RETVM_IF(ret != LOCATIONS_ERROR_NONE, NULL, "location_manager_create fail > Error = %d", ret); @@ -312,67 +311,72 @@ runtimeinfo_view *runtimeinfo_view_add(Evas_Object *navi, tbt_info *tbt_info, El ERR("location_manager_start fail > Error = %d", ret); } - ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_GPS_STATUS , _gps_state_changed_cb, this); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); - - this->gps_label = ui_utils_label_add(this->view->layout, "GPS: "); - elm_label_line_wrap_set(this->gps_label, ELM_WRAP_WORD); + ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_GPS_STATUS , _gps_state_changed_cb, this); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); - if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) - { - is_gps_not_supported = true; - ui_utils_label_set_text(this->gps_label, "GPS is not supported", "left"); - elm_object_part_content_set(this->view->layout, "gps_text", this->gps_label); - } - else - { + this->info_label = ui_utils_label_add(this->view->layout, "GPS: "); + elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); - ret = runtime_info_get_value_int(RUNTIME_INFO_KEY_GPS_STATUS , &value); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - is_gps_not_supported = true; - ui_utils_label_set_text(this->gps_label, "GPS is not supported", "left"); - elm_object_part_content_set(this->view->layout, "gps_text", this->gps_label); + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "GPS is not supported"); + RETVM_IF(!this->view, NULL,"GPS is not supported"); } else { - DBG("value: %d", value); - switch(value) - { - case 0: - ui_utils_label_set_text(this->gps_label, "GPS is disabled", "left"); - break; - - case 1: - ui_utils_label_set_text(this->gps_label, "GPS is searching for satellites", "left"); - break; - - case 2: - ui_utils_label_set_text(this->gps_label, "GPS connection is established", "left"); - break; - - default: - ui_utils_label_set_text(this->gps_label, "Unknown status", "left"); - break; + ret = runtime_info_get_value_int(RUNTIME_INFO_KEY_GPS_STATUS , &value); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); + if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) + { + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "GPS is not supported"); + RETVM_IF(!this->view, NULL,"GPS is not supported"); + } + else + { + DBG("value: %d", value); + switch(value) + { + case 0: + ui_utils_label_set_text(this->info_label, "GPS is disabled", "left"); + break; + + case 1: + ui_utils_label_set_text(this->info_label, "GPS is searching for satellites", "left"); + break; + + case 2: + ui_utils_label_set_text(this->info_label, "GPS connection is established", "left"); + break; + + default: + ui_utils_label_set_text(this->info_label, "Unknown status", "left"); + break; + + } } } - } + elm_object_part_content_set(this->view->layout, "1cnt", this->info_label); + return this; } - + else if (this->view->tbt_info->apptype == TBT_APP_USB_CONNECTED) + { ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_USB_CONNECTED , _usb_state_changed_cb, this); RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); - this->usb_label = ui_utils_label_add(this->view->layout, "usb: "); - elm_label_line_wrap_set(this->usb_label, ELM_WRAP_WORD); + this->info_label = ui_utils_label_add(this->view->layout, "usb: "); + elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - - is_usb_not_supported = true; - ui_utils_label_set_text(this->usb_label, "USB is not supported", "left"); - elm_object_part_content_set(this->view->layout, "usb_text", this->usb_label); + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "USB is not supported"); + RETVM_IF(!this->view, NULL,"USB is not supported"); } else { @@ -380,9 +384,10 @@ runtimeinfo_view *runtimeinfo_view_add(Evas_Object *navi, tbt_info *tbt_info, El RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - is_usb_not_supported = true; - ui_utils_label_set_text(this->usb_label, "USB is not supported", "left"); - elm_object_part_content_set(this->view->layout, "usb_text", this->usb_label); + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "USB is not supported"); + RETVM_IF(!this->view, NULL,"USB is not supported"); } else { @@ -391,226 +396,200 @@ runtimeinfo_view *runtimeinfo_view_add(Evas_Object *navi, tbt_info *tbt_info, El switch(bvalue) { case 0: - ui_utils_label_set_text(this->usb_label, "USB Not Connected", "left"); + ui_utils_label_set_text(this->info_label, "USB Not Connected", "left"); break; case 1: - ui_utils_label_set_text(this->usb_label, "USB is Connected", "left"); + ui_utils_label_set_text(this->info_label, "USB is Connected", "left"); break; } } } - - bool is_bluetooth_supported = does_feature_exist("tizen.org/feature/network.bluetooth"); - if(is_bluetooth_supported == false) - { - is_bluetooth_not_supported = true; - ui_utils_label_set_text(this->bluetooth_label, "Feature:network.bluetooth is not supported", "left"); - elm_object_part_content_set(this->view->layout, "bluetooth_text", this->bluetooth_label); + elm_object_part_content_set(this->view->layout, "1cnt", this->info_label); + return this; } - else + else if (this->view->tbt_info->apptype == TBT_APP_BLUETOOTH_ENABLED) { - ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_BLUETOOTH_ENABLED , _bluetooth_state_changed_cb, this); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); + ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_BLUETOOTH_ENABLED , _bluetooth_state_changed_cb, this); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); - this->bluetooth_label = ui_utils_label_add(this->view->layout, "bluetooth: "); - elm_label_line_wrap_set(this->bluetooth_label, ELM_WRAP_WORD); + this->info_label = ui_utils_label_add(this->view->layout, "bluetooth: "); + elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); - if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) - { - - is_bluetooth_not_supported = true; - ui_utils_label_set_text(this->bluetooth_label, "Bluetooth is not supported", "left"); - elm_object_part_content_set(this->view->layout, "bluetooth_text", this->bluetooth_label); - } - else - { - ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_BLUETOOTH_ENABLED , &bvalue); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - - is_bluetooth_not_supported = true; - ui_utils_label_set_text(this->bluetooth_label, "Bluetooth is not supported", "left"); - elm_object_part_content_set(this->view->layout, "bluetooth_text", this->bluetooth_label); + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "Bluetooth is not supported"); + RETVM_IF(!this->view, NULL,"Bluetooth is not supported"); } else { - DBG("value: %d", bvalue); - switch(bvalue) + ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_BLUETOOTH_ENABLED , &bvalue); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); + if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - case 0: - ui_utils_label_set_text(this->bluetooth_label, "Bluetooth Not Enabled", "left"); - break; - - case 1: - ui_utils_label_set_text(this->bluetooth_label, "Bluetooth is Enabled", "left"); - break; + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "Bluetooth is not supported"); + RETVM_IF(!this->view, NULL,"Bluetooth is not supported"); + } + else + { + DBG("value: %d", bvalue); + switch(bvalue) + { + case 0: + ui_utils_label_set_text(this->info_label, "Bluetooth Not Enabled", "left"); + break; + + case 1: + ui_utils_label_set_text(this->info_label, "Bluetooth is Enabled", "left"); + break; + } } } - } - } + elm_object_part_content_set(this->view->layout, "1cnt", this->info_label); + return this; - bool is_orientation_supported = does_feature_exist("tizen.org/feature/screen.auto_rotation"); - if(is_orientation_supported == false) - { - - is_autorotate_not_supported = true; - ui_utils_label_set_text(this->rotate_label, "Feature:screen.auto_rotation is not supported", "left"); - elm_object_part_content_set(this->view->layout, "rotate_text", this->rotate_label); } - else + else if (this->view->tbt_info->apptype == TBT_APP_AUTO_ROTATION_ENABLED) { - ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED , _rotate_state_changed_cb, this); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); + ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED , _rotate_state_changed_cb, this); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); - this->rotate_label = ui_utils_label_add(this->view->layout, "rotate: "); - elm_label_line_wrap_set(this->rotate_label, ELM_WRAP_WORD); + this->info_label = ui_utils_label_add(this->view->layout, "rotate: "); + elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); - if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) - { - is_autorotate_not_supported = true; - ui_utils_label_set_text(this->rotate_label, "AUTO_ROTATION is not supported", "left"); - elm_object_part_content_set(this->view->layout, "rotate_text", this->rotate_label); - } - else - { - ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED , &bvalue); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - is_autorotate_not_supported = true; - ui_utils_label_set_text(this->rotate_label, "AUTO_ROTATION is not supported", "left"); - elm_object_part_content_set(this->view->layout, "rotate_text", this->rotate_label); + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "AUTO_ROTATION is not supported"); + RETVM_IF(!this->view, NULL,"AUTO_ROTATION is not supported"); } else { - DBG("value: %d", bvalue); - - switch(bvalue) + ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED , &bvalue); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); + if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - case 0: - ui_utils_label_set_text(this->rotate_label, "Auto Rotate Not Enabled", "left"); - break; - - case 1: - ui_utils_label_set_text(this->rotate_label, "Auto Rotate is Enabled", "left"); - break; + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "AUTO_ROTATION is not supported"); + RETVM_IF(!this->view, NULL,"AUTO_ROTATION is not supported"); + } + else + { + DBG("value: %d", bvalue); + + switch(bvalue) + { + case 0: + ui_utils_label_set_text(this->info_label, "Auto Rotate Not Enabled", "left"); + break; + + case 1: + ui_utils_label_set_text(this->info_label, "Auto Rotate is Enabled", "left"); + break; + } } } - } + elm_object_part_content_set(this->view->layout, "1cnt", this->info_label); + return this; } - - bool is_location_supported = does_feature_exist("tizen.org/feature/location"); - if(is_location_supported == false) + else if (this->view->tbt_info->apptype == TBT_APP_LOCATION_SERVICE_ENABLED) { + + ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED , _location_state_changed_cb, this); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); - is_location_not_supported = true; - ui_utils_label_set_text(this->location_label, "Feature:location is not supported", "left"); - elm_object_part_content_set(this->view->layout, "location_text", this->location_label); - } - else - { - ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED , _location_state_changed_cb, this); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); + this->info_label = ui_utils_label_add(this->view->layout, "location: "); + elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); - this->location_label = ui_utils_label_add(this->view->layout, "location: "); - elm_label_line_wrap_set(this->location_label, ELM_WRAP_WORD); - - if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) - { - is_location_not_supported = true; - ui_utils_label_set_text(this->location_label, "Location is not supported", "left"); - elm_object_part_content_set(this->view->layout, "location_text", this->location_label); - } - else - { - ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED , &bvalue); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - is_location_not_supported = true; - ui_utils_label_set_text(this->location_label, "Location is not supported", "left"); - elm_object_part_content_set(this->view->layout, "location_text", this->location_label); + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "Location is not supported"); + RETVM_IF(!this->view, NULL,"Location is not supported"); } else { - DBG("value: %d", bvalue); - switch(bvalue) + ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED , &bvalue); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); + if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - case 0: - ui_utils_label_set_text(this->location_label, "Location Not Enabled", "left"); - break; - - case 1: - ui_utils_label_set_text(this->location_label, "Location is Enabled", "left"); - break; + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "Location is not supported"); + RETVM_IF(!this->view, NULL,"Location is not supported"); + } + else + { + DBG("value: %d", bvalue); + switch(bvalue) + { + case 0: + ui_utils_label_set_text(this->info_label, "Location Not Enabled", "left"); + break; + + case 1: + ui_utils_label_set_text(this->info_label, "Location is Enabled", "left"); + break; + } } } - } + elm_object_part_content_set(this->view->layout, "1cnt", this->info_label); + return this; } - - bool is_wifi_supported = does_feature_exist("tizen.org/feature/network.wifi"); - if(is_wifi_supported == false) - { - is_wifi_not_supported = true; - ui_utils_label_set_text(this->wifi_label, "Feature:network.wifi is not supported", "left"); - elm_object_part_content_set(this->view->layout, "wifi_text", this->wifi_label); - } - else + else if (this->view->tbt_info->apptype == TBT_APP_WIFI_HOTSPOT_ENABLED) { - ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED , _wifi_state_changed_cb, this); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); + ret = runtime_info_set_changed_cb(RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED , _wifi_state_changed_cb, this); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_set_changed_cb failed : %s", get_runtime_info_error(ret)); - this->wifi_label = ui_utils_label_add(this->view->layout, "wifi: "); - elm_label_line_wrap_set(this->wifi_label, ELM_WRAP_WORD); + this->info_label = ui_utils_label_add(this->view->layout, "wifi: "); + elm_label_line_wrap_set(this->info_label, ELM_WRAP_WORD); - if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) - { - is_wifi_not_supported = true; - ui_utils_label_set_text(this->wifi_label, "Wifi Hotspot is not supported", "left"); - elm_object_part_content_set(this->view->layout, "wifi_text", this->wifi_label); - } - else - { - ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED , &bvalue); - RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - is_wifi_not_supported = true; - ui_utils_label_set_text(this->wifi_label, "Wifi Hotspot is not supported", "left"); - elm_object_part_content_set(this->view->layout, "wifi_text", this->wifi_label); + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "Wifi Hotspot is not supported"); + RETVM_IF(!this->view, NULL,"Wifi Hotspot is not supported"); } else { - DBG("value: %d", bvalue); - switch(bvalue) + ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED , &bvalue); + RETVM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED, NULL, "runtime_info_get_value_int failed: %s",get_runtime_info_error(ret)); + if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - case 0: - ui_utils_label_set_text(this->wifi_label, "Wifi Hotspot Not Enabled", "left"); - break; - - case 1: - ui_utils_label_set_text(this->wifi_label, "Wifi Hotspot is Enabled", "left"); - break; + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "Wifi Hotspot is not supported"); + RETVM_IF(!this->view, NULL,"Wifi Hotspot is not supported"); + } + else + { + DBG("value: %d", bvalue); + switch(bvalue) + { + case 0: + ui_utils_label_set_text(this->info_label, "Wifi Hotspot Not Enabled", "left"); + break; + + case 1: + ui_utils_label_set_text(this->info_label, "Wifi Hotspot is Enabled", "left"); + break; + } } } - } + elm_object_part_content_set(this->view->layout, "1cnt", this->info_label); + return this; + } - - elm_object_part_content_set(this->view->layout, "info_text", this->info_label); - elm_object_part_content_set(this->view->layout, "vibrate_text", this->vibrate_label); - elm_object_part_content_set(this->view->layout, "battery_text", this->battery_label); - elm_object_part_content_set(this->view->layout, "gps_text", this->gps_label); - elm_object_part_content_set(this->view->layout, "usb_text", this->usb_label); - elm_object_part_content_set(this->view->layout, "bluetooth_text", this->bluetooth_label); - elm_object_part_content_set(this->view->layout, "rotate_text", this->rotate_label); - elm_object_part_content_set(this->view->layout, "location_text", this->location_label); - elm_object_part_content_set(this->view->layout, "wifi_text", this->wifi_label); - - - return this; + return this; } @@ -630,16 +609,14 @@ static void _app_destroy_cb(void* this) view = (runtimeinfo_view*)this; RETM_IF(NULL == view, "view is NULL"); - if((is_audiojack_not_supported == true) && (is_gps_not_supported == true) && (is_bluetooth_not_supported == true) && (is_vibrate_not_supported == true) && (is_battery_not_supported == true) && (is_usb_not_supported == true) && (is_autorotate_not_supported == true) && (is_location_not_supported == true) && (is_wifi_not_supported == true)) + if(is_not_supported == true) { view->view->tbt_info->result = TBT_INFO_RESULT_NOT_SUPPORTED; elm_genlist_item_update(view->view->item); } - - if(is_gps_not_supported == false) - { - - int err = location_manager_unset_service_state_changed_cb(view->manager); + if (view->view->tbt_info->apptype == TBT_APP_GPS_STATUS) + { + int err = location_manager_unset_service_state_changed_cb(view->manager); if(err != LOCATIONS_ERROR_NONE) { DBG( "location_manager_unset_service_state_changed_cb fail > Error = %d", err); @@ -662,7 +639,7 @@ static void _app_destroy_cb(void* this) { DBG( "location_manager_destroy fail > Error = %d", err); } - } + } SAFE_DELETE(view->view); SAFE_DELETE(view); @@ -733,7 +710,7 @@ static void _vibrate_state_changed_cb(runtime_info_key_e key, void *user_data) RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - ui_utils_label_set_text(this->vibrate_label, "Device Vibration is not supported", "left"); + ui_utils_label_set_text(this->info_label, "Device Vibration is not supported", "left"); return; } @@ -742,11 +719,11 @@ static void _vibrate_state_changed_cb(runtime_info_key_e key, void *user_data) switch(bvalue) { case 0: - ui_utils_label_set_text(this->vibrate_label, "Device Vibration is Not Enabled", "left"); + ui_utils_label_set_text(this->info_label, "Device Vibration is Not Enabled", "left"); break; case 1: - ui_utils_label_set_text(this->vibrate_label, "Device Vibration is Enabled", "left"); + ui_utils_label_set_text(this->info_label, "Device Vibration is Enabled", "left"); break; } } @@ -770,7 +747,7 @@ static void _battery_state_changed_cb(runtime_info_key_e key, void *user_data) RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - ui_utils_label_set_text(this->vibrate_label, "Battery Charging is not supported", "left"); + ui_utils_label_set_text(this->info_label, "Battery Charging is not supported", "left"); return; } @@ -779,11 +756,11 @@ static void _battery_state_changed_cb(runtime_info_key_e key, void *user_data) switch(bvalue) { case 0: - ui_utils_label_set_text(this->battery_label, "Battery Not Charging", "left"); + ui_utils_label_set_text(this->info_label, "Battery Not Charging", "left"); break; case 1: - ui_utils_label_set_text(this->battery_label, "Battery Charging Started", "left"); + ui_utils_label_set_text(this->info_label, "Battery Charging Started", "left"); break; } @@ -808,7 +785,7 @@ void _gps_state_changed_cb(runtime_info_key_e key, void *user_data) RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - ui_utils_label_set_text(this->gps_label, "GPS is not supported", "left"); + ui_utils_label_set_text(this->info_label, "GPS is not supported", "left"); return; } @@ -817,19 +794,19 @@ void _gps_state_changed_cb(runtime_info_key_e key, void *user_data) switch(value) { case 0: - ui_utils_label_set_text(this->gps_label, "GPS is disabled", "left"); + ui_utils_label_set_text(this->info_label, "GPS is disabled", "left"); break; case 1: - ui_utils_label_set_text(this->gps_label, "GPS is searching for satellites", "left"); + ui_utils_label_set_text(this->info_label, "GPS is searching for satellites", "left"); break; case 2: - ui_utils_label_set_text(this->gps_label, "GPS connection is established", "left"); + ui_utils_label_set_text(this->info_label, "GPS connection is established", "left"); break; default: - ui_utils_label_set_text(this->gps_label, "Unknown status", "left"); + ui_utils_label_set_text(this->info_label, "Unknown status", "left"); break; } @@ -854,7 +831,7 @@ static void _usb_state_changed_cb(runtime_info_key_e key, void *user_data) RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - ui_utils_label_set_text(this->usb_label, "USB is not supported", "left"); + ui_utils_label_set_text(this->info_label, "USB is not supported", "left"); return; } @@ -863,11 +840,11 @@ static void _usb_state_changed_cb(runtime_info_key_e key, void *user_data) switch(bvalue) { case 0: - ui_utils_label_set_text(this->usb_label, "USB Not Connected", "left"); + ui_utils_label_set_text(this->info_label, "USB Not Connected", "left"); break; case 1: - ui_utils_label_set_text(this->usb_label, "USB is Connected", "left"); + ui_utils_label_set_text(this->info_label, "USB is Connected", "left"); break; } @@ -892,7 +869,7 @@ static void _bluetooth_state_changed_cb(runtime_info_key_e key, void *user_data) RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - ui_utils_label_set_text(this->bluetooth_label, "Bluetooth is not supported", "left"); + ui_utils_label_set_text(this->info_label, "Bluetooth is not supported", "left"); return; } @@ -901,11 +878,11 @@ static void _bluetooth_state_changed_cb(runtime_info_key_e key, void *user_data) switch(bvalue) { case 0: - ui_utils_label_set_text(this->bluetooth_label, "Bluetooth Not Enabled", "left"); + ui_utils_label_set_text(this->info_label, "Bluetooth Not Enabled", "left"); break; case 1: - ui_utils_label_set_text(this->bluetooth_label, "Bluetooth is Enabled", "left"); + ui_utils_label_set_text(this->info_label, "Bluetooth is Enabled", "left"); break; } @@ -930,7 +907,7 @@ static void _rotate_state_changed_cb(runtime_info_key_e key, void *user_data) RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - ui_utils_label_set_text(this->rotate_label, "Auto Rotate is not supported", "left"); + ui_utils_label_set_text(this->info_label, "Auto Rotate is not supported", "left"); return; } @@ -939,11 +916,11 @@ static void _rotate_state_changed_cb(runtime_info_key_e key, void *user_data) switch(bvalue) { case 0: - ui_utils_label_set_text(this->rotate_label, "Auto Rotate Not Enabled", "left"); + ui_utils_label_set_text(this->info_label, "Auto Rotate Not Enabled", "left"); break; case 1: - ui_utils_label_set_text(this->rotate_label, "Auto Rotate is Enabled", "left"); + ui_utils_label_set_text(this->info_label, "Auto Rotate is Enabled", "left"); break; } @@ -969,7 +946,7 @@ static void _location_state_changed_cb(runtime_info_key_e key, void *user_data) RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - ui_utils_label_set_text(this->location_label, "Location is not supported", "left"); + ui_utils_label_set_text(this->info_label, "Location is not supported", "left"); return; } @@ -978,11 +955,11 @@ static void _location_state_changed_cb(runtime_info_key_e key, void *user_data) switch(bvalue) { case 0: - ui_utils_label_set_text(this->location_label, "Location Not Enabled", "left"); + ui_utils_label_set_text(this->info_label, "Location Not Enabled", "left"); break; case 1: - ui_utils_label_set_text(this->location_label, "Location is Enabled", "left"); + ui_utils_label_set_text(this->info_label, "Location is Enabled", "left"); break; } @@ -1008,7 +985,7 @@ static void _wifi_state_changed_cb(runtime_info_key_e key, void *user_data) RETM_IF(ret != RUNTIME_INFO_ERROR_NONE && ret != RUNTIME_INFO_ERROR_NOT_SUPPORTED,"runtime_info_get_value_int failed :%s",get_runtime_info_error(ret)); if(ret == RUNTIME_INFO_ERROR_NOT_SUPPORTED) { - ui_utils_label_set_text(this->wifi_label, "Wifi Hotspot is not supported", "left"); + ui_utils_label_set_text(this->info_label, "Wifi Hotspot is not supported", "left"); return; } @@ -1017,11 +994,11 @@ static void _wifi_state_changed_cb(runtime_info_key_e key, void *user_data) switch(bvalue) { case 0: - ui_utils_label_set_text(this->wifi_label, "Wifi Hotspot Not Enabled", "left"); + ui_utils_label_set_text(this->info_label, "Wifi Hotspot Not Enabled", "left"); break; case 1: - ui_utils_label_set_text(this->wifi_label, "Wifi Hotspot is Enabled", "left"); + ui_utils_label_set_text(this->info_label, "Wifi Hotspot is Enabled", "left"); break; } @@ -1064,4 +1041,6 @@ static void _gps_state_changed_gps_cb(location_service_state_e state, void *data snprintf(buf, MAX_LENGTH, "Longitude: %f", dbLongitude); } + #endif + diff --git a/tbtcoreapp/src/view/tbt-systemsettings-view.c b/tbtcoreapp/src/view/tbt-systemsettings-view.c index ccb607e..a5dc5d5 100755 --- a/tbtcoreapp/src/view/tbt-systemsettings-view.c +++ b/tbtcoreapp/src/view/tbt-systemsettings-view.c @@ -39,16 +39,7 @@ struct _systemsettings_view { common_view* view; - Evas_Object *font_size_label; - Evas_Object *timeformat_label; - Evas_Object *time_changed_label; - Evas_Object *sound_lock_label; - Evas_Object *sound_silent_label; - Evas_Object *sound_touch_label; - Evas_Object *screen_rotation_label; - Evas_Object *motion_label; - Evas_Object *flight_mode_label; - Evas_Object *lock_state_label; + Evas_Object *create_label; }; static bool is_not_supported = false; @@ -118,309 +109,327 @@ systemsettings_view *systemsettings_view_add(Evas_Object *navi, tbt_info *tbt_in int ret, value; bool bvalue; systemsettings_view *this = NULL; - this = calloc(1, sizeof(systemsettings_view)); - RETVM_IF(!this, NULL, "calloc failed"); + this = calloc(1, sizeof(systemsettings_view)); + RETVM_IF(!this, NULL, "calloc failed"); - this->view = calloc(1, sizeof(common_view)); - RETVM_IF(!this->view, NULL, "calloc failed"); + this->view = calloc(1, sizeof(common_view)); + RETVM_IF(!this->view, NULL, "calloc failed"); - tbt_info->layout_group = "systemsettings_viewer"; - tbt_info->layout_file = get_edje_path("systemsettings_viewer.edj"); + tbt_info->layout_group = "systemsettings_viewer"; + tbt_info->layout_file = get_edje_path("systemsettings_viewer.edj"); - common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this); + common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this); RETVM_IF(NULL == this->view, NULL, "navi is null"); - ui_utils_guide_instruction_popup_button(navi, "Instructions:

1.Manually change settings for each item through device Settings.
2. Verify all the items' values.
Note:You can also refer info section"); - - ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE, _system_settings_font_size_changed_cb, this); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); - - this->font_size_label = ui_utils_label_add(this->view->layout, "Key Font Size: "); - elm_label_line_wrap_set(this->font_size_label, ELM_WRAP_WORD); - - if(ret == SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED) + if (this->view->tbt_info->apptype == TBT_APP_SYSTEM_SETTINGS_FONT) { - is_not_supported = true; - Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); - elm_object_text_set(popup, "System Settings is not supported"); - RETVM_IF(!this->view, NULL,"System Settings is not supported"); - } + ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_FONT_SIZE, _system_settings_font_size_changed_cb, this); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); + + this->create_label = ui_utils_label_add(this->view->layout, "Key Font Size: "); + elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD); + + if(ret == SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED) + { + is_not_supported = true; + Evas_Object *popup = ui_utils_popup_add(this->view->navi, "Message"); + elm_object_text_set(popup, "System Settings is not supported"); + RETVM_IF(!this->view, NULL,"System Settings is not supported"); + } - ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE, &value); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_int failed: %s",get_system_settings_error(ret)); + ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_FONT_SIZE, &value); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_int failed: %s",get_system_settings_error(ret)); - DBG("value: %d", value); + DBG("value: %d", value); -switch(value) -{ - case 0: - ui_utils_label_set_text(this->font_size_label, "Small Size", "left"); - break; + switch(value) + { + case 0: + ui_utils_label_set_text(this->create_label, "Small Size", "left"); + break; - case 1: - ui_utils_label_set_text(this->font_size_label, "Normal Size", "left"); - break; + case 1: + ui_utils_label_set_text(this->create_label, "Normal Size", "left"); + break; - case 2: - ui_utils_label_set_text(this->font_size_label, "Large Size", "left"); - break; + case 2: + ui_utils_label_set_text(this->create_label, "Large Size", "left"); + break; - case 3: - ui_utils_label_set_text(this->font_size_label, "Huge Size", "left"); - break; + case 3: + ui_utils_label_set_text(this->create_label, "Huge Size", "left"); + break; - case 4: - ui_utils_label_set_text(this->font_size_label, "Giant Size", "left"); - break; + case 4: + ui_utils_label_set_text(this->create_label, "Giant Size", "left"); + break; - default: - ui_utils_label_set_text(this->font_size_label, "Unknown status", "left"); - break; + default: + ui_utils_label_set_text(this->create_label, "Unknown status", "left"); + break; } -/*timeformat*/ - - ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, _system_settings_timeformat_changed_cb, this); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); + } + /*timeformat*/ + if (this->view->tbt_info->apptype == TBT_APP_SYSTEM_SETTINGS_TIMEFORMAT) + { + ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, _system_settings_timeformat_changed_cb, this); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); - this->timeformat_label = ui_utils_label_add(this->view->layout, "Time Format: "); - elm_label_line_wrap_set(this->timeformat_label, ELM_WRAP_WORD); + this->create_label = ui_utils_label_add(this->view->layout, "Time Format: "); + elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD); - ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &bvalue); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); + ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &bvalue); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); - DBG("value: %d", bvalue); + DBG("value: %d", bvalue); - switch((int)bvalue) - { - case 0: - ui_utils_label_set_text(this->timeformat_label, "12-Hour Clock used", "left"); - break; + switch((int)bvalue) + { + case 0: + ui_utils_label_set_text(this->create_label, "12-Hour Clock used", "left"); + break; - case 1: - ui_utils_label_set_text(this->timeformat_label, "24-Hour Clock used", "left"); - break; + case 1: + ui_utils_label_set_text(this->create_label, "24-Hour Clock used", "left"); + break; } -/*timeformat*/ -/*time_changed*/ - - ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_TIME_CHANGED, _system_settings_time_changed_changed_cb, this); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); + } + /*timeformat*/ + /*time_changed*/ + if (this->view->tbt_info->apptype == TBT_APP_SYSTEM_SETTINGS_TIMECHANGE) + { + ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_TIME_CHANGED, _system_settings_time_changed_changed_cb, this); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); - this->time_changed_label = ui_utils_label_add(this->view->layout, "Key Font Size: "); - elm_label_line_wrap_set(this->time_changed_label, ELM_WRAP_WORD); + this->create_label = ui_utils_label_add(this->view->layout, "Key Font Size: "); + elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD); - ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_TIME_CHANGED, &value); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); + ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_TIME_CHANGED, &value); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); - DBG("value: %d", bvalue); + DBG("value: %d", bvalue); - switch(value) - { - case 0: - ui_utils_label_set_text(this->time_changed_label, "Time unchanged", "left"); - break; + switch(value) + { + case 0: + ui_utils_label_set_text(this->create_label, "Time unchanged", "left"); + break; - case 1: - ui_utils_label_set_text(this->time_changed_label, "Time changed", "left"); - break; + case 1: + ui_utils_label_set_text(this->create_label, "Time changed", "left"); + break; - default: - ui_utils_label_set_text(this->time_changed_label, "System Time Unknown status", "left"); - break; + default: + ui_utils_label_set_text(this->create_label, "System Time Unknown status", "left"); + break; } + } -/*time_changed*/ -/*sound_lock*/ - ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_LOCK, _system_settings_sound_lock_changed_cb, this); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); + /*time_changed*/ + /*sound_lock*/ + if (this->view->tbt_info->apptype == TBT_APP_SYSTEM_SETTINGS_LOCKSOUND) + { + ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_LOCK, _system_settings_sound_lock_changed_cb, this); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); - this->sound_lock_label = ui_utils_label_add(this->view->layout, "Lock Sound: "); - elm_label_line_wrap_set(this->sound_lock_label, ELM_WRAP_WORD); + this->create_label = ui_utils_label_add(this->view->layout, "Lock Sound: "); + elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD); - ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_LOCK, &bvalue); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); + ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_LOCK, &bvalue); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); - DBG("value: %d", bvalue); + DBG("value: %d", bvalue); - switch((int)bvalue) - { - case 0: - ui_utils_label_set_text(this->sound_lock_label, "Lock Sound is disabled", "left"); - break; + switch((int)bvalue) + { + case 0: + ui_utils_label_set_text(this->create_label, "Lock Sound is disabled", "left"); + break; - case 1: - ui_utils_label_set_text(this->sound_lock_label, "Lock Sound is enabled", "left"); - break; + case 1: + ui_utils_label_set_text(this->create_label, "Lock Sound is enabled", "left"); + break; } -/*sound_lock*/ -/*sound_silent*/ - ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, _system_settings_sound_silent_changed_cb, this); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); + } + /*sound_lock*/ + /*sound_silent*/ + if (this->view->tbt_info->apptype == TBT_APP_SYSTEM_SETTINGS_SILENT) + { + ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, _system_settings_sound_silent_changed_cb, this); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); - this->sound_silent_label = ui_utils_label_add(this->view->layout, "Silent Mode: "); - elm_label_line_wrap_set(this->sound_silent_label, ELM_WRAP_WORD); + this->create_label = ui_utils_label_add(this->view->layout, "Silent Mode: "); + elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD); - ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, &bvalue); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); + ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, &bvalue); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); - DBG("value: %d", bvalue); + DBG("value: %d", bvalue); - switch((int)bvalue) - { - case 0: - ui_utils_label_set_text(this->sound_silent_label, "Silent Mode is disabled", "left"); - break; + switch((int)bvalue) + { + case 0: + ui_utils_label_set_text(this->create_label, "Silent Mode is disabled", "left"); + break; - case 1: - ui_utils_label_set_text(this->sound_silent_label, "Silent Mode is enabled", "left"); - break; + case 1: + ui_utils_label_set_text(this->create_label, "Silent Mode is enabled", "left"); + break; } -/*sound_silent*/ -/*sound_touch*/ - ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_TOUCH, _system_settings_sound_touch_changed_cb, this); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); + } + /*sound_silent*/ + /*sound_touch*/ + if (this->view->tbt_info->apptype == TBT_APP_SYSTEM_SETTINGS_TOUCHSOUND) + { + ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_SOUND_TOUCH, _system_settings_sound_touch_changed_cb, this); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); - this->sound_touch_label = ui_utils_label_add(this->view->layout, "Screen Touch Sound: "); - elm_label_line_wrap_set(this->sound_touch_label, ELM_WRAP_WORD); + this->create_label = ui_utils_label_add(this->view->layout, "Screen Touch Sound: "); + elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD); - ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_TOUCH, &bvalue); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); + ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_SOUND_TOUCH, &bvalue); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); - DBG("value: %d", bvalue); + DBG("value: %d", bvalue); -switch((int)bvalue) -{ + switch((int)bvalue) + { case 0: - ui_utils_label_set_text(this->sound_touch_label, "Screen Touch Sound is disabled", "left"); + ui_utils_label_set_text(this->create_label, "Screen Touch Sound is disabled", "left"); break; case 1: - ui_utils_label_set_text(this->sound_touch_label, "Screen Touch Sound is enabled", "left"); + ui_utils_label_set_text(this->create_label, "Screen Touch Sound is enabled", "left"); break; } -/*sound_touch*/ -/*screen_rotation*/ - ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, _system_settings_screen_rotation_changed_cb, this); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); + } + /*sound_touch*/ + /*screen_rotation*/ + if (this->view->tbt_info->apptype == TBT_APP_SYSTEM_SETTINGS_SCREENROTATION) + { + ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, _system_settings_screen_rotation_changed_cb, this); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); - this->screen_rotation_label = ui_utils_label_add(this->view->layout, "Rotation Control: "); - elm_label_line_wrap_set(this->screen_rotation_label, ELM_WRAP_WORD); + this->create_label = ui_utils_label_add(this->view->layout, "Rotation Control: "); + elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD); - ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, &bvalue); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); + ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, &bvalue); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); - DBG("value: %d", bvalue); + DBG("value: %d", bvalue); - switch((int)bvalue) - { - case 0: - ui_utils_label_set_text(this->screen_rotation_label, "Rotation Control is disabled", "left"); - break; + switch((int)bvalue) + { + case 0: + ui_utils_label_set_text(this->create_label, "Rotation Control is disabled", "left"); + break; - case 1: - ui_utils_label_set_text(this->screen_rotation_label, "Rotation Control is enabled", "left"); - break; + case 1: + ui_utils_label_set_text(this->create_label, "Rotation Control is enabled", "left"); + break; } -/*screen_rotation*/ -/*motion*/ - ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_MOTION_ENABLED, _system_settings_motion_changed_cb, this); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); + } + /*screen_rotation*/ + /*motion*/ + if (this->view->tbt_info->apptype == TBT_APP_SYSTEM_SETTINGS_MOTION) + { + ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_MOTION_ENABLED, _system_settings_motion_changed_cb, this); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); - this->motion_label = ui_utils_label_add(this->view->layout, "Motion Feature: "); - elm_label_line_wrap_set(this->motion_label, ELM_WRAP_WORD); + this->create_label = ui_utils_label_add(this->view->layout, "Motion Feature: "); + elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD); - ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ENABLED, &bvalue); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); + ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ENABLED, &bvalue); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); - DBG("value: %d", bvalue); + DBG("value: %d", bvalue); - switch((int)bvalue) - { - case 0: - ui_utils_label_set_text(this->motion_label, "Motion Feature is disabled", "left"); - break; + switch((int)bvalue) + { + case 0: + ui_utils_label_set_text(this->create_label, "Motion Feature is disabled", "left"); + break; - case 1: - ui_utils_label_set_text(this->motion_label, "Motion Feature is enabled", "left"); - break; + case 1: + ui_utils_label_set_text(this->create_label, "Motion Feature is enabled", "left"); + break; } -/*motion*/ -/*filght_mode*/ - ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, _system_settings_flight_mode_changed_cb, this); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); + } + /*motion*/ + /*filght_mode*/ + if (this->view->tbt_info->apptype == TBT_APP_SYSTEM_SETTINGS_FILGHTMODE) + { + ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, _system_settings_flight_mode_changed_cb, this); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); - this->flight_mode_label = ui_utils_label_add(this->view->layout, "Flight Mode: "); - elm_label_line_wrap_set(this->flight_mode_label, ELM_WRAP_WORD); + this->create_label = ui_utils_label_add(this->view->layout, "Flight Mode: "); + elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD); - ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, &bvalue); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); + ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, &bvalue); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); - DBG("value: %d", bvalue); + DBG("value: %d", bvalue); - switch((int)bvalue) - { - case 0: - ui_utils_label_set_text(this->flight_mode_label, "Flight Mode is disabled", "left"); - break; + switch((int)bvalue) + { + case 0: + ui_utils_label_set_text(this->create_label, "Flight Mode is disabled", "left"); + break; - case 1: - ui_utils_label_set_text(this->flight_mode_label, "Flight Mode is enabled", "left"); - break; + case 1: + ui_utils_label_set_text(this->create_label, "Flight Mode is enabled", "left"); + break; } -/*filght_mode*/ -/*lock_state*/ - ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCK_STATE, _system_settings_lock_state_changed_cb, this); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); + } + /*filght_mode*/ + /*lock_state*/ + if (this->view->tbt_info->apptype == TBT_APP_SYSTEM_SETTINGS_LOCKSTATE) + { + ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCK_STATE, _system_settings_lock_state_changed_cb, this); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_set_changed_cb failed : %s", get_system_settings_error(ret)); - this->lock_state_label = ui_utils_label_add(this->view->layout, "Flight Mode: "); - elm_label_line_wrap_set(this->lock_state_label, ELM_WRAP_WORD); + this->create_label = ui_utils_label_add(this->view->layout, "Flight Mode: "); + elm_label_line_wrap_set(this->create_label, ELM_WRAP_WORD); - ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_LOCK_STATE, &value); - RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); + ret = system_settings_get_value_int(SYSTEM_SETTINGS_KEY_LOCK_STATE, &value); + RETVM_IF(ret != SYSTEM_SETTINGS_ERROR_NONE && ret != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED, NULL, "system_settings_get_value_bool failed: %s",get_system_settings_error(ret)); - DBG("value: %d", value); + DBG("value: %d", value); - switch(value) - { - case 0: - ui_utils_label_set_text(this->lock_state_label, "Device is unlocked", "left"); + switch(value) + { + case 0: + ui_utils_label_set_text(this->create_label, "Device is unlocked", "left"); break; case 1: - ui_utils_label_set_text(this->lock_state_label, "Device is locked", "left"); + ui_utils_label_set_text(this->create_label, "Device is locked", "left"); break; case 2: - ui_utils_label_set_text(this->lock_state_label, "Device is being locked", "left"); + ui_utils_label_set_text(this->create_label, "Device is being locked", "left"); break; default: - ui_utils_label_set_text(this->lock_state_label, "Unknown status", "left"); + ui_utils_label_set_text(this->create_label, "Unknown status", "left"); break; } + } /*lock_state*/ - elm_object_part_content_set(this->view->layout, "info_text1", this->font_size_label); - elm_object_part_content_set(this->view->layout, "info_text2", this->timeformat_label); - elm_object_part_content_set(this->view->layout, "info_text3", this->time_changed_label); - elm_object_part_content_set(this->view->layout, "info_text4", this->sound_lock_label); - elm_object_part_content_set(this->view->layout, "info_text5", this->sound_silent_label); - elm_object_part_content_set(this->view->layout, "info_text6", this->sound_touch_label); - elm_object_part_content_set(this->view->layout, "info_text7", this->screen_rotation_label); - elm_object_part_content_set(this->view->layout, "info_text8", this->motion_label); - elm_object_part_content_set(this->view->layout, "info_text9", this->flight_mode_label); - elm_object_part_content_set(this->view->layout, "info_text10", this->lock_state_label); + elm_object_part_content_set(this->view->layout, "info_text", this->create_label); + DBG("view complete: %d", value); return this; } @@ -504,27 +513,27 @@ void _system_settings_font_size_changed_cb(system_settings_key_e key, void *user switch(value) { case 0: - ui_utils_label_set_text(this->font_size_label, "Small Size", "left"); + ui_utils_label_set_text(this->create_label, "Small Size", "left"); break; case 1: - ui_utils_label_set_text(this->font_size_label, "Normal Size", "left"); + ui_utils_label_set_text(this->create_label, "Normal Size", "left"); break; case 2: - ui_utils_label_set_text(this->font_size_label, "Large Size", "left"); + ui_utils_label_set_text(this->create_label, "Large Size", "left"); break; case 3: - ui_utils_label_set_text(this->font_size_label, "Huge Size", "left"); + ui_utils_label_set_text(this->create_label, "Huge Size", "left"); break; case 4: - ui_utils_label_set_text(this->font_size_label, "Giant Size", "left"); + ui_utils_label_set_text(this->create_label, "Giant Size", "left"); break; default: - ui_utils_label_set_text(this->font_size_label, "Unknown status", "left"); + ui_utils_label_set_text(this->create_label, "Unknown status", "left"); break; } @@ -552,15 +561,15 @@ void _system_settings_timeformat_changed_cb(system_settings_key_e key, void *use switch((int)bvalue) { case 0: - ui_utils_label_set_text(this->timeformat_label, "12-Hour Clock used", "left"); + ui_utils_label_set_text(this->create_label, "12-Hour Clock used", "left"); break; case 1: - ui_utils_label_set_text(this->timeformat_label, "24-Hour Clock used", "left"); + ui_utils_label_set_text(this->create_label, "24-Hour Clock used", "left"); break; default: - ui_utils_label_set_text(this->timeformat_label, "Unknown status", "left"); + ui_utils_label_set_text(this->create_label, "Unknown status", "left"); break; } @@ -587,15 +596,15 @@ void _system_settings_time_changed_changed_cb(system_settings_key_e key, void *u switch(value) { case 0: - ui_utils_label_set_text(this->time_changed_label, "Time unchanged", "left"); + ui_utils_label_set_text(this->create_label, "Time unchanged", "left"); break; case 1: - ui_utils_label_set_text(this->time_changed_label, "Time changed", "left"); + ui_utils_label_set_text(this->create_label, "Time changed", "left"); break; default: - ui_utils_label_set_text(this->time_changed_label, "System Time Unknown status", "left"); + ui_utils_label_set_text(this->create_label, "System Time Unknown status", "left"); break; } @@ -623,11 +632,11 @@ void _system_settings_sound_lock_changed_cb(system_settings_key_e key, void *use switch((int)bvalue) { case 0: - ui_utils_label_set_text(this->sound_lock_label, "Lock Sound is disabled", "left"); + ui_utils_label_set_text(this->create_label, "Lock Sound is disabled", "left"); break; case 1: - ui_utils_label_set_text(this->sound_lock_label, "Lock Sound is enabled", "left"); + ui_utils_label_set_text(this->create_label, "Lock Sound is enabled", "left"); break; } @@ -655,11 +664,11 @@ void _system_settings_sound_silent_changed_cb(system_settings_key_e key, void *u switch((int)bvalue) { case 0: - ui_utils_label_set_text(this->sound_silent_label, "Silent Mode is disabled", "left"); + ui_utils_label_set_text(this->create_label, "Silent Mode is disabled", "left"); break; case 1: - ui_utils_label_set_text(this->sound_silent_label, "Silent Mode is enabled", "left"); + ui_utils_label_set_text(this->create_label, "Silent Mode is enabled", "left"); break; } @@ -687,11 +696,11 @@ void _system_settings_sound_touch_changed_cb(system_settings_key_e key, void *us switch((int)bvalue) { case 0: - ui_utils_label_set_text(this->sound_touch_label, "Screen Touch Sound is disabled", "left"); + ui_utils_label_set_text(this->create_label, "Screen Touch Sound is disabled", "left"); break; case 1: - ui_utils_label_set_text(this->sound_touch_label, "Screen Touch Sound is enabled", "left"); + ui_utils_label_set_text(this->create_label, "Screen Touch Sound is enabled", "left"); break; } @@ -719,11 +728,11 @@ void _system_settings_screen_rotation_changed_cb(system_settings_key_e key, void switch((int)bvalue) { case 0: - ui_utils_label_set_text(this->screen_rotation_label, "Rotation Control is disabled", "left"); + ui_utils_label_set_text(this->create_label, "Rotation Control is disabled", "left"); break; case 1: - ui_utils_label_set_text(this->screen_rotation_label, "Rotation Control is enabled", "left"); + ui_utils_label_set_text(this->create_label, "Rotation Control is enabled", "left"); break; } } @@ -750,11 +759,11 @@ void _system_settings_motion_changed_cb(system_settings_key_e key, void *user_da switch((int)bvalue) { case 0: - ui_utils_label_set_text(this->motion_label, "Motion Feature is disabled", "left"); + ui_utils_label_set_text(this->create_label, "Motion Feature is disabled", "left"); break; case 1: - ui_utils_label_set_text(this->motion_label, "Motion Feature is enabled", "left"); + ui_utils_label_set_text(this->create_label, "Motion Feature is enabled", "left"); break; } @@ -782,11 +791,11 @@ void _system_settings_flight_mode_changed_cb(system_settings_key_e key, void *us switch((int)bvalue) { case 0: - ui_utils_label_set_text(this->flight_mode_label, "Flight Mode is disabled", "left"); + ui_utils_label_set_text(this->create_label, "Flight Mode is disabled", "left"); break; case 1: - ui_utils_label_set_text(this->flight_mode_label, "Flight Mode is enabled", "left"); + ui_utils_label_set_text(this->create_label, "Flight Mode is enabled", "left"); break; } @@ -813,19 +822,19 @@ void _system_settings_lock_state_changed_cb(system_settings_key_e key, void *use switch(value) { case 0: - ui_utils_label_set_text(this->lock_state_label, "Device is unlocked", "left"); + ui_utils_label_set_text(this->create_label, "Device is unlocked", "left"); break; case 1: - ui_utils_label_set_text(this->lock_state_label, "Device is locked", "left"); + ui_utils_label_set_text(this->create_label, "Device is locked", "left"); break; case 2: - ui_utils_label_set_text(this->lock_state_label, "Device is being locked", "left"); + ui_utils_label_set_text(this->create_label, "Device is being locked", "left"); break; default: - ui_utils_label_set_text(this->lock_state_label, "Unknown status", "left"); + ui_utils_label_set_text(this->create_label, "Unknown status", "left"); break; }