DisplayArea: Fix computation of ImeContainers parent surface

When not attached to an activity, the IME container must be attached
where the DisplayAreaPolicy placed it, not in WindowContainers.

Fixes: 150943539
Test: atest DisplayContentTests
Change-Id: Ia205f4ce53cfa063651a0010258f14fc1a22f5ef
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
index 38b3d76..685c3bc 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
@@ -826,7 +826,7 @@
             dc.mInputMethodTarget = createWindow(null, TYPE_STATUS_BAR, "app");
             dc.mInputMethodTarget.setWindowingMode(
                     WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY);
-            assertEquals(dc.getWindowingLayer(), dc.computeImeParent());
+            assertEquals(dc.getImeContainer().getParentSurfaceControl(), dc.computeImeParent());
         }
     }
 
@@ -836,7 +836,8 @@
         doReturn(false).when(mAppWindow.mActivityRecord).matchParentBounds();
         mDisplayContent.mInputMethodTarget = mAppWindow;
         // The surface parent of IME should be the display instead of app window.
-        assertEquals(mDisplayContent.getWindowingLayer(), mDisplayContent.computeImeParent());
+        assertEquals(mDisplayContent.getImeContainer().getParentSurfaceControl(),
+                mDisplayContent.computeImeParent());
     }
 
     @Test
@@ -845,7 +846,7 @@
                      new InsetsModeSession(ViewRootImpl.NEW_INSETS_MODE_IME)) {
             final DisplayContent dc = createNewDisplay();
             dc.mInputMethodTarget = createWindow(null, TYPE_STATUS_BAR, "statusBar");
-            assertEquals(dc.getWindowingLayer(), dc.computeImeParent());
+            assertEquals(dc.getImeContainer().getParentSurfaceControl(), dc.computeImeParent());
         }
     }