From 0cd96a9eed0e6af0252ef1ddf06ee9c2afd95c65 Mon Sep 17 00:00:00 2001 From: Jorge Gil Date: Mon, 28 Nov 2022 21:56:04 +0000 Subject: Create window decors for leaf tasks & skip non-leafs Fixes the logic that intended to filter out window decorations for non-leaf tasks. Previously, non-root leafs were mistakenly skipped instead of their parents, which went unnoticed until freeform tasks were nested and the non-root leafs were missing the caption bar. Bug: None Test: nest freeform tasks, leaf tasks have window decorations. Change-Id: Ia958fb43319d17a0e33e28497e52293954706416 --- .../com/android/wm/shell/freeform/FreeformTaskTransitionObserver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/freeform/FreeformTaskTransitionObserver.java b/libs/WindowManager/Shell/src/com/android/wm/shell/freeform/FreeformTaskTransitionObserver.java index 168f6d79a390..3be97c499856 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/freeform/FreeformTaskTransitionObserver.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/freeform/FreeformTaskTransitionObserver.java @@ -90,7 +90,7 @@ public class FreeformTaskTransitionObserver implements Transitions.TransitionObs // This logic relies on 2 assumptions: 1 is that child tasks will be visited before // parents (due to how z-order works). 2 is that no non-tasks are interleaved // between tasks (hierarchically). - taskParents.add(change.getContainer()); + taskParents.add(change.getParent()); } if (taskParents.contains(change.getContainer())) { continue; -- cgit v1.2.3-59-g8ed1b