!528 修复sensor驱动连接失败服务不启动问题

Merge pull request !528 from lixiangpeng5/lxp
This commit is contained in:
openharmony_ci 2023-12-14 03:33:51 +00:00 committed by Gitee
commit d1ea8fd45b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -68,15 +68,12 @@ void SensorService::OnStart()
#ifdef HDF_DRIVERS_INTERFACE_SENSOR
if (!InitInterface()) {
SEN_HILOGE("Init interface error");
return;
}
if (!InitDataCallback()) {
SEN_HILOGE("Init data callback error");
return;
}
if (!InitSensorList()) {
SEN_HILOGE("Init sensor list error");
return;
}
sensorDataProcesser_ = new (std::nothrow) SensorDataProcesser(sensorMap_);
CHKPV(sensorDataProcesser_);