diff --git a/BUILD.gn b/BUILD.gn index 70b7a92de57ac7dd9a3ea156738a0ee0867c1e82..f9a013a7aec3338ce8ac3101be871aa23e8f4705 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -38,6 +38,7 @@ ohos_shared_library("tel_call_manager") { external_deps = [ "cJSON:cjson", "libphonenumber:phonenumber_standard", + "hilog:libhilog", ] external_deps += call_manager_external_deps @@ -67,6 +68,7 @@ ohos_shared_library("tel_call_manager") { defines = [ "TELEPHONY_LOG_TAG = \"CallManager\"", "LOG_DOMAIN = 0xD001F10", + "LOG_TAG = \"CallManager\"", ] if (call_manager_feature_hfp_async_enable) { diff --git a/services/audio/src/audio_control_manager.cpp b/services/audio/src/audio_control_manager.cpp index 175e6019aa5fa2cee2b6ef8f98f493642f3264b8..790b49e0ce65bca37537f7967d4acdee63ebd016 100644 --- a/services/audio/src/audio_control_manager.cpp +++ b/services/audio/src/audio_control_manager.cpp @@ -277,6 +277,8 @@ void AudioControlManager::UpdateDeviceTypeForCrs(AudioDeviceType deviceType) } TELEPHONY_LOGI("update deviceType = %{public}d,initCrsDeviceType_ %{public}d", deviceType, initCrsDeviceType_); + HILOG_COMM_INFO("update deviceType = %{public}d,initCrsDeviceType_ %{public}d", + deviceType, initCrsDeviceType_); initCrsDeviceType_ = deviceType; if (device.deviceType == deviceType) { return; @@ -326,6 +328,7 @@ void AudioControlManager::HandleCallStateUpdated( } auto callStateProcessor = DelayedSingleton::GetInstance(); TELEPHONY_LOGI("HandleCallStateUpdated priorState:%{public}d, nextState:%{public}d", priorState, nextState); + HILOG_COMM_INFO("HandleCallStateUpdated priorState:%{public}d, nextState:%{public}d", priorState, nextState); if ((nextState == TelCallState::CALL_STATUS_DISCONNECTING || nextState == TelCallState::CALL_STATUS_DISCONNECTED) && callObjectPtr->GetAnsweredByPhone()) { callStateProcessor->DeleteCall(callObjectPtr->GetCallID(), TelCallState::CALL_STATUS_ACTIVE); @@ -577,6 +580,7 @@ int32_t AudioControlManager::SetAudioDevice(const AudioDevice &device, bool isBy return CALL_ERR_AUDIO_SET_AUDIO_DEVICE_FAILED; } TELEPHONY_LOGI("set audio device, type: %{public}d", static_cast(device.deviceType)); + HILOG_COMM_INFO("set audio device, type: %{public}d", static_cast(device.deviceType)); AudioDeviceType audioDeviceType = AudioDeviceType::DEVICE_UNKNOWN; if (CallObjectManager::HasSatelliteCallExist() && device.deviceType == AudioDeviceType::DEVICE_EARPIECE) { DelayedSingleton::GetInstance()->DialogConnectExtension("SATELLITE_CALL_NOT_SUPPORT_EARPIECE"); @@ -801,6 +805,7 @@ bool AudioControlManager::PlayRingtone() return false; } TELEPHONY_LOGI("play ringtone success"); + HILOG_COMM_INFO("play ringtone success"); PostProcessRingtone(); return true; } @@ -845,6 +850,7 @@ bool AudioControlManager::dealCrsScene(const AudioStandard::AudioRingerMode &rin } AdjustVolumesForCrs(); TELEPHONY_LOGE("play soundtone fail."); + HILOG_COMM_INFO("play soundtone fail."); return false; } TELEPHONY_LOGI("type_crs but not play ringtone"); @@ -926,6 +932,7 @@ bool AudioControlManager::StopSoundtone() } sound_->ReleaseRenderer(); TELEPHONY_LOGI("stop soundtone success"); + HILOG_COMM_INFO("stop soundtone success"); RestoreVoiceValumeIfNecessary(); isCrsStartSoundTone_ = false; return true; @@ -950,6 +957,7 @@ bool AudioControlManager::StopRingtone() } ring_->ReleaseRenderer(); TELEPHONY_LOGI("stop ringtone success"); + HILOG_COMM_INFO("stop ringtone success"); return true; } @@ -1044,6 +1052,7 @@ int32_t AudioControlManager::SetMute(bool isMute) TelCallState::CALL_STATUS_ACTIVE)) { std::string strMute = isMute ? "true" : "false"; TELEPHONY_LOGI("SetMute strMute=%{public}s", strMute.c_str()); + HILOG_COMM_INFO("SetMute strMute=%{public}s", strMute.c_str()); std::vector> vec = { std::pair("hfp_set_mic_mute", strMute) }; @@ -1414,6 +1423,7 @@ void AudioControlManager::MuteNetWorkRingTone(bool isMute) DelayedSingleton::GetInstance()->SetVoiceRingtoneMute(isMute); } TELEPHONY_LOGI("Set Voice Ringtone mute,isMute: %{public}d", isMute); + HILOG_COMM_INFO("Set Voice Ringtone mute,isMute: %{public}d", isMute); if (isCrsVibrating_ && isMute) { DelayedSingleton::GetInstance()->StopVibrator(); isCrsVibrating_ = false; @@ -1562,6 +1572,7 @@ void AudioControlManager::AdjustVolumesForCrs() int32_t ringVolume = audioProxy->GetVolume(AudioStandard::AudioVolumeType::STREAM_RING); int32_t voiceVolume = audioProxy->GetVolume(AudioStandard::AudioVolumeType::STREAM_VOICE_CALL); TELEPHONY_LOGI("now ringVolume is %{public}d, voiceVolume is %{public}d", ringVolume, voiceVolume); + HILOG_COMM_INFO("now ringVolume is %{public}d, voiceVolume is %{public}d", ringVolume, voiceVolume); audioProxy->SetVolume(AudioStandard::AudioVolumeType::STREAM_VOICE_CALL, ringVolume); SaveVoiceVolume(voiceVolume); } diff --git a/services/call/src/call_ability_connect_callback.cpp b/services/call/src/call_ability_connect_callback.cpp index 2b610478b1a8b6fbe0bcdcf6bbf9f667fa1504c6..27629e61835d2121e62ff4a4357c6df8d30d08a8 100644 --- a/services/call/src/call_ability_connect_callback.cpp +++ b/services/call/src/call_ability_connect_callback.cpp @@ -31,6 +31,7 @@ void CallAbilityConnectCallback::OnAbilityConnectDone( const AppExecFwk::ElementName &element, const sptr &remoteObject, int resultCode) { TELEPHONY_LOGW("connect callui result code: %{public}d", resultCode); + HILOG_COMM_INFO("connect callui result code: %{public}d", resultCode); if (resultCode == CONNECT_ABILITY_SUCCESS) { DelayedSingleton::GetInstance()->SetConnectFlag(true); DelayedSingleton::GetInstance()->SetConnectingFlag(false); diff --git a/services/call/src/call_connect_ability.cpp b/services/call/src/call_connect_ability.cpp index 23e1e21961ba9c7682741418602c78c4708e342d..c681df0c8c5e5298bf7abd03dadb46e68ce25d66 100644 --- a/services/call/src/call_connect_ability.cpp +++ b/services/call/src/call_connect_ability.cpp @@ -45,6 +45,7 @@ void CallConnectAbility::ConnectAbility() return; } TELEPHONY_LOGW("Connect callui ability"); + HILOG_COMM_INFO("Connect callui ability"); std::lock_guard lock(connectAbilityMutex_); AAFwk::Want want; AppExecFwk::ElementName element("", "com.ohos.callui", "com.ohos.callui.ServiceAbility"); diff --git a/services/call/src/call_control_manager.cpp b/services/call/src/call_control_manager.cpp index 8135cd3ed69bd1bac6ce5a45f58b3c9f414bd85e..5827e51228471ab301b41d126801fbcec443b855 100644 --- a/services/call/src/call_control_manager.cpp +++ b/services/call/src/call_control_manager.cpp @@ -607,6 +607,8 @@ bool CallControlManager::NotifyCallStateUpdated( if (callStateListenerPtr_ != nullptr) { TELEPHONY_LOGI("NotifyCallStateUpdated priorState:%{public}d,nextState:%{public}d", priorState, nextState); callStateListenerPtr_->CallStateUpdated(callObjectPtr, priorState, nextState); + HILOG_COMM_INFO("NotifyCallStateUpdated priorState:%{public}d,nextState:%{public}d", priorState, nextState); + callStateListenerPtr_->CallStateUpdated(callObjectPtr, priorState, nextState); if (callObjectPtr->GetCallType() == CallType::TYPE_VOIP) { return true; }