!48358 添加日志,追踪卡片ID信息

Merge pull request !48358 from y30069754/master
This commit is contained in:
openharmony_ci 2024-11-22 11:56:19 +00:00 committed by Gitee
commit d50d81e5ae
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 6 additions and 3 deletions

View File

@ -80,10 +80,10 @@ void JSForm::Create(const JSCallbackInfo& info)
return;
}
formInfo.id = inputFormId;
}
if (id->IsNumber()) {
} else if (id->IsNumber()) {
formInfo.id = id->ToNumber<int64_t>();
}
LOGI("JSForm Create, info.id: %{public}" PRId64, formInfo.id);
formInfo.cardName = name->ToString();
formInfo.bundleName = bundle->ToString();
formInfo.abilityName = ability->ToString();

View File

@ -126,6 +126,7 @@ void FormManagerDelegate::AddForm(const WeakPtr<PipelineBase>& context, const Re
SetParamForWant(info, formInfo);
OHOS::AppExecFwk::FormJsInfo formJsInfo;
auto clientInstance = OHOS::AppExecFwk::FormHostClient::GetInstance();
TAG_LOGI(AceLogTag::ACE_FORM, "Before FormMgr adding form, info.id: %{public}" PRId64, info.id);
auto ret = OHOS::AppExecFwk::FormMgr::GetInstance().AddForm(info.id, wantCache_, clientInstance, formJsInfo);
if (ret != 0) {
auto errorMsg = OHOS::AppExecFwk::FormMgr::GetInstance().GetErrorMessage(ret);
@ -956,7 +957,7 @@ void FormManagerDelegate::ProcessFormUpdate(const AppExecFwk::FormJsInfo& formJs
void FormManagerDelegate::ReleaseRenderer()
{
TAG_LOGI(AceLogTag::ACE_FORM, "FormManagerDelegate releaseForm. formId: %{public}" PRId64 ", %{public}s",
TAG_LOGI(AceLogTag::ACE_FORM, "FormManagerDelegate releaseRenderer. formId: %{public}" PRId64 ", %{public}s",
runningCardId_, runningCompId_.c_str());
if (runningCardId_ <= 0) {
return;

View File

@ -138,6 +138,7 @@ void FormPattern::OnAttachToFrameNode()
auto uiTaskExecutor =
SingleTaskExecutor::Make(context->GetTaskExecutor(), TaskExecutor::TaskType::UI);
auto id = subContainer->GetRunningCardId();
TAG_LOGI(AceLogTag::ACE_FORM, "FormPattern::OnAttachToFrameNode, cardId: %{public}" PRId64, id);
FormManager::GetInstance().AddSubContainer(id, subContainer);
uiTaskExecutor.PostDelayedTask(
[id, nodeId = subContainer->GetNodeId()] {
@ -608,6 +609,7 @@ void FormPattern::OnModifyDone()
}
// Convert DimensionUnit to DimensionUnit::PX
auto info = layoutProperty->GetRequestFormInfo().value_or(RequestFormInfo());
TAG_LOGI(AceLogTag::ACE_FORM, "FormPattern::OnModifyDone, info.id: %{public}" PRId64, info.id);
info.width = Dimension(width.ConvertToPx());
info.height = Dimension(height.ConvertToPx());
auto &&borderWidthProperty = layoutProperty->GetBorderWidthProperty();