Only allow roots tasks to be organized

Non-root tasks are relative to their parents so no need to have them
return true to the isOrganized() method.
We can also:
- Reset the windowing mode for a task we are moving to split screen
before we reparent to the split task.
- Remove code in sys-ui that was added to compensate for the
method previous returning true.

Bug: 152619437
Test: They pass
Change-Id: I7a0381f535f2d0b245773ecb1fbb4fdb524954f9
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index 682e991..7803c73 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -2802,6 +2802,9 @@
                     false /* includingParents */);
         }
         WindowContainerTransaction wct = new WindowContainerTransaction();
+        // Clear out current windowing mode before reparenting to split taks.
+        wct.setWindowingMode(
+                task.getStack().mRemoteToken.toWindowContainerToken(), WINDOWING_MODE_UNDEFINED);
         wct.reparent(task.getStack().mRemoteToken.toWindowContainerToken(),
                 primarySplitTask.mRemoteToken.toWindowContainerToken(), toTop);
         mWindowOrganizerController.applyTransaction(wct);