Fix WM input limitations on secondary displays (1/N)
- One DisplayContent include one InputMonitor.
- For customized inputconsumers, they can be handled by DisplayContent.
- Extract InputManagerCallback to communicated InputManagerService.
- All windows need pass displayId to InputWindowHandle.
Bug: 111363643
Test: atest WindowManagerSmokeTest
Test: atest DisplayContentTests
Change-Id: Iaaca7d135a11c55a78bcf1f81918599b3d160106
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index d9ddf9f..4b8b6074 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -449,13 +449,13 @@
+ ": hidden=" + isHidden() + " hiddenRequested=" + hiddenRequested);
if (changed) {
- mService.mInputMonitor.setUpdateInputWindowsNeededLw();
+ getDisplayContent().getInputMonitor().setUpdateInputWindowsNeededLw();
if (performLayout) {
mService.updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES,
false /*updateInputWindows*/);
mService.mWindowPlacerLocked.performSurfacePlacement();
}
- mService.mInputMonitor.updateInputWindowsLw(false /*force*/);
+ getDisplayContent().getInputMonitor().updateInputWindowsLw(false /*force*/);
}
}
@@ -677,7 +677,7 @@
if (DEBUG_FOCUS_LIGHT) Slog.v(TAG_WM, "Removing focused app token:" + this);
mService.mFocusedApp = null;
mService.updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL, true /*updateInputWindows*/);
- mService.mInputMonitor.setFocusedAppLw(null);
+ getDisplayContent().getInputMonitor().setFocusedAppLw(null);
}
if (!delayed) {