diff options
-rwxr-xr-x | src/moments/moments_manager.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/src/moments/moments_manager.c b/src/moments/moments_manager.c index 301c58b..73711d3 100755 --- a/src/moments/moments_manager.c +++ b/src/moments/moments_manager.c @@ -385,34 +385,32 @@ static void __unregister_status_callback(void) if (ret != RUNTIME_INFO_ERROR_NONE) _E("Failed to unregister location service state"); - ret = telephony_unset_noti_cb(handle_list.handle[0], TELEPHONY_NOTI_NETWORK_PS_TYPE); - if (ret != TELEPHONY_ERROR_NONE) - _E("Failed to unregister service state"); + if (s_info.telephony_initialized) { + ret = telephony_unset_noti_cb(handle_list.handle[0], TELEPHONY_NOTI_NETWORK_ROAMING_STATUS); + if (ret != TELEPHONY_ERROR_NONE) + _E("Failed to unregister roaming status"); - ret = telephony_unset_noti_cb(handle_list.handle[0], TELEPHONY_NOTI_NETWORK_ROAMING_STATUS); - if (ret != TELEPHONY_ERROR_NONE) - _E("Failed to unregister roaming status"); + ret = telephony_unset_noti_cb(handle_list.handle[0], TELEPHONY_NOTI_NETWORK_SIGNALSTRENGTH_LEVEL); + if (ret != TELEPHONY_ERROR_NONE) + _E("Failed to unregister signal strength"); - ret = telephony_unset_noti_cb(handle_list.handle[0], TELEPHONY_NOTI_NETWORK_SIGNALSTRENGTH_LEVEL); - if (ret != TELEPHONY_ERROR_NONE) - _E("Failed to unregister signal strength"); + ret = telephony_unset_noti_cb(handle_list.handle[0], TELEPHONY_NOTI_NETWORK_SERVICE_STATE); + if (ret != TELEPHONY_ERROR_NONE) + _E("Failed to unregister service state"); - ret = telephony_unset_noti_cb(handle_list.handle[0], TELEPHONY_NOTI_NETWORK_SERVICE_STATE); - if (ret != TELEPHONY_ERROR_NONE) - _E("Failed to unregister service state"); + ret = telephony_unset_noti_cb(handle_list.handle[0], TELEPHONY_NOTI_SIM_STATUS); + if (ret != TELEPHONY_ERROR_NONE) + _E("Failed to unregister sim status"); - ret = telephony_unset_noti_cb(handle_list.handle[0], TELEPHONY_NOTI_SIM_STATUS); - if (ret != TELEPHONY_ERROR_NONE) - _E("Failed to unregister sim status"); + ret = telephony_deinit(&handle_list); + if (ret != TELEPHONY_ERROR_NONE) + _E("Failed to deinitialize telephony"); - ret = telephony_deinit(&handle_list); - if (ret != TELEPHONY_ERROR_NONE) - _E("Failed to deinitialize telephony"); + s_info.telephony_initialized = false; + } vconf_ignore_key_changed(VCONFKEY_DNET_STATE, __network_type_changed_cb); vconf_ignore_key_changed(VCONFKEY_TELEPHONY_CALL_FORWARD_STATE, __callforwarding_state_changed_cb); - - s_info.telephony_initialized = false; } vconf_ignore_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE, __flight_mode_changed_cb); |