From efdbc10fce74f7c0bcef371075639e002c973693 Mon Sep 17 00:00:00 2001 From: Radoslaw Czerski Date: Mon, 7 Mar 2016 15:22:47 +0100 Subject: [PATCH] module/connection/connection: Unneeded code removed. Change-Id: I4388e865337aecd6aa856f36b49b82b5aa879afe Signed-off-by: Radoslaw Czerski --- src/modules/connection/connection.c | 48 +++++++++++-------------------------- 1 file changed, 14 insertions(+), 34 deletions(-) diff --git a/src/modules/connection/connection.c b/src/modules/connection/connection.c index 02fceb5..a7c84d7 100644 --- a/src/modules/connection/connection.c +++ b/src/modules/connection/connection.c @@ -45,7 +45,7 @@ static int wake_up_cb(void *data); static void __deinit_tel(void); static int transfer_state = -1; -int isBTIconShowing = 0; +static int isBTIconShowing = 0; static telephony_handle_list_s tel_list; static int updated_while_lcd_off = 0; static int prevIndex = -1; @@ -103,54 +103,34 @@ static void show_connection_transfer_icon(void* data) { int state = 0; int ret = 0; - int type = -1; ret = vconf_get_int(VCONFKEY_PACKET_STATE, &state); if (ret == OK) { + + if (transfer_state == state) { + _D("same transfer state"); + return; + } + + _D("type %d",state); + transfer_state = state; + switch (state) { case VCONFKEY_PACKET_RX: - type = TRANSFER_DOWN; + util_signal_emit(conn.ad,"indicator.connection.updown.download","indicator.prog"); break; case VCONFKEY_PACKET_TX: - type = TRANSFER_UP; + util_signal_emit(conn.ad,"indicator.connection.updown.upload","indicator.prog"); break; case VCONFKEY_PACKET_RXTX: - type = TRANSFER_UPDOWN; + util_signal_emit(conn.ad,"indicator.connection.updown.updownload","indicator.prog"); break; case VCONFKEY_PACKET_NORMAL: - type = TRANSFER_NONE; - break; - default: - type = -1; - break; - } - } - - if(transfer_state==type) - { - DBG("same transfer state"); - return; - } - - DBG("type %d",type); - transfer_state = type; - switch (type) - { - case TRANSFER_NONE: util_signal_emit(conn.ad,"indicator.connection.updown.none","indicator.prog"); break; - case TRANSFER_DOWN: - util_signal_emit(conn.ad,"indicator.connection.updown.download","indicator.prog"); - break; - case TRANSFER_UP: - util_signal_emit(conn.ad,"indicator.connection.updown.upload","indicator.prog"); - break; - case TRANSFER_UPDOWN: - util_signal_emit(conn.ad,"indicator.connection.updown.updownload","indicator.prog"); - break; default: break; - + } } } -- 2.7.4