From 3529b8697a52eccab838b2dd07108728fb54da0f Mon Sep 17 00:00:00 2001 From: chenliming Date: Sun, 22 Jun 2025 10:56:10 +0800 Subject: [PATCH] =?UTF-8?q?description:=E4=BF=AE=E5=A4=8Dmac=5Fsdk?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chenliming --- .../ability_simulator/src/bundle_parser/ability_info.cpp | 1 + .../ability_simulator/src/bundle_parser/module_profile.cpp | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frameworks/simulator/ability_simulator/src/bundle_parser/ability_info.cpp b/frameworks/simulator/ability_simulator/src/bundle_parser/ability_info.cpp index 3fabdfb5a1b..6c1e0265761 100644 --- a/frameworks/simulator/ability_simulator/src/bundle_parser/ability_info.cpp +++ b/frameworks/simulator/ability_simulator/src/bundle_parser/ability_info.cpp @@ -430,6 +430,7 @@ bool to_json(cJSON *&jsonObject, const AbilityInfo &abilityInfo) static_cast(abilityInfo.maxWindowRatio == 0 ? 0 : abilityInfo.maxWindowRatio)); cJSON_AddNumberToObject(jsonObject, JOSN_KEY_MIN_WINDOW_RATIO.c_str(), static_cast(abilityInfo.minWindowRatio == 0 ? 0 : abilityInfo.minWindowRatio)); + return true; } void from_json(const cJSON *jsonObject, CustomizeData &customizeData) diff --git a/frameworks/simulator/ability_simulator/src/bundle_parser/module_profile.cpp b/frameworks/simulator/ability_simulator/src/bundle_parser/module_profile.cpp index 855cc321c7e..ce741a77ff1 100644 --- a/frameworks/simulator/ability_simulator/src/bundle_parser/module_profile.cpp +++ b/frameworks/simulator/ability_simulator/src/bundle_parser/module_profile.cpp @@ -347,7 +347,7 @@ void from_json(const cJSON *jsonObject, Extension &extension) TAG_LOGD(AAFwkTag::ABILITY_SIM, "read extension tag from module.json"); if (jsonObject == nullptr) { TAG_LOGE(AAFwkTag::ABILITY_SIM, "jsonObject is null"); - return false; + return; } GetStringValueIfFindKey(jsonObject, EXTENSION_ABILITY_NAME, extension.name, true, g_parseResult); // both srcEntry and srcEntrance can be configured, but srcEntry has higher priority @@ -377,9 +377,8 @@ void from_json(const cJSON *jsonObject, Extension &extension) GetObjectValuesIfFindKey(jsonObject, META_DATA, extension.metadata, false, g_parseResult); if (g_parseResult != ERR_OK) { TAG_LOGE(AAFwkTag::ABILITY_SIM, "g_parseResult:%{public}d", g_parseResult); - return false; } - return true; + return; } void from_json(const cJSON *jsonObject, DeviceConfig &deviceConfig) -- Gitee