回退 'Pull Request !10544 : 修复意图框架stoull处理问题'

This commit is contained in:
yangzk 2024-10-25 01:51:07 +00:00 committed by Gitee
parent 2fb6cf2f80
commit ab6f761bc1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -82,20 +82,13 @@ bool InsightIntentExecuteParam::GenerateFromWant(const AAFwk::Want &want,
TAG_LOGE(AAFwkTag::INTENT, "empty want");
return false;
}
uint64_t insightIntentId = 0;
try {
insightIntentId = std::stoull(wantParams.GetStringParam(INSIGHT_INTENT_EXECUTE_PARAM_ID));
} catch (...) {
TAG_LOGE(AAFwkTag::ABILITY, "invalid insight intent ID");
return false;
}
AppExecFwk::ElementName elementName = want.GetElement();
executeParam.bundleName_ = elementName.GetBundleName();
executeParam.moduleName_ = elementName.GetModuleName();
executeParam.abilityName_ = elementName.GetAbilityName();
executeParam.insightIntentName_ = wantParams.GetStringParam(INSIGHT_INTENT_EXECUTE_PARAM_NAME);
executeParam.insightIntentId_ = insightIntentId;
executeParam.insightIntentId_ = std::stoull(wantParams.GetStringParam(INSIGHT_INTENT_EXECUTE_PARAM_ID));
executeParam.executeMode_ = wantParams.GetIntParam(INSIGHT_INTENT_EXECUTE_PARAM_MODE, 0);
auto insightIntentParam = wantParams.GetWantParams(INSIGHT_INTENT_EXECUTE_PARAM_PARAM);