Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 688353b0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix flicker when hiding the IME in horizontal split screen" into main

parents cc8d7445 9a7d8912
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -643,7 +643,9 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
                        t.setPosition(animatingLeash, x, endY);
                        t.setAlpha(animatingLeash, 1.f);
                    }
                    if (!android.view.inputmethod.Flags.refactorInsetsController()) {
                        dispatchEndPositioning(mDisplayId, mCancelled, t);
                    }
                    if (mAnimationDirection == DIRECTION_HIDE && !mCancelled) {
                        ImeTracker.forLogging().onProgress(mStatsToken,
                                ImeTracker.PHASE_WM_ANIMATION_RUNNING);
@@ -659,6 +661,14 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
                        ImeTracker.forLogging().onCancelled(mStatsToken,
                                ImeTracker.PHASE_WM_ANIMATION_RUNNING);
                    }
                    if (android.view.inputmethod.Flags.refactorInsetsController()) {
                        // In split screen, we also set {@link
                        // WindowContainer#mExcludeInsetsTypes} but this should only happen after
                        // the IME client visibility was set. Otherwise the insets will we
                        // dispatched too early, and we get a flicker. Thus, only dispatching it
                        // after reporting that the IME is hidden to system server.
                        dispatchEndPositioning(mDisplayId, mCancelled, t);
                    }
                    if (DEBUG_IME_VISIBILITY) {
                        EventLog.writeEvent(IMF_IME_REMOTE_ANIM_END,
                                mStatsToken != null ? mStatsToken.getTag() : ImeTracker.TOKEN_NONE,