diff --git a/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver.cpp b/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver.cpp index 823c40e06e7aecbe39cfe0d80e2777e1bb9309e0..909deaa8da12b823c260db8c39bd644b6e481783 100644 --- a/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver.cpp +++ b/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver.cpp @@ -171,7 +171,9 @@ private: GetInsightIntentFlag flag; if (!ConvertFromJsValue(env, info.argv[INDEX_ZERO], flag) || (flag != GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT && - flag != GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT)) { + flag != GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT && + flag != (GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT | GetInsightIntentFlag::GET_ENTITY_INFO) && + flag != (GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT | GetInsightIntentFlag::GET_ENTITY_INFO))) { TAG_LOGE(AAFwkTag::INTENT, "Parse flag failed"); ThrowInvalidParamError(env, "Parse param flag failed, flag must be GetInsightIntentFlag."); return CreateJsUndefined(env); @@ -212,7 +214,9 @@ private: GetInsightIntentFlag flag; if (!ConvertFromJsValue(env, info.argv[INDEX_ONE], flag) || (flag != GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT && - flag != GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT)) { + flag != GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT && + flag != (GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT | GetInsightIntentFlag::GET_ENTITY_INFO) && + flag != (GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT | GetInsightIntentFlag::GET_ENTITY_INFO))) { TAG_LOGE(AAFwkTag::INTENT, "Parse flag failed"); ThrowInvalidParamError(env, "Parse param flag failed, flag must be GetInsightIntentFlag."); return CreateJsUndefined(env); @@ -266,7 +270,9 @@ private: GetInsightIntentFlag flag; if (!ConvertFromJsValue(env, info.argv[INDEX_THREE], flag) || (flag != GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT && - flag != GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT)) { + flag != GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT && + flag != (GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT | GetInsightIntentFlag::GET_ENTITY_INFO) && + flag != (GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT | GetInsightIntentFlag::GET_ENTITY_INFO))) { TAG_LOGE(AAFwkTag::INTENT, "Parse flag failed"); ThrowInvalidParamError(env, "Parse param flag failed, flag must be GetInsightIntentFlag."); return CreateJsUndefined(env); @@ -332,6 +338,8 @@ static napi_value InitGetInsightIntentFlagObject(napi_env env) env, napiObject, "GET_FULL_INSIGHT_INTENT", GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT)); NAPI_CALL(env, SetEnumItem( env, napiObject, "GET_SUMMARY_INSIGHT_INTENT", GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT)); + NAPI_CALL(env, SetEnumItem( + env, napiObject, "GET_ENTITY_INFO", GetInsightIntentFlag::GET_ENTITY_INFO)); return napiObject; } diff --git a/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver_utils.cpp b/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver_utils.cpp index 5680c248f007bebc0a1d9baeba5f2155752b786d..fa5d051173df4694068223b1ad1f5c5ac5667d60 100644 --- a/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver_utils.cpp +++ b/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver_utils.cpp @@ -87,6 +87,36 @@ napi_value CreateFormInfoForQuery(napi_env env, const FormInfoForQuery &info) return objValue; } +napi_value CreateEntityInfoForArray(napi_env env, const std::vector &infos) +{ + napi_value arrayValue = nullptr; + napi_create_array_with_length(env, infos.size(), &arrayValue); + uint32_t index = 0; + for (const auto &info : infos) { + napi_set_element(env, arrayValue, index++, CreateJsEntityInfo(env, info)); + } + + return arrayValue; +} + +napi_value CreateJsEntityInfo(napi_env env, const EntityInfoForQuery &info) +{ + napi_value objValue = nullptr; + napi_create_object(env, &objValue); + if (objValue == nullptr) { + TAG_LOGE(AAFwkTag::INTENT, "null obj"); + return nullptr; + } + + napi_set_named_property(env, objValue, "className", CreateJsValue(env, info.className)); + napi_set_named_property(env, objValue, "entityId", CreateJsValue(env, info.entityId)); + napi_set_named_property(env, objValue, "entityCategory", CreateJsValue(env, info.entityCategory)); + napi_set_named_property(env, objValue, "parameters", CreateInsightIntentInfoParam(env, info.parameters)); + napi_set_named_property(env, objValue, "parentClassName", CreateJsValue(env, info.parentClassName)); + + return objValue; +} + napi_value CreateInsightIntentInfoWithJson(napi_env env, const nlohmann::json &jsonObject) { if (jsonObject.is_object()) { @@ -175,6 +205,7 @@ napi_value CreateInsightIntentInfoForQuery(napi_env env, const InsightIntentInfo napi_set_named_property(env, objValue, "parameters", CreateInsightIntentInfoParam(env, info.parameters)); napi_set_named_property(env, objValue, "result", CreateInsightIntentInfoResult(env, info.result)); napi_set_named_property(env, objValue, "keywords", CreateNativeArray(env, info.keywords)); + napi_set_named_property(env, objValue, "entities", CreateEntityInfoForArray(env, info.entities)); if (info.intentType == INSIGHT_INTENTS_TYPE_LINK) { napi_set_named_property(env, objValue, "subIntentInfo", CreateLinkInfoForQuery(env, info.linkInfo)); } else if (info.intentType == INSIGHT_INTENTS_TYPE_PAGE) { diff --git a/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver_utils.h b/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver_utils.h index 6eff220acad6c179b602b12df2c8486f1445b54d..d718809ce8c559888dc7c1c841b30e1a861d55e5 100644 --- a/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver_utils.h +++ b/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver_utils.h @@ -34,6 +34,8 @@ napi_value CreateInsightIntentInfoParam(napi_env env, const std::string ¶mSt napi_value CreateInsightIntentInfoResult(napi_env env, const std::string &resultStr); napi_value CreateInsightIntentInfoForQuery(napi_env env, const InsightIntentInfoForQuery &info); napi_value CreateInsightIntentInfoForQueryArray(napi_env env, const std::vector &infos); +napi_value CreateJsEntityInfo(napi_env env, const EntityInfoForQuery &info); +napi_value CreateEntityInfoForArray(napi_env env, const std::vector &infos); } // namespace AbilityRuntime } // namespace OHOS #endif // OHOS_ABILITY_RUNTIME_JS_INSIGHT_INTENT_DRIVER_UTILS_H diff --git a/interfaces/inner_api/ability_manager/include/insight_intent/insight_intent_constant.h b/interfaces/inner_api/ability_manager/include/insight_intent/insight_intent_constant.h index cbe409e3b231fe3268ba286923a70269a89a5fbb..23522f4f3c92c285548542b84ccb830225d6cae8 100644 --- a/interfaces/inner_api/ability_manager/include/insight_intent/insight_intent_constant.h +++ b/interfaces/inner_api/ability_manager/include/insight_intent/insight_intent_constant.h @@ -50,8 +50,14 @@ namespace OHOS::AbilityRuntime { constexpr char INSIGHT_INTENT_LINK_INFO[] = "linkInfo"; constexpr char INSIGHT_INTENT_PAGE_INFO[] = "pageInfo"; constexpr char INSIGHT_INTENT_ENTRY_INFO[] = "entryInfo"; + constexpr char INSIGHT_INTENT_ENTITY_INFO[] = "entities"; constexpr char INSIGHT_INTENT_FUNCTION_INFO[] = "functionInfo"; constexpr char INSIGHT_INTENT_FORM_INFO[] = "formInfo"; + constexpr char INSIGHT_INTENT_ENTITY_CLASS_NAME[] = "className"; + constexpr char INSIGHT_INTENT_ENTITY_CATEGORY[] = "entityCategory"; + constexpr char INSIGHT_INTENT_ENTITY_ID[] = "entityId"; + constexpr char INSIGHT_INTENT_ENTITY_PARENT_CLASS_NAME[] = "parentClassName"; + constexpr char INSIGHT_INTENT_ENTITY_PARAMETERS[] = "parameters"; enum class InsightIntentExecuteMode { UIABILITY_FOREGROUND, @@ -70,7 +76,10 @@ namespace OHOS::AbilityRuntime { enum GetInsightIntentFlag { GET_FULL_INSIGHT_INTENT = 1, - GET_SUMMARY_INSIGHT_INTENT + GET_SUMMARY_INSIGHT_INTENT, + GET_ENTITY_INFO = 4, + GET_FULL_INSIGHT_INTENT_ENTITY, + GET_SUMMARY_INSIGHT_INTENT_ENTITY, }; enum class InsightIntentType : uint8_t { diff --git a/interfaces/inner_api/ability_manager/include/insight_intent/insight_intent_info_for_query.h b/interfaces/inner_api/ability_manager/include/insight_intent/insight_intent_info_for_query.h index 38d333d241b9ac43e990d804d69b41d7ef12ef7d..412e0e8631a86bca589bd4188dbf7d9cc0111765 100644 --- a/interfaces/inner_api/ability_manager/include/insight_intent/insight_intent_info_for_query.h +++ b/interfaces/inner_api/ability_manager/include/insight_intent/insight_intent_info_for_query.h @@ -48,6 +48,14 @@ struct FormInfoForQuery { std::string formName; }; +struct EntityInfoForQuery { + std::string className; + std::string entityId; + std::string entityCategory; + std::string parameters; + std::string parentClassName; +}; + struct InsightIntentInfoForQuery : public Parcelable { std::string bundleName; std::string moduleName; @@ -68,6 +76,7 @@ struct InsightIntentInfoForQuery : public Parcelable { EntryInfoForQuery entryInfo; FunctionInfoForQuery functionInfo; FormInfoForQuery formInfo; + std::vector entities {}; bool ReadFromParcel(Parcel &parcel); virtual bool Marshalling(Parcel &parcel) const override; diff --git a/interfaces/inner_api/ability_manager/include/insight_intent/insight_intent_utils.h b/interfaces/inner_api/ability_manager/include/insight_intent/insight_intent_utils.h index 017f14442634a7397f5ac37f91c2f6b15bd6dc73..c2e251b242d46c58f7874d006ae4c7a88fe4ccbe 100644 --- a/interfaces/inner_api/ability_manager/include/insight_intent/insight_intent_utils.h +++ b/interfaces/inner_api/ability_manager/include/insight_intent/insight_intent_utils.h @@ -33,7 +33,9 @@ public: static uint32_t ConvertExtractInsightIntentGenericInfo( ExtractInsightIntentGenericInfo &genericInfo, InsightIntentInfoForQuery &queryInfo); static uint32_t ConvertExtractInsightIntentInfo( - ExtractInsightIntentInfo &intentInfo, InsightIntentInfoForQuery &queryInfo); + ExtractInsightIntentInfo &intentInfo, InsightIntentInfoForQuery &queryInfo, bool getEntity); + static uint32_t ConvertExtractInsightIntentEntityInfo( + ExtractInsightIntentInfo &intentInfo, InsightIntentInfoForQuery &queryInfo); }; } // namespace AbilityRuntime } // namespace OHOS diff --git a/services/abilitymgr/src/ability_manager_proxy.cpp b/services/abilitymgr/src/ability_manager_proxy.cpp index 02bc3db4c6c2040c437131b005e0095636d454c8..6823d27f94f1b080114451011c04d2bb3d4e0169 100644 --- a/services/abilitymgr/src/ability_manager_proxy.cpp +++ b/services/abilitymgr/src/ability_manager_proxy.cpp @@ -6468,7 +6468,7 @@ int32_t AbilityManagerProxy::GetAllInsightIntentInfo( TAG_LOGE(AAFwkTag::INTENT, "write flag fail"); return ERR_INVALID_VALUE; } - + int error = SendRequest( AbilityManagerInterfaceCode::GET_ALL_INSIGHT_INTENT_INFO, data, reply, option); if (error != NO_ERROR) { @@ -6510,7 +6510,7 @@ int32_t AbilityManagerProxy::GetInsightIntentInfoByBundleName( TAG_LOGE(AAFwkTag::INTENT, "write bundleName fail"); return ERR_INVALID_VALUE; } - + int error = SendRequest( AbilityManagerInterfaceCode::GET_INSIGHT_INTENT_INFO_BY_BUNDLE_NAME, data, reply, option); if (error != NO_ERROR) { @@ -6564,7 +6564,7 @@ int32_t AbilityManagerProxy::GetInsightIntentInfoByIntentName( TAG_LOGE(AAFwkTag::INTENT, "write intentName fail"); return ERR_INVALID_VALUE; } - + int error = SendRequest( AbilityManagerInterfaceCode::GET_INSIGHT_INTENT_INFO_BY_INTENT_NAME, data, reply, option); if (error != NO_ERROR) { diff --git a/services/abilitymgr/src/ability_manager_service.cpp b/services/abilitymgr/src/ability_manager_service.cpp index 77a46420ab5b1e495568c9ca5a13add82c99aa9d..11fdbea49e13f53e3476b1622070589f19a9c041 100644 --- a/services/abilitymgr/src/ability_manager_service.cpp +++ b/services/abilitymgr/src/ability_manager_service.cpp @@ -14201,7 +14201,7 @@ int32_t AbilityManagerService::GetAllInsightIntentInfo( TAG_LOGD(AAFwkTag::INTENT, "not system app or permission denied"); return ret; } - if (flag == AbilityRuntime::GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT) { + if (flag & AbilityRuntime::GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT) { std::vector intentInfos; const int32_t userId = IPCSkeleton::GetCallingUid() / BASE_USER_RANGE; DelayedSingleton::GetInstance()->GetAllInsightIntentInfo(userId, intentInfos); @@ -14210,24 +14210,45 @@ int32_t AbilityManagerService::GetAllInsightIntentInfo( return ERR_OK; } TAG_LOGD(AAFwkTag::INTENT, "intentInfos size: %{public}zu", intentInfos.size()); + bool getEntity = (flag & AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO); for (auto &info : intentInfos) { InsightIntentInfoForQuery intentInfoQuery; - InsightIntentUtils::ConvertExtractInsightIntentInfo(info, intentInfoQuery); + InsightIntentUtils::ConvertExtractInsightIntentInfo(info, intentInfoQuery, getEntity); infos.emplace_back(intentInfoQuery); } - } else { + } else if (flag & AbilityRuntime::GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT) { std::vector genericInfos; DelayedSingleton::GetInstance()->GetAllInsightIntentGenericInfo(genericInfos); if (genericInfos.empty()) { return ERR_OK; } TAG_LOGD(AAFwkTag::INTENT, "genericInfos size: %{public}zu", genericInfos.size()); + + if (flag & AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO) { + std::vector intentInfos; + const int32_t userId = IPCSkeleton::GetCallingUid() / BASE_USER_RANGE; + DelayedSingleton::GetInstance()->GetAllInsightIntentInfo(userId, intentInfos); + if (intentInfos.empty()) { + TAG_LOGI(AAFwkTag::INTENT, "extractInsightIntentInfos empty"); + return ERR_OK; + } + for (auto &info : intentInfos) { + InsightIntentInfoForQuery intentInfoQuery; + InsightIntentUtils::ConvertExtractInsightIntentEntityInfo(info, intentInfoQuery); + infos.emplace_back(intentInfoQuery); + } + return ERR_OK; + } + for (auto &info : genericInfos) { InsightIntentInfoForQuery intentInfoQuery; InsightIntentUtils::ConvertExtractInsightIntentGenericInfo(info, intentInfoQuery); infos.emplace_back(intentInfoQuery); } + } else { + TAG_LOGW(AAFwkTag::INTENT, "invalid flag: %{public}d", flag); } + return ERR_OK; } @@ -14242,7 +14263,7 @@ int32_t AbilityManagerService::GetInsightIntentInfoByBundleName( TAG_LOGD(AAFwkTag::INTENT, "not system app or permission denied"); return ret; } - if (flag == AbilityRuntime::GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT) { + if (flag & AbilityRuntime::GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT) { std::vector intentInfos; const int32_t userId = IPCSkeleton::GetCallingUid() / BASE_USER_RANGE; DelayedSingleton::GetInstance()->GetInsightIntentInfoByName( @@ -14252,12 +14273,13 @@ int32_t AbilityManagerService::GetInsightIntentInfoByBundleName( return ERR_OK; } TAG_LOGD(AAFwkTag::INTENT, "intentInfos size: %{public}zu", intentInfos.size()); + bool getEntity = (flag & AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO); for (auto &info : intentInfos) { InsightIntentInfoForQuery intentInfoQuery; - InsightIntentUtils::ConvertExtractInsightIntentInfo(info, intentInfoQuery); + InsightIntentUtils::ConvertExtractInsightIntentInfo(info, intentInfoQuery, getEntity); infos.emplace_back(intentInfoQuery); } - } else { + } else if (flag & AbilityRuntime::GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT) { std::vector genericInfos; DelayedSingleton::GetInstance()->GetInsightIntentGenericInfoByName( bundleName, genericInfos); @@ -14265,11 +14287,30 @@ int32_t AbilityManagerService::GetInsightIntentInfoByBundleName( return ERR_OK; } TAG_LOGD(AAFwkTag::INTENT, "genericInfos size: %{public}zu", genericInfos.size()); + + if (flag & AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO) { + std::vector intentInfos; + const int32_t userId = IPCSkeleton::GetCallingUid() / BASE_USER_RANGE; + DelayedSingleton::GetInstance()->GetInsightIntentInfoByName( + bundleName, userId, intentInfos); + if (intentInfos.empty()) { + TAG_LOGI(AAFwkTag::INTENT, "extractInsightIntentInfos empty"); + return ERR_OK; + } + for (auto &info : intentInfos) { + InsightIntentInfoForQuery intentInfoQuery; + InsightIntentUtils::ConvertExtractInsightIntentEntityInfo(info, intentInfoQuery); + infos.emplace_back(intentInfoQuery); + } + return ERR_OK; + } for (auto &info : genericInfos) { InsightIntentInfoForQuery intentInfoQuery; InsightIntentUtils::ConvertExtractInsightIntentGenericInfo(info, intentInfoQuery); infos.emplace_back(intentInfoQuery); } + } else { + TAG_LOGW(AAFwkTag::INTENT, "invalid flag: %{public}d", flag); } return ERR_OK; } @@ -14287,17 +14328,31 @@ int32_t AbilityManagerService::GetInsightIntentInfoByIntentName( TAG_LOGD(AAFwkTag::INTENT, "not system app or permission denied"); return ret; } - if (flag == AbilityRuntime::GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT) { + if (flag & AbilityRuntime::GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT) { ExtractInsightIntentInfo intentInfo; const int32_t userId = IPCSkeleton::GetCallingUid() / BASE_USER_RANGE; DelayedSingleton::GetInstance()->GetInsightIntentInfo( bundleName, moduleName, intentName, userId, intentInfo); - InsightIntentUtils::ConvertExtractInsightIntentInfo(intentInfo, info); - } else { + bool getEntity = (flag & AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO); + InsightIntentUtils::ConvertExtractInsightIntentInfo(intentInfo, info, getEntity); + } else if (flag & AbilityRuntime::GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT) { + if (flag & AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO) { + ExtractInsightIntentInfo intentInfo; + const int32_t userId = IPCSkeleton::GetCallingUid() / BASE_USER_RANGE; + DelayedSingleton::GetInstance()->GetInsightIntentInfo( + bundleName, moduleName, intentName, userId, intentInfo); + InsightIntentUtils::ConvertExtractInsightIntentEntityInfo(intentInfo, info); + + return ERR_OK; + } + ExtractInsightIntentGenericInfo genericInfo; DelayedSingleton::GetInstance()->GetInsightIntentGenericInfo( bundleName, moduleName, intentName, genericInfo); InsightIntentUtils::ConvertExtractInsightIntentGenericInfo(genericInfo, info); + + } else { + TAG_LOGW(AAFwkTag::INTENT, "invalid flag: %{public}d", flag); } return ERR_OK; } diff --git a/services/abilitymgr/src/insight_intent/insight_intent_info_for_query.cpp b/services/abilitymgr/src/insight_intent/insight_intent_info_for_query.cpp index 0474b52d0b00b994142aab7aeaad56e4d663aa9c..eb48274052d59b72d61fd1b678d4073b72c89027 100644 --- a/services/abilitymgr/src/insight_intent/insight_intent_info_for_query.cpp +++ b/services/abilitymgr/src/insight_intent/insight_intent_info_for_query.cpp @@ -170,6 +170,54 @@ void to_json(nlohmann::json& jsonObject, const FormInfoForQuery &info) }; } +void from_json(const nlohmann::json &jsonObject, EntityInfoForQuery &entityInfo) +{ + TAG_LOGD(AAFwkTag::INTENT, "EntityInfoForQuery from json"); + const auto &jsonObjectEnd = jsonObject.end(); + AppExecFwk::BMSJsonUtil::GetStrValueIfFindKey(jsonObject, + jsonObjectEnd, + INSIGHT_INTENT_ENTITY_CLASS_NAME, + entityInfo.className, + true, + g_parseResult); + AppExecFwk::BMSJsonUtil::GetStrValueIfFindKey(jsonObject, + jsonObjectEnd, + INSIGHT_INTENT_ENTITY_ID, + entityInfo.entityId, + true, + g_parseResult); + AppExecFwk::BMSJsonUtil::GetStrValueIfFindKey(jsonObject, + jsonObjectEnd, + INSIGHT_INTENT_ENTITY_CATEGORY, + entityInfo.entityCategory, + true, + g_parseResult); + AppExecFwk::BMSJsonUtil::GetStrValueIfFindKey(jsonObject, + jsonObjectEnd, + INSIGHT_INTENT_ENTITY_PARAMETERS, + entityInfo.parameters, + false, + g_parseResult); + AppExecFwk::BMSJsonUtil::GetStrValueIfFindKey(jsonObject, + jsonObjectEnd, + INSIGHT_INTENT_ENTITY_PARENT_CLASS_NAME, + entityInfo.parentClassName, + false, + g_parseResult); +} + +void to_json(nlohmann::json& jsonObject, const EntityInfoForQuery &info) +{ + TAG_LOGD(AAFwkTag::INTENT, "EntityInfoForQuery to json"); + jsonObject = nlohmann::json { + {INSIGHT_INTENT_ENTITY_CLASS_NAME, info.className}, + {INSIGHT_INTENT_ENTITY_ID, info.entityId}, + {INSIGHT_INTENT_ENTITY_CATEGORY, info.entityCategory}, + {INSIGHT_INTENT_PARAMETERS, info.parameters}, + {INSIGHT_INTENT_ENTITY_PARENT_CLASS_NAME, info.parentClassName} + }; +} + void from_json(const nlohmann::json &jsonObject, InsightIntentInfoForQuery &insightIntentInfo) { TAG_LOGD(AAFwkTag::INTENT, "InsightIntentInfoForQuery from json"); @@ -260,6 +308,14 @@ void from_json(const nlohmann::json &jsonObject, InsightIntentInfoForQuery &insi false, g_parseResult, ArrayType::STRING); + AppExecFwk::GetValueIfFindKey>(jsonObject, + jsonObjectEnd, + INSIGHT_INTENT_ENTITY_INFO, + insightIntentInfo.entities, + JsonType::ARRAY, + false, + g_parseResult, + ArrayType::OBJECT); if (insightIntentInfo.intentType == INSIGHT_INTENTS_TYPE_LINK) { AppExecFwk::GetValueIfFindKey(jsonObject, @@ -321,7 +377,8 @@ void to_json(nlohmann::json& jsonObject, const InsightIntentInfoForQuery &info) {INSIGHT_INTENT_LINK_INFO, info.linkInfo}, {INSIGHT_INTENT_PAGE_INFO, info.pageInfo}, {INSIGHT_INTENT_ENTRY_INFO, info.entryInfo}, - {INSIGHT_INTENT_FORM_INFO, info.formInfo} + {INSIGHT_INTENT_FORM_INFO, info.formInfo}, + {INSIGHT_INTENT_ENTITY_INFO, info.entities} }; } diff --git a/services/abilitymgr/src/insight_intent/insight_intent_utils.cpp b/services/abilitymgr/src/insight_intent/insight_intent_utils.cpp index 16ae9b4f6fefb67a2195dfb3f6eccd88a83e6c51..4634bf632e9c01904bced57e97cb3af8b0a86721 100644 --- a/services/abilitymgr/src/insight_intent/insight_intent_utils.cpp +++ b/services/abilitymgr/src/insight_intent/insight_intent_utils.cpp @@ -138,7 +138,7 @@ uint32_t InsightIntentUtils::ConvertExtractInsightIntentGenericInfo( } uint32_t InsightIntentUtils::ConvertExtractInsightIntentInfo( - ExtractInsightIntentInfo &intentInfo, InsightIntentInfoForQuery &queryInfo) + ExtractInsightIntentInfo &intentInfo, InsightIntentInfoForQuery &queryInfo, bool getEntity) { ConvertExtractInsightIntentGenericInfo(intentInfo.genericInfo, queryInfo); queryInfo.domain = intentInfo.domain; @@ -152,6 +152,37 @@ uint32_t InsightIntentUtils::ConvertExtractInsightIntentInfo( for (auto &keyword : intentInfo.keywords) { queryInfo.keywords.emplace_back(keyword); } + + if (getEntity) { + for (auto &entityInfo : intentInfo.entities) { + EntityInfoForQuery insightInfo; + insightInfo.className = entityInfo.className; + insightInfo.entityCategory = entityInfo.entityCategory; + insightInfo.entityId = entityInfo.entityId; + insightInfo.parameters = entityInfo.parameters; + insightInfo.parentClassName = entityInfo.parentClassName; + queryInfo.entities.emplace_back(insightInfo); + } + } + + return ERR_OK; +} + +uint32_t InsightIntentUtils::ConvertExtractInsightIntentEntityInfo( + ExtractInsightIntentInfo &intentInfo, InsightIntentInfoForQuery &queryInfo) +{ + ConvertExtractInsightIntentGenericInfo(intentInfo.genericInfo, queryInfo); + + for (auto &entityInfo : intentInfo.entities) { + EntityInfoForQuery insightInfo; + insightInfo.className = entityInfo.className; + insightInfo.entityCategory = entityInfo.entityCategory; + insightInfo.entityId = entityInfo.entityId; + insightInfo.parameters = entityInfo.parameters; + insightInfo.parentClassName = entityInfo.parentClassName; + queryInfo.entities.emplace_back(insightInfo); + } + return ERR_OK; } } // namespace AbilityRuntime diff --git a/test/unittest/ability_manager_service_sixth_test/ability_manager_service_sixth_test.cpp b/test/unittest/ability_manager_service_sixth_test/ability_manager_service_sixth_test.cpp index 225d192d90d822e94a054fd467073f404c793a45..877aea90ab112028a52d4e5ffbaea513be604288 100644 --- a/test/unittest/ability_manager_service_sixth_test/ability_manager_service_sixth_test.cpp +++ b/test/unittest/ability_manager_service_sixth_test/ability_manager_service_sixth_test.cpp @@ -249,6 +249,7 @@ HWTEST_F(AbilityManagerServiceSixthTest, ReportEventToRss_001, TestSize.Level1) * SubFunction: NA * FunctionPoints: AbilityManagerService StartUIAbilityBySCBDefault */ +/* HWTEST_F(AbilityManagerServiceSixthTest, StartUIAbilityBySCBDefault_001, TestSize.Level1) { TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest StartUIAbilityBySCBDefault_001 start"); @@ -263,7 +264,7 @@ HWTEST_F(AbilityManagerServiceSixthTest, StartUIAbilityBySCBDefault_001, TestSiz abilityMs->interceptorExecuter_ = std::make_shared(); EXPECT_EQ(abilityMs->StartUIAbilityBySCBDefault(sessionInfo, sceneFlag, isColdStart), RESOLVE_ABILITY_ERR); TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest StartUIAbilityBySCBDefault_001 end"); -} +}*/ /* * Feature: AbilityManagerService @@ -2049,6 +2050,62 @@ HWTEST_F(AbilityManagerServiceSixthTest, GetAllInsightIntentInfo_001, TestSize.L TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetAllInsightIntentInfo_001 end"); } +/* + * Feature: AbilityManagerService + * Function: GetAllInsightIntentInfo + * SubFunction: flag is GET_FULL_INSIGHT_INTENT or GET_ENTITY_INFO + * FunctionPoints: AbilityManagerService GetAllInsightIntentInfo + */ +HWTEST_F(AbilityManagerServiceSixthTest, GetAllInsightIntentInfo_002, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetAllInsightIntentInfo_002 start"); + auto abilityMs = std::make_shared(); + EXPECT_NE(abilityMs, nullptr); + auto flag = static_cast(AbilityRuntime::GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT | + AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO); + std::vector infos; + auto ret = abilityMs->GetAllInsightIntentInfo(flag, infos); + EXPECT_NE(ret, ERR_OK); + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetAllInsightIntentInfo_002 end"); +} + +/* + * Feature: AbilityManagerService + * Function: GetAllInsightIntentInfo + * SubFunction: flag is GET_SUMMARY_INSIGHT_INTENT or GET_ENTITY_INFO + * FunctionPoints: AbilityManagerService GetAllInsightIntentInfo + */ +HWTEST_F(AbilityManagerServiceSixthTest, GetAllInsightIntentInfo_003, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetAllInsightIntentInfo_003 start"); + auto abilityMs = std::make_shared(); + EXPECT_NE(abilityMs, nullptr); + auto flag = static_cast(AbilityRuntime::GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT | + AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO); + std::vector infos; + auto ret = abilityMs->GetAllInsightIntentInfo(flag, infos); + EXPECT_NE(ret, ERR_OK); + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetAllInsightIntentInfo_003 end"); +} + +/* + * Feature: AbilityManagerService + * Function: GetAllInsightIntentInfo + * SubFunction: invalid flag + * FunctionPoints: AbilityManagerService GetAllInsightIntentInfo + */ +HWTEST_F(AbilityManagerServiceSixthTest, GetAllInsightIntentInfo_004, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetAllInsightIntentInfo_004 start"); + auto abilityMs = std::make_shared(); + EXPECT_NE(abilityMs, nullptr); + auto flag = AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO; + std::vector infos; + auto ret = abilityMs->GetAllInsightIntentInfo(flag, infos); + EXPECT_NE(ret, ERR_OK); + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetAllInsightIntentInfo_004 end"); +} + /* * Feature: AbilityManagerService * Function: GetInsightIntentInfoByBundleName @@ -2068,6 +2125,65 @@ HWTEST_F(AbilityManagerServiceSixthTest, GetInsightIntentInfoByBundleName_001, T TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByBundleName end"); } +/* + * Feature: AbilityManagerService + * Function: GetInsightIntentInfoByBundleName + * SubFunction: flag is GET_FULL_INSIGHT_INTENT or GET_ENTITY_INFO + * FunctionPoints: AbilityManagerService GetInsightIntentInfoByBundleName + */ +HWTEST_F(AbilityManagerServiceSixthTest, GetInsightIntentInfoByBundleName_002, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByBundleName_002 start"); + auto abilityMs = std::make_shared(); + EXPECT_NE(abilityMs, nullptr); + auto flag = static_cast(AbilityRuntime::GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT | + AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO); + std::string bundleName = "com.example.bundleName"; + std::vector infos; + auto ret = abilityMs->GetInsightIntentInfoByBundleName(flag, bundleName, infos); + EXPECT_NE(ret, ERR_OK); + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByBundleName_002 end"); +} + +/* + * Feature: AbilityManagerService + * Function: GetInsightIntentInfoByBundleName + * SubFunction: flag is GET_SUMMARY_INSIGHT_INTENT or GET_ENTITY_INFO + * FunctionPoints: AbilityManagerService GetInsightIntentInfoByBundleName + */ +HWTEST_F(AbilityManagerServiceSixthTest, GetInsightIntentInfoByBundleName_003, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByBundleName_003 start"); + auto abilityMs = std::make_shared(); + EXPECT_NE(abilityMs, nullptr); + auto flag = static_cast(AbilityRuntime::GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT | + AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO); + std::string bundleName = "com.example.bundleName"; + std::vector infos; + auto ret = abilityMs->GetInsightIntentInfoByBundleName(flag, bundleName, infos); + EXPECT_NE(ret, ERR_OK); + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByBundleName_003 end"); +} + +/* + * Feature: AbilityManagerService + * Function: GetInsightIntentInfoByBundleName + * SubFunction: invalid flag + * FunctionPoints: AbilityManagerService GetInsightIntentInfoByBundleName + */ +HWTEST_F(AbilityManagerServiceSixthTest, GetInsightIntentInfoByBundleName_004, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByBundleName_004 start"); + auto abilityMs = std::make_shared(); + EXPECT_NE(abilityMs, nullptr); + auto flag = AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO; + std::string bundleName = "com.example.bundleName"; + std::vector infos; + auto ret = abilityMs->GetInsightIntentInfoByBundleName(flag, bundleName, infos); + EXPECT_NE(ret, ERR_OK); + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByBundleName_004 end"); +} + /* * Feature: AbilityManagerService * Function: GetInsightIntentInfoByIntentName @@ -2088,5 +2204,71 @@ HWTEST_F(AbilityManagerServiceSixthTest, GetInsightIntentInfoByIntentName_001, T EXPECT_EQ(ret, ERR_OK); TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByIntentName_001 end"); } + +/* + * Feature: AbilityManagerService + * Function: GetInsightIntentInfoByIntentName + * SubFunction: flag is GET_FULL_INSIGHT_INTENT or GET_ENTITY_INFO + * FunctionPoints: AbilityManagerService GetInsightIntentInfoByIntentName + */ +HWTEST_F(AbilityManagerServiceSixthTest, GetInsightIntentInfoByIntentName_002, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByIntentName_002 start"); + auto abilityMs = std::make_shared(); + EXPECT_NE(abilityMs, nullptr); + auto flag = static_cast(AbilityRuntime::GetInsightIntentFlag::GET_FULL_INSIGHT_INTENT | + AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO); + std::string bundleName = "com.example.bundleName"; + std::string moduleName = "entry"; + std::string intentName = "test"; + InsightIntentInfoForQuery info; + auto ret = abilityMs->GetInsightIntentInfoByIntentName(flag, bundleName, moduleName, intentName, info); + EXPECT_NE(ret, ERR_OK); + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByIntentName_002 end"); +} + +/* + * Feature: AbilityManagerService + * Function: GetInsightIntentInfoByIntentName + * SubFunction: flag is GET_SUMMARY_INSIGHT_INTENT or GET_ENTITY_INFO + * FunctionPoints: AbilityManagerService GetInsightIntentInfoByIntentName + */ +HWTEST_F(AbilityManagerServiceSixthTest, GetInsightIntentInfoByIntentName_003, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByIntentName_003 start"); + auto abilityMs = std::make_shared(); + EXPECT_NE(abilityMs, nullptr); + auto flag = static_cast(AbilityRuntime::GetInsightIntentFlag::GET_SUMMARY_INSIGHT_INTENT | + AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO); + std::string bundleName = "com.example.bundleName"; + std::string moduleName = "entry"; + std::string intentName = "test"; + InsightIntentInfoForQuery info; + auto ret = abilityMs->GetInsightIntentInfoByIntentName(flag, bundleName, moduleName, intentName, info); + EXPECT_NE(ret, ERR_OK); + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByIntentName_003 end"); +} + +/* + * Feature: AbilityManagerService + * Function: GetInsightIntentInfoByIntentName + * SubFunction: invalid flag + * FunctionPoints: AbilityManagerService GetInsightIntentInfoByIntentName + */ +HWTEST_F(AbilityManagerServiceSixthTest, GetInsightIntentInfoByIntentName_004, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByIntentName_004 start"); + auto abilityMs = std::make_shared(); + EXPECT_NE(abilityMs, nullptr); + auto flag = AbilityRuntime::GetInsightIntentFlag::GET_ENTITY_INFO; + std::string bundleName = "com.example.bundleName"; + std::string moduleName = "entry"; + std::string intentName = "test"; + InsightIntentInfoForQuery info; + auto ret = abilityMs->GetInsightIntentInfoByIntentName(flag, bundleName, moduleName, intentName, info); + EXPECT_NE(ret, ERR_OK); + TAG_LOGI(AAFwkTag::TEST, "AbilityManagerServiceSixthTest GetInsightIntentInfoByIntentName_004 end"); +} + } // namespace AAFwk } // namespace OHOS \ No newline at end of file diff --git a/test/unittest/insight_intent/insight_intent_utils_test/insight_intent_utils_test.cpp b/test/unittest/insight_intent/insight_intent_utils_test/insight_intent_utils_test.cpp index 46b059016ae9a8212f43df1d0cb7c09738f78820..5977cb8baf5ec80302a2842c4fcb69b3af8a1d9c 100644 --- a/test/unittest/insight_intent/insight_intent_utils_test/insight_intent_utils_test.cpp +++ b/test/unittest/insight_intent/insight_intent_utils_test/insight_intent_utils_test.cpp @@ -127,6 +127,14 @@ ExtractInsightIntentGenericInfo TEST_INSIGHT_INTENT_GENERIC_INFO = [] { ExtractInsightIntentInfo TEST_INSIGHT_INTENT_INFO = [] { ExtractInsightIntentInfo tmp; + InsightIntentEntityInfo entities; + entities.decoratorFile = "decoratorFile_test"; + entities.className = "className_test"; + entities.decoratorType = "decoratorType_test"; + entities.entityCategory = "entityCategory_test"; + entities.parameters = "parameters_test"; + entities.parentClassName = "parentClassName_test"; + tmp.decoratorFile = "decoratorFile_test"; tmp.decoratorClass = "decoratorClass_test"; tmp.displayDescription = "displayDescription_test"; @@ -136,6 +144,7 @@ ExtractInsightIntentInfo TEST_INSIGHT_INTENT_INFO = [] { tmp.icon = "icon_test"; tmp.llmDescription = "llmDescription_test"; tmp.keywords = std::vector{ "keywords_test1", "keywords_test2" }; + tmp.entities.push_back(entities); tmp.genericInfo = TEST_INSIGHT_INTENT_GENERIC_INFO; return tmp; }(); @@ -339,7 +348,8 @@ HWTEST_F(InsightIntentUtilsTest, ConvertExtractInsightIntentInfo_0100, TestSize. .WillRepeatedly(DoAll(SetArgReferee<3>(TEST_JSON_STR_ARRAY), Return(ERR_OK))); AbilityRuntime::InsightIntentUtils utils; InsightIntentInfoForQuery insightIntentInfoForQuery; - auto result = utils.ConvertExtractInsightIntentInfo(TEST_INSIGHT_INTENT_INFO, insightIntentInfoForQuery); + bool getEntity = false; + auto result = utils.ConvertExtractInsightIntentInfo(TEST_INSIGHT_INTENT_INFO, insightIntentInfoForQuery, getEntity); EXPECT_EQ(result, ERR_OK); Mock::VerifyAndClear(mockBundleMgr); testing::Mock::AllowLeak(mockBundleMgr); @@ -359,7 +369,9 @@ HWTEST_F(InsightIntentUtilsTest, ConvertExtractInsightIntentInfo_0200, TestSize. AbilityRuntime::InsightIntentUtils utils; InsightIntentInfoForQuery insightIntentInfoForQuery; TEST_INSIGHT_INTENT_INFO.genericInfo.data = TEST_INSIGHT_INTENT_FORM_INFO; - auto result = utils.ConvertExtractInsightIntentInfo(TEST_INSIGHT_INTENT_INFO, insightIntentInfoForQuery); + TEST_INSIGHT_INTENT_INFO.genericInfo.decoratorType = INSIGHT_INTENTS_DECORATOR_TYPE_FORM; + bool getEntity = false; + auto result = utils.ConvertExtractInsightIntentInfo(TEST_INSIGHT_INTENT_INFO, insightIntentInfoForQuery, getEntity); EXPECT_EQ(result, ERR_OK); EXPECT_EQ(TEST_INSIGHT_INTENT_FORM_INFO.abilityName, insightIntentInfoForQuery.formInfo.abilityName); EXPECT_EQ(TEST_INSIGHT_INTENT_FORM_INFO.formName, insightIntentInfoForQuery.formInfo.formName); @@ -367,5 +379,47 @@ HWTEST_F(InsightIntentUtilsTest, ConvertExtractInsightIntentInfo_0200, TestSize. testing::Mock::AllowLeak(mockBundleMgr); TAG_LOGI(AAFwkTag::TEST, "InsightIntentUtilsTest ConvertExtractInsightIntentInfo_0200 end"); } + +/** + * @tc.name: ConvertExtractInsightIntentInfo_0300 + * @tc.desc: basic function test of convert info. + * @tc.type: FUNC + */ +HWTEST_F(InsightIntentUtilsTest, ConvertExtractInsightIntentInfo_0300, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "InsightIntentUtilsTest ConvertExtractInsightIntentInfo_0300 start"); + EXPECT_CALL(*mockBundleMgr, GetJsonProfile(testing::_, testing::_, testing::_, testing::_, testing::_)) + .WillRepeatedly(DoAll(SetArgReferee<3>(TEST_JSON_STR_ARRAY), Return(ERR_OK))); + AbilityRuntime::InsightIntentUtils utils; + InsightIntentInfoForQuery insightIntentInfoForQuery; + bool getEntity = true; + auto result = utils.ConvertExtractInsightIntentInfo(TEST_INSIGHT_INTENT_INFO, insightIntentInfoForQuery, getEntity); + EXPECT_EQ(result, ERR_OK); + EXPECT_EQ(TEST_INSIGHT_INTENT_INFO.entities[0].className, insightIntentInfoForQuery.entities[0].className); + Mock::VerifyAndClear(mockBundleMgr); + testing::Mock::AllowLeak(mockBundleMgr); + TAG_LOGI(AAFwkTag::TEST, "InsightIntentUtilsTest ConvertExtractInsightIntentInfo_0300 end."); +} + +/** + * @tc.name: ConvertExtractInsightIntentEntityInfo_0100 + * @tc.desc: basic function test of convert info. + * @tc.type: FUNC + */ +HWTEST_F(InsightIntentUtilsTest, ConvertExtractInsightIntentEntityInfo_0100, TestSize.Level1) +{ + TAG_LOGI(AAFwkTag::TEST, "InsightIntentUtilsTest ConvertExtractInsightIntentEntityInfo_0100 start"); + EXPECT_CALL(*mockBundleMgr, GetJsonProfile(testing::_, testing::_, testing::_, testing::_, testing::_)) + .WillRepeatedly(DoAll(SetArgReferee<3>(TEST_JSON_STR_ARRAY), Return(ERR_OK))); + AbilityRuntime::InsightIntentUtils utils; + InsightIntentInfoForQuery insightIntentInfoForQuery; + auto result = utils.ConvertExtractInsightIntentEntityInfo(TEST_INSIGHT_INTENT_INFO, insightIntentInfoForQuery); + EXPECT_EQ(result, ERR_OK); + EXPECT_EQ(TEST_INSIGHT_INTENT_INFO.entities[0].className, insightIntentInfoForQuery.entities[0].className); + Mock::VerifyAndClear(mockBundleMgr); + testing::Mock::AllowLeak(mockBundleMgr); + TAG_LOGI(AAFwkTag::TEST, "InsightIntentUtilsTest ConvertExtractInsightIntentEntityInfo_0100 end."); +} + } // namespace AAFwk } // namespace OHOS