diff --git a/frameworks/security_component/src/sec_comp_base.cpp b/frameworks/security_component/src/sec_comp_base.cpp index 608113269744bd33176c2bc367446ec7b3b848cd..22d10f357e12b90cdafa5d2d897e30397edadeb4 100644 --- a/frameworks/security_component/src/sec_comp_base.cpp +++ b/frameworks/security_component/src/sec_comp_base.cpp @@ -51,7 +51,6 @@ const std::string JsonTagConstants::JSON_BORDER_TAG = "border"; const std::string JsonTagConstants::JSON_BORDER_WIDTH_TAG = "borderWidth"; const std::string JsonTagConstants::JSON_PARENT_TAG = "parent"; const std::string JsonTagConstants::JSON_PARENT_EFFECT_TAG = "parentEffect"; -const std::string JsonTagConstants::JSON_PARENT_CHECK_FAILED_TAG = "isParentCheckFailed"; const std::string JsonTagConstants::JSON_IS_CLIPPED_TAG = "isClipped"; const std::string JsonTagConstants::JSON_TOP_CLIP_TAG = "topClip"; const std::string JsonTagConstants::JSON_BOTTOM_CLIP_TAG = "bottomClip"; @@ -197,9 +196,6 @@ bool SecCompBase::ParseParent(const nlohmann::json& json, const std::string& tag if (!ParseBool(jsonParent, JsonTagConstants::JSON_PARENT_EFFECT_TAG, parentEffect_)) { return false; } - if (!ParseBool(jsonParent, JsonTagConstants::JSON_PARENT_CHECK_FAILED_TAG, isParentCheckFailed_)) { - return false; - } if (!ParseBool(jsonParent, JsonTagConstants::JSON_IS_CLIPPED_TAG, isClipped_)) { return false; } @@ -343,7 +339,6 @@ void SecCompBase::ToJson(nlohmann::json& jsonRes) const }; jsonRes[JsonTagConstants::JSON_PARENT_TAG] = nlohmann::json { { JsonTagConstants::JSON_PARENT_EFFECT_TAG, parentEffect_ }, - { JsonTagConstants::JSON_PARENT_CHECK_FAILED_TAG, isParentCheckFailed_}, { JsonTagConstants::JSON_IS_CLIPPED_TAG, isClipped_ }, { JsonTagConstants::JSON_TOP_CLIP_TAG, topClip_ }, { JsonTagConstants::JSON_BOTTOM_CLIP_TAG, bottomClip_ }, 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 34c4c3e637ef615a4e3b4b03820f6aad6cdc71ff..f7c013089b24191695cc7e403b49cbd2dab75d22 100644 --- a/interfaces/inner_api/security_component/include/sec_comp_base.h +++ b/interfaces/inner_api/security_component/include/sec_comp_base.h @@ -66,7 +66,6 @@ public: static const std::string JSON_BORDER_WIDTH_TAG; static const std::string JSON_PARENT_TAG; static const std::string JSON_PARENT_EFFECT_TAG; - static const std::string JSON_PARENT_CHECK_FAILED_TAG; static const std::string JSON_IS_CLIPPED_TAG; static const std::string JSON_TOP_CLIP_TAG; static const std::string JSON_BOTTOM_CLIP_TAG; @@ -115,7 +114,6 @@ public: // parent effect bool parentEffect_ = false; - bool isParentCheckFailed_ = false; bool isClipped_ = false; DimensionT topClip_; DimensionT bottomClip_; diff --git a/interfaces/inner_api/security_component/test/unittest/src/test_common.cpp b/interfaces/inner_api/security_component/test/unittest/src/test_common.cpp index 8c754179020d1e88c691bba0983d665ca8fc72f4..2c602e3bca366ec109b90937594ec8955cff9222 100644 --- a/interfaces/inner_api/security_component/test/unittest/src/test_common.cpp +++ b/interfaces/inner_api/security_component/test/unittest/src/test_common.cpp @@ -58,7 +58,6 @@ void TestCommon::BuildLocationComponentInfo(nlohmann::json& jsonComponent) }; jsonComponent[JsonTagConstants::JSON_PARENT_TAG] = nlohmann::json { { JsonTagConstants::JSON_PARENT_EFFECT_TAG, false }, - { JsonTagConstants::JSON_PARENT_CHECK_FAILED_TAG, false }, { JsonTagConstants::JSON_IS_CLIPPED_TAG, false }, { JsonTagConstants::JSON_TOP_CLIP_TAG, 0.0 }, { JsonTagConstants::JSON_BOTTOM_CLIP_TAG, 0.0 }, @@ -115,7 +114,6 @@ void TestCommon::BuildSaveComponentInfo(nlohmann::json& jsonComponent) }; jsonComponent[JsonTagConstants::JSON_PARENT_TAG] = nlohmann::json { { JsonTagConstants::JSON_PARENT_EFFECT_TAG, false }, - { JsonTagConstants::JSON_PARENT_CHECK_FAILED_TAG, false }, { JsonTagConstants::JSON_IS_CLIPPED_TAG, false }, { JsonTagConstants::JSON_TOP_CLIP_TAG, 0.0 }, { JsonTagConstants::JSON_BOTTOM_CLIP_TAG, 0.0 }, @@ -172,7 +170,6 @@ void TestCommon::BuildPasteComponentInfo(nlohmann::json& jsonComponent) }; jsonComponent[JsonTagConstants::JSON_PARENT_TAG] = nlohmann::json { { JsonTagConstants::JSON_PARENT_EFFECT_TAG, false }, - { JsonTagConstants::JSON_PARENT_CHECK_FAILED_TAG, false }, { JsonTagConstants::JSON_IS_CLIPPED_TAG, false }, { JsonTagConstants::JSON_TOP_CLIP_TAG, 0.0 }, { JsonTagConstants::JSON_BOTTOM_CLIP_TAG, 0.0 }, 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 5de862a870fd6b58498b9d722d6b56ad65873242..4ae69ff658cbd91668343f41600556e7e65153ec 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 @@ -454,7 +454,7 @@ int32_t SecCompManager::CheckClickSecurityComponentInfo(std::shared_ptrGetType()); return SC_SERVICE_ERROR_COMPONENT_INFO_INVALID; } - if (report && (report->isClipped_ || report->isParentCheckFailed_)) { + if (report && (report->isClipped_)) { HiSysEventWrite(HiviewDFX::HiSysEvent::Domain::SEC_COMPONENT, "CLIP_CHECK_FAILED", HiviewDFX::HiSysEvent::EventType::SECURITY, "CALLER_BUNDLE_NAME", bundleName, "COMPONENT_INFO", jsonComponent.dump().c_str()); diff --git a/services/security_component_service/sa/test/unittest/src/sec_comp_info_helper_test.cpp b/services/security_component_service/sa/test/unittest/src/sec_comp_info_helper_test.cpp index fcd754b5f19e7451b33ed134e5e3ac4a016eca80..0e463d01848707fe954f5d8649bf6001a5e41e2d 100644 --- a/services/security_component_service/sa/test/unittest/src/sec_comp_info_helper_test.cpp +++ b/services/security_component_service/sa/test/unittest/src/sec_comp_info_helper_test.cpp @@ -235,7 +235,6 @@ HWTEST_F(SecCompInfoHelperTest, ParseComponent006, TestSize.Level1) jsonComponent[JsonTagConstants::JSON_PARENT_TAG] = nlohmann::json { { JsonTagConstants::JSON_PARENT_EFFECT_TAG, true }, - { JsonTagConstants::JSON_PARENT_CHECK_FAILED_TAG, false }, { JsonTagConstants::JSON_IS_CLIPPED_TAG, false }, { JsonTagConstants::JSON_TOP_CLIP_TAG, 0.0 }, { JsonTagConstants::JSON_BOTTOM_CLIP_TAG, 0.0 }, diff --git a/services/security_component_service/sa/test/unittest/src/service_test_common.cpp b/services/security_component_service/sa/test/unittest/src/service_test_common.cpp index d6ab82b1e15ec2344617eb6d242a63b5a2ebc86d..d3433d1d5951acb21fe183faa7d61712e2ec71ac 100644 --- a/services/security_component_service/sa/test/unittest/src/service_test_common.cpp +++ b/services/security_component_service/sa/test/unittest/src/service_test_common.cpp @@ -58,7 +58,6 @@ void ServiceTestCommon::BuildLocationComponentJson(nlohmann::json& jsonComponent }; jsonComponent[JsonTagConstants::JSON_PARENT_TAG] = nlohmann::json { { JsonTagConstants::JSON_PARENT_EFFECT_TAG, false }, - { JsonTagConstants::JSON_PARENT_CHECK_FAILED_TAG, false }, { JsonTagConstants::JSON_IS_CLIPPED_TAG, false }, { JsonTagConstants::JSON_TOP_CLIP_TAG, 0.0 }, { JsonTagConstants::JSON_BOTTOM_CLIP_TAG, 0.0 }, @@ -115,7 +114,6 @@ void ServiceTestCommon::BuildSaveComponentJson(nlohmann::json& jsonComponent) }; jsonComponent[JsonTagConstants::JSON_PARENT_TAG] = nlohmann::json { { JsonTagConstants::JSON_PARENT_EFFECT_TAG, false }, - { JsonTagConstants::JSON_PARENT_CHECK_FAILED_TAG, false }, { JsonTagConstants::JSON_IS_CLIPPED_TAG, false }, { JsonTagConstants::JSON_TOP_CLIP_TAG, 0.0 }, { JsonTagConstants::JSON_BOTTOM_CLIP_TAG, 0.0 }, @@ -172,7 +170,6 @@ void ServiceTestCommon::BuildPasteComponentJson(nlohmann::json& jsonComponent) }; jsonComponent[JsonTagConstants::JSON_PARENT_TAG] = nlohmann::json { { JsonTagConstants::JSON_PARENT_EFFECT_TAG, false }, - { JsonTagConstants::JSON_PARENT_CHECK_FAILED_TAG, false }, { JsonTagConstants::JSON_IS_CLIPPED_TAG, false }, { JsonTagConstants::JSON_TOP_CLIP_TAG, 0.0 }, { JsonTagConstants::JSON_BOTTOM_CLIP_TAG, 0.0 }, diff --git a/test/fuzztest/security_component/common/fuzz_common.cpp b/test/fuzztest/security_component/common/fuzz_common.cpp index def10eb01800ef94d740be18adaf1c69e48892d2..d591bee852dd370d2adc3456d913fb6544c3d0fa 100644 --- a/test/fuzztest/security_component/common/fuzz_common.cpp +++ b/test/fuzztest/security_component/common/fuzz_common.cpp @@ -93,7 +93,6 @@ std::string CompoRandomGenerator::ConstructLocationJson() // set default val jsonComponent[JsonTagConstants::JSON_PARENT_TAG] = nlohmann::json { { JsonTagConstants::JSON_PARENT_EFFECT_TAG, GetData() }, - { JsonTagConstants::JSON_PARENT_CHECK_FAILED_TAG, GetData() }, { JsonTagConstants::JSON_IS_CLIPPED_TAG, GetData() }, { JsonTagConstants::JSON_TOP_CLIP_TAG, GetData() }, { JsonTagConstants::JSON_BOTTOM_CLIP_TAG, GetData() }, @@ -136,7 +135,6 @@ std::string CompoRandomGenerator::ConstructSaveJson() // set default val jsonComponent[JsonTagConstants::JSON_PARENT_TAG] = nlohmann::json { { JsonTagConstants::JSON_PARENT_EFFECT_TAG, GetData() }, - { JsonTagConstants::JSON_PARENT_CHECK_FAILED_TAG, GetData() }, { JsonTagConstants::JSON_IS_CLIPPED_TAG, GetData() }, { JsonTagConstants::JSON_TOP_CLIP_TAG, GetData() }, { JsonTagConstants::JSON_BOTTOM_CLIP_TAG, GetData() }, @@ -178,7 +176,6 @@ std::string CompoRandomGenerator::ConstructPasteJson() // set default val jsonComponent[JsonTagConstants::JSON_PARENT_TAG] = nlohmann::json { { JsonTagConstants::JSON_PARENT_EFFECT_TAG, GetData() }, - { JsonTagConstants::JSON_PARENT_CHECK_FAILED_TAG, GetData() }, { JsonTagConstants::JSON_IS_CLIPPED_TAG, GetData() }, { JsonTagConstants::JSON_TOP_CLIP_TAG, GetData() }, { JsonTagConstants::JSON_BOTTOM_CLIP_TAG, GetData() },