bug fix showWhenLocked

Signed-off-by: qianlf <qianliangfang@huawei.com>
Change-Id: Ib6f5ff6f03e1e9d05a915991493e962a74678c36
This commit is contained in:
qianlf
2022-04-26 21:42:49 +08:00
parent 869db7b654
commit a1669a1085
+2 -2
View File
@@ -196,8 +196,8 @@ WMError WindowNodeContainer::AddWindowNodeOnWindowTree(sptr<WindowNode>& node, s
node->requestedVisibility_ = true;
if (parentNode != nullptr) { // subwindow
if (parentNode->parent_ != root &&
!((node->GetWindowFlags() & static_cast<uint32_t>(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED)) &&
(node->parent_ == aboveAppWindowNode_))) {
!((parentNode->GetWindowFlags() & static_cast<uint32_t>(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED)) &&
(parentNode->parent_ == aboveAppWindowNode_))) {
WLOGFE("window type and parent window not match or try to add subwindow to subwindow, which is forbidden");
return WMError::WM_ERROR_INVALID_PARAM;
}