- if ((indicator_info.curr_rx > indicator_info.prev_rx)
- || (indicator_info.curr_tx > indicator_info.prev_tx)) {
- if(pkt_state != INDICATOR_ONLINE)
- tcore_storage_set_int(strg_vconf, STORAGE_KEY_PACKET_SERVICE_STATE, INDICATOR_ONLINE);
- }
- else{ //rx, tx are the same as before
- if(pkt_state != INDICATOR_ON)
- tcore_storage_set_int(strg_vconf, STORAGE_KEY_PACKET_SERVICE_STATE, INDICATOR_ON);
- }
+ rx_changes = indicator_info.curr_rx - indicator_info.prev_rx;
+ tx_changes = indicator_info.curr_tx - indicator_info.prev_tx;
+
+ if (rx_changes != 0 || tx_changes != 0)
+ tcore_storage_set_int(strg_vconf, STORAGE_KEY_PACKET_SERVICE_STATE, CELLULAR_USING);
+ else
+ tcore_storage_set_int(strg_vconf, STORAGE_KEY_PACKET_SERVICE_STATE, CELLULAR_NORMAL_CONNECTED);
+
+ if (rx_changes > 0 && tx_changes > 0)
+ tcore_storage_set_int(strg_vconf, STORAGE_KEY_PACKET_INDICATOR_STATE, INDICATOR_RXTX);
+ else if (rx_changes > 0 && tx_changes == 0)
+ tcore_storage_set_int(strg_vconf, STORAGE_KEY_PACKET_INDICATOR_STATE, INDICATOR_RX);
+ else if (rx_changes == 0 && tx_changes > 0)
+ tcore_storage_set_int(strg_vconf, STORAGE_KEY_PACKET_INDICATOR_STATE, INDICATOR_TX);
+ else
+ tcore_storage_set_int(strg_vconf, STORAGE_KEY_PACKET_INDICATOR_STATE, INDICATOR_NORMAL);