!674 修改5.0.1代码差异

Merge pull request !674 from liyaoyao/OpenHarmony-5.0.1-Release
This commit is contained in:
openharmony_ci 2024-11-16 04:05:15 +00:00 committed by Gitee
commit 11fe8249f2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 3 deletions

View File

@ -322,7 +322,7 @@ bool ConvertToSensorData(const napi_env &env, sptr<AsyncCallbackInfo> asyncCallb
{
CHKPF(asyncCallbackInfo);
int32_t sensorTypeId = asyncCallbackInfo->data.sensorData.sensorTypeId;
std::lock_guard<std::mutex> sensorAttrListMutex(g_sensorAttrListMutex);
std::lock_guard<std::mutex> sensorAttrListLock(g_sensorAttrListMutex);
CHKNCF(env, (g_sensorAttributeList.find(sensorTypeId) != g_sensorAttributeList.end()), "Invalid sensor type");
if (sensorTypeId == SENSOR_TYPE_ID_WEAR_DETECTION && asyncCallbackInfo->type == SUBSCRIBE_CALLBACK) {
return ConvertToBodyData(env, asyncCallbackInfo, result);

View File

@ -223,7 +223,7 @@ void SensorServiceClient::ReenableSensor()
CALL_LOG_ENTER;
std::lock_guard<std::mutex> mapLock(mapMutex_);
for (const auto &it : sensorInfoMap_) {
std::lock_guard<std::mutex> clientLock_(clientMutex_);
std::lock_guard<std::mutex> clientLock(clientMutex_);
if (sensorServer_ != nullptr) {
sensorServer_->EnableSensor(it.first, it.second.GetSamplingPeriodNs(), it.second.GetMaxReportDelayNs());
}
@ -265,7 +265,7 @@ void SensorServiceClient::ProcessDeathObserver(const wptr<IRemoteObject> &object
SENSOR_AGENT_IMPL->SetIsChannelCreated(false);
return;
}
std::lock_guard<std::mutex> clientLock_(clientMutex_);
std::lock_guard<std::mutex> clientLock(clientMutex_);
if (sensorServer_ != nullptr && sensorClientStub_ != nullptr) {
auto remoteObject = sensorClientStub_->AsObject();
if (remoteObject != nullptr) {