diff --git a/services/native/src/thermal_observer/state_machine/state_collection_factory.cpp b/services/native/src/thermal_observer/state_machine/state_collection_factory.cpp index 52df1f800c8a5dc8503c8a530994f0b704d7f572..022d1c9f6ed1895dd724a67c5c59c6656cc713a7 100644 --- a/services/native/src/thermal_observer/state_machine/state_collection_factory.cpp +++ b/services/native/src/thermal_observer/state_machine/state_collection_factory.cpp @@ -31,7 +31,7 @@ std::shared_ptr StateCollectionFactory::Create(std::string &st return std::make_shared(); } else if (stateName == STATE_SCREEN) { return std::make_shared(); - } else if (stateName == STATE_SCNEN) { + } else if (stateName == STATE_SCENE) { return std::make_shared(); } else { return std::make_shared(stateName); diff --git a/services/native/src/thermal_observer/thermal_sensor_info.cpp b/services/native/src/thermal_observer/thermal_sensor_info.cpp index 210fa8822cdf0e4f8dfa27171072071600ac79c4..3745b407cebfd2accf6edfca0f29c57780835bca 100644 --- a/services/native/src/thermal_observer/thermal_sensor_info.cpp +++ b/services/native/src/thermal_observer/thermal_sensor_info.cpp @@ -58,4 +58,4 @@ void ThermalSensorInfo::NotifyObserver() tms->GetObserver()->OnReceivedSensorInfo(GetTypeTempMap()); } } // PowerMgr -} // OHOS \ No newline at end of file +} // OHOS diff --git a/services/native/src/thermal_policy/thermal_config_sensor_cluster.cpp b/services/native/src/thermal_policy/thermal_config_sensor_cluster.cpp index cf08a8014b074c3cd320022a897fe5eb2d62c2bc..854e193576ae93ab68853f2d628695deb273addd 100644 --- a/services/native/src/thermal_policy/thermal_config_sensor_cluster.cpp +++ b/services/native/src/thermal_policy/thermal_config_sensor_cluster.cpp @@ -32,6 +32,10 @@ bool ThermalConfigSensorCluster::CheckStandard() THERMAL_HILOGE(COMP_SVC, "sensor info is empty"); return false; } + if (auxSensorInfolist_.empty()) { + THERMAL_HILOGE(COMP_SVC, "aux sensor info is empty"); + return false; + } uint32_t expectedLevSize = static_cast(sensorInfolist_.begin()->second.size()); for (auto sensorInfo = sensorInfolist_.begin(); sensorInfo != sensorInfolist_.end(); ++sensorInfo) { uint32_t actualLevSize = static_cast(sensorInfo->second.size()); diff --git a/utils/native/include/constants.h b/utils/native/include/constants.h index c39c3a97e1643233663e189401c1c4275ecd3510..ba7ce38cf10b787dff6bbc508c1bb31ac4a67983 100644 --- a/utils/native/include/constants.h +++ b/utils/native/include/constants.h @@ -44,7 +44,7 @@ namespace PowerMgr { // state name const std::string STATE_CHARGER = "charge"; const std::string STATE_SCREEN = "screen"; - const std::string STATE_SCNEN = "scene"; + const std::string STATE_SCENE = "scene"; // scene sensor name const std::string BATTERY = "battery";