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
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 168f6d7..3be97c4 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 @@
                 // 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;