summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRadoslaw Czerski <r.czerski@samsung.com>2016-03-10 15:19:05 +0100
committerRadoslaw Czerski <r.czerski@samsung.com>2016-03-10 15:19:05 +0100
commite44a1362c786a2a93c5884a9f004b66b028e0180 (patch)
tree2bc090f0ce0cdae0809289b1d40f3a8b525b16ac /src
parent1588f407b11754f75d618217669d0d9e14d11310 (diff)
downloadindicator-win-e44a1362c786a2a93c5884a9f004b66b028e0180.tar.gz
indicator-win-e44a1362c786a2a93c5884a9f004b66b028e0180.tar.bz2
indicator-win-e44a1362c786a2a93c5884a9f004b66b028e0180.zip
modules/connection/connection: icon showing fix.
No mobile data icon is visible while connecting to wifi when mobile data function is disabled. Change-Id: I4def9f5af0d452403a5bf8314d81b9f5db5da6d1 Signed-off-by: Radoslaw Czerski <r.czerski@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/modules/connection/connection.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/modules/connection/connection.c b/src/modules/connection/connection.c
index 2b8e03c..ffbf11f 100644
--- a/src/modules/connection/connection.c
+++ b/src/modules/connection/connection.c
@@ -48,6 +48,7 @@ static int isBTIconShowing = 0;
static telephony_handle_list_s tel_list;
static int updated_while_lcd_off = 0;
static int prevIndex = -1;
+static bool mobile_data_status = false;
static event_handler_h event;
@@ -254,7 +255,6 @@ static void _view_icon_update(telephony_h handle, void *data)
static void on_noti(telephony_h handle, void *user_data)
{
- telephony_network_default_data_subs_e default_subscription;
wifi_connection_state_e state;
int ret = 0;
@@ -299,21 +299,9 @@ static void on_noti(telephony_h handle, void *user_data)
hide_image_icon();
}
}
+ if (mobile_data_status)
+ _view_icon_update(handle, user_data);
- ret = telephony_network_get_default_data_subscription(handle, &default_subscription);
- retm_if(ret != TELEPHONY_ERROR_NONE, "telephony_network_get_default_data_subscription failed %s",
- get_error_message(ret));
-
- switch (default_subscription) {
- case TELEPHONY_NETWORK_DEFAULT_DATA_SUBS_SIM1:
- _view_icon_update(handle, user_data);
- break;
- case TELEPHONY_NETWORK_DEFAULT_DATA_SUBS_SIM2:
- case TELEPHONY_NETWORK_DEFAULT_DATA_SUBS_UNKNOWN:
- default:
- hide_image_icon();
- break;
- }
}
static int wake_up_cb(void *data)
@@ -449,16 +437,20 @@ static void data_event_cb(const char *event_name, bundle *event_data, void *user
}
_D("bundle value:%s", value);
- if (!strcmp(value, "off"))
+ if (!strcmp(value, "off")) {
+ mobile_data_status = false;
hide_image_icon();
- else
+ } else {
+ mobile_data_status = true;
on_noti(tel_list.handle[0], user_data);
+ }
}
static int register_conn_module(void *data)
{
int ret;
telephony_state_e state;
+ event_handler_h event;
retvm_if(data == NULL, FAIL, "Invalid parameter!");