mirror of
https://gitee.com/openharmony/sensors_sensor
synced 2024-12-04 04:31:52 +00:00
!674 修改5.0.1代码差异
Merge pull request !674 from liyaoyao/OpenHarmony-5.0.1-Release
This commit is contained in:
commit
11fe8249f2
@ -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);
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user