Switched WindowState to use WindowContainer for managing children

Bug: 30060889
Change-Id: Ia451b623123210514e79f830f92f6459169911b6
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index 05ce7ae..1000043 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -362,7 +362,7 @@
 
             win.destroyOrSaveSurface();
             if (win.mRemoveOnExit) {
-                win.removeLocked();
+                win.remove();
             }
             final DisplayContent displayContent = win.getDisplayContent();
             if (displayContent != null && !displayList.contains(displayContent)) {
@@ -680,10 +680,10 @@
                 candidate.mReplacingWindow.mSkipEnterAnimationForSeamlessReplacement = false;
             }
             // Since the window already timed out, remove it immediately now.
-            // Use WindowState#removeLocked() instead of removeWindowLocked(), as the latter
+            // Use WindowState#remove() instead of removeWindowLocked(), as the latter
             // delays removal on certain conditions, which will leave the stale window in the
             // stack and marked mWillReplaceWindow=false, so the window will never be removed.
-            candidate.removeLocked();
+            candidate.remove();
         }
     }