From 440f06834cce7632056f721cc34419515336993b Mon Sep 17 00:00:00 2001 From: Ming-Shin Lu Date: Mon, 13 Dec 2021 16:27:19 +0800 Subject: [PATCH] Re-compute IME target after the transition finished With enabling the shell transition, launcher will setTransientLaunch as true when starting the recents animation for launcher to make it is not IME target during transitioning. but shell didn't re-compute IME target again after the transition finish, so when swiping to all apps won't see the IME is visible with enabling the device search feature. Simply adding the correct check in RootWindowContainer#checkAppTransitionReady to invoke handleAnimatingStoppedAndTransition with re-compute IME target when finishing shell-transition playing. In case missing the IME target update when the window has no longer in this transient state. Fix: 210390668 Test: manual as steps: 0) Enabling the shell transition. 1) launching an app with focusing the editor to show IME. 2) swiping out to the home screen. 3) swiping up to enter the all apps, tapping the editor and expecting the IME is visible Change-Id: I0569d728888e81160ecb96303f26f033875ee4d5 --- .../java/com/android/server/wm/RootWindowContainer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java index c7b13eb96dfa7..dcb28d25ee5d2 100644 --- a/services/core/java/com/android/server/wm/RootWindowContainer.java +++ b/services/core/java/com/android/server/wm/RootWindowContainer.java @@ -1037,7 +1037,13 @@ class RootWindowContainer extends WindowContainer } } - if (curDisplay.mAppTransition.isRunning() && !curDisplay.isAppTransitioning()) { + final boolean curDisplayInTransitNotAnimate = + // legacy transition + (curDisplay.mAppTransition.isRunning() && !curDisplay.isAppTransitioning()) + // shell transition + || (curDisplay.mTransitionController.isShellTransitionsEnabled() + && !curDisplay.mTransitionController.isPlaying()); + if (curDisplayInTransitNotAnimate) { // We have finished the animation of an app transition. To do this, we have // delayed a lot of operations like showing and hiding apps, moving apps in // Z-order, etc.