!2356 修复GetImsStatus稳定性问题

Merge pull request !2356 from 罗建贞/master
This commit is contained in:
openharmony_ci 2024-10-16 02:05:13 +00:00 committed by Gitee
commit 476f7f5764
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -107,6 +107,10 @@ void NetworkSearchState::SetNetworkStateToRoaming(RoamingType roamingType, Domai
int32_t NetworkSearchState::GetImsStatus(ImsServiceType imsSrvType, ImsRegInfo &info)
{
std::lock_guard<std::mutex> lock(imsMutex_);
if (imsServiceStatus_ == nullptr) {
TELEPHONY_LOGE("imsServiceStatus_ is null!");
return TELEPHONY_ERR_LOCAL_PTR_NULL;
}
bool isRegister = false;
switch (imsSrvType) {
case ImsServiceType::TYPE_VOICE: