4/n Add fallback to default task display area
... for the cases when a particular task display area target is not
specified, and/or the logic applies only to the default/fallback
task area on the display.
Bug: 152116619
Test: WM CTS and unit tests
Change-Id: I209629baada05b0615ea2874f39a2b30a95b7565
diff --git a/services/core/java/com/android/server/wm/WindowOrganizerController.java b/services/core/java/com/android/server/wm/WindowOrganizerController.java
index a332b69..3e2e9be 100644
--- a/services/core/java/com/android/server/wm/WindowOrganizerController.java
+++ b/services/core/java/com/android/server/wm/WindowOrganizerController.java
@@ -234,7 +234,7 @@
if (task.getParent() != newParent) {
if (newParent == null) {
// Re-parent task to display as a root task.
- dc.moveStackToDisplay(as, hop.getToTop());
+ as.reparent(dc.getDefaultTaskDisplayArea(), hop.getToTop());
} else if (newParent.inMultiWindowMode() && !task.isResizeable()
&& task.isLeafTask()) {
Slog.w(TAG, "Can't support task that doesn't support multi-window mode in"