Fix the activity windowingmode error of exiting pip

The top activity will keep fullscreen mode, even if it is reparented
to multi-window parent, so we reset the activity windowing mode to
match parent here.

Bug: 317645068
Test: Manual test

Change-Id: I96b7f821ad55565c4c4f1d786522988e0c703ec4
Signed-off-by: buwenjing <buwenjing@xiaomi.com>
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 3ef0048..4a21b5f 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -4712,6 +4712,9 @@
                     mTransitionController.collect(topActivity);
 
                     final Task lastParentBeforePip = topActivity.getLastParentBeforePip();
+                    // Reset the activity windowing mode to match the parent.
+                    topActivity.getRequestedOverrideConfiguration()
+                            .windowConfiguration.setWindowingMode(WINDOWING_MODE_UNDEFINED);
                     topActivity.reparent(lastParentBeforePip,
                             lastParentBeforePip.getChildCount() /* top */,
                             "movePinnedActivityToOriginalTask");