From 2d0aca48c049f7c3069ba64475ad25255f70fbbc Mon Sep 17 00:00:00 2001 From: Tarandeep Singh Date: Thu, 28 Mar 2019 14:08:58 -0700 Subject: [PATCH] Keep IME target till window is closing and not removed Issue: When current IME target window has IME open and user navigates to next window, IME target is set to next window (unless it's isActivityTypeHome). This causes IME to be reparented to the next window. This next window may not have an editor and IME will be dismissed. This causes flicker: IME animating out as next window is animating-in. The fix: If we hold on to IME target till last IME target is closing and not removed, the flicker can be prevented. The restriction for isActivityTypeHome() was originally added for bug 78214125 which made sense prior to reparenting. Fix: 129270541 Test: 1. Manually tested steps in bug and flickering was not observed. 2. Verified with next window having IME up (stateAlwaysVisible). No noticeable change. 3. also ran go/wm-smoke-auto Change-Id: I016c1e4549cf03c09cf1a30a91bd55fdb2587075 --- services/core/java/com/android/server/wm/DisplayContent.java | 10 ++++------ 1 file changed, 4 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 0c34e253a394..85dd8b312592 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -3219,13 +3219,11 @@ class DisplayContent extends WindowContainer