From 1cafdf8b989b965e201db5839a658768173145ff Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Wed, 22 Nov 2017 13:56:43 -0800 Subject: [PATCH] Fix removal of IME target. In the case that the IME target is removed while it is still the IME target we will trigger a layer assignment before updating WindowManagerService#mInputMethodTarget. In general in the new hierarchy model we assume that containers always have SurfaceControl's but this is only true while they are attached to the hierarchy. Since the IME target may stick around otherwise until it's cleared we need to check if it has a surface before using it in this way. Bug: 69669036 Test: go/wm-smoke Change-Id: I296549aba45368ee5e88f6e1224024e6105207dd --- .../com/android/server/wm/DisplayContent.java | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 17312b217c086..c6256334ffa41 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -3865,12 +3865,25 @@ class DisplayContent extends WindowContainer