From: Radoslaw Czerski Date: Mon, 28 Nov 2016 13:45:50 +0000 (-0800) Subject: Revert "Revert "Merge branch 'tizen' into tizen_3.0"" X-Git-Tag: accepted/tizen/mobile/20161222.020447~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F06%2F100606%2F2;p=profile%2Fmobile%2Fapps%2Fnative%2Findicator.git Revert "Revert "Merge branch 'tizen' into tizen_3.0"" Previous revert removed important changes. This reverts commit 74bcc519bf04a256f2913863ebcafa81507cc8d8. Change-Id: I2c4f6846bef73289cfc1aff68890bdc8c3e8b99d --- diff --git a/src/main.c b/src/main.c index 0974c8b..246cd0f 100644 --- a/src/main.c +++ b/src/main.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "common.h" #include "box.h" @@ -94,6 +95,13 @@ static void _indicator_low_bat_cb(app_event_info_h event_info, void *data) static void _indicator_lang_changed_cb(app_event_info_h event_info, void *data) { modules_lang_changed(data); + + char *language_set = vconf_get_str(VCONFKEY_LANGSET); + if (language_set) { + _D("Lanugaged changed: %s", language_set); + elm_language_set(language_set); + free(language_set); + } } static void _indicator_region_changed_cb(app_event_info_h event_info, void *data) diff --git a/src/modules/connection/connection.c b/src/modules/connection/connection.c index 325e903..a8623e8 100644 --- a/src/modules/connection/connection.c +++ b/src/modules/connection/connection.c @@ -253,6 +253,7 @@ static void on_noti(telephony_h handle, void *user_data) wifi_connection_state_e state; int ret = 0; + int network = 0; bool val; retm_if(user_data == NULL, "invalid parameter!!"); @@ -277,11 +278,11 @@ static void on_noti(telephony_h handle, void *user_data) return; } - ret = runtime_info_get_value_bool(RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED, &val); + ret = vconf_get_int(VCONFKEY_NETWORK_STATUS, &network); retm_if(ret != RUNTIME_INFO_ERROR_NONE, "runtime_info_get_value_bool failed: %s", get_error_message(ret)); - if (val) { + if (network == VCONFKEY_NETWORK_BLUETOOTH) { _D("bluetooth tethering on"); isBTIconShowing = 1; show_image_icon(LEVEL_BT_TETHERING); @@ -463,6 +464,11 @@ static void data_event_cb(const char *event_name, bundle *event_data, void *user on_noti(tel_list.handle[0], user_data); } +static void network_status_cb(keynode_t *node, void *data) +{ + on_noti(tel_list.handle[0], data); +} + static int register_conn_module(void *data) { int ret; @@ -501,11 +507,18 @@ static int register_conn_module(void *data) return FAIL; } + ret = vconf_notify_key_changed(VCONFKEY_NETWORK_STATUS, network_status_cb, data); + if (ret != OK) { + _E("vconf_notify_kay_change failed: %s", get_error_message(ret)); + __deinit_tel(); + return FAIL; + } return OK; } static int unregister_conn_module(void) { + vconf_ignore_key_changed(VCONFKEY_NETWORK_STATUS, network_status_cb); telephony_unset_state_changed_cb(tel_ready_cb); __deinit_tel(); event_remove_event_handler(event); diff --git a/src/modules/network/rssi.c b/src/modules/network/rssi.c index 118a334..500bfdf 100644 --- a/src/modules/network/rssi.c +++ b/src/modules/network/rssi.c @@ -252,13 +252,13 @@ static rssi_icon_e icon_enum_get(bool roaming_enabled, telephony_network_rssi_e case TELEPHONY_NETWORK_RSSI_0: return roaming_enabled ? LEVEL_RSSI_ROAMING_0 : LEVEL_RSSI_SIM_0; case TELEPHONY_NETWORK_RSSI_1: - case TELEPHONY_NETWORK_RSSI_2: return roaming_enabled ? LEVEL_RSSI_ROAMING_1 : LEVEL_RSSI_SIM_1; - case TELEPHONY_NETWORK_RSSI_3: + case TELEPHONY_NETWORK_RSSI_2: return roaming_enabled ? LEVEL_RSSI_ROAMING_2 : LEVEL_RSSI_SIM_2; + case TELEPHONY_NETWORK_RSSI_3: + return roaming_enabled ? LEVEL_RSSI_ROAMING_3 : LEVEL_RSSI_SIM_3; case TELEPHONY_NETWORK_RSSI_4: case TELEPHONY_NETWORK_RSSI_5: - return roaming_enabled ? LEVEL_RSSI_ROAMING_3 : LEVEL_RSSI_SIM_3; case TELEPHONY_NETWORK_RSSI_6: return roaming_enabled ? LEVEL_RSSI_ROAMING_4 : LEVEL_RSSI_SIM_4; default: