diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 07ac73b057067..bba50a75a3b93 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -2568,6 +2568,7 @@ class WindowState extends WindowContainer implements WindowManagerP private void setupWindowForRemoveOnExit() { mRemoveOnExit = true; setDisplayLayoutNeeded(); + getDisplayContent().getDisplayPolicy().removeWindowLw(this); // Request a focus update as this window's input channel is already gone. Otherwise // we could have no focused window in input manager. final boolean focusChanged = mWmService.updateFocusedWindowLocked(