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 3fabdfb5a1b374b62b73d15bc5b71f709e6dce17..6c1e026576167e946567ad758e0017e7c794539d 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 855cc321c7ec55fa715eb332f934cbe42e141f62..ce741a77ff15e96e071bcaf01f1946323a6808d0 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)