Fix IME flickering when playing Keyguard launching remote animation
When starting the remote animation, before RemoteAnimationController#goodToGo, WM will traverse all windows to perform mApplySurfaceChangesTransaction to prepare showing the window surface if needed. Howerver, in issue case, IME surface accidientally being in traverse window list and shown on the screen even Gpay didn't request show IME. As IME window now is being in ImeContainer, to apply IME surface change transaction, in WindowState#forAllWindows -> applyInOrderWithImeWindows -> applyImeWindowsIfNeeded that has logic to apply for IME window when the traversing window is non-split-screen IME layering target. However, this logic didn't cover the case if the last IME input target that interact with IME is not drawn. For issue case, the last IME input target is the Message app and invisible because it has obscured by lockscreen. So during launching the Gpay activity, even Gpay activity is layering target, since the last IME input target is not visible, in that case we should not apply IME surface preperation. As the result, the fix will be: - Add a check in WindowState#applyImeWindowsIfNeeded to ignore applying callback for IME window if the IME input target is not drawn. Fix: 201987724 Test: atest RemoteAnimationControllerTests#\ testLaunchRemoteAnimationWithoutImeBehind Test: manual steps as below: 0-1) Set secure unlock method (e.g. pattern) 0-2) Install "Google Pay" app 0-3) Add a payment method instruction 1) Start Message app 2) Click search window and wait IME window appears 3) Hit power button to lock the device 4) Tap screen to show Lockscreen 5) Tap GPay icon 6) See animation and expect there is no IME flickering behind Change-Id: I57357ba85501397fa5926ab4dee116c42df24506
Loading
Please register or sign in to comment