回退 'Pull Request !1570 : 修复XTS测试getNetworkState模块测试fail问题'

This commit is contained in:
openharmony_ci 2023-11-25 09:49:27 +00:00 committed by Gitee
parent 718e61c069
commit d87dbd2802
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -242,8 +242,8 @@ int32_t CoreServiceStub::OnGetNetworkState(MessageParcel &data, MessageParcel &r
auto slotId = data.ReadInt32();
sptr<NetworkState> networkState = nullptr;
int32_t result = GetNetworkState(slotId, networkState);
if ((networkState == nullptr) && (result != TELEPHONY_ERR_PERMISSION_ERR)) {
TELEPHONY_LOGE("networkState is nullptr and permission is not denied.");
if (networkState == nullptr) {
TELEPHONY_LOGE("networkState is nullptr.");
result = TELEPHONY_ERR_LOCAL_PTR_NULL;
}
reply.WriteInt32(result);