diff --git a/frameworks/security_component/src/sec_comp_base.cpp b/frameworks/security_component/src/sec_comp_base.cpp index 13a2c20027f3f2a1b18e735c776aafb288157e1d..5a76982df37e9f980a94854e9e1ab93458c77c57 100644 --- a/frameworks/security_component/src/sec_comp_base.cpp +++ b/frameworks/security_component/src/sec_comp_base.cpp @@ -72,7 +72,7 @@ const std::string JsonTagConstants::JSON_DISPLAY_ID = "displayId"; const std::string JsonTagConstants::JSON_CROSS_AXIS_STATE = "crossAxisState"; const std::string JsonTagConstants::JSON_IS_ICON_EXCEEDED_TAG = "isIconExceeded"; const std::string JsonTagConstants::JSON_IS_BORDER_COVERED_TAG = "isBorderCovered"; -const std::string JsonTagConstants::JSON_NON_COMPATIBLE_CHANGE_TAG = "hasNonCompatileChange"; +const std::string JsonTagConstants::JSON_NON_COMPATIBLE_CHANGE_TAG = "hasNonCompatibleChange"; const std::string JsonTagConstants::JSON_LINEAR_GRADIENT_BLUR_RADIUS_TAG = "blurRadius"; const std::string JsonTagConstants::JSON_FOREGROUND_BLUR_RADIUS_TAG = "foregroundBlurRadius"; const std::string JsonTagConstants::JSON_IS_OVERLAY_TEXT_SET_TAG = "isOverlayTextSet"; @@ -85,7 +85,7 @@ bool SecCompBase::ParseNonCompatibleChange(const nlohmann::json& json) SC_LOG_ERROR(LABEL, "json: %{public}s tag invalid.", tag.c_str()); return false; } - hasNonCompatileChange_ = json.at(tag).get(); + hasNonCompatibleChange_ = json.at(tag).get(); if (!ParseBool(json, JsonTagConstants::JSON_IS_ICON_EXCEEDED_TAG, isIconExceeded_)) { return false; @@ -505,7 +505,7 @@ void SecCompBase::ToJson(nlohmann::json& jsonRes) const jsonRes[JsonTagConstants::JSON_CROSS_AXIS_STATE] = crossAxisState_; jsonRes[JsonTagConstants::JSON_IS_ICON_EXCEEDED_TAG] = isIconExceeded_; jsonRes[JsonTagConstants::JSON_IS_BORDER_COVERED_TAG] = isBorderCovered_; - jsonRes[JsonTagConstants::JSON_NON_COMPATIBLE_CHANGE_TAG] = hasNonCompatileChange_; + jsonRes[JsonTagConstants::JSON_NON_COMPATIBLE_CHANGE_TAG] = hasNonCompatibleChange_; jsonRes[JsonTagConstants::JSON_LINEAR_GRADIENT_BLUR_RADIUS_TAG] = blurRadius_; jsonRes[JsonTagConstants::JSON_FOREGROUND_BLUR_RADIUS_TAG] = foregroundBlurRadius_; jsonRes[JsonTagConstants::JSON_IS_OVERLAY_TEXT_SET_TAG] = isOverlayTextSet_; diff --git a/interfaces/inner_api/security_component/include/sec_comp_base.h b/interfaces/inner_api/security_component/include/sec_comp_base.h index ae37388b60c8b29e42777477c7129af6fc58f39d..5676f636d6a1e515250ab35739201a6cd6cc2ca0 100644 --- a/interfaces/inner_api/security_component/include/sec_comp_base.h +++ b/interfaces/inner_api/security_component/include/sec_comp_base.h @@ -147,7 +147,7 @@ public: int32_t icon_ = UNKNOWN_ICON; SecCompBackground bg_ = SecCompBackground::UNKNOWN_BG; - bool hasNonCompatileChange_ = false; + bool hasNonCompatibleChange_ = false; double blurRadius_ = 0.0; double foregroundBlurRadius_ = 0.0; bool isOverlayTextSet_ = false; diff --git a/services/security_component_service/sa/sa_main/first_use_dialog.cpp b/services/security_component_service/sa/sa_main/first_use_dialog.cpp index 445c621956bec2dda92ca269d139a350ce9f4f26..c92cd6cb7e4b0c375edbac1eb04a0b5ebed754b8 100644 --- a/services/security_component_service/sa/sa_main/first_use_dialog.cpp +++ b/services/security_component_service/sa/sa_main/first_use_dialog.cpp @@ -164,7 +164,7 @@ bool FirstUseDialog::ParseRecord(nlohmann::json& jsonRes, } id = jsonRes.at(TOKEN_ID_TAG).get(); if (id == AccessToken::INVALID_TOKENID) { - SC_LOG_ERROR(LABEL, "TokenId is not invalid."); + SC_LOG_ERROR(LABEL, "TokenId is invalid."); return false; } diff --git a/services/security_component_service/sa/sa_main/sec_comp_manager.cpp b/services/security_component_service/sa/sa_main/sec_comp_manager.cpp index 1e5b618f6abb3598a928c3ed11019f4c79918861..8f68d59afe8c307bc626adca4d5182c3a9b6d841 100644 --- a/services/security_component_service/sa/sa_main/sec_comp_manager.cpp +++ b/services/security_component_service/sa/sa_main/sec_comp_manager.cpp @@ -469,7 +469,7 @@ int32_t SecCompManager::CheckClickSecurityComponentInfo(std::shared_ptrGetType()); return SC_SERVICE_ERROR_COMPONENT_INFO_INVALID; } - if (report && (report->isClipped_ || report->hasNonCompatileChange_)) { + if (report && (report->isClipped_ || report->hasNonCompatibleChange_)) { HiSysEventWrite(HiviewDFX::HiSysEvent::Domain::SEC_COMPONENT, "CLIP_CHECK_FAILED", HiviewDFX::HiSysEvent::EventType::SECURITY, "CALLER_BUNDLE_NAME", bundleName, "COMPONENT_INFO", jsonComponent.dump().c_str()); @@ -560,7 +560,8 @@ int32_t SecCompManager::ReportSecurityComponentClickEvent(SecCompInfo& info, con if (res != SC_OK) { return res; } - SecCompBase* report = SecCompInfoHelper::ParseComponent(sc->GetType(), compJson, message, true); + SecCompBase* reportComponentInfo = SecCompInfoHelper::ParseComponent(sc->GetType(), compJson, message, true); + std::shared_ptr report(reportComponentInfo); if (report == nullptr) { return SC_SERVICE_ERROR_COMPONENT_INFO_INVALID; }