!1400 子树在不同window下的场景

Merge pull request !1400 from 姚子鹏/treeDiffTree
This commit is contained in:
openharmony_ci 2024-09-05 15:18:40 +00:00 committed by Gitee
commit 96aaaf0d77
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -728,7 +728,7 @@ RetError AccessibleAbilityClientImpl::GetChildren(const AccessibilityElementInfo
std::vector<AccessibilityElementInfo> elementInfos {};
if (parent.GetChildWindowId() > 0 && (parent.GetChildWindowId() != windowId)) {
ret = channelClient_->SearchElementInfosByAccessibilityId(parent.GetChildWindowId(), ROOT_NONE_ID,
GET_SOURCE_MODE, elementInfos, ROOT_TREE_ID);
GET_SOURCE_MODE, elementInfos, parent.GetChildTreeId());
} else if (parent.GetChildTreeId() > 0) {
ret = channelClient_->SearchElementInfosByAccessibilityId(parent.GetWindowId(), ROOT_NONE_ID,
GET_SOURCE_MODE, elementInfos, parent.GetChildTreeId());
@ -860,7 +860,7 @@ RetError AccessibleAbilityClientImpl::SearchElementInfoRecursiveByContent(const
}
if (info.GetChildWindowId() > 0 && info.GetChildWindowId() != info.GetWindowId()) {
ret = SearchElementInfoRecursiveByContent(info.GetChildWindowId(),
elementId, mode, elementInfos, text, ROOT_TREE_ID, isFilter);
elementId, mode, elementInfos, text, info.GetChildTreeId(), isFilter);
} else if (info.GetChildTreeId() > 0) {
ret = SearchElementInfoRecursiveByContent(info.GetWindowId(),
elementId, mode, elementInfos, text, info.GetChildTreeId(), isFilter);
@ -1405,7 +1405,7 @@ RetError AccessibleAbilityClientImpl::SearchElementInfoRecursiveByWinid(const in
if ((elementInfos[i].GetChildWindowId() > 0) &&
(elementInfos[i].GetChildWindowId() != elementInfos[i].GetWindowId())) {
ret = SearchElementInfoRecursiveByWinid(elementInfos[i].GetChildWindowId(),
elementId, mode, elementInfos, ROOT_TREE_ID, isFilter, &elementInfos[i]);
elementId, mode, elementInfos, elementInfos[i].GetChildTreeId(), isFilter, &elementInfos[i]);
HILOG_DEBUG("ChildWindowId %{public}d}. ret:%{public}d", elementInfos[i].GetChildWindowId(), ret);
} else if (elementInfos[i].GetChildTreeId() > 0) {
ret = SearchElementInfoRecursiveByWinid(elementInfos[i].GetWindowId(),