!3907 焦点切换打点事件新增bundleName信息

Merge pull request !3907 from moonGcy/master
This commit is contained in:
openharmony_ci 2023-10-26 11:22:13 +00:00 committed by Gitee
commit 8b61ffe3ba
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 8 additions and 3 deletions

View File

@ -113,6 +113,7 @@ FOCUS_WINDOW:
__BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: Window focus changed}
PID: {type: INT32, desc: app pid}
UID: {type: INT32, desc: app uid}
BUNDLE_NAME: {type: STRING, desc: bundle name}
APPLICATION_BLOCK_INPUT:
__BASE: {type: FAULT, level: CRITICAL, desc: The event is not consumed}

View File

@ -2903,7 +2903,8 @@ void WindowImpl::UpdateFocusStatus(bool focused)
"FOCUS_WINDOW",
OHOS::HiviewDFX::HiSysEvent::EventType::BEHAVIOR,
"PID", getpid(),
"UID", getuid());
"UID", getuid(),
"BUNDLE_NAME", property_->GetAbilityInfo().bundleName_);
NotifyAfterFocused();
} else {
NotifyAfterUnfocused();

View File

@ -94,7 +94,9 @@ WindowSessionImpl::WindowSessionImpl(const sptr<WindowOption>& option)
WLOGFE("Property is null");
return;
}
SessionInfo sessionInfo;
sessionInfo.bundleName_ = option->GetBundleName();
property_->SetSessionInfo(sessionInfo);
property_->SetWindowName(option->GetWindowName());
property_->SetRequestRect(option->GetWindowRect());
property_->SetWindowType(option->GetWindowType());
@ -465,7 +467,8 @@ WSError WindowSessionImpl::UpdateFocus(bool isFocused)
"FOCUS_WINDOW",
OHOS::HiviewDFX::HiSysEvent::EventType::BEHAVIOR,
"PID", getpid(),
"UID", getuid());
"UID", getuid(),
"BUNDLE_NAME", property_->GetSessionInfo().bundleName_);
NotifyAfterFocused();
} else {
NotifyAfterUnfocused();