Update input windows when moving display to top

If per-display focus is not enabled, moving display to top may cause
the focus change. We need to update input windows to keep input
dispatcher up-to-date.

Change-Id: I7934dd76395f249c3b4c1d30f15d15436a1cebf0
Fix: 121303595
Fix: 121343696
Test: atest ActivityManagerDisplayLockedKeyguardTests
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index dcade2f0..4e70bbc 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -198,7 +198,8 @@
 
     @Override
     void onChildPositionChanged() {
-        mWmService.updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL, false /* updateInputWindows */);
+        mWmService.updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL,
+                !mWmService.mPerDisplayFocusEnabled /* updateInputWindows */);
     }
 
     DisplayContent getDisplayContent(int displayId) {