From e1b67cdbf122ab178b0d74efee54be0b93ae2cdb Mon Sep 17 00:00:00 2001 From: Tiger Huang Date: Sat, 30 May 2020 02:17:26 +0800 Subject: [PATCH] Don't notify dead client about losing control The client cannot handle it, and the server can save time on preparing the arguments. Fix: 157694251 Test: Kill the process which has the focused window and see if there is the warning log. Change-Id: I3422eca565f29b8e293ba6628dac74f0a1ef67b9 --- services/core/java/com/android/server/wm/WindowState.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 4f1893eb6c13c..af44c392774a2 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -3571,6 +3571,9 @@ class WindowState extends WindowContainer implements WindowManagerP @Override public void notifyInsetsControlChanged() { ProtoLog.d(WM_DEBUG_IME, "notifyInsetsControlChanged for %s ", this); + if (mAppDied || mRemoved) { + return; + } final InsetsStateController stateController = getDisplayContent().getInsetsStateController(); try {